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

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

 



On Fri, 4 May 2018, Matthew Wilcox wrote:

> So you'd rather have one union that's used for slab/slob/slub?  Like this?

Yup that looks better.
>
>                 struct {        /* slab, slob and slub */
>                         union {
>                                 struct list_head slab_list;
>                                 struct {        /* Partial pages */
>                                         struct page *next;
> #ifdef CONFIG_64BIT
>                                         int pages;      /* Nr of pages left */
>                                         int pobjects;   /* Approximate count */
> #else
>                                         short int pages;
>                                         short int pobjects;
> #endif
>                                 };
>                         };
>                         struct kmem_cache *slab_cache;
>                         /* Double-word boundary */
>                         void *freelist;         /* first free object */
>                         union {
>                                 void *s_mem;    /* first object (slab only) */
>                                 unsigned long counters; /* slub */
>                                 struct {
>                                         unsigned inuse:16;
>                                         unsigned objects:15;
>                                         unsigned frozen:1;
>                                 };
>                         };
>                 };
>




[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