From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5538C7EE25 for ; Thu, 8 Jun 2023 16:37:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6148F6B0074; Thu, 8 Jun 2023 12:37:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5C52C6B0075; Thu, 8 Jun 2023 12:37:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4B3E58E0002; Thu, 8 Jun 2023 12:37:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 3D9316B0074 for ; Thu, 8 Jun 2023 12:37:08 -0400 (EDT) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 13CF7802FD for ; Thu, 8 Jun 2023 16:37:08 +0000 (UTC) X-FDA: 80880135336.17.277BC20 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by imf30.hostedemail.com (Postfix) with ESMTP id 1EA9A8001A for ; Thu, 8 Jun 2023 16:37:05 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=fail ("headers rsa verify failed") header.d=mit.edu header.s=outgoing header.b=RqfXkYoZ; spf=pass (imf30.hostedemail.com: domain of tytso@mit.edu designates 18.9.28.11 as permitted sender) smtp.mailfrom=tytso@mit.edu; dmarc=pass (policy=none) header.from=mit.edu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1686242226; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=shiW3MxbgeJoRhHHYMf+Lg7J4ykrzks2P+y1IqsB/aY=; b=ZH9ynXt9Rmr6tEvofC1AsMg+rKqXDGbkmsJ35DW0wdXSVo+AjGsF5/MPmXp9idk9Wkkxni 5ObaO3u3FXRLN0PrnMSyZ684dbTYt9CNJbZVBROGG4RiiV+/pkkDHJZF3xr1OerHVjNCqA ztPusruxAopPFnh752XGgbalq7uZf7E= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1686242226; a=rsa-sha256; cv=none; b=fkABirAnEkj6n17lIyFMrf311fHSlSdFkLAnGqh3/eoqTxMTcmKYMg+WH3FIRGseoSWSc1 BRLfryn9XvlTPlDbXfe7qCkPsLfG2DEOuhSGjuNn/m1TGtj6MB9Dcfi8X6UO9siCAgjflj hEh1GDofbWuBv8Hj/Rkz9AIY/QCQ+t8= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=fail ("headers rsa verify failed") header.d=mit.edu header.s=outgoing header.b=RqfXkYoZ; spf=pass (imf30.hostedemail.com: domain of tytso@mit.edu designates 18.9.28.11 as permitted sender) smtp.mailfrom=tytso@mit.edu; dmarc=pass (policy=none) header.from=mit.edu Received: from cwcc.thunk.org (pool-173-48-82-39.bstnma.fios.verizon.net [173.48.82.39]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 358GaM2E029198 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 8 Jun 2023 12:36:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1686242186; bh=shiW3MxbgeJoRhHHYMf+Lg7J4ykrzks2P+y1IqsB/aY=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=RqfXkYoZ5EfyswFT/IoHwD28IyGaSArs6cGCB/H0TD4xHGHzpBVP2vwPhrxaz6S4M /3rwqaPRGQ8aSiECtd052yWKcpmZGeSVS6MBJPjCE7//VdQu9n6EkMBmkPIExzyvk/ 7ne4YcOKUq6w3GNtlSuqCHJfkyScdvJ8Oo8F2i2igkP8q1ngkCaJAU+UbCJG6S5dUK jI26E84MM/d1eGpejXwsiRKo7MGZP5McibXcPH5PfXdh6aeiLWRpZSpKGSNWhfq0Fl kdsMH9OBXqpvCo1DiXaIgO6ZGpfxA6cjLQnaHU+Jd4GblQ5c06R1VbK2SqM18K2atM PUynhlqNqAPwQ== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 6B6CD15C04C3; Thu, 8 Jun 2023 12:36:22 -0400 (EDT) Date: Thu, 8 Jun 2023 12:36:22 -0400 From: "Theodore Ts'o" To: Dave Chinner Cc: Roman Gushchin , Kirill Tkhai , akpm@linux-foundation.org, vbabka@suse.cz, viro@zeniv.linux.org.uk, brauner@kernel.org, djwong@kernel.org, hughd@google.com, paulmck@kernel.org, muchun.song@linux.dev, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, zhengqi.arch@bytedance.com Subject: Re: [PATCH v2 3/3] fs: Use delayed shrinker unregistration Message-ID: <20230608163622.GA1435580@mit.edu> References: <168599103578.70911.9402374667983518835.stgit@pro.pro> <168599180526.70911.14606767590861123431.stgit@pro.pro> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: 1EA9A8001A X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: zhe651w5br3nbgwmziwk8dkdqeqomihz X-HE-Tag: 1686242225-597011 X-HE-Meta: U2FsdGVkX1/+OxuUfbWBdH7Rxm7zX9MdrJSkufQWhUahdp2tWgUWsxN2uwddCNMNkTOZIQs649v3uEWJMHiPqP6doKiYrR1Q3b5FkJIgIxbgfx7ViNInfvRHtZ7GU9ZLOqJHZCG1Be6JV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uS2X+bYIwXYL X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jun 06, 2023 at 11:24:32AM +1000, Dave Chinner wrote: > On Mon, Jun 05, 2023 at 05:38:27PM -0700, Roman Gushchin wrote: > > Hm, it makes the API more complex and easier to mess with. Like what will happen > > if the second part is never called? Or it's called without the first part being > > called first? > > Bad things. > > Also, it doesn't fix the three other unregister_shrinker() calls in > the XFS unmount path, nor the three in the ext4/mbcache/jbd2 unmount > path. > > Those are just some of the unregister_shrinker() calls that have > dynamic contexts that would also need this same fix; I haven't > audited the 3 dozen other unregister_shrinker() calls around the > kernel to determine if any of them need similar treatment, too. > > IOWs, this patchset is purely a band-aid to fix the reported > regression, not an actual fix for the underlying problems caused by > moving the shrinker infrastructure to SRCU protection. This is why > I really want the SRCU changeover reverted. There's been so much traffic on linux-fsdevel so I missed this thread until Darrick pointed it out to me today. (Thanks, Darrick!) >From his description, and my quick read-through of this thread.... I'm worried. Given that we're at -rc5 now, and the file system folks didn't get consulted until fairly late in the progress, and the fact that this may cause use-after-free problems that could lead to security issues, perhaps we shoould consider reverting the SRCU changeover now, and try again for the next merge window? Thanks!! - Ted