Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3833763rdh; Tue, 28 Nov 2023 05:16:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpSQbp36rwgYxPLS/gkiLH7NaEhFrIx1bGY3A0R3G4alz9hlZRq3Cs6b/6fWTu4PNP57LU X-Received: by 2002:a05:6a21:78a3:b0:18c:3ea9:b85d with SMTP id bf35-20020a056a2178a300b0018c3ea9b85dmr15221620pzc.11.1701177405350; Tue, 28 Nov 2023 05:16:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701177405; cv=pass; d=google.com; s=arc-20160816; b=VetvAo/8YuMzu5RSbclU1mJiXzHbBvGmDiS/txQAZD13N7ZW+3wmHMEwhW27TC8b/4 1CENwIFTMqnXkMRTi2MxUgfRe8iFDtfSJ2Hyj048jEQ71kjUn+KwiPAPfaH2/1Hg2kwV P0+6uBmKmUST0sotslsx/Ury0SNNFXMoWNifS0ucNOrYNUCiNZceQ3PAjiDUFGH5madm OqjT4Kj5erebb/NCrNFmml+YoVkILnVEcoZtOJ4Ij/ILPUjpTAWzQ3xh0jeSR0l6vknp +g2wSz9lc24wdydszEcdQ4K3dXPq+IK3v0rwcQWi+XDysyoSKzEjLcv0UFGQsZcdSBvi Prpw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=O6F+FZjJpfn1HoLaBjoBNRhDjZr23NPVpqCE8ERdGn4=; fh=448dP942/3OGbtos9B2G1vkYrvYHgwtSdjP+VYKWjqM=; b=of7qWQnpEzddMAoc0CQEQBDuHtXNLxC4Wz+NwmHMp5Rfsfeho0j1kjSRjHvvtZ5QL3 eRJcAkXlwg8RBShL3ulpMJ6BJFtYe2d6OorwGG4kIB+DNjbBxCq7Ot83HsTQHPWOhPdQ Tte9Qsyg0yNXgym5ZmATX6XzYs/LqPjmF6617AhjZxdGoGL7vTXY/q8RJHpb2CvKY260 hk83NBw7rWBINQ8ikh1izt82OrPv3XRfpUtf+HVQ4Pnff8Gc2msvPl92BeQ7uBblOEp5 JkC8PiGUT/N77ceRXFyAHYfcChUisDKK5FydKKUVZDdYhoICtgDTDY3iCVK9MtrzmIoc UBvA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@memverge.com header.s=selector2 header.b=XehbtVxP; arc=pass (i=1 spf=pass spfdomain=memverge.com dkim=pass dkdomain=memverge.com dmarc=pass fromdomain=memverge.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=memverge.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id s14-20020a65690e000000b005c203ace543si11378440pgq.774.2023.11.28.05.16.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 05:16:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@memverge.com header.s=selector2 header.b=XehbtVxP; arc=pass (i=1 spf=pass spfdomain=memverge.com dkim=pass dkdomain=memverge.com dmarc=pass fromdomain=memverge.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=memverge.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 36B93805564E; Tue, 28 Nov 2023 05:16:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345057AbjK1NP7 (ORCPT + 99 others); Tue, 28 Nov 2023 08:15:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34834 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345026AbjK1NPy (ORCPT ); Tue, 28 Nov 2023 08:15:54 -0500 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2058.outbound.protection.outlook.com [40.107.223.58]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C423D10DA; Tue, 28 Nov 2023 05:16:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cJOIfd5U8xDrH+PFdd/+dqaLlEs2KCXGZl9bT/2xUtE7HWarXhzBEB8KxNTO9o9AQh4iLBBjRCYsGZl39HapcR9MGa0MbPU1Tf0HM/stiNMz7DnRM2Cn6taS7RizjYFkkU7lELIe30M6VM8M5MC/yQQE8RvjAmlw0nRIRLL3BAAeJH5n3+BjSLOfw7X9Qp2tCfQ9fjPIrb9x1T7XWVoGQOO1SdDWzeBuTVXAzkXuxNkl5Mf472ArwXh1b+mdRPbDRPdTPKUlsNc0wJth9WOjtC/5rIwE9dTwJWVeIffo7buFnim4E511haoLl9yBvKO3WDBd3piTh6oh+FUeVpHLvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=O6F+FZjJpfn1HoLaBjoBNRhDjZr23NPVpqCE8ERdGn4=; b=VZsQ2Ck9hA9CxfhzJPE0/T6LYFC/Mf0hBmkK3cw/MaP3CqtGyFbGUnjUhu+2vMeGu5oz7TzUx/JnYFY2cjNjWHmbUUvesZbG8Mdc5tL+LP8deTFzPWywchORQwGiYVHqnaoeGhja1xxECUDjtsBmay5q/heLZAUQf6CXRGSnV0kFpFTBT501gG5kgVkIaOUGolOW4TCORrsFFSQXvqbc0BBRrJrSa14KPUGzLn52JH9cXGrbJ/CZwZWgzw6k7u9q32BzSeemd23U4uDrGQ0sLufuFTUAXIUnRH3tvzPeP94HHhFU5W5hMb4xx5QEc7WVmFAKw1Ck5YBrczxW3F013A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=memverge.com; dmarc=pass action=none header.from=memverge.com; dkim=pass header.d=memverge.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=memverge.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O6F+FZjJpfn1HoLaBjoBNRhDjZr23NPVpqCE8ERdGn4=; b=XehbtVxPTeygWLjYKcbwhEs4QjkSviA8BooXAQ8p26cULY5t02JtH2X5AEZHWWc2ehr6RQeTZ2/my7yHNjLr0AmFNKUTvSlrl14AFLjHHr7xS4vd8Mn60Jx4Mkk9NIjFmLIxPwXSLKX8RyKn5sbCBMtX9Kxry3eXX2m4DnzjcHc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=memverge.com; Received: from SJ0PR17MB5512.namprd17.prod.outlook.com (2603:10b6:a03:394::19) by SN7PR17MB6819.namprd17.prod.outlook.com (2603:10b6:806:2dc::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7046.22; Tue, 28 Nov 2023 13:15:57 +0000 Received: from SJ0PR17MB5512.namprd17.prod.outlook.com ([fe80::381c:7f11:1028:15f4]) by SJ0PR17MB5512.namprd17.prod.outlook.com ([fe80::381c:7f11:1028:15f4%5]) with mapi id 15.20.7046.015; Tue, 28 Nov 2023 13:15:57 +0000 Date: Tue, 28 Nov 2023 08:15:47 -0500 From: Gregory Price To: Michal Hocko Cc: Andrew Morton , Gregory Price , linux-mm@kvack.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@arndb.de, tglx@linutronix.de, luto@kernel.org, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, tj@kernel.org, ying.huang@intel.com Subject: Re: [RFC PATCH 00/11] mm/mempolicy: Make task->mempolicy externally modifiable via syscall and procfs Message-ID: References: <20231122211200.31620-1-gregory.price@memverge.com> <20231122133348.d27c09a90bce755dc1c0f251@linux-foundation.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: PH8PR21CA0002.namprd21.prod.outlook.com (2603:10b6:510:2ce::16) To SJ0PR17MB5512.namprd17.prod.outlook.com (2603:10b6:a03:394::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR17MB5512:EE_|SN7PR17MB6819:EE_ X-MS-Office365-Filtering-Correlation-Id: 445cccf6-4b18-48b0-524e-08dbf014282d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WpD2q9HNIfPSkVkDRJ9xAFpNUqDEsugVivYPJbazTOElYAzctbzbgMtJ1uHj+Y+ZmNsRU169TFhlnS4qJ4D8g+w6iRxW+ESdZhZ9PtZIyuMPQSwdfNTojYJw/PtkzO6abnXtcmqX4g6KDVG1np0jvhgwMaZYWnjEvKScqG8BvPU3qv8ncdFV+c9js8s0lfjoog5PV6qs8jG+01eRIFLbwxUsbSb1NvYWZRCR4G8Ru+2sw21ae9C7CS8R0VEp5YNorqO5wlYrblr/RrF/svv7LSEkI2w8X0J6p6Ut1G50GI2fFyfxpgqRyIwkdCgumTQql82+zgSPCzjlQTNDM0Mf1Ht38fszkYLLsbEvZySO4IHj8fu97a+z1U1Rg30zNpg4vLqNMaofbKQjvJq73aBOwdfQ++ilTCZZZ24xZlnIgUjq4knck9t7zLZJxiOI7VCfm15A4VWV7wP7cmLcP+Y9BOLogeb//TYhK/S1bVpNcG09wvLBE78TL2qUUMwysYxBF/ee84Rrs99g+ODFI/IDKXuckv/QqR1Mb/ghnc44Pm54d+DPy13g44qlSTeETtGj X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR17MB5512.namprd17.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(39850400004)(366004)(346002)(396003)(376002)(230922051799003)(64100799003)(186009)(451199024)(1800799012)(5660300002)(7416002)(44832011)(478600001)(86362001)(2616005)(26005)(83380400001)(6506007)(6512007)(2906002)(38100700002)(6666004)(36756003)(41300700001)(8936002)(4326008)(8676002)(316002)(54906003)(66556008)(66476007)(6916009)(66946007)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?X5Qor0B7Twu074At4B6PPb7RyIGi2ZAyvc2rS7qIhMgiBbwzphTYAtgCCnid?= =?us-ascii?Q?GSvwTr5DPjziXHMNZ5KPuVq3PW4lUpBx1vKaN1oP2LyopKqVycjPNW0FEsoN?= =?us-ascii?Q?cEMJHImRnhvaDii6OOaHvIrkx0vHOE5SuC1XpGMcSeK+p9PTk+hXYnJCHCma?= =?us-ascii?Q?NYUdAd9C2wMf46knHwTcWbo2UyyOsEKFa7IiOe9M1kN2+19aoHeqSRv+3fNA?= =?us-ascii?Q?6HAjIPNXfdtXDw0Twv22IG2ZCLsdPhOoAni5vpF3mGBHayo/NZTOWdcGpxpJ?= =?us-ascii?Q?1AGjMmCOBE4QJCCDveEmlQv/8Zfj3TfeE1a4/qUrS+3E0Oy70sMGaoLjwUNu?= =?us-ascii?Q?hjygpK9UALYkqrYspXjaM/S1gegLuliUIgkxa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?svQ32eBgtzpdbdAAYBfxOs/tbwwmYZdU62r0oOHQHutY6awaa85xFMMs5RZb?= =?us-ascii?Q?phJGb4oQP/dRmH1QxukTQTmTA1Dh5wABbhIqcE73tfNj5SqSz3Ztv/znOFND?= =?us-ascii?Q?s42yNiFifwCGLnh8EYhuxGeMDfcpgilBb0TtAowN7THzDiVWWHC4BupG94tz?= =?us-ascii?Q?Y6IrGCjWxV2Y4s/RygnwVs0KVoJL/OnMpFLpAAUl5YCvmtl+zcSjYlSNFhdN?= =?us-ascii?Q?idpFlmcoz4ICMmTP4Hl0JKwazV9yYVSQAzB55KOKTpuxa4RvKo+Kdar7C31R?= =?us-ascii?Q?hGFxdHNVxE35DxYXh2A6X5Y3Ylpfbm/O9JTHmjBdoxLm78B8wfAwt2Htyd8q?= =?us-ascii?Q?pQ=3D=3D?= X-OriginatorOrg: memverge.com X-MS-Exchange-CrossTenant-Network-Message-Id: 445cccf6-4b18-48b0-524e-08dbf014282d X-MS-Exchange-CrossTenant-AuthSource: SJ0PR17MB5512.namprd17.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2023 13:15:56.8362 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5c90cb59-37e7-4c81-9c07-00473d5fb682 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hSAS0MTUmHqSiLoI6cXLkN5Idgdy+kYxHMYHNKYKYiITftFYV1ojROZhEqklh0b8bw1ypKG9UdnvxIxLIo+apS+iH7yR6UsHm1SLHs6niLI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR17MB6819 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 28 Nov 2023 05:16:39 -0800 (PST) On Tue, Nov 28, 2023 at 10:45:02AM +0100, Michal Hocko wrote: > > 2) Should we combine all the existing operations into set_mempolicy2 and > > add an operation arg. > > > > set_mempolicy2(pidfd, arg_struct, len) > > > > struct { > > int pidfd; /* optional */ > > int operation; /* describe which op_args to use */ > > union { > > struct { > > } set_mempolicy; > > struct { > > } set_vma_home_node; > > struct { > > } mbind; > > ... > > } op_args; > > } args; > > > > capturing: > > sys_set_mempolicy > > sys_set_mempolicy_home_node > > sys_mbind > > > > or should we just make a separate interface for mbind/home_node to > > limit complexity of the single syscall? > > My preference would be to go with specific syscalls. Multiplexing > syscalls have turned much more complex and less flexible over time. > Just have a look at futex. got it, that simplifies things a bit. I can pull my set/get mempolicy2 work forward and just keep the interfaces pretty much the same. Only difference being an argument structure that is extensible and possibly some additional refactoring in do_get_mempolicy to make things a bit cleaner. ~Gregory