Received: by 10.192.165.148 with SMTP id m20csp2622647imm; Sun, 22 Apr 2018 11:05:00 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/jhVfAfHsNvcaFJptbgHyXiW7czRT3DpDgIkkJ6AkuZZCMHQGPu/gsnoq9B8QZqKuYKohs X-Received: by 10.99.107.8 with SMTP id g8mr14750342pgc.271.1524420300887; Sun, 22 Apr 2018 11:05:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524420300; cv=none; d=google.com; s=arc-20160816; b=ihXKDRckGLXSJ6tdyVOqMTm9Bw4ZspxJnza6gNkGrd0zvlM49LpRfb5WbiO3s70rAY cH5w0foNXZ9Xz8IbCqhiqGQU+JNWPNVmFHIoelR2JPbNliwSsuBaTPtDCSsHEuzP43nb XRn8ufBeaTA5Pi6kmxrat2J/TiRuKTEvk33nUrpBuRjoVcVVIPG0W9ogENgWszr580G7 PsWBthUNmqk1nxSQQBT0QaTpik6aB0A61HcXL4ENhkUnS+tZFjl/aogYTr1m/VlAemRq 2U3UdAFWrBZ2vylgifNtWKQd6EAOGDg50SyraYDtlfe4Kt9rwD31FToRJEYB9PAOxks5 7TRw== 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:arc-authentication-results; bh=FYT9lcUDTby6vLfiGHBBBGwklUq0J+iA6+7pUzbTFoQ=; b=vNdtQ237Wu1kQVfjAEYeMXdiTfLS7YySRjmnziexo3bmYC2jnoHdEWtWpWGmz04FCW AbvADkvjLeCKtv3jojIQIZ1TRN3ppEOex67CVWlrWuP28XeNfELi6n54QYTt2nWdGIkD pzm8wtdexQAqAnnUk8LP7ru+tu/5GYJDOkv+K9kn0xESvjWXbqtes4Nca4HbQRqlqx9T 8xlDmvwSahUc4iaGJ5rpmPFB3jl183gZITDlHU1VfMDKOr2fMh08dfp0Z7KIwsPIa+yV pkdm3d0ASz28XLppasgR+zpWUUW3Vpi2B7C5zOmg9UHf6AvRdB7K8vHEhnudxFHHLWag aJ7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ohwQ5gpK; 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 bd8-v6si4346597plb.156.2018.04.22.11.04.46; Sun, 22 Apr 2018 11:05:00 -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=ohwQ5gpK; 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 S1753417AbeDVSDn (ORCPT + 99 others); Sun, 22 Apr 2018 14:03:43 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:41625 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751683AbeDVSDk (ORCPT ); Sun, 22 Apr 2018 14:03:40 -0400 Received: by mail-lf0-f68.google.com with SMTP id o123-v6so9089435lfe.8 for ; Sun, 22 Apr 2018 11:03:40 -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=FYT9lcUDTby6vLfiGHBBBGwklUq0J+iA6+7pUzbTFoQ=; b=ohwQ5gpK/hIr/QNo5ky8tWghIXxg4r5uwqb2tzyMTeqP8XE2L1R3Ozi9Sym93GPLi3 hqvFcL+/+aidfvcF2z/R7dO0Rrja6pKbuBk5cEJI/evIAGjzUrUKwElk9wUn0sY55WXb cyLv4WECIGjV5Xlp+vWmwITvb/SLproMGv8luGS9Ozn9ylph7FPSSWOYBatyFCgJoBC1 GmzrKiNfqTHb1P/EbsR5+UqX0GoU+1J6X/3KVKBwx1PWXhWO+Shl7UBohggDKnxGCpOZ ROn9bkNA+zhOsBX/2xavuvpQ5tZRzqthQHYHeF4oXE3dYnUhEUd1o/oFQ8Xv/Y2d5Auc xzUQ== 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=FYT9lcUDTby6vLfiGHBBBGwklUq0J+iA6+7pUzbTFoQ=; b=JSiUxWnyxBY6Hbwf0TWtt4Sc1vx8Wy8OmFxDYGUq9Xw79N2fsLUeYq/oli7t68LV7V 2EGMDgjv0/to6oshv/D95QiX6PYP+jWnr6JTekXVopGhizr7guyOrAeOut5H3B1bqt7I t2kgYCIHTM+AhQIGK12iUFzTCb2hEgJfoenrTE9YJ3/ArlnPUmT6Dad6KDeLWIftjDuM Kn9ERywxKzO2fsky5qZkEhhqwb4rCmoFX7zH8FrAJrjUI3ZMVxTB7orN+TmdAoJ0zPLh /LfJVAlHXd5+hBYvNw7LB5kTSnu1s87noVk0HB794fmvglo92MgSRlyOvAKbCqfDMzgz /vWA== X-Gm-Message-State: ALQs6tBvvYtYtXYPa8He3a7+Dfb/H68IrJURwLNWU8Zi9hmMyOmlXr+U zDTAVhGJQXl+MljWnIVp7go= X-Received: by 2002:a19:5491:: with SMTP id b17-v6mr7476767lfl.33.1524420219264; Sun, 22 Apr 2018 11:03:39 -0700 (PDT) Received: from esperanza (81.5.110.211.dhcp.mipt-telecom.ru. [81.5.110.211]) by smtp.gmail.com with ESMTPSA id x62-v6sm2389942lfd.82.2018.04.22.11.03.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 22 Apr 2018 11:03:38 -0700 (PDT) Date: Sun, 22 Apr 2018 21:03:36 +0300 From: Vladimir Davydov To: Kirill Tkhai Cc: akpm@linux-foundation.org, shakeelb@google.com, viro@zeniv.linux.org.uk, hannes@cmpxchg.org, mhocko@kernel.org, tglx@linutronix.de, pombredanne@nexb.com, stummala@codeaurora.org, gregkh@linuxfoundation.org, sfr@canb.auug.org.au, guro@fb.com, mka@chromium.org, penguin-kernel@I-love.SAKURA.ne.jp, chris@chris-wilson.co.uk, longman@redhat.com, minchan@kernel.org, hillf.zj@alibaba-inc.com, ying.huang@intel.com, mgorman@techsingularity.net, jbacik@fb.com, linux@roeck-us.net, linux-kernel@vger.kernel.org, linux-mm@kvack.org, willy@infradead.org, lirongqing@baidu.com, aryabinin@virtuozzo.com Subject: Re: [PATCH v2 05/12] fs: Propagate shrinker::id to list_lru Message-ID: <20180422180336.n6ahbpwmpedjga5n@esperanza> References: <152397794111.3456.1281420602140818725.stgit@localhost.localdomain> <152399122780.3456.1111065927024895559.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <152399122780.3456.1111065927024895559.stgit@localhost.localdomain> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 17, 2018 at 09:53:47PM +0300, Kirill Tkhai wrote: > The patch adds list_lru::shrinker_id field, and populates > it by registered shrinker id. > > This will be used to set correct bit in memcg shrinkers > map by lru code in next patches, after there appeared > the first related to memcg element in list_lru. > > Signed-off-by: Kirill Tkhai > --- > fs/super.c | 4 +++- > include/linux/list_lru.h | 1 + > include/linux/shrinker.h | 8 +++++++- > mm/list_lru.c | 6 ++++++ > mm/vmscan.c | 15 ++++++++++----- > mm/workingset.c | 3 ++- > 6 files changed, 29 insertions(+), 8 deletions(-) > > diff --git a/fs/super.c b/fs/super.c > index 5fa9a8d8d865..9bc5698c8c3c 100644 > --- a/fs/super.c > +++ b/fs/super.c > @@ -518,7 +518,9 @@ struct super_block *sget_userns(struct file_system_type *type, > hlist_add_head(&s->s_instances, &type->fs_supers); > spin_unlock(&sb_lock); > get_filesystem(type); > - err = register_shrinker(&s->s_shrink); > + err = register_shrinker_args(&s->s_shrink, 2, > + &s->s_dentry_lru.shrinker_id, > + &s->s_inode_lru.shrinker_id); This looks ugly. May be, we could allocate an id in prealloc_shrinker then simply pass it to list_lru_init in arguments?