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 29FEACD5BC9 for ; Thu, 5 Sep 2024 15:25:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B80536B008A; Thu, 5 Sep 2024 11:25:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B317C6B008C; Thu, 5 Sep 2024 11:25:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A1F4E6B0092; Thu, 5 Sep 2024 11:25:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 858E66B008A for ; Thu, 5 Sep 2024 11:25:09 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 2EF8FA8ECE for ; Thu, 5 Sep 2024 15:25:09 +0000 (UTC) X-FDA: 82531057938.07.91F24A0 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by imf12.hostedemail.com (Postfix) with ESMTP id 8276E40021 for ; Thu, 5 Sep 2024 15:25:07 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=mit.edu header.s=outgoing header.b=bC90hOhN; dmarc=pass (policy=none) header.from=mit.edu; spf=pass (imf12.hostedemail.com: domain of tytso@mit.edu designates 18.9.28.11 as permitted sender) smtp.mailfrom=tytso@mit.edu ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725549836; a=rsa-sha256; cv=none; b=zPeHUy7Jn36zqTngm19/1B5Ltu6JFYjGuKKr9UYHZl3xgro0Wg7GG3ydH7B/LVksLEsu1m uSJNOYb3BjY3gMtUUBLFWTL/gCQVhliTXa8z8+1bWqOS9C72DU5/IOrqB/WJ5PUb9i1oGL xNNImNRNDz85fsXx1NYt2TkbFnszcJA= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=mit.edu header.s=outgoing header.b=bC90hOhN; dmarc=pass (policy=none) header.from=mit.edu; spf=pass (imf12.hostedemail.com: domain of tytso@mit.edu designates 18.9.28.11 as permitted sender) smtp.mailfrom=tytso@mit.edu ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725549836; 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=ZMAwb0TTSWq5wGxMOGxbhqvtzOXca35VpaiLmpGkZyk=; b=Wr8glkNdZ0l8a4Mvsbs8xLYTPeLdTMEEuNaVU/E+3WB3MZBrLTOnF5+l+TwW6HAJvgTSff ck7K5gz3jPCjxH+BQ7eA4xEssKckXHSIEfEqO8FseYsDiO/JqxC/RhlmZSEq+9UfL1ibdn YSiu0g+ewrmyAvH24WQbDNa9nfdXAys= Received: from cwcc.thunk.org (pool-173-48-102-194.bstnma.fios.verizon.net [173.48.102.194]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 485FOuO8022670 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 5 Sep 2024 11:24:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1725549900; bh=ZMAwb0TTSWq5wGxMOGxbhqvtzOXca35VpaiLmpGkZyk=; h=Date:From:Subject:Message-ID:MIME-Version:Content-Type; b=bC90hOhNVtGBzISUHWFA+vIPMEGufqK81VfNH++gBMimSDmzUIT2PO9/60HtmWG/C ay6hQ5QICOiWGGLsW++Qk+XPO3OldLATfDxqLz0EpmlN3ctQ5rw318he2Nk5dSMcKL FXiLh524vPNJlMTH3JGUWLeOG6XGKmsZF9o6WJfzVZb2kWHQJmzyeXRqFcXbHEkW4D twc1UWEWXcapIVFpNUXjqA/vX/Nc2Y50RydPKQW7Wv7RrZKqLJpWw7rsYHyhzfb36n iwTYS4i3eF2n2EQtqjNjZDEltZvduFIX1ojyg2BtOfg8vhq+pVi0sDqjEv6spTD3Sx w51KAAhY8aqrA== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 5C30415C02C6; Thu, 05 Sep 2024 11:24:56 -0400 (EDT) Date: Thu, 5 Sep 2024 11:24:56 -0400 From: "Theodore Ts'o" To: Kent Overstreet Cc: Michal Hocko , Andrew Morton , Christoph Hellwig , Yafang Shao , jack@suse.cz, Vlastimil Babka , Dave Chinner , Christian Brauner , Alexander Viro , Paul Moore , James Morris , "Serge E. Hallyn" , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-bcachefs@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2 v2] remove PF_MEMALLOC_NORECLAIM Message-ID: <20240905152456.GW9627@mit.edu> References: <20240902145252.1d2590dbed417d223b896a00@linux-foundation.org> <20240905135326.GU9627@mit.edu> <4ty2psn26sergqax6yhcs3htt2tsg3wuvrfyvfdvseom22zhqk@yppva6vxpmjz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ty2psn26sergqax6yhcs3htt2tsg3wuvrfyvfdvseom22zhqk@yppva6vxpmjz> X-Rspamd-Queue-Id: 8276E40021 X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: shpuazk9hgcbft5toinb5dnk9rj68hob X-HE-Tag: 1725549907-609535 X-HE-Meta: U2FsdGVkX1+8ma1ZRFy1CGuZ5g5B7ZTeCOmxvMB8ipXCwjyBJqtsb8ztoCPjXc7nK8Aoggu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79sGQiW7neXd5yevHzD95+J3ccK1KBEtFbWeIHzpW3fIb8se5dfTwqNwnNTo5ErryKaqB/newUCdjqMXl0AFZgUjOH7HvJ6y+ghNPVUokegfPXs309RLvHRzuqV4cJv0lrE7Xs= 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: List-Subscribe: List-Unsubscribe: On Thu, Sep 05, 2024 at 10:05:15AM -0400, Kent Overstreet wrote: > > That may be the currrent state of affiars; but is it > > ****guaranteed**** forever and ever, amen, that GFP_KERNEL will never > > fail if the amount of memory allocated was lower than a particular > > multiple of the page size? If so, what is that size? I've checked, > > and this is not documented in the formal interface. > > Yeah, and I think we really need to make that happen, in order to head > off a lot more sillyness in the future. I don't think there's any "sillyness"; I hear that you believe that it's silly, but I think what we have is totally fine. I've done a quick check of ext4, and we do check the error returns in most if not all of the calls where we pass in __GFP_NOFAIL and/or are small allocations less than the block size. We won't crash if someone sends a patch which violates the documented guarantee of __GFP_NOFAIL. So what's the sillynesss? In any case, Michal has said ix-nay on making GFP_KERNEL == GFP_NOFAIL for small allocations as documented guarantee, as opposed to the way things work today, so as far as I'm concerned, the matter is closed. - Ted