mm: remove pointless struct in struct page definition

This patchset implements per kmemcg accounting of page tables
(x86-only), pipe buffers, and unix socket buffers.

Patches 1-3 are just cleanups that are not supposed to introduce any
functional changes.  Patches 4 and 5 move charge/uncharge to generic
page allocator paths for the sake of accounting pipe and unix socket
buffers.  Patches 5-7 make x86 page tables, pipe buffers, and unix
socket buffers accountable.

This patch (of 8):

... to reduce indentation level thus leaving more space for comments.

Link: http://lkml.kernel.org/r/f34ffe70fce2b0b9220856437f77972d67c14275.1464079537.git.vdavydov@virtuozzo.com
Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Vladimir Davydov 2016-07-26 15:24:16 -07:00 committed by Linus Torvalds
parent e77b0852b5
commit 99691addb4
1 changed files with 32 additions and 36 deletions

View File

@ -60,7 +60,6 @@ struct page {
}; };
/* Second double word */ /* Second double word */
struct {
union { union {
pgoff_t index; /* Our offset within mapping. */ pgoff_t index; /* Our offset within mapping. */
void *freelist; /* sl[aou]b first free object */ void *freelist; /* sl[aou]b first free object */
@ -74,23 +73,22 @@ struct page {
unsigned long counters; unsigned long counters;
#else #else
/* /*
* Keep _refcount separate from slub cmpxchg_double * Keep _refcount separate from slub cmpxchg_double data.
* data. As the rest of the double word is protected by * As the rest of the double word is protected by slab_lock
* slab_lock but _refcount is not. * but _refcount is not.
*/ */
unsigned counters; unsigned counters;
#endif #endif
struct { struct {
union { union {
/* /*
* Count of ptes mapped in mms, to show * Count of ptes mapped in mms, to show when
* when page is mapped & limit reverse * page is mapped & limit reverse map searches.
* map searches.
*/ */
atomic_t _mapcount; atomic_t _mapcount;
unsigned int active; /* SLAB */
struct { /* SLUB */ struct { /* SLUB */
unsigned inuse:16; unsigned inuse:16;
unsigned objects:15; unsigned objects:15;
@ -99,13 +97,11 @@ struct page {
int units; /* SLOB */ int units; /* SLOB */
}; };
/* /*
* Usage count, *USE WRAPPER FUNCTION* * Usage count, *USE WRAPPER FUNCTION* when manual
* when manual accounting. See page_ref.h * accounting. See page_ref.h
*/ */
atomic_t _refcount; atomic_t _refcount;
}; };
unsigned int active; /* SLAB */
};
}; };
/* /*