linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/7] kmalloc-reclaimable caches
@ 2018-06-18  9:18 Vlastimil Babka
  2018-06-18  9:18 ` [PATCH v2 1/7] mm, slab: combine kmalloc_caches and kmalloc_dma_caches Vlastimil Babka
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Vlastimil Babka @ 2018-06-18  9:18 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, linux-kernel, Roman Gushchin, Michal Hocko,
	Johannes Weiner, linux-api, Christoph Lameter, David Rientjes,
	Mel Gorman, Matthew Wilcox, Vlastimil Babka, Laura Abbott,
	Sumit Semwal, Vijayanand Jitta

v2 changes:
- shorten cache names to kmalloc-rcl-<SIZE>
- last patch shortens <SIZE> for all kmalloc caches to e.g. "1k", "4M"
- include dma caches to the 2D kmalloc_caches[] array to avoid a branch
- vmstat counter nr_indirectly_reclaimable_bytes renamed to
  nr_kernel_misc_reclaimable, doesn't include kmalloc-rcl-*
- /proc/meminfo counter renamed to KReclaimable, includes kmalloc-rcl*
  and nr_kernel_misc_reclaimable

Hi,

as discussed at LSF/MM [1] here's a patchset that introduces
kmalloc-reclaimable caches (more details in the second patch) and uses them for
SLAB freelists and dcache external names. The latter allows us to repurpose the
NR_INDIRECTLY_RECLAIMABLE_BYTES counter later in the series.

This is how /proc/slabinfo looks like after booting in virtme:

...
kmalloc-rcl-4M         0      0 4194304    1 1024 : tunables    1    1    0 : slabdata      0      0      0
...
kmalloc-rcl-96         7     32    128   32    1 : tunables  120   60    8 : slabdata      1      1      0
kmalloc-rcl-64        25    128     64   64    1 : tunables  120   60    8 : slabdata      2      2      0
kmalloc-rcl-32         0      0     32  124    1 : tunables  120   60    8 : slabdata      0      0      0
kmalloc-4M             0      0 4194304    1 1024 : tunables    1    1    0 : slabdata      0      0      0
kmalloc-2M             0      0 2097152    1  512 : tunables    1    1    0 : slabdata      0      0      0
kmalloc-1M             0      0 1048576    1  256 : tunables    1    1    0 : slabdata      0      0      0
...

/proc/vmstat with renamed nr_indirectly_reclaimable_bytes counter:

...
nr_slab_reclaimable 2817
nr_slab_unreclaimable 1781
...
nr_kernel_misc_reclaimable 0
...

/proc/meminfo with new KReclaimable counter:

...
Shmem:               564 kB
KReclaimable:      11260 kB
Slab:              18368 kB
SReclaimable:      11260 kB
SUnreclaim:         7108 kB
KernelStack:        1248 kB
...

Thanks,
Vlastimil

Vlastimil Babka (7):
  mm, slab: combine kmalloc_caches and kmalloc_dma_caches
  mm, slab/slub: introduce kmalloc-reclaimable caches
  mm, slab: allocate off-slab freelists as reclaimable when appropriate
  dcache: allocate external names from reclaimable kmalloc caches
  mm: rename and change semantics of nr_indirectly_reclaimable_bytes
  mm, proc: add KReclaimable to /proc/meminfo
  mm, slab: shorten kmalloc cache names for large sizes

 Documentation/filesystems/proc.txt          |   4 +
 drivers/base/node.c                         |  19 ++--
 drivers/staging/android/ion/ion_page_pool.c |   4 +-
 fs/dcache.c                                 |  38 ++------
 fs/proc/meminfo.c                           |  16 +--
 include/linux/mmzone.h                      |   2 +-
 include/linux/slab.h                        |  49 +++++++---
 mm/page_alloc.c                             |  19 ++--
 mm/slab.c                                   |  11 ++-
 mm/slab_common.c                            | 102 ++++++++++++--------
 mm/slub.c                                   |  13 +--
 mm/util.c                                   |   3 +-
 mm/vmstat.c                                 |   6 +-
 13 files changed, 159 insertions(+), 127 deletions(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2018-07-17 19:11 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-18  9:18 [PATCH v2 0/7] kmalloc-reclaimable caches Vlastimil Babka
2018-06-18  9:18 ` [PATCH v2 1/7] mm, slab: combine kmalloc_caches and kmalloc_dma_caches Vlastimil Babka
2018-06-18  9:18 ` [PATCH v2 2/7] mm, slab/slub: introduce kmalloc-reclaimable caches Vlastimil Babka
2018-06-18  9:18 ` [PATCH v2 3/7] mm, slab: allocate off-slab freelists as reclaimable when appropriate Vlastimil Babka
2018-06-18  9:18 ` [PATCH v2 4/7] dcache: allocate external names from reclaimable kmalloc caches Vlastimil Babka
2018-06-18  9:18 ` [PATCH v2 5/7] mm: rename and change semantics of nr_indirectly_reclaimable_bytes Vlastimil Babka
2018-06-20 11:23   ` kbuild test robot
2018-06-29 15:37     ` Vlastimil Babka
2018-06-29 21:12       ` Roman Gushchin
2018-06-30 10:09         ` Vlastimil Babka
2018-07-02 16:52           ` Roman Gushchin
2018-07-17  8:44             ` Vlastimil Babka
2018-07-17 18:54               ` Roman Gushchin
2018-07-17 19:11                 ` Vlastimil Babka
2018-06-18  9:18 ` [PATCH v2 6/7] mm, proc: add KReclaimable to /proc/meminfo Vlastimil Babka
2018-06-18 21:33   ` Andrew Morton
2018-06-19  7:30     ` Vlastimil Babka
2018-06-19  8:13       ` Minchan Kim
2018-06-19 12:44         ` Vlastimil Babka
2018-06-18  9:18 ` [PATCH v2 7/7] mm, slab: shorten kmalloc cache names for large sizes Vlastimil Babka
2018-06-19  7:54 ` [PATCH v2 0/7] kmalloc-reclaimable caches Vlastimil Babka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).