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=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 F1028C433E0 for ; Tue, 4 Aug 2020 11:13:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 86D66206F6 for ; Tue, 4 Aug 2020 11:13:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="PzwSj9y3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 86D66206F6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B65408D0152; Tue, 4 Aug 2020 07:13:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B15388D0081; Tue, 4 Aug 2020 07:13:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9DC8F8D0152; Tue, 4 Aug 2020 07:13:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0228.hostedemail.com [216.40.44.228]) by kanga.kvack.org (Postfix) with ESMTP id 8736A8D0081 for ; Tue, 4 Aug 2020 07:13:47 -0400 (EDT) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id DDF72180AD806 for ; Tue, 4 Aug 2020 11:13:46 +0000 (UTC) X-FDA: 77112626052.05.chalk00_0f1036b26fa5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id BD12E18010BDE for ; Tue, 4 Aug 2020 11:13:46 +0000 (UTC) X-HE-Tag: chalk00_0f1036b26fa5 X-Filterd-Recvd-Size: 4771 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Tue, 4 Aug 2020 11:13:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=JW6B2OD0Jc1EExGD+ptuOCacpQEjtzVk2AEqTGdI46A=; b=PzwSj9y3HWvWL1Rp+pmHIne3rH wKYMzFQT6F4iULIoYFz7BrP4Dn/r6IX7jpbgu0fYM7o1HJRyfr2gSwgW9KrJ6pbleU7wTrQDUxj2/ lzfw0wgiy7rHpZv8tVGkaRHJmVFnwtdV+CIjmaC5GkUqGi1ySTIZJFOHyiYulFLVqHmOhrLioUBbh h4uzdEkGQe/1O77PFpozs6gKfiUHIoS1YcwCUk42qCOmRDr/WMylVhNTmG7k5iIsLcN0TiQQByPz3 xX/j8+YSud/d3gYpvv8BkRFyI1J/G+3C5zz4BYPiT76mQ6WLKu3vDFAD67oSnwWwCK+/mghapqqcG LlnoD+pQ==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2use-000476-F4; Tue, 04 Aug 2020 11:13:16 +0000 Date: Tue, 4 Aug 2020 12:13:16 +0100 From: Matthew Wilcox To: David Laight Cc: 'James Bottomley' , "Eric W. Biederman" , Steven Sistare , Anthony Yznaga , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "linux-mm@kvack.org" , "linux-arch@vger.kernel.org" , "mhocko@kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "x86@kernel.org" , "hpa@zytor.com" , "viro@zeniv.linux.org.uk" , "akpm@linux-foundation.org" , "arnd@arndb.de" , "keescook@chromium.org" , "gerg@linux-m68k.org" , "ktkhai@virtuozzo.com" , "christian.brauner@ubuntu.com" , "peterz@infradead.org" , "esyr@redhat.com" , "jgg@ziepe.ca" , "christian@kellner.me" , "areber@redhat.com" , "cyphar@cyphar.com" Subject: Re: [RFC PATCH 0/5] madvise MADV_DOEXEC Message-ID: <20200804111316.GE23808@casper.infradead.org> References: <20200730171251.GI23808@casper.infradead.org> <63a7404c-e4f6-a82e-257b-217585b0277f@oracle.com> <20200730174956.GK23808@casper.infradead.org> <87y2n03brx.fsf@x220.int.ebiederm.org> <689d6348-6029-5396-8de7-a26bc3c017e5@oracle.com> <877dufvje9.fsf@x220.int.ebiederm.org> <1596469370.29091.13.camel@HansenPartnership.com> <9371b8272fd84280ae40b409b260bab3@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9371b8272fd84280ae40b409b260bab3@AcuMS.aculab.com> X-Rspamd-Queue-Id: BD12E18010BDE X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 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 Tue, Aug 04, 2020 at 08:44:42AM +0000, David Laight wrote: > From: James Bottomley > > Sent: 03 August 2020 16:43 > > > > On Mon, 2020-08-03 at 10:28 -0500, Eric W. Biederman wrote: > > [...] > > > What is wrong with live migration between one qemu process and > > > another qemu process on the same machine not work for this use case? > > > > > > Just reusing live migration would seem to be the simplest path of > > > all, as the code is already implemented. Further if something goes > > > wrong with the live migration you can fallback to the existing > > > process. With exec there is no fallback if the new version does not > > > properly support the handoff protocol of the old version. > > > > Actually, could I ask this another way: the other patch set you sent to > > the KVM list was to snapshot the VM to a PKRAM capsule preserved across > > kexec using zero copy for extremely fast save/restore. The original > > idea was to use this as part of a CRIU based snapshot, kexec to new > > system, restore. However, why can't you do a local snapshot, restart > > qemu, restore using the PKRAM capsule to achieve exactly the same as > > MADV_DOEXEC does but using a system that's easy to reason about? It > > may be slightly slower, but I think we're still talking milliseconds. > > > I've had another idea (that is probably impossible...). > What about a 'reverse mmap' operation. > Something that creates an fd whose contents are a chunk of the > processes address space. http://www.wil.cx/~willy/linux/sileby.html