lkml.org 
[lkml]   [2016]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH RESEND 1/8] mm: remove pointless struct in struct page definition
    Date
    ... to reduce indentation level thus leaving more space for comments.

    Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com>
    ---
    include/linux/mm_types.h | 68 +++++++++++++++++++++++-------------------------
    1 file changed, 32 insertions(+), 36 deletions(-)

    diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
    index d553855503e6..3cc5977a9cab 100644
    --- a/include/linux/mm_types.h
    +++ b/include/linux/mm_types.h
    @@ -60,51 +60,47 @@ struct page {
    };

    /* Second double word */
    - struct {
    - union {
    - pgoff_t index; /* Our offset within mapping. */
    - void *freelist; /* sl[aou]b first free object */
    - /* page_deferred_list().prev -- second tail page */
    - };
    + union {
    + pgoff_t index; /* Our offset within mapping. */
    + void *freelist; /* sl[aou]b first free object */
    + /* page_deferred_list().prev -- second tail page */
    + };

    - union {
    + union {
    #if defined(CONFIG_HAVE_CMPXCHG_DOUBLE) && \
    defined(CONFIG_HAVE_ALIGNED_STRUCT_PAGE)
    - /* Used for cmpxchg_double in slub */
    - unsigned long counters;
    + /* Used for cmpxchg_double in slub */
    + unsigned long counters;
    #else
    - /*
    - * Keep _refcount separate from slub cmpxchg_double
    - * data. As the rest of the double word is protected by
    - * slab_lock but _refcount is not.
    - */
    - unsigned counters;
    + /*
    + * Keep _refcount separate from slub cmpxchg_double data.
    + * As the rest of the double word is protected by slab_lock
    + * but _refcount is not.
    + */
    + unsigned counters;
    #endif
    + struct {

    - struct {
    -
    - union {
    - /*
    - * Count of ptes mapped in mms, to show
    - * when page is mapped & limit reverse
    - * map searches.
    - */
    - atomic_t _mapcount;
    -
    - struct { /* SLUB */
    - unsigned inuse:16;
    - unsigned objects:15;
    - unsigned frozen:1;
    - };
    - int units; /* SLOB */
    - };
    + union {
    /*
    - * Usage count, *USE WRAPPER FUNCTION*
    - * when manual accounting. See page_ref.h
    + * Count of ptes mapped in mms, to show when
    + * page is mapped & limit reverse map searches.
    */
    - atomic_t _refcount;
    + atomic_t _mapcount;
    +
    + unsigned int active; /* SLAB */
    + struct { /* SLUB */
    + unsigned inuse:16;
    + unsigned objects:15;
    + unsigned frozen:1;
    + };
    + int units; /* SLOB */
    };
    - unsigned int active; /* SLAB */
    + /*
    + * Usage count, *USE WRAPPER FUNCTION* when manual
    + * accounting. See page_ref.h
    + */
    + atomic_t _refcount;
    };
    };

    --
    2.1.4
    \
     
     \ /
      Last update: 2016-05-24 11:41    [W:3.199 / U:0.496 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site