From patchwork Thu Dec 14 12:50:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 13493005 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 5B02BC4332F for ; Thu, 14 Dec 2023 12:51:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B97048D00AF; Thu, 14 Dec 2023 07:51:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id B464E8D00A2; Thu, 14 Dec 2023 07:51:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9C24F8D00AF; Thu, 14 Dec 2023 07:51:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 824348D00A2 for ; Thu, 14 Dec 2023 07:51:47 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 4D10314033E for ; Thu, 14 Dec 2023 12:51:47 +0000 (UTC) X-FDA: 81565410654.07.9DABA43 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by imf14.hostedemail.com (Postfix) with ESMTP id 804AF10001F for ; Thu, 14 Dec 2023 12:51:45 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Fr0JwBBu; spf=pass (imf14.hostedemail.com: domain of laoar.shao@gmail.com designates 209.85.214.181 as permitted sender) smtp.mailfrom=laoar.shao@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702558305; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=xHJ+KYyJ1jZcwPU6L/9C8DimrQ09bt4oL7onSyu8iGg=; b=O0OEq/j1/oWDAolYjazR9LZkqdGPMhTdMoBLXcr4q/g2JJrnxNWLFJE9Nfuj/toWePD55R lruceOEITGGy1jr1JTtCqYOl0kZVm4E2qCkJGCcYitgzJHljcRhMAdEo0riCeoLLZ0eehz J+55JlgwxSo8PMLvj2urffiEXW5dE1I= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702558305; a=rsa-sha256; cv=none; b=VmAV1OSMI2O+jprH1hwkuFiNfXLLkV4ASHfR6AEPKxN6kJWjzZCpnT8LtyVWRR5Qklys4U 3qIuhpbVTq0fS/brKJjjF1eiek7sPz+0ipJPuLb8geT767/EZTo+VpEzfUZX0VnH5kdt9y cYEErg1N8a62obzTRtWezDv14jsgfjc= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Fr0JwBBu; spf=pass (imf14.hostedemail.com: domain of laoar.shao@gmail.com designates 209.85.214.181 as permitted sender) smtp.mailfrom=laoar.shao@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1d331f12f45so20323045ad.2 for ; Thu, 14 Dec 2023 04:51:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702558304; x=1703163104; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xHJ+KYyJ1jZcwPU6L/9C8DimrQ09bt4oL7onSyu8iGg=; b=Fr0JwBBuzlz4dxfk/53YCSYaYnaChGMpS8AMlg3z4zhHbjWsyL0hdfLRS3dDi68nhf 0cT/dx2Kqxebq6lid6WLUcPsvzAwu/3TeCrRVO06vZVZOPaP8mDqw2AQdDh2gf03pZmr Eekx0b7oJx/lCVtS/4/BJgJfBSRLck186uDXlo0I2kZ2OPVStawS2uZhlDeTOEKkyzV1 saVocXQ4p6zVnneQpsJQgK6Z4GjpdCq2sQXMS+kqfvB4N2OaK1zCCnaa0iRBmJChJxcp PCUYL+PwZFRT6AaP69BehN9KKFQ5Pm5gF8eSzh/dP9w10u6alI43AzR+mDs3Ix0CP1Pz zCFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702558304; x=1703163104; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xHJ+KYyJ1jZcwPU6L/9C8DimrQ09bt4oL7onSyu8iGg=; b=LK2TIs5XDosoM8TJhNNGabIi0v7NRstgftAuNrZmILR/z0iea/JXrW79lomA5I+nwj 1Vpp5e6k7bNJHxzNWN0BUfLSBvbsBac5BNIKwR+qobmtVGQ29FEx/OKXc2BF1zdP4krX 6SuAQvNtMhlkrzul4Qvsuef6TRQ+q9Z53E+qonJScUduZoSZWrcPSLk0yG+ZIUnvlUsh +aRoO9HI9QP6L9EMFd3nXw5Szz0nWCRWbL08+6yp8xc9+QMSwHD0SXwsHg0WUkME14lX BqgnQTeCLN+QVAfmeSBXZQAMnoPEvNzPgqTZ+mevdj2salkmMoWjJjwCsW4F+ODqH2ln eRzA== X-Gm-Message-State: AOJu0YxBvT4y+gsVpD2zFH83Po5YgiBkUXxyUErc/wnKDY10QYCMSiRo cFix21+xselMtsfcguRcYQs= X-Google-Smtp-Source: AGHT+IHJCfmGa/OQsAmV/JJqlMOqa+7hR321uAICGK3vb14T4CyiXYT6mtyWpONo4B+Q9E+Y2wuXOA== X-Received: by 2002:a17:903:2441:b0:1cf:aff5:8934 with SMTP id l1-20020a170903244100b001cfaff58934mr5418252pls.48.1702558304467; Thu, 14 Dec 2023 04:51:44 -0800 (PST) Received: from vultr.guest ([149.28.194.201]) by smtp.gmail.com with ESMTPSA id jj17-20020a170903049100b001d36b2e3dddsm1184528plb.192.2023.12.14.04.51.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 04:51:43 -0800 (PST) From: Yafang Shao To: akpm@linux-foundation.org, paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com, omosnace@redhat.com, casey@schaufler-ca.com, kpsingh@kernel.org, mhocko@suse.com, ying.huang@intel.com Cc: linux-mm@kvack.org, linux-security-module@vger.kernel.org, bpf@vger.kernel.org, ligang.bdlg@bytedance.com, Yafang Shao , Eric Dumazet Subject: [PATCH v5 bpf-next 2/5] mm: mempolicy: Revise comment regarding mempolicy mode flags Date: Thu, 14 Dec 2023 12:50:30 +0000 Message-Id: <20231214125033.4158-3-laoar.shao@gmail.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20231214125033.4158-1-laoar.shao@gmail.com> References: <20231214125033.4158-1-laoar.shao@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 804AF10001F X-Rspam-User: X-Stat-Signature: xw7qirga3zx8airc65ws7qtu83ehrbbh X-Rspamd-Server: rspam03 X-HE-Tag: 1702558305-918292 X-HE-Meta: U2FsdGVkX1/Dhac0QfSbszgjJPwy0qssht9PBoffw9WSpElZpdxhhcZq8KmJNsIcDZX85QSfEHO5jUUTP+jMOrBq6SGnyv7/l1KOS7sODgCyAN/XAzY33wwP8ladyETTtTQQDDnwfxewbidYpXShiSaSibl36Xzs4pEzE8LME/TpFm6zKM1y/HwnikjRfaYk56PErifQhGC+qD32yY9Ka26oUtMnRYIv2h/KdKBciqP57rfEgWcqDfBuPHB328sMvoWQV8YLsRp3lIieuklSrmiINHUX/mfMw3fC+Qk5XN9pSeFKJ7rRA3R160lgNDT/XyDmVTWHwZibIwCFpvpeCUnrNfEZN0EVis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JqjMSby9iR87jGOrITSZ2SYw8hU9lXB/jWYvbwDyi8LCfW4jppgBQaWlu1GU1EhTyGgUXPkmAb3KbIDk6Ml19FIqQYINHteCK2cn25nks7IbMySN30k0mdSYb0McW4x1XQDpVcHv/FpVgbqrj+Bj/+AsDdB/g== 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: MPOL_F_STATIC_NODES, MPOL_F_RELATIVE_NODES, and MPOL_F_NUMA_BALANCING are mode flags applicable to both set_mempolicy(2) and mbind(2) system calls. It's worth noting that MPOL_F_NUMA_BALANCING was initially introduced in commit bda420b98505 ("numa balancing: migrate on fault among multiple bound nodes") exclusively for set_mempolicy(2). However, it was later made a shared flag for both set_mempolicy(2) and mbind(2) following commit 6d2aec9e123b ("mm/mempolicy: do not allow illegal MPOL_F_NUMA_BALANCING | MPOL_LOCAL in mbind()"). This revised version aims to clarify the details regarding the mode flags. Signed-off-by: Yafang Shao Reviewed-by: "Huang, Ying" Cc: Eric Dumazet --- include/uapi/linux/mempolicy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/mempolicy.h b/include/uapi/linux/mempolicy.h index a8963f7..afed4a4 100644 --- a/include/uapi/linux/mempolicy.h +++ b/include/uapi/linux/mempolicy.h @@ -26,7 +26,7 @@ enum { MPOL_MAX, /* always last member of enum */ }; -/* Flags for set_mempolicy */ +/* Flags for set_mempolicy() or mbind() */ #define MPOL_F_STATIC_NODES (1 << 15) #define MPOL_F_RELATIVE_NODES (1 << 14) #define MPOL_F_NUMA_BALANCING (1 << 13) /* Optimize with NUMA balancing if possible */