From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25863C433E2 for ; Fri, 4 Sep 2020 19:49:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9A768208C7 for ; Fri, 4 Sep 2020 19:49:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="dukJUYr8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9A768208C7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 970346B0003; Fri, 4 Sep 2020 15:49:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8F9A36B005A; Fri, 4 Sep 2020 15:49:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7C0436B005C; Fri, 4 Sep 2020 15:49:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0146.hostedemail.com [216.40.44.146]) by kanga.kvack.org (Postfix) with ESMTP id 626ED6B0003 for ; Fri, 4 Sep 2020 15:49:15 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 278A83633 for ; Fri, 4 Sep 2020 19:49:15 +0000 (UTC) X-FDA: 77226417870.03.line55_16144e2270b4 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id F22E928A4E9 for ; Fri, 4 Sep 2020 19:49:14 +0000 (UTC) X-HE-Tag: line55_16144e2270b4 X-Filterd-Recvd-Size: 5433 Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Fri, 4 Sep 2020 19:49:14 +0000 (UTC) Received: by mail-qk1-f194.google.com with SMTP id u3so7483175qkd.9 for ; Fri, 04 Sep 2020 12:49:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=Wlp5eq0L4jf0fV1dZhNQXxwrYrnlfBr1ejU/Wv6GFRE=; b=dukJUYr81zmJLJUq/pSBUq9knB3bs5cVV7IdVU+zFjBm0RI3v5y9t5zYBXwNDChKum +sJ/Xp3y45b6rmrsS1B3T/3Za7B56UHjMUG5Q58BgF7a3FTZBOFsopO87a8ply+So4OT Dty7MuUow8EoYwyWxZ5pbV+mhDVSNKl71gPorUkDXYtIx737bmRAgxkaqGOeCfQJin6h gt78V7U8E8qUQnc97Ho5MK8GKp0GIpUQBKSEMQXp59ISDoFWzxb+cIOTO2HTJQ4pYR34 EaK3WYBENHr+ZYWXFZ4LUw5TfhaMw9oE20M+pYJbOYL8Ju7GsZtnjzmbdjBR25RUTKh7 UfOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=Wlp5eq0L4jf0fV1dZhNQXxwrYrnlfBr1ejU/Wv6GFRE=; b=Bkkpw/mWckudAHFN9ytlXu96jXK2FuZML+77VT0z0v99cnoU8Evup88VqvoEmR031L JdPf3rxVn/b3h0cjXCG7/064sFr8TafX2ja70bf5FRfIqmiwfJdSs+QEDsX9kAFF+gzR kZ96P5PExAihaj4GmFu5lhzBaTJL3gEju8J55Mx/jsB9kt1SjI8csKHSdi7HTf8PFE/V Il6PKIS4MDr2jxTBH6h5I8zSkVplOlc2Mg6/GX8ETfAhp9feopcp7X07oy6OFdAfQUrZ 7ymI2JYqcTwzUGDIoxd9XHdfGVa7V0bQExdAeQYlFNTsNrslCjJi2eDWoAmqmZf238e3 RDog== X-Gm-Message-State: AOAM532Q0XnCQv/pOig+K+mOqZHEqbY3qC/pjOwNTblScRBeDh4Rk9Mi FS5rnLgvxy3JXKqwE//47ZaMkQ== X-Google-Smtp-Source: ABdhPJwOjyB3sB4YRkZQ0ZL+RtGFS9Bz0C/TP12GqAsX1WiYNNC8MVUuTcOSB7KvXJpNMwoAUxuu+g== X-Received: by 2002:a37:6109:: with SMTP id v9mr9321198qkb.418.1599248953730; Fri, 04 Sep 2020 12:49:13 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-48-30.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.48.30]) by smtp.gmail.com with ESMTPSA id y7sm5333481qtn.11.2020.09.04.12.49.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2020 12:49:12 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1kEHhv-0014CU-Rm; Fri, 04 Sep 2020 16:49:11 -0300 Date: Fri, 4 Sep 2020 16:49:11 -0300 From: Jason Gunthorpe To: Matthew Wilcox Cc: Adalbert =?utf-8?B?TGF6xINy?= , linux-mm@kvack.org, linux-api@vger.kernel.org, Andrew Morton , Alexander Graf , Stefan Hajnoczi , Jerome Glisse , Paolo Bonzini , Mihai =?utf-8?B?RG9uyJt1?= , Mircea Cirjaliu , Andy Lutomirski , Arnd Bergmann , Sargun Dhillon , Aleksa Sarai , Oleg Nesterov , Jann Horn , Kees Cook , Christian Brauner Subject: Re: [RESEND RFC PATCH 0/5] Remote mapping Message-ID: <20200904194911.GA87483@ziepe.ca> References: <20200904113116.20648-1-alazar@bitdefender.com> <20200904121148.GR24045@ziepe.ca> <20200904194139.GA5881@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200904194139.GA5881@casper.infradead.org> X-Rspamd-Queue-Id: F22E928A4E9 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam01 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Sep 04, 2020 at 08:41:39PM +0100, Matthew Wilcox wrote: > On Fri, Sep 04, 2020 at 09:11:48AM -0300, Jason Gunthorpe wrote: > > On Fri, Sep 04, 2020 at 02:31:11PM +0300, Adalbert Laz=C4=83r wrote: > > > VMAs obtained by mmap()ing memory access fds mirror the contents of= the remote > > > process address space within the specified range. Pages are install= ed in the > > > current process page tables at fault time and removed by the mmu_in= terval_notifier > > > invalidate callbck. No further memory management is involved. > > > On attempts to access a hole, or if a mapping was removed by PIDFD_= MEM_UNMAP, > > > or if the remote process address space was reaped by OOM, the remot= e mapping > > > fault handler returns VM_FAULT_SIGBUS. > >=20 > > I still think anything along these lines needs to meet the XPMEM use > > cases as well, we have to have more general solutions for such MM > > stuff: > >=20 > > https://gitlab.com/hjelmn/xpmem > >=20 > > However, I think this fundamentally falls into some of the same bad > > direction as xpmem. > >=20 > > I would much rather see this design copy & clone the VMA's than try t= o > > mirror the PTEs inside the VMAs from the remote into a single giant > > VMA and somehow split/mirror the VMA ops. >=20 > I'm on holiday for the next few days, but does the mshare() API work fo= r > your use case? > > Proposal: http://www.wil.cx/~willy/linux/sileby.html > Start at implementation: > http://git.infradead.org/users/willy/linux.git/shortlog/refs/heads/msha= re Let me ask around, it seems in a similar space at least! Thanks, Jason =20