lkml.org 
[lkml]   [2019]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/32] locking/lockdep: Introduce struct lock_usage
On Tue, Feb 12, 2019 at 09:38:42AM -0800, Linus Torvalds wrote:
> On Tue, Feb 12, 2019 at 9:14 AM Frederic Weisbecker <frederic@kernel.org> wrote:
> >
> > +static u64 lock_usage_mask(struct lock_usage *usage)
> > +{
> > + return BIT(usage->bit);
> > +}
>
> More insane "u64" - and it's *incorrect* too.
>
> #define BIT(nr) (1UL << (nr))
>
> fundamentally means that "BIT()" can only work on up to "unsigned long".
>
> So this odd use of u64 seems to be a disease. It only uses more memory
> (and more CPU) for no obvious reason.
>
> u64 is not some "default type". It's expensive and shouldn't be used
> unless you have a *reason* for it.

Right, I'll simply move "[PATCH 03/32] locking/lockdep: Convert usage_mask to u64"
at the first position and follow up on that to justify its use.

Thanks.

\
 
 \ /
  Last update: 2019-02-13 15:58    [W:0.059 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site