All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov@parallels.com>
To: Christoph Lameter <cl@linux.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@suse.cz>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm v2 1/3] slub: never fail to shrink cache
Date: Thu, 29 Jan 2015 19:17:39 +0300	[thread overview]
Message-ID: <20150129161739.GE11463@esperanza> (raw)
In-Reply-To: <alpine.DEB.2.11.1501290954230.7725@gentwo.org>

On Thu, Jan 29, 2015 at 09:55:56AM -0600, Christoph Lameter wrote:
> On Thu, 29 Jan 2015, Vladimir Davydov wrote:
> 
> > Come to think of it, do we really need to optimize slab placement in
> > kmem_cache_shrink? None of its users except shrink_store expects it -
> > they just want to purge the cache before destruction, that's it. May be,
> > we'd better move slab placement optimization to a separate SLUB's
> > private function that would be called only by shrink_store, where we can
> > put up with kmalloc failures? Christoph, what do you think?
> 
> The slabinfo tool invokes kmem_cache_shrink to optimize placement.
> 
> Run
> 
> 	slabinfo -s
> 
> which can then be used to reduce the fragmentation.

Yeah, but the tool just writes 1 to /sys/kernel/slab/cache/shrink, i.e.
invokes shrink_store(), and I don't propose to remove slab placement
optimization from there. What I propose is to move slab placement
optimization from kmem_cache_shrink() to shrink_store(), because other
users of kmem_cache_shrink() don't seem to need it at all - they just
want to release empty slabs. Such a change wouldn't affect the behavior
of `slabinfo -s` at all.

Thanks,
Vladimir

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Vladimir Davydov <vdavydov@parallels.com>
To: Christoph Lameter <cl@linux.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@suse.cz>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -mm v2 1/3] slub: never fail to shrink cache
Date: Thu, 29 Jan 2015 19:17:39 +0300	[thread overview]
Message-ID: <20150129161739.GE11463@esperanza> (raw)
In-Reply-To: <alpine.DEB.2.11.1501290954230.7725@gentwo.org>

On Thu, Jan 29, 2015 at 09:55:56AM -0600, Christoph Lameter wrote:
> On Thu, 29 Jan 2015, Vladimir Davydov wrote:
> 
> > Come to think of it, do we really need to optimize slab placement in
> > kmem_cache_shrink? None of its users except shrink_store expects it -
> > they just want to purge the cache before destruction, that's it. May be,
> > we'd better move slab placement optimization to a separate SLUB's
> > private function that would be called only by shrink_store, where we can
> > put up with kmalloc failures? Christoph, what do you think?
> 
> The slabinfo tool invokes kmem_cache_shrink to optimize placement.
> 
> Run
> 
> 	slabinfo -s
> 
> which can then be used to reduce the fragmentation.

Yeah, but the tool just writes 1 to /sys/kernel/slab/cache/shrink, i.e.
invokes shrink_store(), and I don't propose to remove slab placement
optimization from there. What I propose is to move slab placement
optimization from kmem_cache_shrink() to shrink_store(), because other
users of kmem_cache_shrink() don't seem to need it at all - they just
want to release empty slabs. Such a change wouldn't affect the behavior
of `slabinfo -s` at all.

Thanks,
Vladimir

  reply	other threads:[~2015-01-29 16:17 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-28 16:22 [PATCH -mm v2 0/3] slub: make dead caches discard free slabs immediately Vladimir Davydov
2015-01-28 16:22 ` Vladimir Davydov
2015-01-28 16:22 ` [PATCH -mm v2 1/3] slub: never fail to shrink cache Vladimir Davydov
2015-01-28 16:22   ` Vladimir Davydov
2015-01-28 16:31   ` Christoph Lameter
2015-01-28 16:31     ` Christoph Lameter
2015-01-28 18:29     ` Pekka Enberg
2015-01-28 18:29       ` Pekka Enberg
2015-01-28 16:37   ` Christoph Lameter
2015-01-28 16:37     ` Christoph Lameter
2015-01-28 17:32     ` Vladimir Davydov
2015-01-28 17:32       ` Vladimir Davydov
2015-01-28 19:20       ` Christoph Lameter
2015-01-28 19:20         ` Christoph Lameter
2015-01-28 21:57   ` Andrew Morton
2015-01-28 21:57     ` Andrew Morton
2015-01-28 22:56     ` Christoph Lameter
2015-01-28 22:56       ` Christoph Lameter
2015-01-29  8:07     ` Vladimir Davydov
2015-01-29  8:07       ` Vladimir Davydov
2015-01-29 15:55       ` Christoph Lameter
2015-01-29 15:55         ` Christoph Lameter
2015-01-29 16:17         ` Vladimir Davydov [this message]
2015-01-29 16:17           ` Vladimir Davydov
2015-01-29 16:22           ` Christoph Lameter
2015-01-29 16:22             ` Christoph Lameter
2015-01-29 18:21             ` Vladimir Davydov
2015-01-29 18:21               ` Vladimir Davydov
2015-01-29 19:10               ` Christoph Lameter
2015-01-29 19:10                 ` Christoph Lameter
2015-01-29  8:32     ` Balbir Singh
2015-01-29  8:32       ` Balbir Singh
2015-02-15  3:55   ` Sasha Levin
2015-02-15  3:55     ` Sasha Levin
2015-02-15  9:47     ` Vladimir Davydov
2015-02-15  9:47       ` Vladimir Davydov
2015-01-28 16:22 ` [PATCH -mm v2 2/3] slub: fix kmem_cache_shrink return value Vladimir Davydov
2015-01-28 16:22   ` Vladimir Davydov
2015-01-28 16:33   ` Christoph Lameter
2015-01-28 16:33     ` Christoph Lameter
2015-01-28 17:46     ` Vladimir Davydov
2015-01-28 17:46       ` Vladimir Davydov
2015-01-28 19:19       ` Christoph Lameter
2015-01-28 19:19         ` Christoph Lameter
2015-01-28 16:22 ` [PATCH -mm v2 3/3] slub: make dead caches discard free slabs immediately Vladimir Davydov
2015-01-28 16:22   ` Vladimir Davydov
2016-04-01  9:04   ` Peter Zijlstra
2016-04-01  9:04     ` Peter Zijlstra
2016-04-01 10:55     ` Vladimir Davydov
2016-04-01 10:55       ` Vladimir Davydov
2016-04-01 11:41       ` Peter Zijlstra
2016-04-01 11:41         ` Peter Zijlstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150129161739.GE11463@esperanza \
    --to=vdavydov@parallels.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=hannes@cmpxchg.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.