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 87FF0C433EF for ; Tue, 3 May 2022 15:59:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D75D46B0098; Tue, 3 May 2022 11:59:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CFE546B0099; Tue, 3 May 2022 11:59:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B9F576B009A; Tue, 3 May 2022 11:59:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id A46DB6B0098 for ; Tue, 3 May 2022 11:59:20 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 71E5661ED7 for ; Tue, 3 May 2022 15:59:20 +0000 (UTC) X-FDA: 79424891280.21.250D2D6 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf23.hostedemail.com (Postfix) with ESMTP id B90F2140082 for ; Tue, 3 May 2022 15:59:10 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CC3BC616AB; Tue, 3 May 2022 15:59:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 37067C385A4; Tue, 3 May 2022 15:59:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651593558; bh=XY9ch2qBQz1SEgroJDBDxJ7tbxMsdOzqeG8iF4Vg6NA=; h=Date:From:To:Cc:Subject:Reply-To:From; b=j51WGuTq2KD/fLVJmuUDFZe+OZdWlAv8lR3nxVgu+whTaECowisgCxpMK7kYHvjo7 hMee1gp1pLguQI0tuxugGNPQcOkcl4vX5MpuH2efetRFWh0F6qOkcahZQFDaqnLOBP 90Pgrsy3CtA6Dx/y9sp7axtpqPASAG5tmz6jsoIUv79pV7KPq6V2oh72kM4Y4qVHPw b4OOBDRWHrvs/YLISULk0upIqPoN0nHAJTqylDO/aPa3KjayQ6OnEcLCedZJ0hjh+Z I37cepvKUZKOWILyaTJVa6bXzJHD0sjkB9rarzL2oKySkt3T0cOtWd9rEQv8+hQjbM lsYTkvd69L0qA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 0F0AA5C0115; Tue, 3 May 2022 08:59:13 -0700 (PDT) Date: Tue, 3 May 2022 08:59:13 -0700 From: "Paul E. McKenney" To: liam.howlett@oracle.com, willy@infradead.org, walken.cr@gmail.com, mhocko@suse.com, hannes@cmpxchg.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Memory allocation on speculative fastpaths Message-ID: <20220503155913.GA1187610@paulmck-ThinkPad-P17-Gen-1> Reply-To: paulmck@kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: B90F2140082 X-Stat-Signature: 88u9uhdjux4udf33733y3aetbxpfdsbr X-Rspam-User: Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=j51WGuTq; spf=pass (imf23.hostedemail.com: domain of "SRS0=eDkt=VL=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org" designates 139.178.84.217 as permitted sender) smtp.mailfrom="SRS0=eDkt=VL=paulmck-ThinkPad-P17-Gen-1.home=paulmck@kernel.org"; dmarc=pass (policy=none) header.from=kernel.org X-HE-Tag: 1651593550-215491 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: Hello! Just following up from off-list discussions yesterday. The requirements to allocate on an RCU-protected speculative fastpath seem to be as follows: 1. Never sleep. 2. Never reclaim. 3. Leave emergency pools alone. Any others? If those rules suffice, and if my understanding of the GFP flags is correct (ha!!!), then the following GFP flags should cover this: __GFP_NOMEMALLOC | __GFP_NOWARN Or is this just a fancy way of always returning NULL or some such? ;-) Thanx, Paul