From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f73.google.com (mail-wr1-f73.google.com [209.85.221.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 379C434D90A for ; Wed, 17 Dec 2025 17:19:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765991973; cv=none; b=jwqkyRHWr4il92LyhWkhYWiCZZ2NzJk6f20UpxOP7aFBUMUHXa1V0bzRWFGK1eIvghA2xo9SnItHOK5A59ZfsxG09a3RA1/bSJ4U7OcqWNkWDY0SkNy0ADaDOQwxNGyWVU/B9EcyixVlyUuTufDs0Wn7qa1jgdgDcgP+ntY0SX8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765991973; c=relaxed/simple; bh=nxfMjWlGH75gU72zw0mAEOa0tjE5Lk2Vo0HgdWgx5UY=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=bieMkbIpckjqKQXUwR8tfgTc31r9MxQ3kxbZRUfsQJS6Uljbz2AvMVNTQUmS4LdSwgv5o/GaXXTx9PjptqLi/unqnrRx2CrB54okayLmR3L1oK4oaRfNCC6NajfoSQAi9CyE5p616rkKxIZLp/zsofK5+apefJ1yn85l+FidxPA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=cm7O/hG5; arc=none smtp.client-ip=209.85.221.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--jackmanb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="cm7O/hG5" Received: by mail-wr1-f73.google.com with SMTP id ffacd0b85a97d-430f79b8d4dso2383259f8f.3 for ; Wed, 17 Dec 2025 09:19:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1765991968; x=1766596768; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=fmH64XmJ0F0IHGr/hDAMtzC5HIceqcOPcSCpGBeY+GU=; b=cm7O/hG56tBzvgILJp5bz/3kQnjx3fHybSEh3IVD4xmrwqJORcK4XvkN76yoAt3bC6 RhL86m8WqBENIlwXIxpUvqhS5i2Chvzw1BrqvInHg00y0e4rXhFMNVOWnC+P4/DAIXw6 pu6zj3KDVEqB1GfkFqQuU5rUp7tNI3o4aqtM5WAm6nqSshS1mlnoIqbp4QiIgvhV3glI p6WG1MUlaWHAk0eTdFpWdbsQeqUATKc3/viFRieEr2r5TAjlh1jSSkbBAnpVr7hIWOO8 6/37Rt/4dGFtLNP9bOWeFDgdB1PYN/M3dz/tSdrurqWfQgv73FP6Zz5hM2lxckba55rp vU9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765991968; x=1766596768; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fmH64XmJ0F0IHGr/hDAMtzC5HIceqcOPcSCpGBeY+GU=; b=xLdP6TJr3iFbT8od4m1bNrXZ9uGF7K1fRSq5dRWro+8vQaLXBak6FJcioPTF4mPnfQ n7CK07FP2/ZWLOIuA4IJm/wZjc5fjQm4ukfFDWsS75cirvkwb6eIH1SzlExMVGFo/EKv QpUirz/aqnr2+RhrdqvHhxIekRtG69zkOmxdUBPl96MDGtiTcEsc+qSnO1/2uAsZ+MZO T8deH4MPiAVmZASgTke7l9lXx7ZDboaFtFACX9TBgxspDlMsgG9Nk22SkDAcg0ep4YLg zw/+xkNUykZrYMYL0XMnBWflnOsfVkagc2bR3RbJd70Qp73MgHKXg7tstryOpCutUfc9 3gGQ== X-Forwarded-Encrypted: i=1; AJvYcCVBhKrT+QTDudriMKEntu1yylC2nUpTUJLmaIC94p3UeEySO8jZJaXIjCFXsONmy0b20zXmwkaPl5gecF4=@vger.kernel.org X-Gm-Message-State: AOJu0YwniEjNR9HEcpcvqgp4olbwx589l8tnjx0JBwYz9v3yoSOesgiK u+vbkbT7r8orc5wjNVqpofWVYxjdvIbZu8+BxGVxX2PBCPGvqbjmftQJSxOXkXH27bz1emB/eWw oj/uIddUApcsf/A== X-Google-Smtp-Source: AGHT+IHT10heBTKc0la75zjUcdcWeKQLxIjteE6wN3WG7RYWYRpvl3lG55/6zSe2LENPLJF5rOBhHUOFskHNYw== X-Received: from wrbfo17.prod.google.com ([2002:a05:6000:2911:b0:430:fdbe:cc61]) (user=jackmanb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:2404:b0:431:864:d492 with SMTP id ffacd0b85a97d-4310864d73emr6566925f8f.36.1765991967910; Wed, 17 Dec 2025 09:19:27 -0800 (PST) Date: Wed, 17 Dec 2025 17:19:27 +0000 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20251212161832.2067134-1-yeoreum.yun@arm.com> <916c17ba-22b1-456e-a184-cb3f60249af7@arm.com> <100cc8da-b826-4fc2-a624-746bf6fb049d@arm.com> X-Mailer: aerc 0.21.0 Message-ID: Subject: Re: [PATCH 0/2] introduce pagetable_alloc_nolock() From: Brendan Jackman To: Vlastimil Babka , Brendan Jackman , Yeoreum Yun , Ryan Roberts Cc: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Content-Type: text/plain; charset="UTF-8" >> From 4c6b4d4cb08aee9559d02a348b9ecf799142c96f Mon Sep 17 00:00:00 2001 >> From: Brendan Jackman >> Date: Wed, 17 Dec 2025 13:26:28 +0000 >> Subject: [PATCH] mm: clarify GFP_ATOMIC/GFP_NOWAIT doc-comment >> >> The current description of contexts where it's invalid to make >> GFP_ATOMIC and GFP_NOWAIT calls is rather vague. >> >> Replace this with a direct description of the actual contexts of concern >> and refer to the RT docs where this is explained more discursively. >> >> While rejigging this prose, also move the documentation of GFP_NOWAIT to >> the GFP_NOWAIT section. > > There doesn't seem to be any move? This is referring to [0] and [1]. >> diff --git a/include/linux/gfp_types.h b/include/linux/gfp_types.h >> index 3de43b12209ee..07a378542caf2 100644 >> --- a/include/linux/gfp_types.h >> +++ b/include/linux/gfp_types.h >> @@ -309,8 +309,10 @@ enum { >> * >> * %GFP_ATOMIC users can not sleep and need the allocation to succeed. A lower >> * watermark is applied to allow access to "atomic reserves". >> - * The current implementation doesn't support NMI and few other strict >> - * non-preemptive contexts (e.g. raw_spin_lock). The same applies to %GFP_NOWAIT. [0] ^^^^^^^^^^^^^^^^^^^^^^^^^^ >> + * The current implementation doesn't support NMI, nor contexts that disable >> + * preemption under PREEMPT_RT. This includes raw_spin_lock() and plain >> + * preempt_disable() - see Documentation/core-api/real-time/differences.rst for >> + * more info. > > Can we reference the "Memory allocation" section directly? Yeah good point. I will send this as a standalone [PATCH] mail tomorrow. >> * >> * %GFP_KERNEL is typical for kernel-internal allocations. The caller requires >> * %ZONE_NORMAL or a lower zone for direct access but can direct reclaim. >> @@ -321,6 +323,7 @@ enum { >> * %GFP_NOWAIT is for kernel allocations that should not stall for direct >> * reclaim, start physical IO or use any filesystem callback. It is very >> * likely to fail to allocate memory, even for very small allocations. >> + * The same restrictions on calling contexts apply as for %GFP_ATOMIC. [1] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^