From patchwork Wed Nov 22 14:15:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 13464939 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 17138C61D97 for ; Wed, 22 Nov 2023 14:16:29 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8E6A86B0618; Wed, 22 Nov 2023 09:16:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 872886B0619; Wed, 22 Nov 2023 09:16:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6E8386B061A; Wed, 22 Nov 2023 09:16:26 -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 4B2406B0619 for ; Wed, 22 Nov 2023 09:16:26 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 01CDF160C43 for ; Wed, 22 Nov 2023 14:16:25 +0000 (UTC) X-FDA: 81485790372.12.7FF7A8C Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by imf11.hostedemail.com (Postfix) with ESMTP id D50254002F for ; Wed, 22 Nov 2023 14:16:22 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=T3X7gGls; spf=pass (imf11.hostedemail.com: domain of laoar.shao@gmail.com designates 209.85.210.174 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=1700662582; 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=a1wPdyu7ENjoKkwP42urAAujwzKPPcBKgK7aJbdTPeE=; b=o0AcHbcXS0dB3AJgNop4zgkPmaS+NeKBNObul2tZOGop/jhSvEitRMdA/2ivWyjp2gqreZ PX57rVIO+QzGxM8AxoZZn8tID9WhJvszD22BezalFkfd417eMT+DvOewmtwRTr37ocM2OY NtgrqMCHwVmX/qjw0b/1dGlzhHmJemE= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=T3X7gGls; spf=pass (imf11.hostedemail.com: domain of laoar.shao@gmail.com designates 209.85.210.174 as permitted sender) smtp.mailfrom=laoar.shao@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1700662582; a=rsa-sha256; cv=none; b=yobvcNd9rZFq3T2/rOcboPB1LDIm0MLgS0QE6kdiYz5UgLLue8ZKxWl2WiZIYHQvTdw0LR kgAXLqfw8NnKRzC1l5mPpLwXy2gteJ7LMjmswwZGBwJWhCoCUwG1+K9srsLEELgo1/e4Ry qHrUeim2bf9rkm9KrTjXYNGW8KRIHcs= Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-6cbda959062so60624b3a.1 for ; Wed, 22 Nov 2023 06:16:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700662581; x=1701267381; 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=a1wPdyu7ENjoKkwP42urAAujwzKPPcBKgK7aJbdTPeE=; b=T3X7gGlsyop6RifXI0d82+pDWUndC4DhphlXZKFwSBH882LK7VUU3Z6YeJDUdb16ec 0Q9qmFyIoLi80ciatFq9W9qzFZmYwhiv2xvsSxGd6sSOEVrEVWudArhHvXAR/SCkB4xd s/n5slnyTQTnhsR3rzmoakkGje3jTPkRPgzsIKilteTVPcrqcvczQgl6jayhD25rzpkG RJrNmxhz3dmKX4+Cxvl/ksfRzA2FmxdMbYz9AwGaWsPml3CHy4nBPPUAVLFEFNuUAkUl 3UqC19GXUDaAROvmeLE8mR0BXMQC5qe9vKHwVX5b31bo+Ed83mD0h85M1R1MDorAexOZ /ygw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700662581; x=1701267381; 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=a1wPdyu7ENjoKkwP42urAAujwzKPPcBKgK7aJbdTPeE=; b=ezguyIebOU3V2P0nFa0rcW8BFVhHAeSe2LJGnSC9L6UeGlUlsoUcZXhm8w+GDZzrPL g48lgC6YUfYw69N1uoS8kdyksrihH0oYzV7QEF0Ao3ur4ncvnJDYD6gbotGKW40Tqbie d3hrep2xl57jZlVOo9lYqdB80NSngywsqFeJKdMdu4W4gmvfJnLTqRtIU2+WThZ8Rmbu G3A6ymVmVW6ASNXAIOjvO3paWsO+I2eA7asob5NJarPDGI96yr98iJD4/w1MhNnWQaw2 xcgmorCrEhMRUoCruwCJU9cmdR1c1Fnmk7V0io4rT0rANM+dIvHWNtjEI8/OeID4zCbk n41Q== X-Gm-Message-State: AOJu0Yw4VlMrm+TO6HG5z2U0KFTdvyhjIxF7u1nSgH0MJjrx54IVsQmN mP8cWJSCTrvJkjwqGWVBOeM= X-Google-Smtp-Source: AGHT+IE6MKBa9DH0DLtzNahG0PY3BEbv8SQ3K8eKqp+aMh3wCYdSUNsYu1dxH5w+xaX+5VuH6wLbEA== X-Received: by 2002:a05:6a21:33a4:b0:18b:4a28:6e2d with SMTP id yy36-20020a056a2133a400b0018b4a286e2dmr1310481pzb.22.1700662581452; Wed, 22 Nov 2023 06:16:21 -0800 (PST) Received: from vultr.guest ([2001:19f0:ac01:a71:5400:4ff:fea8:5687]) by smtp.gmail.com with ESMTPSA id p18-20020a63fe12000000b0058988954686sm9356260pgh.90.2023.11.22.06.16.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Nov 2023 06:16:20 -0800 (PST) From: Yafang Shao To: akpm@linux-foundation.org, paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com, omosnace@redhat.com, mhocko@suse.com Cc: linux-mm@kvack.org, linux-security-module@vger.kernel.org, bpf@vger.kernel.org, ligang.bdlg@bytedance.com, Yafang Shao , Eric Dumazet , "Huang, Ying" Subject: [RFC PATCH v2 2/6] mm: mempolicy: Revise comment regarding mempolicy mode flags Date: Wed, 22 Nov 2023 14:15:55 +0000 Message-Id: <20231122141559.4228-3-laoar.shao@gmail.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20231122141559.4228-1-laoar.shao@gmail.com> References: <20231122141559.4228-1-laoar.shao@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: D50254002F X-Rspam-User: X-Stat-Signature: 9fukgkkqq4qjnrsyx1pw9ztw5t9zk34a X-Rspamd-Server: rspam01 X-HE-Tag: 1700662582-782136 X-HE-Meta: U2FsdGVkX1+0pUYjL8H8bFTe9HAMZUQVDXW7wBslVhRgSd8hHcySQP1U+3ZtpLYou0q6ILw5biXqQDpk89qqw2hX4Hlmc6BA9DyoDdDtmgCBjXGj1qmPvYm5fMONsf1T0giKDwH446YLoUpUdKYJs0anqGarz63Yo5Zx/BQXLqq8arvutDkQYVEzy7stAlzOHKMgRKcUDbSA2BhYrkv11a7YoStuRxvIwRtVa5e3AN5AUlvT0fdZFnspVwFQRWKZaZB0/7iX/G1LXcjDXRIycZqmifXhg+gJeAc5VO+YH7+DCk6g/RHtWn9GjXLJIsnt7eDj46LGEaPX9fM3dlS9Z1UcBrxhlKMUck8v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6GoG6ulrdOgQXG0Eb9d1Nc/IO7C14U+lQEtq/xJHESbhU7xQH7o0IWGLMGz1Ao3V3Scqq9gyD+j/0iwb7jySlW9LLnwRkdgMQu8rKoQ2zf26NGqSTzt8dhTtC36XJJJcIne3LxZgvKLU9cz24iHAE78Gq8lRu+hPB0P 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 Cc: Eric Dumazet Cc: "Huang, Ying" Reviewed-by: "Huang, Ying" --- 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 a8963f7ef4c2..afed4a45f5b9 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 */