Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6579928rdb; Tue, 2 Jan 2024 06:38:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHWjhtgstDNsAiMy4F3Dqu/2VJSfhuSKhUrmicolUjUXXL5kMoGbNqmzY12qgoeYRpOpxEj X-Received: by 2002:a05:6e02:188d:b0:35f:e85c:6c0f with SMTP id o13-20020a056e02188d00b0035fe85c6c0fmr17527967ilu.31.1704206337562; Tue, 02 Jan 2024 06:38:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704206337; cv=none; d=google.com; s=arc-20160816; b=cKmr5xgYaI2jUBkCc/O8DWazlF3PRe7V2lkBjq8v6qN/++0+pHBuREmtC99HeULrej 4VGSdOB5srrOX4/+dG74MFNosYQbFf3ONR4VgVx5X0qiCmsnusNdV1HJjZvjN354TekT BzEx1j8gbXsyL3L01iMnC70VRdCGgYJ+CFzhHfFrp42GEUPKt750KGq0h6zRzngRqLsq GEVix8qaCka25Ie7jsg+CmMqqon+gZlmn+dZEEFhJMMe0ZpGloKc14NurokZpN4bAbyW 755FZ+lyZFTHVeQP4761rweH5mm4YW7ZFT8J1z6D2jBGwzj+a9K3kNfuddKU6PvBQhJZ w+HQ== 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=AObwZt7UaKxT4p/1Mc6Gm1CxPN5HAmUYwmfKr7LdX4E=; fh=bdzsJqKGVtXGP+ESw5+vQ4+eXpZQwpXYQw6EMmg+2Rg=; b=CCDQbcNCxpxygcyQOJX+RE7bLl/nM/dkhATS697d1djceAtvMpSnyDfU6GNEbkzZGm dMqrC1+1txiEq/uLTQgkhVEQuIKqRDXdoqFFuF54aprqngP4kzoazb5c+3S82CS10oCK QcdZRyua5hN8HZ2r+ha7S3sV2Ebj/1xRtjIcxhocXqaffX4IouRNDM8c84/BvBO6pwbl RLAgJXCpOUplKUHV6gqX9nd3WjpzihciQWji70GECpi4Yiltut/+3fEqk2d1R0y7QG1Y 1nYikNSOE3PuGFz3+saZxkyXcB3mTZDscMcqoDNVvnolESQvuBqF2j9Q6d2tnuzG3zvN S1Pw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-14488-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14488-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a10-20020a65640a000000b005ce00003530si17055892pgv.562.2024.01.02.06.38.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 06:38:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14488-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-14488-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14488-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E2B0EB221A9 for ; Tue, 2 Jan 2024 14:38:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48770125D2; Tue, 2 Jan 2024 14:38:34 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) (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 8208311722; Tue, 2 Jan 2024 14:38:31 +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-yb1-f175.google.com with SMTP id 3f1490d57ef6-dbe344a6cf4so2910306276.0; Tue, 02 Jan 2024 06:38:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704206310; x=1704811110; 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=AObwZt7UaKxT4p/1Mc6Gm1CxPN5HAmUYwmfKr7LdX4E=; b=HCs35ZYcJ3Cl0q39Hx3v56JwtNjrRm5UpvUfM1xTbl4L7XQtkCYVygHhEbyPh27hhn TSLvYQmqA4kPEF+gdTTJ66CgXwvjIOoj40faIq8/8lZjaf+f2NUVM54z/aer735WLn8/ ZSMIQtyot0RABKP+KTe1T1Fij+HHfLBOXGzX9e9NjlpDLHn0tTLw2JoAFlwQWpgXu2cp RvpSRHPlGPXaXBABXmlseX5YMhqRlmZVM5oVgUVkK9RJyrfviLn8ypI5oFNc010tl3P/ /LWJCQmL3jhDtX2unhmqjdPx0a1sIjdARvjrQ37Fwhv50QL3WqIMNpLLAHLQQg6Dh7bb EeOA== X-Gm-Message-State: AOJu0Yz+jitWoUFmPaWqxV/WhN2u4454MkqdpHIpnldLDTCyrzC9Iegt bmpPh4ObTn4iZ4BOgS1+jCm6i8ifc+d/iw== X-Received: by 2002:a25:ada5:0:b0:dbc:ec6b:3e47 with SMTP id z37-20020a25ada5000000b00dbcec6b3e47mr9878503ybi.33.1704206310511; Tue, 02 Jan 2024 06:38:30 -0800 (PST) Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com. [209.85.128.171]) by smtp.gmail.com with ESMTPSA id v17-20020a258491000000b00db5380fc1absm9962074ybk.19.2024.01.02.06.38.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 02 Jan 2024 06:38:30 -0800 (PST) Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-5edfcba97e3so47552437b3.2; Tue, 02 Jan 2024 06:38:30 -0800 (PST) X-Received: by 2002:a81:88c1:0:b0:5d2:5caf:759 with SMTP id y184-20020a8188c1000000b005d25caf0759mr12335901ywf.22.1704206308913; Tue, 02 Jan 2024 06:38:28 -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-9-gregory.price@memverge.com> In-Reply-To: <20231223181101.1954-9-gregory.price@memverge.com> From: Geert Uytterhoeven Date: Tue, 2 Jan 2024 15:38:17 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 08/11] mm/mempolicy: add set_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:13=E2=80=AFPM Gregory Price wrote: > set_mempolicy2 is an extensible set_mempolicy interface which allows > a user to set the per-task memory policy. > > Defined as: > > set_mempolicy2(struct mpol_args *args, size_t size, unsigned long flags); > > relevant mpol_args fields include the following: > > mode: The MPOL_* policy (DEFAULT, INTERLEAVE, etc.) > mode_flags: The MPOL_F_* flags that were previously passed in or'd > into the mode. This was split to hopefully allow future > extensions additional mode/flag space. > home_node: ignored (see note below) > pol_nodes: the nodemask to apply for the memory policy > pol_maxnodes: The max number of nodes described by pol_nodes > > The usize arg is intended for the user to pass in sizeof(mpol_args) > to allow forward/backward compatibility whenever possible. > > The flags argument is intended to future proof the syscall against > future extensions which may require interpreting the arguments in > the structure differently. > > Semantics of `set_mempolicy` are otherwise the same as `set_mempolicy` > as of this patch. > > As of this patch, setting the home node of a task-policy is not > supported, as this functionality was not supported by set_mempolicy. > Additional research should be done to determine whether adding this > functionality is safe, but doing so would only require setting > MPOL_MF_HOME_NODE and providing a valid home node value. > > 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