Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1559018

Re: [PATCH 3/9] slab: simplify shutdown_memcg_caches()

From Tejun Heo <tj@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/9] slab: simplify shutdown_memcg_caches()
Date 2017-01-14 16:40 +0100
Message-ID <sZyAW-7Cq-17@gated-at.bofh.it> (permalink)
References <sZpxE-2ag-3@gated-at.bofh.it> <sZpxF-2ag-23@gated-at.bofh.it> <sZwz8-6t0-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, Jan 14, 2017 at 04:27:22PM +0300, Vladimir Davydov wrote:
> > -	 * Second, shutdown all caches left from memory cgroups that are now
> > -	 * offline.
> > +	 * Shutdown all caches.
> >  	 */
> >  	list_for_each_entry_safe(c, c2, &s->memcg_params.list,
> >  				 memcg_params.list)
> >  		shutdown_cache(c);
> 
> The point of this complexity was to leave caches that happen to have
> objects when kmem_cache_destroy() is called on the list, so that they
> could be reused later. This behavior was inherited from the global

Ah, right, I misread the branch.  I don't quite get how the cache can
be reused later tho?  This is called when the memcg gets released and
a clear error condition - the caller, kmem_cache_destroy(), handles it
as an error condition too.

> caches - if kmem_cache_destroy() is called on a cache that still has
> object, we print a warning message and don't destroy the cache. This
> patch changes this behavior.

Hmm... yeah, we're missing the error return propagation.  I think
that's the only meaningful difference tho, right?  Will update the
patch.

Thanks!

-- 
tejun

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCHSET] slab: make memcg slab destruction scalable Tejun Heo <tj@kernel.org> - 2017-01-14 07:00 +0100
  [PATCH 1/9] Revert "slub: move synchronize_sched out of slab_mutex on shrink" Tejun Heo <tj@kernel.org> - 2017-01-14 07:00 +0100
  [PATCH 3/9] slab: simplify shutdown_memcg_caches() Tejun Heo <tj@kernel.org> - 2017-01-14 07:00 +0100
    Re: [PATCH 3/9] slab: simplify shutdown_memcg_caches() Vladimir Davydov <vdavydov@tarantool.org> - 2017-01-14 14:30 +0100
      Re: [PATCH 3/9] slab: simplify shutdown_memcg_caches() Tejun Heo <tj@kernel.org> - 2017-01-14 16:40 +0100
        Re: [PATCH 3/9] slab: simplify shutdown_memcg_caches() Tejun Heo <tj@kernel.org> - 2017-01-14 17:00 +0100
  [PATCH 7/9] slab: introduce __kmemcg_cache_deactivate() Tejun Heo <tj@kernel.org> - 2017-01-14 07:00 +0100
    Re: [PATCH 7/9] slab: introduce __kmemcg_cache_deactivate() Vladimir Davydov <vdavydov@tarantool.org> - 2017-01-14 14:50 +0100
      Re: [PATCH 7/9] slab: introduce __kmemcg_cache_deactivate() Tejun Heo <tj@kernel.org> - 2017-01-14 16:40 +0100

csiph-web