Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp3766556rwi; Wed, 12 Oct 2022 06:34:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4oJxsAwnklRnlRrDB/GkRYLxBQ59CXqiMqDq98SwERUTUOi+PEih6xkInaVGQsmQS4u3+M X-Received: by 2002:a17:90b:380b:b0:20d:7364:796f with SMTP id mq11-20020a17090b380b00b0020d7364796fmr5092670pjb.13.1665581640834; Wed, 12 Oct 2022 06:34:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665581640; cv=none; d=google.com; s=arc-20160816; b=CzRDjG9I0yQO8F7ObDlzpVKRmqfJnM1PH6eXCJBF5tBLnOmIFhFDA1oQCNCbAPS7Ez NlKk1zxEDSQsOHJstrqfQ852UjCK7dwi2m1RO9Pk8eBGrEXEAKJEcEKosiVjTtDzIz/T kJkT8B4N7px8dLSWAgVbOyxNeaYrlfyl5C+AyzFNQqMKfmenSg5anYOMO0HiRRkZVpBD +tfuMK6q0DEoDZXD8P/rD4r2L8IwS9e+BCCxlozXBpcMSt0KtVTKQc5eeEZXSa//VZu+ YTcjkJ+T1z9WFVjwQ7Y7pSfvOxFDmkiRA/o9aWp1oIXukRxb90CxwXPOhuYx8AXa/nhD i2Ew== 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=axxPf0w5DXM3j5NJDUDmXxmlQDnP+BGR3NcKUGmmygk=; b=jMfOKD9n7pYbdiEN7mPDqhF29CBGlbGTLicBpMgwNnjtb26NvUH6OetlSBWTnHqnRZ KdUwRm/urCqIEEdD72ev8fUEm5hw+TbNjlpWj20zgIH5n02Fbj/jy4xP2UmMsdhLlRiJ fUGErc6JxRG7DgjQ1k+6Wy5EiTzXcLKaGGWy35dWxgviPkH2Q3YWDg79RitKKgK1pkC6 /2+oqaZE4ahQcfxRnQ8LmtpQ1UvfgKZxYpJqfcZIiSa79QUNhGjUbLetMw8Qzoa716QU n9+MOPpd8xJuknbxC4uKk/RVFGamobeBeH06j1ZIcl+szPeQmYhR0ERX/Y2nqlvMay+V AbYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=bpbzjrYv; 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 s134-20020a632c8c000000b004429ecbda9fsi18181446pgs.39.2022.10.12.06.33.48; Wed, 12 Oct 2022 06:34:00 -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=bpbzjrYv; 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 S229839AbiJLNXk (ORCPT + 99 others); Wed, 12 Oct 2022 09:23:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229836AbiJLNXg (ORCPT ); Wed, 12 Oct 2022 09:23:36 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61E7F1EC42; Wed, 12 Oct 2022 06:23:35 -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-out1.suse.de (Postfix) with ESMTPS id 1614721C46; Wed, 12 Oct 2022 13:23:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1665581014; 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=axxPf0w5DXM3j5NJDUDmXxmlQDnP+BGR3NcKUGmmygk=; b=bpbzjrYvyfEWNNdqbcE+1/xybLofs5vUcNiCggQ00eBKQM9/2KeJOSebD5u5LVoG/uL0WT C2yFlqF5ouupcJy3etp0WrlDOmA/+QP7FmA5IGNWtHHqlCvwZjmYytUDN0OzJA8nNQb84b Z7f3JD6zupuXEIA0/lkUwX3bY2X5pbY= 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 CAB0413ACD; Wed, 12 Oct 2022 13:23:33 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6eqeLtW/RmM7eQAAMHmgww (envelope-from ); Wed, 12 Oct 2022 13:23:33 +0000 Date: Wed, 12 Oct 2022 15:23:33 +0200 From: Michal Hocko To: Vinicius Petrucci Cc: Frank van der Linden , 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=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Wed 12-10-22 15:07:48, Michal Hocko wrote: > On Wed 12-10-22 07:34:06, Vinicius Petrucci wrote: [...] > > Having a feature like "pidfd/process_mbind" would really simplify our > > user-level agent implementation moving forward, as right now we are > > adding a LD_PRELOAD wrapper (for signal handler) to listen and execute > > "mbind" requests from another process. If there's any other > > alternative solution to this already (via ptrace?), please let me > > know. > > userfaultfd sounds like the closest match if #PF handling under control > of an external agent is viable. And just to clarify. I haven't ever played with using userfaultfd for numa balancing so I might be completely wrong here. -- Michal Hocko SUSE Labs