Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2531150rwi; Tue, 11 Oct 2022 09:52:08 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6d8XkGibUleZMW0lW9wZuFrKf3LTzbhltGSZ2VB86e5aoAXsw9+Bi0GY8kNszI06PaKpQ6 X-Received: by 2002:a17:902:70c7:b0:183:3e66:fe48 with SMTP id l7-20020a17090270c700b001833e66fe48mr7091149plt.165.1665507128020; Tue, 11 Oct 2022 09:52:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665507128; cv=none; d=google.com; s=arc-20160816; b=1GWhFq+YoNxUVO6hU+216uVODKj2/88Lihf4dBTGPcQ5Fh02ddS6/vMl0waCl715LI c4YYkDvR94YQKQa8bP9bm4uMpFi1dWPq2DsDFdkOHjWnYLo3QgZDulBAjWtg6P2E5KSE eQ3NryecbXDyo36bkys8H0rf6gOlmrntDGf4Qf1MlkAJ3Clqmb5J0Zja6OjfKFdYvGeR gBtvHpZKtP0CWb9+2TkoJozcB6plDqBTcxAtgP4SipPeYezGc9Yy8geAIiZ5Xj0DhZW6 KzgdAcL3TVQn9nlBvVH/PrYBKTj3hJfo9Yvu3tvuwHdrOWzkS707KWPTz5Rn5yH0oAg0 EfwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=RO0FO74ctDC9cFYZEDLiw7BGFiXGuRuOlnU9ALUUx4Q=; b=QoZ184EOEwKilpFtoxGAjgSVnUZ9dEZPseOJZFQ0rWsWjcrYnvkWnNENW/pd1halWJ w2knf6rYV+M2e787rDrkElTHCiUHgCLMMzJLVcx2hKG2qNFK35nxh2RgmpqZrnPFj/xU oupmv6fxl7EfUXh76T9FJwZO5JqEDSDDQNnD9p5LfIrPMLkCCy3xYfF9uc+4pUX1+s6H Y2JI9ZYbiEqbi2biUIZG7Ij/L1YTqrjaPzzzwEmYVSOTP3glqmwu5vM9pQ4kkMh5GDHA J0rgpE0+/4RSmBk8JsinDEx1nRBg7sLwEzT/Y+j0Xyl6BZU4QWl175yD0GSBqwMqGhsc DJWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=UdX58Ltb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x15-20020a170902ec8f00b001781675f417si18852217plg.258.2022.10.11.09.51.55; Tue, 11 Oct 2022 09:52:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=UdX58Ltb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230094AbiJKPYg (ORCPT + 99 others); Tue, 11 Oct 2022 11:24:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230254AbiJKPYQ (ORCPT ); Tue, 11 Oct 2022 11:24:16 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5269FD57C0; Tue, 11 Oct 2022 08:15:38 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 0D84A20121; Tue, 11 Oct 2022 15:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1665500416; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=RO0FO74ctDC9cFYZEDLiw7BGFiXGuRuOlnU9ALUUx4Q=; b=UdX58LtbOBVnHrZvPxzq+OnrT4JBCxyKX7In8GNplrTy13057zqHjS17NhVXO+X6uvxB+F yWFaRqu7LeV7MI2FHa89kpRAGRakFbDpECYhA7UBIDylrvfmtmTE9wEJI6mhsWJfIxmD+O f+rcsieq2uSRQGfJSh//Jbj6k19Qu2A= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id C78AC139ED; Tue, 11 Oct 2022 15:00:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id fuh0LP+ERWNxSQAAMHmgww (envelope-from ); Tue, 11 Oct 2022 15:00:15 +0000 Date: Tue, 11 Oct 2022 17:00:14 +0200 From: Michal Hocko To: Frank van der Linden Cc: Zhongkun He , corbet@lwn.net, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org, wuyun.abel@bytedance.com Subject: Re: [RFC] mm: add new syscall pidfd_set_mempolicy() Message-ID: References: <20221010094842.4123037-1-hezhongkun.hzk@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 10-10-22 09:22:13, Frank van der Linden wrote: > For consistency with process_madvise(), I would suggest calling it > process_set_mempolicy. This operation has per-thread rather than per-process semantic so I do not think your proposed naming is better. > Other than that, this makes sense. To complete > the set, perhaps a process_mbind() should be added as well. What do > you think? Is there any real usecase for this interface? How is the caller supposed to make per-range decisions without a very involved coordination with the target process? -- Michal Hocko SUSE Labs