Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp725074pxb; Fri, 21 Jan 2022 01:36:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJx9fX8KhCfedIjMsWmfu6YzhIHk8WjRkVOoGO51p26gTNwP3OZxuAvpu0x/QC+2ZL/6+Uib X-Received: by 2002:a17:90a:fd8b:: with SMTP id cx11mr5403592pjb.229.1642757782655; Fri, 21 Jan 2022 01:36:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642757782; cv=none; d=google.com; s=arc-20160816; b=tcFpp9mHW4L4Z00Wt9WgfOwOLS9ZEXOh86UMIqmYPdwnI6qppa6TiA1UbQD4OYS5GE l7FLriZVH3lKzJL8Ge9omdZTF1kQGZAqgu8vRVNCy1erTDM00G3XPkFKbr+aNWz0y5EN R/4CtuN++f14MxiyqlKUMnvEN9DL/62DEq0YMLXkvkCgu3CD/DTxEnaWUEu93bJHajtD Hz/PI+BpUm/NgNoNtoWTyv9C3PkWpaFQRRhVBwCssjG9ngiL+DbsNWdLrTCt15MOxp3v VI6gQtukTwtbFHpIEaHYSVhCb3rqL6alquV6FMHlhxoXAiR7w5N81bbEEFVf18pbTm4p TAiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:subject:from :references:to:dkim-signature; bh=fBRm4jYvscENSfhLS2g1VhW0jpdBk92ox8qPAgtvx64=; b=s3yhBzQ8lIb7cKWu0kBp2xIcebuJLAUWhwiSAwr8ac4hfQi8BMQWrVHzEgzH50ruJ0 zppRm4kty/jUzax+l5Jzv1XBq/cVqlquJ73d/O/usxJdpo52MEsKhmO6iHbKpoRjxacQ BbJWusVtTeYG6nN5hZCn9JItwMTbdCI19/Y6CoPREk9k4wxSr3MXi0wlCUqQrxtp8K+z 3ATi77BZ34BB37beXBgpAGnVGBit9ipjP7yJqCQ9qCgf1FPYYB2U1quhwWkk+0Vg+LOa dtnuNgpQj9lMIglCahAfC0JcLYGLxeuFiV5pzKfaWbvLlTA1kXdhex3+yP01ABNb9wRi 52Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="HuKCM/lI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t14si5607998pgs.783.2022.01.21.01.36.11; Fri, 21 Jan 2022 01:36:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="HuKCM/lI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S239213AbiARWGX (ORCPT + 99 others); Tue, 18 Jan 2022 17:06:23 -0500 Received: from mga11.intel.com ([192.55.52.93]:44801 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233791AbiARWGW (ORCPT ); Tue, 18 Jan 2022 17:06:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1642543582; x=1674079582; h=to:references:from:subject:message-id:date:mime-version: in-reply-to:content-transfer-encoding; bh=Ewi5p/l47EcBj4eeeaDbN5CQqDZhKqbM07MsfSAesJM=; b=HuKCM/lI+c7+eMIY15XjzZEdXBGqR825cloYWvG5V610nQxh3L9qswAj 7u0+RTHO5/OIKJgJfUiNuTMshGP6rsyG6ZC2VbI5uTd334b4qJPj05ArF XGjjsEzC3FSACYnY2ws5/wjf3MmOHMJYj3cPh5KeMemmrE8JHVp7H+5xn a3pTwCuEgBxv/ufzt5Bx3QgdtPhxJ/mMION6mIXI70yyk8pf60Lmhg7qI S/zfChFiXvGE07oHsJVpjt/vmjJZGPOJsgqiex4X49TsGwalY0JhUmJFt f4qW8GZDqduubhbBiqrLONq5YiboFQhJiU8XqCzrmSlIGpNm2ZjSIiwYy Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10231"; a="242487294" X-IronPort-AV: E=Sophos;i="5.88,298,1635231600"; d="scan'208";a="242487294" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2022 14:06:22 -0800 X-IronPort-AV: E=Sophos;i="5.88,298,1635231600"; d="scan'208";a="764732546" Received: from ssrikan2-mobl2.amr.corp.intel.com (HELO [10.209.52.128]) ([10.209.52.128]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2022 14:06:21 -0800 To: Khalid Aziz , akpm@linux-foundation.org, willy@infradead.org, longpeng2@huawei.com, arnd@arndb.de, dave.hansen@linux.intel.com, david@redhat.com, rppt@kernel.org, surenb@google.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org References: From: Dave Hansen Subject: Re: [RFC PATCH 0/6] Add support for shared PTEs across processes Message-ID: Date: Tue, 18 Jan 2022 14:06:20 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/18/22 1:19 PM, Khalid Aziz wrote: > This is a proposal to implement a mechanism in kernel to allow > userspace processes to opt into sharing PTEs. The proposal is to add > a new system call - mshare(), which can be used by a process to > create a region (we will call it mshare'd region) which can be used > by other processes to map same pages using shared PTEs. Other > process(es), assuming they have the right permissions, can then make > the mashare() system call to map the shared pages into their address > space using the shared PTEs. One thing that went over my head here was that this allowing sharing of relatively arbitrary *EXISTING* regions. The mshared'd region might be anonymous or an plain mmap()'d file. It can even be a filesystem or device DAX mmap(). In other words, donors can (ideally) share anything. Consumers have must use msharefs to access the donated areas. Right? ( btw... thanks to willy for the correction on IRC.)