Re: [PATCH v3 2/7] mm, slab/slub: introduce kmalloc-reclaimable caches

2018-07-30 Thread Christopher Lameter
On Wed, 18 Jul 2018, Vlastimil Babka wrote: > index 4299c59353a1..d89e934e0d8b 100644 > --- a/include/linux/slab.h > +++ b/include/linux/slab.h > @@ -296,11 +296,12 @@ static inline void __check_heap_object(const void *ptr, > unsigned long n, > (KMALLOC_MIN_SIZE) :

Re: [PATCH v3 2/7] mm, slab/slub: introduce kmalloc-reclaimable caches

2018-07-20 Thread Vlastimil Babka
On 07/19/2018 08:16 PM, Roman Gushchin wrote: >> is_dma = !!(flags & __GFP_DMA); >> #endif >> >> -return is_dma; >> +is_reclaimable = !!(flags & __GFP_RECLAIMABLE); >> + >> +/* >> + * If an allocation is botth __GFP_DMA and __GFP_RECLAIMABLE, return >

Re: [PATCH v3 2/7] mm, slab/slub: introduce kmalloc-reclaimable caches

2018-07-20 Thread Vlastimil Babka
On 07/19/2018 10:23 AM, Mel Gorman wrote: >> /* >> diff --git a/mm/slab_common.c b/mm/slab_common.c >> index 4614248ca381..614fb7ab8312 100644 >> --- a/mm/slab_common.c >> +++ b/mm/slab_common.c >> @@ -1107,10 +1107,21 @@ void __init setup_kmalloc_cache_index_table(void) >> } >> } >> >> -s

Re: [PATCH v3 2/7] mm, slab/slub: introduce kmalloc-reclaimable caches

2018-07-19 Thread Roman Gushchin
On Wed, Jul 18, 2018 at 03:36:15PM +0200, Vlastimil Babka wrote: > Kmem caches can be created with a SLAB_RECLAIM_ACCOUNT flag, which indicates > they contain objects which can be reclaimed under memory pressure (typically > through a shrinker). This makes the slab pages accounted as > NR_SLAB_REC

Re: [PATCH v3 2/7] mm, slab/slub: introduce kmalloc-reclaimable caches

2018-07-19 Thread Mel Gorman
On Wed, Jul 18, 2018 at 03:36:15PM +0200, Vlastimil Babka wrote: > Kmem caches can be created with a SLAB_RECLAIM_ACCOUNT flag, which indicates > they contain objects which can be reclaimed under memory pressure (typically > through a shrinker). This makes the slab pages accounted as > NR_SLAB_REC

[PATCH v3 2/7] mm, slab/slub: introduce kmalloc-reclaimable caches

2018-07-18 Thread Vlastimil Babka
Kmem caches can be created with a SLAB_RECLAIM_ACCOUNT flag, which indicates they contain objects which can be reclaimed under memory pressure (typically through a shrinker). This makes the slab pages accounted as NR_SLAB_RECLAIMABLE in vmstat, which is reflected also the MemAvailable meminfo count