Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp2744749rwi; Fri, 21 Oct 2022 07:27:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7Gwh3E1f3F2vEXFnUDJBm4pnVI2YUVi4e/H4K5m2t3CM0J0xk43rk5/GVjb4Ulzua3MmbW X-Received: by 2002:a17:90b:2691:b0:20c:d655:c67d with SMTP id pl17-20020a17090b269100b0020cd655c67dmr58712748pjb.36.1666362422601; Fri, 21 Oct 2022 07:27:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666362422; cv=none; d=google.com; s=arc-20160816; b=qC5T2s0H4+4oSuDajFemcmORJqkcsNeI16zHYkOooafmZaaYD7YMicF9Q6mAIQ7Hue vEfB5B41hxDtFvE8g0ofXFjgY8DZms4aJhb/sYwCm68lhaNR8Blz/cqUgBmkcsSFs823 LO7hOITQk6OkUY+mQdWuDmOI8yFGcId34HJjC1qwISOXFztyTynkYxPyiiCnsl37KTpa ILjbylWtRuj9Ic+ZGB5K6z2Ad+5UVqlBFGLNFueKY2Yy42Pd4osNmjnis9tW5cV0+J5v NlWVLSXvSE/+g4/EkSTk5r+Yt+oMr6HuMf62KxeZIfakzTkiYjGLG/XCQrq+H9Hz3t5I yG0A== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=iysBrzX0O1+xvwIhl8w4iJEvY8eeRhaBH+BhN0KL4IA=; b=mnNklXxYhj88Ck3ai+1Lgix2IQPYXzThNKZXdH3VJUB/4OppwKaoGedsqL3FjWJbX0 IgVcf4j8iWMNTWs2g4VXX9gdop/h/+3um6cjj2Jeak+0ZjbwFNeXx+eHEJQxroJzf+uj muWUyXK210Kz0vycAXua62VizRoIwgdXW7jt2szMhNCUtK8SuDbsLZwkwh1OoEdDGry9 HAVeXFBn1DyxX3tmH0luLHawBOjMOju6sJ55QUeDVqN6kXWeYdKoRJptK19iZfmB8Nes Q442C8wtQfWPmQISEIpIEy0k11yI/sVC67QvD0WCuqedHgPpjcc7pbuTAmWlpGao8a06 oAcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UhpLSBbz; 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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o18-20020a63f152000000b00434e297a5ccsi25577355pgk.142.2022.10.21.07.26.50; Fri, 21 Oct 2022 07:27:02 -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=@intel.com header.s=Intel header.b=UhpLSBbz; 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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231176AbiJUNwA (ORCPT + 99 others); Fri, 21 Oct 2022 09:52:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230446AbiJUNvy (ORCPT ); Fri, 21 Oct 2022 09:51:54 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D35D5277099; Fri, 21 Oct 2022 06:51:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666360312; x=1697896312; h=date:from:to:cc:subject:message-id:reply-to:references: mime-version:in-reply-to; bh=DaWZG1/RJ5yq5HjRGu08lgshjmm5vbZXlRwrj8iUEyQ=; b=UhpLSBbzCwnl8MpjzDPT1/5gwzSO7dJ0nn/hotq4zUIC4OrXvPniCmQa qCuG3vE1YOSlh1S8gcgwiBp6qMsMfPioGkHhidLAm6nTtvsKhyyPmgTz+ R4dpbGwOHbF/nvyLyj/r6XQLCp0MuBC3pc4U+qBhdYLTc/IngCjbGIz8B suEEeFHUpNPzPitQ+jV8Tq7GNS9/+jNm3/nkHSVAEojLHUK965vp47AMM 9OiH1DzHcdNIO99blsW9HbyIj7VVLXD5cF9SzAwpTNlzG6Ci4TBp4TdR5 6leqzRPqbYahWvuhthY3VnlNO36yC2jPn/jaOoAxfJc0TKup8IB6+qfvq w==; X-IronPort-AV: E=McAfee;i="6500,9779,10507"; a="286725182" X-IronPort-AV: E=Sophos;i="5.95,200,1661842800"; d="scan'208";a="286725182" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Oct 2022 06:51:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10507"; a="625348380" X-IronPort-AV: E=Sophos;i="5.95,200,1661842800"; d="scan'208";a="625348380" Received: from chaop.bj.intel.com (HELO localhost) ([10.240.193.75]) by orsmga007.jf.intel.com with ESMTP; 21 Oct 2022 06:51:41 -0700 Date: Fri, 21 Oct 2022 21:47:11 +0800 From: Chao Peng To: Vishal Annapurve Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-doc@vger.kernel.org, qemu-devel@nongnu.org, Paolo Bonzini , Jonathan Corbet , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , x86@kernel.org, "H . Peter Anvin" , Hugh Dickins , Jeff Layton , "J . Bruce Fields" , Andrew Morton , Shuah Khan , Mike Rapoport , Steven Price , "Maciej S . Szmigiero" , Vlastimil Babka , Yu Zhang , "Kirill A . Shutemov" , luto@kernel.org, jun.nakajima@intel.com, dave.hansen@intel.com, ak@linux.intel.com, david@redhat.com, aarcange@redhat.com, ddutile@redhat.com, dhildenb@redhat.com, Quentin Perret , Michael Roth , mhocko@suse.com, Muchun Song , wei.w.wang@intel.com Subject: Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd Message-ID: <20221021134711.GA3607894@chaop.bj.intel.com> Reply-To: Chao Peng References: <20220915142913.2213336-1-chao.p.peng@linux.intel.com> <20220915142913.2213336-2-chao.p.peng@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE,URIBL_BLOCKED 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 > > In the context of userspace inaccessible memfd, what would be a > suggested way to enforce NUMA memory policy for physical memory > allocation? mbind[1] won't work here in absence of virtual address > range. How about set_mempolicy(): https://www.man7.org/linux/man-pages/man2/set_mempolicy.2.html Chao > > [1] https://github.com/chao-p/qemu/blob/privmem-v8/backends/hostmem.c#L382