Received: by 10.213.65.68 with SMTP id h4csp8247imn; Sat, 24 Mar 2018 11:51:33 -0700 (PDT) X-Google-Smtp-Source: AG47ELusWjsyMtBHW0kWw2UZspT2BHbQtMCqXzDEzFBE2QK7keQy6SHL7mq/f33mOBM5k5ZAuMCA X-Received: by 2002:a17:902:5793:: with SMTP id l19-v6mr16041226pli.386.1521917493509; Sat, 24 Mar 2018 11:51:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521917493; cv=none; d=google.com; s=arc-20160816; b=zWiWIajnN0VfWPRGTymsUejfQkWP60MqLK3mwuoIvElu567C9qfC1LNz1WxtZUHPch u5HBc0jpVluZf2Z8vdllhS3pl/BZMi+T9HBoUfvTp2zy8l00fmeqvzpcliQ3aBj5wvb9 hcHzHCCEhtNyGi52wvfjkbcdwVbGzy+AvBS+JOOStY5iaNzsReUNZy1As9DssLw03AVx DK3Ex3r4ZPO72lrX0gVcmrK02J9UHHdzu4GI5SZvUM8J84Thsb0wvORUFu9VlgAOVjfe 0CFnLwXm257mjSRoEoSDcT0TP53F5JWbZIBzZPZj7ipf6iJ1IZQCBPGOuKvLIQrlqatz h10A== 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=UnQ47EHbqK8CUBxRw3FVezd0+eOwSHbkFrlGm7jBpnQ=; b=S1tt2N1+c1WZwzUToag0pE+cRyO+/Els5KsLAeNUHsjF3vwEHESIhzcFb/INPSUQet ZCfIvKTNqKLAvJ4dpWTvNjTSHRCmXDZMBlFJR7lV/uO4KkDRdy0B0YDlOdLBJmvT6k8p BlBf0TRrqTGkGpsbk1yJ8GbdHmPs68qkDd4a4k+s7A+ZkFQa45KmOgeC6HnhatJvwe9u U3ZuoTsYVQG9glLIFNwKHI76dxux0g2On2zaBVxktXwIhZeb+EKs4wiLKOR4I7+97EB9 Eqr+80GnoRWnem6QHineClGTDgNuUr2TSVBkCdru4Zf6Q+HGLJaQJepIdaY3c3ZRSP0I 2xWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OkzyGxKZ; 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 b11-v6si8026400plx.631.2018.03.24.11.51.19; Sat, 24 Mar 2018 11:51:33 -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=OkzyGxKZ; 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 S1752859AbeCXSuY (ORCPT + 99 others); Sat, 24 Mar 2018 14:50:24 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:38165 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752783AbeCXSuW (ORCPT ); Sat, 24 Mar 2018 14:50:22 -0400 Received: by mail-lf0-f68.google.com with SMTP id u3-v6so1820185lff.5 for ; Sat, 24 Mar 2018 11:50:21 -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=UnQ47EHbqK8CUBxRw3FVezd0+eOwSHbkFrlGm7jBpnQ=; b=OkzyGxKZEaX3lU5W0Z3Zx+typ2veNkVyI6IDEdAiFWgEF5a6qWqM0H/OaZTS53Pi3N iyqEkqkmJY1s0Gy1JeLqEZfGAGLNXCSMDAfx8CXTLpkvql68gAVjxlciLHnVpD4BDZ1u ySBiKHdOBUe6G0UHor0TAHvJutIUrl82u7pMQ6thKlgr32LSEQIpVOMZ+UwH9qZrafQQ WXwDWVHYl3SKZcu5GRBosOOI5rhGE2jYdV1W+zpINOrUBGEHegQMRQJ97gOU4s/BJIIy STJukCFT7+Md5t8JXP8voQXhfxAxgBFj6eh5cdRQ0PmTzlz3nSL3U+qI4vCgE2TUnffT uzvg== 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=UnQ47EHbqK8CUBxRw3FVezd0+eOwSHbkFrlGm7jBpnQ=; b=rxBf/g1+TUNsyXbEfR/y+iXJF9nw4KSJRsrypsvIv/+SQfiC2agTPZaSu1lZG9frY1 oHgDztmES23NWr0YH85ROALtfZam7FtwjZxgaPsIUZaSoc74Hb4geJlHiIDhXGurLRtM 6k5BeM2pPo/kbOlwCIwdMepMWvUVPELweXjB8kObAy5XAK58zS4lJkx2B4qUPrMMqlei 4NFD5yKBTQxu2N4DhANCKh1YB6vy69u8aYXaVUcs+o6GyjaIkZQCNfhZOCO9vFtTEndf /vpvFmZfw9qfC5YNWct903p8cogV3W9Sl4NTJ9sXxl+qbGtyfkuVd1H1qEc0ni2Z0Qj7 zDrg== X-Gm-Message-State: AElRT7E9wvf6JU13uKpDjMr3fSn0QVNfcSuPyWRh21bUQgCDCo8FhnEE hZd0B3EWpdsBr0Kq1l9f5es= X-Received: by 2002:a19:5745:: with SMTP id l66-v6mr9586253lfb.135.1521917420857; Sat, 24 Mar 2018 11:50:20 -0700 (PDT) Received: from esperanza (81.5.110.211.dhcp.mipt-telecom.ru. [81.5.110.211]) by smtp.gmail.com with ESMTPSA id f65sm1987453lji.31.2018.03.24.11.50.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 24 Mar 2018 11:50:20 -0700 (PDT) Date: Sat, 24 Mar 2018 21:50:18 +0300 From: Vladimir Davydov To: Kirill Tkhai Cc: viro@zeniv.linux.org.uk, hannes@cmpxchg.org, mhocko@kernel.org, akpm@linux-foundation.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, shakeelb@google.com, jbacik@fb.com, linux@roeck-us.net, linux-kernel@vger.kernel.org, linux-mm@kvack.org, willy@infradead.org Subject: Re: [PATCH 04/10] fs: Propagate shrinker::id to list_lru Message-ID: <20180324185018.iibbx3zjtzikjtlc@esperanza> References: <152163840790.21546.980703278415599202.stgit@localhost.localdomain> <152163851112.21546.11559231484397320114.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <152163851112.21546.11559231484397320114.stgit@localhost.localdomain> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 21, 2018 at 04:21:51PM +0300, Kirill Tkhai wrote: > The patch adds list_lru::shrk_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 | 5 +++++ > include/linux/list_lru.h | 1 + > mm/list_lru.c | 7 ++++++- > mm/workingset.c | 3 +++ > 4 files changed, 15 insertions(+), 1 deletion(-) > > diff --git a/fs/super.c b/fs/super.c > index 0660083427fa..1f3dc4eab409 100644 > --- a/fs/super.c > +++ b/fs/super.c > @@ -521,6 +521,11 @@ struct super_block *sget_userns(struct file_system_type *type, > if (err) { > deactivate_locked_super(s); > s = ERR_PTR(err); > + } else { > +#if defined(CONFIG_MEMCG) && !defined(CONFIG_SLOB) > + s->s_dentry_lru.shrk_id = s->s_shrink.id; > + s->s_inode_lru.shrk_id = s->s_shrink.id; > +#endif I don't really like the new member name. Let's call it shrink_id or shrinker_id, shall we? Also, I think we'd better pass shrink_id to list_lru_init rather than setting it explicitly.