lkml.org 
[lkml]   [2019]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v7 03/10] mm: generalize postponed non-root kmem_cache deactivation
On Tue, Jun 11, 2019 at 4:18 PM Roman Gushchin <guro@fb.com> wrote:
>
> Currently SLUB uses a work scheduled after an RCU grace period
> to deactivate a non-root kmem_cache. This mechanism can be reused
> for kmem_caches release, but requires generalization for SLAB
> case.
>
> Introduce kmemcg_cache_deactivate() function, which calls
> allocator-specific __kmem_cache_deactivate() and schedules
> execution of __kmem_cache_deactivate_after_rcu() with all
> necessary locks in a worker context after an rcu grace period.
>
> Here is the new calling scheme:
> kmemcg_cache_deactivate()
> __kmemcg_cache_deactivate() SLAB/SLUB-specific
> kmemcg_rcufn() rcu
> kmemcg_workfn() work
> __kmemcg_cache_deactivate_after_rcu() SLAB/SLUB-specific
>
> instead of:
> __kmemcg_cache_deactivate() SLAB/SLUB-specific
> slab_deactivate_memcg_cache_rcu_sched() SLUB-only
> kmemcg_rcufn() rcu
> kmemcg_workfn() work
> kmemcg_cache_deact_after_rcu() SLUB-only
>
> For consistency, all allocator-specific functions start with "__".
>
> Signed-off-by: Roman Gushchin <guro@fb.com>
> Acked-by: Vladimir Davydov <vdavydov.dev@gmail.com>

Reviewed-by: Shakeel Butt <shakeelb@google.com>

\
 
 \ /
  Last update: 2019-06-25 20:18    [W:0.187 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site