Re: [PATCH v4 07/16] slub: Remove page->counters

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

 



On Thu, May 03, 2018 at 01:17:02AM +0300, Kirill A. Shutemov wrote:
> On Wed, May 02, 2018 at 05:26:39PM +0000, Matthew Wilcox wrote:
> > Option 2:
> > +                       union {
> > +                               unsigned long counters;
> > +                               struct {
> > +                                       unsigned inuse:16;
> > +                                       unsigned objects:15;
> > +                                       unsigned frozen:1;
> > +                               };
> > +                       };
> > 
> > Pro: Expresses exactly what we do.
> > Con: Back to five levels of indentation in struct page
> 
> The indentation issue can be fixed (to some extend) by declaring the union
> outside struct page and just use it inside.
> 
> I don't advocate for the approach, just listing the option.

Actually, you can't have an anonymous tagged union without -fms-extensions
(which got zero comments when I proposed it to lkml) or -fplan9-extensions
(which would require gcc 4.6)




[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