Message ID | 153365631661.19074.12075476211623702890.stgit@localhost.localdomain (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BCCB6157D for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 7 Aug 2018 15:38:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A83FA2A464 for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 7 Aug 2018 15:38:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9AC8C2A46E; Tue, 7 Aug 2018 15:38:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 101DF2A464 for <patchwork-linux-mm@patchwork.kernel.org>; Tue, 7 Aug 2018 15:38:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E80126B027B; Tue, 7 Aug 2018 11:38:45 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E57A26B027C; Tue, 7 Aug 2018 11:38:45 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D20846B027D; Tue, 7 Aug 2018 11:38:45 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt0-f199.google.com (mail-qt0-f199.google.com [209.85.216.199]) by kanga.kvack.org (Postfix) with ESMTP id AB2C96B027B for <linux-mm@kvack.org>; Tue, 7 Aug 2018 11:38:45 -0400 (EDT) Received: by mail-qt0-f199.google.com with SMTP id w7-v6so3843747qto.9 for <linux-mm@kvack.org>; Tue, 07 Aug 2018 08:38:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:subject:from:to:date:message-id :in-reply-to:references:user-agent:mime-version :content-transfer-encoding:spamdiagnosticoutput :spamdiagnosticmetadata; bh=2uYe2qDeYfym+/n7FbyMe2UtdLf6NUQqwQG95QedNIE=; b=iIHEajjrDK5RE8alvticrRM5cb0L7reIUJSr4CJiNexLHRjOjTU3dYPY/b0EQmzIMF Al8g7EJO1ycX1z924Z58DN2XIcIaFY7d7a7j1PYM+fT+CDNyF1ZklE6F1L0BCR7t0l7b bwqmemzEAl0pV7lrBeJA4fVBc16cZ8c5TkBsPstdi92T3w//D2jvNaMYsB0c/ICdFBlG uKsFiVMQra8ZLef7vjcLgj3CKWkVP20kPy++Zp+Cnitf9zF2DcAUoBFApHz0Bz6L3wTU 6aIjeyKAEMYQWpMXIMqARo3tSFhtYheyuZplJL1Qr+B3Sh3eY7P33EjWLgZzsOpbRB6E Ybtg== X-Gm-Message-State: AOUpUlE5bue0WiXAdS6qHPYeWU/MyuDD0UYbOz9oTXOGWYXH7Gj8ha1G wAFPccN1o/MsVKyCTs57A2JKrk8aOlnjtQYCsVBnW/NJ//jVFE3X2cSpw8rYHKNt2Jw8rFoTvN0 DtJ/xhVZW7/9kjJnGN5nttIWTYiXTraA7XJhIu3NUidIQFr3wePoMm3ATp18WbRsm7g== X-Received: by 2002:a37:7fc7:: with SMTP id a190-v6mr17151430qkd.247.1533656325465; Tue, 07 Aug 2018 08:38:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcaltdHKNUjWVasClXwnecaklXWqMtwNAqDiUpUwPFY8m3AuuDhk+572evHPmwWmQT0FPAG X-Received: by 2002:a37:7fc7:: with SMTP id a190-v6mr17151398qkd.247.1533656324763; Tue, 07 Aug 2018 08:38:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533656324; cv=none; d=google.com; s=arc-20160816; b=IeZ8CS2mUn8NxDcY8TRwKRg/bj/yWlgYX7HGOhu5ZiYYe3WSuj46CI9ZGAjH9Cu2hd /wh9EpNAnAtphAgsppOoRBFus+wGVvtWA35Zy9DJSDj6ysGl5gnO26QP8octGAh0x7Gj 9WR9PrXYSboLVSOrswiBzq3eaGC/YSBGGj47OtZc6glxHV2PbY50Pzl04aJM6qcyXSNu HjNmUGfsS9jjv+Anp2QTAl8/PPDIZcqB4IDYp+AzyOza4Yr+IZLQj8J909VOj1O/agoh 8VKYbINDoRBYP2PZSq0rL+LXdbqLreoPREZcaZfqHAutAZfDIMwHBxORZNa4TjxoMJTE EEpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=spamdiagnosticmetadata:spamdiagnosticoutput :content-transfer-encoding:mime-version:user-agent:references :in-reply-to:message-id:date:to:from:subject:dkim-signature :arc-authentication-results; bh=2uYe2qDeYfym+/n7FbyMe2UtdLf6NUQqwQG95QedNIE=; b=F3g27L3KHho55c2ywU3+AsQW71aLiOvd0bRguEujgbwzDz0Zebp8P/YKqfSomkiw0G iEDChmDijNhgkOSU9iguQFbMk5FCs1oY1//sQ29P7uGOzbwrLUnwmcowbeDfXGXBuPo2 OBknhGAXIA86fTF0yvvEENj8MpUPJSBcMOEC5s5wGKPjSrX7e1Ibw15tJgm1aZHI/DjH gndxviUf6GMeUgyL5k5nirlhYeiKuqGpMbjOlKM7R9cVcqz3ZN9/PxmC8YSYl3ZlsSjX 6l2CyQ9RgIomxw4FNHsr7hgOjYDaHYy/C8LLqzyQeZP0iutlwQtnd9RjjAWFre28eooA fTzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=H3ZkR6BY; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.1.130 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0130.outbound.protection.outlook.com. [104.47.1.130]) by mx.google.com with ESMTPS id g9-v6si1704604qtk.14.2018.08.07.08.38.44 for <linux-mm@kvack.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 07 Aug 2018 08:38:44 -0700 (PDT) Received-SPF: pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.1.130 as permitted sender) client-ip=104.47.1.130; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=selector1 header.b=H3ZkR6BY; spf=pass (google.com: domain of ktkhai@virtuozzo.com designates 104.47.1.130 as permitted sender) smtp.mailfrom=ktkhai@virtuozzo.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2uYe2qDeYfym+/n7FbyMe2UtdLf6NUQqwQG95QedNIE=; b=H3ZkR6BY2YtXy5QC5QYTbULVlgs/WojIMi7sbp3uqRnja9NfCXvUjkRdoXV2oXSySmGPXYIU8DrP2zxl16zTiNGAQ1OuGwgtivs0JEQyAKv/Vg/6NAMTXUarTyv9m7JJF9ojBcuYJ8V1ZlTmpg0cr3tSUw45uYKdf5TNb3Vylu4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=ktkhai@virtuozzo.com; Received: from localhost.localdomain (185.231.240.5) by HE1PR0801MB2026.eurprd08.prod.outlook.com (2603:10a6:3:50::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1017.15; Tue, 7 Aug 2018 15:38:39 +0000 Subject: [PATCH RFC 06/10] fs: Shrink only (SB_ACTIVE|SB_BORN) superblocks in super_cache_scan() From: Kirill Tkhai <ktkhai@virtuozzo.com> To: akpm@linux-foundation.org, gregkh@linuxfoundation.org, rafael@kernel.org, viro@zeniv.linux.org.uk, darrick.wong@oracle.com, paulmck@linux.vnet.ibm.com, josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, hughd@google.com, shuah@kernel.org, robh@kernel.org, ulf.hansson@linaro.org, aspriel@gmail.com, vivek.gautam@codeaurora.org, robin.murphy@arm.com, joe@perches.com, heikki.krogerus@linux.intel.com, ktkhai@virtuozzo.com, sfr@canb.auug.org.au, vdavydov.dev@gmail.com, mhocko@suse.com, chris@chris-wilson.co.uk, penguin-kernel@I-love.SAKURA.ne.jp, aryabinin@virtuozzo.com, willy@infradead.org, ying.huang@intel.com, shakeelb@google.com, jbacik@fb.com, mingo@kernel.org, mhiramat@kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Date: Tue, 07 Aug 2018 18:38:36 +0300 Message-ID: <153365631661.19074.12075476211623702890.stgit@localhost.localdomain> In-Reply-To: <153365347929.19074.12509495712735843805.stgit@localhost.localdomain> References: <153365347929.19074.12509495712735843805.stgit@localhost.localdomain> User-Agent: StGit/0.18 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [185.231.240.5] X-ClientProxiedBy: VI1PR0501CA0047.eurprd05.prod.outlook.com (2603:10a6:800:60::33) To HE1PR0801MB2026.eurprd08.prod.outlook.com (2603:10a6:3:50::15) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 056f8490-5f05-46c7-fee2-08d5fc7bdafa X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:HE1PR0801MB2026; X-Microsoft-Exchange-Diagnostics: 1;HE1PR0801MB2026;3:Ep2J8WJ9cstVkVfzYUct6fQuXh0K+MQaR/vRNrwpDOGF7IY9hgAwvH9kvuTRadeVLVafVBVLofD8x+87LW+W4SLXitAMMhh0uA1gjReWxOmIR/AZ/lFbZNq7R2/Ll/n80/I+BkP6/GVqD2gu7QZfEXdamfmsG6y5Kro+hBS3+cr4yfJqev56fFiqVleR3dIzVSLuw9PFzs8L1iDpXs86iKY/SKH9WgaW6LqVE3QJIR03tdNj+Q8NXt++3+XHGbzE;25:k2PMV37nlw386iO/+KBiciYAp74HxzwctN5AxYSZwF9dmyzM/uGPRFSSUGbWu8IzTtdFP42pKyzmouy8EygTmtVIzBIlj0SJNNl3e9CtSASxiXfNYiWoQsoFg4Cbg2Oq0FcT7eSHBRYencfCdbmEvd009OtrzRiXJrF+SIc/LUKvfbvqebkwE/Xg2Ysv6WCfesw2Gq65SO/IkL/5TXMrKhJySqucdFGG00UrQrEQrFTFZ/yujdfLTkAPlOsX2eVRqbxZyTRFwTfw8jh0v/CSFJQwjkMFbVcmjRW6SFkrw7wb769bfDg+fL8o6uE4CtAftagsnV5lzYqRLw42UhzhAQ==;31:rg/q8LmsdKDM/JgXMcQWzdK9u0Oh0au0/wbPRyNkTJbkqK8pk8KdfYWqWpCfmJr6cPduWJTSc8DDmoao/N3/8KKDm2OFhopEUXVNdik5B1BJsmqI8Og/DO/44saemtf8E+wAQX/t6IKVBu1HQ5WZO3RiUqHwATgIoF7vi91FhNTY0ifbSZKB+OA8Uyt8EWB64EzrCTpfpO8NHSJ3L+0N/W3ZygVPmLBybHBez3yXZvM= X-MS-TrafficTypeDiagnostic: HE1PR0801MB2026: X-Microsoft-Exchange-Diagnostics: 1;HE1PR0801MB2026;20:ui+ZNGRgz5CluGPYaL/rdd64PzcWJ2StIj0oJc8Zr+s41GqADXsCSK1p85U4QiJCQXd+98zR2ef3ETbzN8Sv8G9BcyOzzjMZCh7OWaQRRKeCoLv25LrD3nk38kZCcP70HQsOxyiaZWopkgbrZ6+q4p40nNet92ygrfBaIrwSUGgL/f9yjfEhSOG0Pq7ceB76mxYl2A9DZIMq2mDNsfGs4l00CoVhfeRnvJGPYVAxlv9HRMwKn7M0V7C/UXKRV5m7Y0MIGjhQutMbUG02kBAcT7ZG6TY1VSqNjX51QziJiZ8Vr/RrUkU95rfB/dROz5+8/JcASAWlD4necYwD38HRPu/FaF7x6R660Gcqq+9wAfBU4AwdevmN/JAxaIxI18H5PkDxcENIGGeQhVAxeUyuf1Od3//kf2LNFZqKtGc71L+s46VC7hw1MTqFxVD3/NRQQmRNXuTX9JG9Ryr/Ym6Tfq0tHW4nDmhYCqJggVqox+PIoxgrlJ0QLNvCilPIDBof;4:TnDtMZqUN3B1lhd6NSFHVvabknAfxBAU1c2eSGk9eD/8NmHA2NAXDAMcLBoFXUYoVnFtEv+nwXDHZo1xPG+o8p6gPEhTnNlkB8ZqDT3UjONB8j5DfvjDmWTAw0x0u8mR8cw/Rv5ClP1S+s+pLCFzEJxCVu2w2S9z1z9uF4jjgveOyJTpY94BAWVR/QNuHc9VPbqqLp96sz+hrCATe4wn/FJDoEv1dZvinvSxTQBggB43XwK3PAMC21OljiL14GNO5G7Sm4VRLjK/0VhovaBcdQ== X-Microsoft-Antispam-PRVS: <HE1PR0801MB20264494E190C394BE90EA6CCD270@HE1PR0801MB2026.eurprd08.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(10201501046)(3231311)(944501410)(52105095)(149027)(150027)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(20161123562045)(20161123564045)(6072148)(201708071742011)(7699016);SRVR:HE1PR0801MB2026;BCL:0;PCL:0;RULEID:;SRVR:HE1PR0801MB2026; X-Forefront-PRVS: 0757EEBDCA X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6069001)(366004)(346002)(376002)(136003)(396003)(39850400004)(189003)(199004)(386003)(2906002)(6506007)(39060400002)(478600001)(58126008)(26005)(5660300001)(53936002)(305945005)(68736007)(476003)(7416002)(186003)(7736002)(7406005)(16526019)(11346002)(33896004)(50466002)(956004)(486006)(86362001)(446003)(106356001)(230700001)(25786009)(66066001)(52116002)(47776003)(14444005)(7696005)(55016002)(105586002)(23676004)(2486003)(6116002)(3846002)(97736004)(76176011)(61506002)(6666003)(316002)(103116003)(81156014)(9686003)(8936002)(217873002)(81166006)(8676002)(83133001)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:HE1PR0801MB2026;H:localhost.localdomain;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?q?1=3BHE1PR0801MB2026=3B23=3A/Cf5r?= =?utf-8?q?QeRqQg9SjVZrooVhev/h+n8AIQ4g1brn5AAUqei+4W33v7D5sG0ncPM6HWLHC21Yu?= =?utf-8?q?0pTRRsb2NUWbbyyU4q5hGRd0tZmamiTg0keWnHuByBNWog7ZFIFp5XbCXo5VzoqWe?= =?utf-8?q?8hAZd7apfkWEWHeUGqJZltN3Ku7gmmw6JRcvJKGztLbQfop7wbtX5F8ddPqkkSaSZ?= =?utf-8?q?3IAIsuVKH5RVwKCtVSDRneY1sOpVjCk+zdXrl/FN4Muqp0ieYU5pzRYtdoPdw0W74?= =?utf-8?q?Y+5mWMKmVxCnZ5hsSQ6Zy5ihUY/WVLdrlSPR6h+5vIgfWawNLjOq7P9sDAR8cf5Nd?= =?utf-8?q?+ourviT/S/JmgCUQdyvLT/qPfDuAbZ9KvXpKTrPVoOVS+SqufGfj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C7rLI2viEJjySQ6YNS824QM8M2xEG7ZLhhgpJYkPUgj1coZX4t1blFKglNCCM0v3yG7VZ5qfhkseRrkBTW7usNY5ffu9Tcatzze/OmC/W2mU=;7:NQkJ8HTTMTtNa54/V7IcTxMCqwHpRlC2Nv0HmOrqQTXKnkSqBKfwK8/TaofGJuMyIAGqzgo/qzILAJcUaD/8x5kdApHTNxUBXQ35sTXGj4jvjc5tskzjjN+L4UAf80TknrBFnSlRErpV8G4CYrAy5vzXS+9e5nCXY8otUYUaVN4RC6Ex7z2usuFuH6oWYullv3nRzrkMephA3lBaL4MFjWfHVBDjQ1GvtSg7vtCV5s1hWyiCVq6dLxVEOiNS05yu SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;HE1PR0801MB2026;20:em2/RxsE9Sx2dneLAl/4rA2Bzjcuc7IOmvxmOSmXBP8nDMG5R6q3mZ5D0oRcIGBJZd83ljUI6CZY5ylJpm8BYceaORhxZf7oIkh+8nRDggOMcDovZNevxOcLRL3TJGaN9zbCW46uRcLaCBuMpCF++BMTXOdI0s9RxnkqbLK/IIs= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2018 15:38:39.2227 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 056f8490-5f05-46c7-fee2-08d5fc7bdafa X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB2026 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Introduce lockless shrink_slab()
|
expand
|
diff --git a/fs/super.c b/fs/super.c index 457834278e37..9222cfc196bf 100644 --- a/fs/super.c +++ b/fs/super.c @@ -79,6 +79,11 @@ static unsigned long super_cache_scan(struct shrinker *shrink, if (!trylock_super(sb)) return SHRINK_STOP; + if ((sb->s_flags & (SB_BORN|SB_ACTIVE)) != (SB_BORN|SB_ACTIVE)) { + freed = SHRINK_STOP; + goto unlock; + } + if (sb->s_op->nr_cached_objects) fs_objects = sb->s_op->nr_cached_objects(sb, sc); @@ -110,6 +115,7 @@ static unsigned long super_cache_scan(struct shrinker *shrink, freed += sb->s_op->free_cached_objects(sb, sc); } +unlock: up_read(&sb->s_umount); return freed; } @@ -136,7 +142,7 @@ static unsigned long super_cache_count(struct shrinker *shrink, * avoid this situation, so do the same here. The memory barrier is * matched with the one in mount_fs() as we don't hold locks here. */ - if (!(sb->s_flags & SB_BORN)) + if ((sb->s_flags & (SB_BORN|SB_ACTIVE)) != (SB_BORN|SB_ACTIVE)) return 0; smp_rmb();
This patch prepares superblock shrinker for delayed unregistering. It makes super_cache_scan() avoid shrinking of not active superblocks. SB_ACTIVE is used as such the indicator. In case of superblock is not active, super_cache_scan() just exits with SHRINK_STOP as result. Note, that SB_ACTIVE is cleared in generic_shutdown_super() and this is made under s_umount mutex. Function super_cache_scan() also takes the mutex, so it can't skip this flag cleared. SB_BORN check is added to super_cache_scan() just for uniformity with super_cache_count(), while super_cache_count() received SB_ACTIVE check just for uniformity with super_cache_scan(). After this patch super_cache_scan() becomes to ignore unregistering superblocks, so this function is OK with splitting unregister_shrinker(). Next patches prepare super_cache_count() to follow this way. Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> --- fs/super.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)