Re: [PATCH 23/25] slub: make struct kmem_cache_order_objects::x unsigned int

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 6 Mar 2018 12:51:47 -0600 (CST) Christopher Lameter <cl@xxxxxxxxx> wrote:

> On Mon, 5 Mar 2018, Alexey Dobriyan wrote:
> 
> > struct kmem_cache_order_objects is for mixing order and number of objects,
> > and orders aren't bit enough to warrant 64-bit width.
> >
> > Propagate unsignedness down so that everything fits.
> >
> > !!! Patch assumes that "PAGE_SIZE << order" doesn't overflow. !!!
> 
> PAGE_SIZE could be a couple of megs on some platforms (256 or so on
> Itanium/PowerPC???) . So what are the worst case scenarios here?
> 
> I think both order and # object should fit in a 32 bit number.
> 
> A page with 256M size and 4 byte objects would have 64M objects.

Another dangling review comment.  Alexey, please respond?




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux