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

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

 



On Fri, May 04, 2018 at 09:55:30AM -0500, Christopher Lameter wrote:
> On Thu, 3 May 2018, Matthew Wilcox wrote:
> 
> > OK.  Do you want the conversion of slub to using slub_freelist and slub_list
> > as part of this patch series as well, then?
> 
> Not sure if that is needed. Dont like allocator specific names.

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

                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