Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6587136rdb; Tue, 2 Jan 2024 06:52:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IGwgGL2nU6/rKP+GwYqp3EIeo9dh92bIg8gqGrkGWBswrrRgrD95W5+NxD8LOn76jOAR1PB X-Received: by 2002:a05:6214:4113:b0:67f:f68:ab47 with SMTP id kc19-20020a056214411300b0067f0f68ab47mr20201524qvb.111.1704207134925; Tue, 02 Jan 2024 06:52:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704207134; cv=none; d=google.com; s=arc-20160816; b=ueNwg6LPQiIDBuDCIg3iajp5RTK+6yH3Dlpb2e0NQws6SJEnRGgd3Csxu0eRrjyo6I ovnTPAYOvmLq9dMTRHHzKKpKiOOKPd7XpCF7QwUswS96T1hGdxDskKMGAYAOlo9z/I8k VNtHYpAisCTJIbmtVxxZVnGgX4mlQyJTdmuD7MVxFF8DzeP3HvJAhUtbBQkFhqiPwI73 /7Xnqc6yvsNhxuCfSWIfxtzluANszxwsVKcwp8SiKMuKmwZ+Mfzjs/VkfFKggmViS2rO RP1RWDvzdSmastlpSx0ILxLBPJ6o/EwJ9sR15LYYd/ZqDYMKnZSXAnjd1n6t6dJr3XO2 OdYQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=RgMSQI9ztusESa2/dVb2946CGIyB/32Wyc20atk9ulA=; fh=bdzsJqKGVtXGP+ESw5+vQ4+eXpZQwpXYQw6EMmg+2Rg=; b=sOnfpZigvNyQnmlVLWyDiSk7mfxOfD8kz/b32xQ6CY67f6IR4G2cNBcvwaHOvQ4OVE 9rdR7dxW8vMioWEbeTUqkpi5hMI3ZRWg8+nfucF9iy/dj7x4de5Ol35Bnv38EygCUx+3 SUo+/CaJL8G29l5vUv0VphV0Uoe//GAacsDbMsu5a/uRWd95xufwU+dB1/XtCwRXeVbZ 7oarv4iIXpRKgu5WC+2yDuu90WdcGQ4LWpPDFbWkE7JOE/NrujIuUVpXoRJRPoLlfN5t A0P6xEYmBJ4mPzAuXmRX7e6INMR4Pml6nD42JcSuMdWE+ZYXHrLt9iGwMt2F+QszfVyr S+VQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-14511-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14511-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id a26-20020a0cb35a000000b006806132c8c0si13156182qvf.240.2024.01.02.06.52.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 06:52:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14511-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-14511-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14511-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id AC0D51C220E2 for ; Tue, 2 Jan 2024 14:52:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A550912E67; Tue, 2 Jan 2024 14:52:03 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mail-qk1-f174.google.com (mail-qk1-f174.google.com [209.85.222.174]) (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 A10CD12E55; Tue, 2 Jan 2024 14:52:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qk1-f174.google.com with SMTP id af79cd13be357-7810827e54eso923560985a.2; Tue, 02 Jan 2024 06:52:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704207120; x=1704811920; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RgMSQI9ztusESa2/dVb2946CGIyB/32Wyc20atk9ulA=; b=iqycHvx1x1TFxvSKLR8yYJjR7T1rqF7HIRB0HHlCwS0ZKh2ETP59K/2Mh+2yeZq55v Fe6wqhJBLfPSsarwviFCeEDHHNN0Vu++TD+zIIu60dAknXaKx+yoJoEwt/bldnr8W+FA VDuESk7qmopK4fX1V9Hmtrs8embXS9DT/Pd0XVas/BT9WTuuDyPUNVgQ29gmyLisiEa3 QsAafbimZoWhB9kFxF3Yi0Ycxtf2iZC3MVUT/iP60lZlMiExouvcc2f74EHxUbYPSKmT dY3rtKdvhtgVcEQ6++uI2bIIwr91nhd7+hln6L5uYaHNTy/mTE5cznyJkPLMak52r/dq TH5g== X-Gm-Message-State: AOJu0Yyib69+GiAzxXOrZbccHiDPM1iGfYRIT1ou82UgqmmCmi/bU6c7 Gr9Kg4zT0yMahRS5N3kHXPPa6Qm/i6KxAQ== X-Received: by 2002:a05:620a:384f:b0:781:1adf:f030 with SMTP id po15-20020a05620a384f00b007811adff030mr18675560qkn.91.1704207120346; Tue, 02 Jan 2024 06:52:00 -0800 (PST) Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com. [209.85.222.182]) by smtp.gmail.com with ESMTPSA id oo25-20020a05620a531900b007815c45cdc5sm5127462qkn.95.2024.01.02.06.52.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Jan 2024 06:52:00 -0800 (PST) Received: by mail-qk1-f182.google.com with SMTP id af79cd13be357-7817070291eso406788985a.3; Tue, 02 Jan 2024 06:52:00 -0800 (PST) X-Received: by 2002:a0d:eb15:0:b0:5e8:4f42:fe with SMTP id u21-20020a0deb15000000b005e84f4200femr10739224ywe.50.1704206798019; Tue, 02 Jan 2024 06:46:38 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231223181101.1954-1-gregory.price@memverge.com> <20231223181101.1954-10-gregory.price@memverge.com> In-Reply-To: <20231223181101.1954-10-gregory.price@memverge.com> From: Geert Uytterhoeven Date: Tue, 2 Jan 2024 15:46:27 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 09/11] mm/mempolicy: add get_mempolicy2 syscall To: Gregory Price Cc: linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, x86@kernel.org, akpm@linux-foundation.org, arnd@arndb.de, tglx@linutronix.de, luto@kernel.org, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, mhocko@kernel.org, tj@kernel.org, ying.huang@intel.com, gregory.price@memverge.com, corbet@lwn.net, rakie.kim@sk.com, hyeongtak.ji@sk.com, honggyu.kim@sk.com, vtavarespetr@micron.com, peterz@infradead.org, jgroves@micron.com, ravis.opensrc@micron.com, sthanneeru@micron.com, emirakhur@micron.com, Hasan.Maruf@amd.com, seungjun.ha@samsung.com, Michal Hocko Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Dec 23, 2023 at 7:14=E2=80=AFPM Gregory Price wrote: > get_mempolicy2 is an extensible get_mempolicy interface which allows > a user to retrieve the memory policy for a task or address. > > Defined as: > > get_mempolicy2(struct mpol_args *args, size_t size, > unsigned long addr, unsigned long flags) > > Top level input values: > > mpol_args: The field which collects information about the mempolicy > returned to userspace. > addr: if MPOL_F_ADDR is passed in `flags`, this address will be > used to return the mempolicy details of the vma the > address belongs to > flags: if MPOL_F_ADDR, return mempolicy info vma containing addr > else, returns task mempolicy information > > Input values include the following fields of mpol_args: > > pol_nodes: if set, the nodemask of the policy returned here > pol_maxnodes: if pol_nodes is set, must describe max number of nodes > to be copied to pol_nodes > > Output values include the following fields of mpol_args: > > mode: mempolicy mode > mode_flags: mempolicy mode flags > home_node: policy home node will be returned here, or -1 if not. > pol_nodes: if set, the nodemask for the mempolicy > policy_node: if the policy has extended node information, it will > be placed here. For example MPOL_INTERLEAVE will > return the next node which will be used for allocation > > MPOL_F_NODE has been dropped from get_mempolicy2 (EINVAL). > MPOL_F_MEMS_ALLOWED has been dropped from get_mempolicy2 (EINVAL). > > Suggested-by: Michal Hocko > Signed-off-by: Gregory Price > arch/m68k/kernel/syscalls/syscall.tbl | 1 + Acked-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert --=20 Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k= .org In personal conversations with technical people, I call myself a hacker. Bu= t when I'm talking to journalists I just say "programmer" or something like t= hat. -- Linus Torvalds