From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f181.google.com (mail-qk1-f181.google.com [209.85.222.181]) (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 9C23F4C9019 for ; Wed, 1 Jul 2026 18:21:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782930074; cv=none; b=d1hxKDft3vED0EoUzvErzSb9rVpPG1A2kOefwch9VbIty+4YIuagWyiDZlwps9Qnq/XbdhfKT9EAtAzhf+Tr5BMhB7pyQFji1TZYbczZbU8ZxXkle3t47mLT+z6wKrq7HqQVmxIiHO8Nmtenzzvv0PzJ4KolFsULOZACutHppGA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782930074; c=relaxed/simple; bh=nItfjWaMhvqTGGPSuKIqP4AzvuW18zPSx/dsB/4uVmY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TY3JvR3El4xIQ9TeH0sUxTbz3w3NBVy1hBgihnYQLNZaF/m+GhZCMIoaNvjO1CkTNNqh0MKQ/s3vkJOOo37EXYDKuz9lluumsK+iz5g5D3V10WnLEDhtDFU0H0l8BtWfkbSbSgnOC3evbg/mF5c1YQs4AuxMkkRevw5Z2EM6su4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b=YpruxKr/; arc=none smtp.client-ip=209.85.222.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg.org header.i=@cmpxchg.org header.b="YpruxKr/" Received: by mail-qk1-f181.google.com with SMTP id af79cd13be357-92e5c92c389so48863185a.3 for ; Wed, 01 Jul 2026 11:21:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg.org; s=google; t=1782930070; x=1783534870; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=QBjYQGhoBP1Rzw+O9Mu9B3KRHSZGqqE2WAhtEsoN9xY=; b=YpruxKr/yMqtePjYGl05hlhSvC9cuGcUInAFV7Ra2TgWxO3trfbGyJoZWK88q1nASV xtwNvhSXt7DnHtD+2yEa9WrA7oSn84XmgryL0P67QvFMVcEws9K6TNObywd74YfkNJq+ g6W6HMtDKU3m5c7Uu50DeDyc3E1NTyyJSiTMUANIHS8hrhtOHyxhVMOl4eahuYOO6zXT DGHA216kKbQeOQSkzLtovdmWx6ZGE8Gb4j5GZf2VoO6j6RgWlrcN1nRxY/Mb7S659Zr9 n0wOoD9/O9fjKs2lITVwdUiY0MWmscUyq7H4Mxxc0zw/S/Ep4QRM4Dbtz1m50UfLca/Z N8Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782930070; x=1783534870; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=QBjYQGhoBP1Rzw+O9Mu9B3KRHSZGqqE2WAhtEsoN9xY=; b=RR1P4uB6xTdpJhbpYgKTDfVttAO3aTz0zAg0uaYyMU56grwVNVjTPhRqum+Nkk5XYa iTg2wHbNOWwqrcrKodBnZF4hdJ5zTDw4QMz6mf+lTdHWAqNeF7y+bSkOyaP7+m8Ktjud 6xV/M8ziRXsGJTJgpt/pfq9q2ZFsKVbLbJeH0RzEQavA2sXg/4H/Vx0PQgZhve/aGeWQ kihFHfjyzFSyTwOxB3aYShDnazDCliER9F3O9gAYSjIF4yTPq97ATb+vFBymVZy5lsYA rm4tohSDmZ89B9PumZbA8u94BPA5f3i+2gSk8BZk1uC+bijnVf7krnOzJFwSPOEswETS dcqg== X-Forwarded-Encrypted: i=1; AFNElJ9l9Sr1u1Cz//Pd2WdPOj6FV+0NkEJREKxtu/JVP93FWSEbyxnxQ2efGcYvi5U8wNgn6DuMP6wlAu0YtsU=@vger.kernel.org X-Gm-Message-State: AOJu0YwQthBtrrzzYpYyfuiqGwg49ndQPD3epdpy1GRxgtRVypzxgnsb gzkAo5946HYIcIbjgu3MFgCfiQXInJAPT3+oeZu2kHNpYnORsLMA5bLtMIGx/+Bifoo= X-Gm-Gg: AfdE7cl2QjDlfZEpifO8T46rUAArzSAvn3nKOH6JRQZvtLqsXPBMfEsG0laIs0G1Mcy TtNZfd1uI/mVl8srKQwfoPGROCYVNR7GOpYP7YeErPIzcWE+9T5lSz4qN90s016xppSOvvJTXIc ikRBZHDo5xmC9dLLrjmSpQDu1Rqx+uqPLUyb+fS21i0cJBQ2HKqXewEvoR05xtyXHYMj9SgR/5/ e7K3M8xOdPMl6aevclDChrUP6JLEiOeD2P0VdLwMQx2R2q3VITGh55HSEvUSWZMgeg+TRoWHO8D RtwuA1PjUzhTIX1Vq7BoESYFe+5NQY8wr3RYB65KUew/4X4bvUV3CJhU3rtUeKCOdWiwqCRmyEM CyuMP1k4Z79SsE21wlt7Hzc1ZlaJFaxzTzxEijDoxd8UwajvFzLf6pLFLggMQF/M1Hfiz8at9a/ QPDBIbP3EKJpLYW++phEyS7A== X-Received: by 2002:a05:620a:2851:b0:92e:52df:3523 with SMTP id af79cd13be357-92e781dc83emr395697685a.8.1782930070154; Wed, 01 Jul 2026 11:21:10 -0700 (PDT) Received: from localhost ([2603:7001:f100:500:365a:60ff:fe62:ff29]) by smtp.gmail.com with ESMTPSA id af79cd13be357-92e80009552sm9286785a.11.2026.07.01.11.21.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2026 11:21:06 -0700 (PDT) From: Johannes Weiner To: Andrew Morton Cc: Gregory Price , Michal Hocko , Roman Gushchin , Shakeel Butt , Muchun Song , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: gfp_types: fix __GFP_ACCOUNT, GFP_KERNEL_ACCOUNT documentation Date: Wed, 1 Jul 2026 14:21:02 -0400 Message-ID: <20260701182102.1586784-1-hannes@cmpxchg.org> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Gregory points out that these descriptions are cursed and confusing, considering what these flags actually do. This is mostly due to historic implementation choices and cgroup1 baggage. Improve the description of their actual effects. Reported-by: Gregory Price Signed-off-by: Johannes Weiner --- include/linux/gfp_types.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/gfp_types.h b/include/linux/gfp_types.h index 54ca0c88bab6..463b551d12d9 100644 --- a/include/linux/gfp_types.h +++ b/include/linux/gfp_types.h @@ -136,7 +136,8 @@ enum { * %__GFP_THISNODE forces the allocation to be satisfied from the requested * node with no fallbacks or placement policy enforcements. * - * %__GFP_ACCOUNT causes the allocation to be accounted to kmemcg. + * %__GFP_ACCOUNT causes the allocation to be accounted to the active + * cgroup context. * * %__GFP_NO_OBJ_EXT causes slab allocation to have no object extension. * mark_obj_codetag_empty() should be called upon freeing for objects allocated @@ -320,7 +321,7 @@ enum { * %ZONE_NORMAL or a lower zone for direct access but can direct reclaim. * * %GFP_KERNEL_ACCOUNT is the same as GFP_KERNEL, except the allocation is - * accounted to kmemcg. + * accounted to the active cgroup context. * * %GFP_NOWAIT is for kernel allocations that should not stall for direct * reclaim, start physical IO or use any filesystem callback. It is very -- 2.55.0