From: Keller, Jacob E
> Sent: 14 August 2017 23:11
> > From: David Miller [mailto:da...@davemloft.net]
> > Sent: Saturday, August 12, 2017 1:04 PM
> > From: Jeff Kirsher <jeffrey.t.kirs...@intel.com>
> > Date: Sat, 12 Aug 2017 04:08:41 -0700
> >
> > > Also ensure that the flags variable is actually a u64 to guarantee
> > > 64bits of space on all architectures.
> >
> > Why?  You don't need 64-bits, you only need 27.
> >
> > This will be unnecessarily expensive on 32-bit platforms.
> >
> > Please don't do this.
> 
> I suppose a better method would be to switch to using a declare_bitmap 
> instead, so that it
> automatically sizes based on the number of flags we have. The reason we chose 
> 64bits is because we
> will add flags in the future, as we originally had more than 32 flags prior 
> to this patch until we
> moved some into a separate field.
> 
> But now that I think about it, using DECLARE_BITMAP makes more sense, though 
> it's a bit more invasive
> of the code.

And horribly stupid unless you really need dynamic indexes.

        David

Reply via email to