Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp2166224ybi; Sun, 9 Jun 2019 05:25:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxa5Ypr1HAOGpC6sHAedeGQN8fl40R9nKws7ycTS7c/zUZFaXVIaFBcybvQfkOZscluUdMU X-Received: by 2002:a63:1a59:: with SMTP id a25mr3988107pgm.173.1560083158015; Sun, 09 Jun 2019 05:25:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560083158; cv=none; d=google.com; s=arc-20160816; b=hJFjt2C+Hqawnl1aRVL7/sKqQAoyGpoOKs+pg/FvJha3XRSL3HoeLegpmbJF3/r+/S +HTLXq29xS/fn0Ps2aByn9XLeL9bVa/d2EIIjUFPzYWUzMFNAvIf1Kg/zCR3XWqqTDJO jRnksz43CU558AB4r3DjJv+fae/oZP+oH1j0A71zQATOBuJfdWokMY1PEkw1YnQTAaNE 02CBNQLsc+1Q5j0OpR09+VA4GGFPZFzbx2CtWStCrqDVQk3C8uxkUc7Ot9KUBAPBs6IM Hs02VfwPLJOF/OdVbRd+PogVGZdBcY1aKX5Di2vhR3n9cAs/qCe1HVZScktsOiGC7i5q EdXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=iFbsAteAWCOB8EYWVkTmBCNQWQgWWukwnbyxrLkrB0g=; b=BFjbJLVdts9NBnlSLlx4O6vQLm4UdXux0XUlGYGzgVuf4Nl+K5rwh91N1EiLBW8uly 3M6EYrxKjLTlL95aDY9xlyWvGJp9R0cqJUC7FUDb3zX0JQnUOCXAjHWCDN3Fh9SNIlcf dRQCBbAP86c2oSJnFBndo1P7L4mbEUX40NUzo1aEJlnXnWvu6uLB8AP88z7OZe7AsPk4 KbGFOFgG3H8Kf+7otRGF2MLB/7JKR5vVMBvnTUBV63IEb6COM+vL0pQUgYCKkdPr8OXx dTjrkF5TdMjLM6EbVoRvFIylC79HtB37uiHn6Q78MnhvB7tAziS79rRxHzs9URfBfUdj 76mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CR31kyMK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d10si6779923plr.307.2019.06.09.05.25.42; Sun, 09 Jun 2019 05:25:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CR31kyMK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728546AbfFIMXk (ORCPT + 99 others); Sun, 9 Jun 2019 08:23:40 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:36600 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726874AbfFIMXk (ORCPT ); Sun, 9 Jun 2019 08:23:40 -0400 Received: by mail-lj1-f193.google.com with SMTP id i21so5477006ljj.3 for ; Sun, 09 Jun 2019 05:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=iFbsAteAWCOB8EYWVkTmBCNQWQgWWukwnbyxrLkrB0g=; b=CR31kyMKqJssQbVi1JNiJC/mpUqUbB9GeHhEnWXxUYEm/NFvtyAwx+ibkWn73vB8s1 ijmN8IVbIB6z7z2Xw7lOxf+6NAJ94vILodRFkmRNak6nbqnti1w7Vec83AbVODQti+Kg 7iZr/mfEAgiffcNh//LPD7cgzTHZYJwM9cu/zGu5dgHfwIT/9Yo8YMZFtBELx50wYa0F rbPp54YHrqXeg1OAS9y5SI2EhI+hVbTYKJJdL1LP54ucpmGb/21rizHKTKR6QAjKJzsX SYmGj1j3ACblLdnWniEQFA6KCwJKI0YxvpBvj6O7nu3fu2xWUvqQV5NL2r+mOCMSZlEB WSNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=iFbsAteAWCOB8EYWVkTmBCNQWQgWWukwnbyxrLkrB0g=; b=TycUlR1sTWcyCPeQ760BTIWYntYTlmKsKclrW/1ukoIxCrtgJPfHK8nr+FqOBpatet DruIvcfHFA4iveuGH7Jt795/Nslen0sd24n5OJQR+bCq+EMvARlN17Lec70t5iKWni9P T0AqusoGeBkjKAh5rbmA7VfYsjmwUMfksYqiKyTOy6/JMPhnplSBIxorRiCqjKmqg/3h nopFqLWd6Kf/POlpa3vleZhhJ55pDenemDIz3wvevFG7mCpxTRWZJjVfVbk3EMWPjHsU l+bKO4KDxpYXA6yAVT39c6oGqWxITshQkhtG1o0Lvu22WisZaoxkXmUU20kTGHhqU0gW s11Q== X-Gm-Message-State: APjAAAV4FJs2FgsYRLrZeCu3mBWt3Px+gTOA2o2kmnXShRtB3QzUc7Ds oAoiQ4BreDRMijJZoQCMfpQ= X-Received: by 2002:a2e:b0d0:: with SMTP id g16mr21038731ljl.161.1560083018160; Sun, 09 Jun 2019 05:23:38 -0700 (PDT) Received: from esperanza ([176.120.239.149]) by smtp.gmail.com with ESMTPSA id c8sm1354240ljk.77.2019.06.09.05.23.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 09 Jun 2019 05:23:37 -0700 (PDT) Date: Sun, 9 Jun 2019 15:23:35 +0300 From: Vladimir Davydov To: Roman Gushchin Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, Johannes Weiner , Shakeel Butt , Waiman Long Subject: Re: [PATCH v6 04/10] mm: generalize postponed non-root kmem_cache deactivation Message-ID: <20190609122334.6jbpiwgrdzs4xill@esperanza> References: <20190605024454.1393507-1-guro@fb.com> <20190605024454.1393507-5-guro@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190605024454.1393507-5-guro@fb.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 04, 2019 at 07:44:48PM -0700, Roman Gushchin 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 Much easier to review after extracting renaming, thanks. Acked-by: Vladimir Davydov