Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp232492pxa; Tue, 4 Aug 2020 04:20:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLQ1vglXPxAk3NLQz4oBZ5n6kKzMXWyobB5VXhjvxIx8/6t+LtjHvCp439TTgGKQ4BgoYO X-Received: by 2002:aa7:cf06:: with SMTP id a6mr20817899edy.293.1596540004978; Tue, 04 Aug 2020 04:20:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596540004; cv=none; d=google.com; s=arc-20160816; b=qYaZQJAjiZ/jKEnW/o+Tr9cDQ430e0KYXDsWqy3TWH4jqh5ZzMqQqlo3ZuFxN8/Alo 3eE/kuBswny8W2c04QKNopKd/luS8eihP56BEwkbZ3LFyrz/3e5nQXfzxWvTAxsUJzLU 1bi0IFx8ej92yaUCO9Wudb06gD8/WqQXGajbgmz69Wf4hgkKpX0cZGBOKH1qeCsg9G9f 0UdB2y/A5Ij6RyQSYoe9SBwoeF/50noSZnWisaIJyn29XkY1kt4jNKS4O/4crsmMSPWx x2MtIAcXWtEidy4JXLNdoaIVjbusuxz7pAmZUgR9rogeq5sNifU07gfSLID4r6haEVN3 gljw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=JW6B2OD0Jc1EExGD+ptuOCacpQEjtzVk2AEqTGdI46A=; b=bHKf2P4T3ur6cK2CyocNB79DJeLwzUYn14j6wCNdrEBbAObc2Ld8LFFaavQMErDF0t GpLxxQmKRuNygfYYWg4JE39WH+zAPg0Z6mIgPoa5ntwCjLJEJu27RrM/YIEhTum22y3T vdPrXl4UdOf5w3rj8qu8eJ8MXlFTEOOW+JhipQuTjt/b05TlvlgGTlLM5N+oNNwrKoW+ sQ/+8qFQUWOxGluVOraBx58/OKpKbrbdAa8yEmYJ03xyVWaqFSUjbnnhYDsWs5W/+8j9 1TBSAM7nB5FUEs2IcfsbONtXyZJGSH5MzFYuKvQM/a8xZI7gDxTJLRB3Gq6yx29Mtrc7 jChg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=PzwSj9y3; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c22si12381925edr.146.2020.08.04.04.19.42; Tue, 04 Aug 2020 04:20:04 -0700 (PDT) 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=fail header.i=@infradead.org header.s=casper.20170209 header.b=PzwSj9y3; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730216AbgHDLQH (ORCPT + 99 others); Tue, 4 Aug 2020 07:16:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730016AbgHDLO6 (ORCPT ); Tue, 4 Aug 2020 07:14:58 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4885C06179E; Tue, 4 Aug 2020 04:13:36 -0700 (PDT) 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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