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=-7.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 90F83C64E7A for ; Tue, 1 Dec 2020 20:36:14 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7BF6F2151B for ; Tue, 1 Dec 2020 20:36:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="LQa/mVoM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7BF6F2151B Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:57148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kkCNg-0005LP-DS for qemu-devel@archiver.kernel.org; Tue, 01 Dec 2020 15:36:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkCGs-0005go-VA for qemu-devel@nongnu.org; Tue, 01 Dec 2020 15:29:11 -0500 Received: from mail-eopbgr40108.outbound.protection.outlook.com ([40.107.4.108]:59454 helo=EUR03-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kkCGo-0002Kz-9N for qemu-devel@nongnu.org; Tue, 01 Dec 2020 15:29:10 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QDVIBbhFOJ0QIK3rwtHu46A3oDCHrrdl6ftiNX6WVqGxwFtZtaOH9tCos6G0Rx/7r97d40PWl4XQwxoTWxzN/TvWa0OzONz2bPsevLc6kwadZHX7aBI2a3YvC1gpXDe/QP3ooN5l1P5sZ16D4MRMd9ZK0fyOmeJWTZ5Udf3dL7apdA7eNVC4it30biDW90lJycoUGa+Dvd6ahYeXBgPaynipmIATyrphuD9ETdPxlbTwno82Kyhxvs5Lmqodxp1282tguy5TSVyKgUNoZ6oUk0WnY1DJWQ+gdaX/MvVnOgmmpsA9FqzEuszlbRF5H84pcpU1FeEY9EI2GmsGiG41Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jj1NASIX5JD1EmWLesxW9bkwPiFR/ofuBY/c0QW5S44=; b=BMvavkT7LtOEU5xq/dKu6diYv7ca7jd230N6JK3tl+NFQzqCbR+fO/6Z+5baqnl3zwCRgfUKQTBlhe4XjFDIm5sp4t/8uOxyFM7Yk/rt53CJNrx7coD52UsAIbbyYpC07d/2wwBPC3nvz+gdMIUbvk2EqVcDtI833wgdI/DwSXTXyvtoG0COs9Fwa/6Caw3S7gfaV79jheFa5y2lMFdayfuABIt90sRZ0gsHjJyo0EClaz4bG3stuiAmMwjbKhLnLcbz/efyEYMe36kF5eUut5OqUN5cq1Y4uTPc4gzDfKZgUBX13aK0fOGu6H7L9eYbyINcIY2cvSuvN+f3o9lkWg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=virtuozzo.com; dmarc=pass action=none header.from=virtuozzo.com; dkim=pass header.d=virtuozzo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Jj1NASIX5JD1EmWLesxW9bkwPiFR/ofuBY/c0QW5S44=; b=LQa/mVoMyzxqOJHb29goKMoa+PRxlL0WWTe47lpZueOeAwk3hSG+14iijx1ut3QAk+NILI2Gfnv/+wO2yGI5Ba03oOhF3qOHyej56Og0e0p24f4RjfUveyilLBqTQNV9Is+9VNGiOaKBcvn6nuJjd8EDdC7IFYEQDCFEn/YBCDE= Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=virtuozzo.com; Received: from VI1PR0802MB2510.eurprd08.prod.outlook.com (2603:10a6:800:ad::14) by VI1PR08MB3184.eurprd08.prod.outlook.com (2603:10a6:803:41::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17; Tue, 1 Dec 2020 20:29:03 +0000 Received: from VI1PR0802MB2510.eurprd08.prod.outlook.com ([fe80::ac70:da6f:e05d:1cc9]) by VI1PR0802MB2510.eurprd08.prod.outlook.com ([fe80::ac70:da6f:e05d:1cc9%12]) with mapi id 15.20.3611.025; Tue, 1 Dec 2020 20:29:02 +0000 Subject: Re: [PATCH v4 0/6] UFFD write-tracking migration/snapshots To: "Dr. David Alan Gilbert" , Peter Xu Cc: Peter Krempa , qemu-devel@nongnu.org, Den Lunev , Eric Blake , Paolo Bonzini , Juan Quintela , Markus Armbruster References: <20201126151734.743849-1-andrey.gruzdev@virtuozzo.com> <20201201070820.GO105758@angien.pipo.sk> <20201201105300.GQ105758@angien.pipo.sk> <20201201184055.GM4338@work-vm> <20201201192247.GF3277@xz-x1> <20201201200137.GQ4338@work-vm> From: Andrey Gruzdev Message-ID: <5b7a5ad4-c722-3261-8784-97972d9923bd@virtuozzo.com> Date: Tue, 1 Dec 2020 23:29:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 In-Reply-To: <20201201200137.GQ4338@work-vm> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [95.165.26.68] X-ClientProxiedBy: AM0PR04CA0085.eurprd04.prod.outlook.com (2603:10a6:208:be::26) To VI1PR0802MB2510.eurprd08.prod.outlook.com (2603:10a6:800:ad::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.64] (95.165.26.68) by AM0PR04CA0085.eurprd04.prod.outlook.com (2603:10a6:208:be::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3632.17 via Frontend Transport; Tue, 1 Dec 2020 20:29:01 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0992e997-1b0d-46a5-6752-08d89637bde6 X-MS-TrafficTypeDiagnostic: VI1PR08MB3184: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zryN9yJRw9mRBBOUMZmW/OdIl1LPIoUh+OMsFQG3jDL7KdNmAGgc3Zw/7kkUAntuW+TTZ6ykbOozA+K+PZnfSuEFzpEqZdbjW7T+S18/cnQnnyJU+1WKgNGvKdNKTZLkoODCpKNNL4hjZSUhlSrzxbBnr7ckVNXS0RAJG42UPuN9XNz89YpEjCKv/cM6aNWs/6ztYsc2SOjYZTSk2ESPxg8HCwdG4HVaABErptIF1ywUPbttQm0KhPVWoEsvaBNnEPIgxO7CN2bJCzQWhUEN4Bbd6tp8BUxviwTBrM32vmlrX0TMKvXbZAWPRKSnFP0d6Udyfq8mRc8Uuyk1IEB7uysDsEp4b3PyiChJJb85y69JNWolE3GEe5+7hTmb959J X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0802MB2510.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39850400004)(396003)(366004)(136003)(346002)(376002)(5660300002)(66946007)(8936002)(44832011)(478600001)(31696002)(2906002)(110136005)(54906003)(2616005)(956004)(31686004)(316002)(16576012)(36756003)(53546011)(86362001)(66556008)(66476007)(4326008)(8676002)(26005)(52116002)(186003)(6486002)(16526019)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?B?YUswSXUvVGdFd3d3T2xiSy9NS3NmVGovL3dZSSt0TTNKN0Q1MXJDZFRuMzY3?= =?utf-8?B?N1NRMXhtMWZPeG1XVHBTajRqK2VyVlBKRHdkSFRzVUM4dzJxVDh5clJmQXlH?= =?utf-8?B?Mk9leTMrRkF5VmFzaXhYTXIzaUowbTRWcWhYZ1dCWlcxd3JYWk1Gdkw3SlVC?= =?utf-8?B?NjRSN2Q0WnVqV1VLTXZmTU9ZcHJ1aVhTTmlhU3RGS1VVMzNzVEZqVkJrYWNN?= =?utf-8?B?THhKd2NFWHpESVl1bGp5RlErcE0yWENVN2JaRU1ramRBaHRXTG9jbnE3UU5J?= =?utf-8?B?d3JHbGJQYkMxdkFRRllGSWhEVC9mbEtWSFUxTE1OVDhSL3JsR29ZNUdwQk9a?= =?utf-8?B?N0FydnJlUFBGZkJwYU9vMkRwSFVrWUlRWjVDVXlvZER6ZkNvTGxNZzJwZ1dM?= =?utf-8?B?NjM4empOVUQ1QkppbjlNN0NoZHNmVlZVb3FVdHI4aDY3YkR4TXlCVDV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L?= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0992e997-1b0d-46a5-6752-08d89637bde6 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0802MB2510.eurprd08.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Dec 2020 20:29:02.8345 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 0bc7f26d-0264-416e-a6fc-8352af79c58f X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0/rdddq0bTMRIDK8fyyyFJXmNsrTmK06q4mdIMkrcv/1MTFOtg3Oaq/Y9jxHfIxiUcGYloYXcoJ4rQEEehTS0HhkY5FXZXbKPIoEZwl8G6Y= X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3184 Received-SPF: pass client-ip=40.107.4.108; envelope-from=andrey.gruzdev@virtuozzo.com; helo=EUR03-DB5-obe.outbound.protection.outlook.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MSGID_FROM_MTA_HEADER=0.001, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On 01.12.2020 23:01, Dr. David Alan Gilbert wrote: > * Peter Xu (peterx@redhat.com) wrote: >> On Tue, Dec 01, 2020 at 06:40:55PM +0000, Dr. David Alan Gilbert wrote: >>>> Yep, seems that current userfaultfd supports hugetlbfs and shared memory for >>>> missing pages but not for wr-protected.. >>> >>> For hugepages, you'd need kernel support - but also you'd want to make >>> sure you write the whole hugepage at once. >> >> Or we can do similar things by splitting the huge pages just like when we >> migrate. >> >> I should have overlooked these facts when I replied previusly - we do need the >> same logic, but also special care on these special memory types. >> >>> >>> For shared, there's a harder problem to ask; what happens if RAM is >>> written by the other process - for postcopy, we get the other process >>> to send us a userfaultfd that they have registered with their VM. >> >> Good point... so we should need similar things too. >> >> Looks like we'd better explicitly disable shmem/hugetlbfs for now from qemu >> background snapshots before we have prepared these utilities, just in case it >> got run on some "future" kernels and accidentally got enabled, so the snapshot >> files could be corrupted ones. >> >> Is shmem used a lot in libvirt, or is it even a default configuration? > > No, but it's used with vhost-user applications; like dpdk. > > Dave > >> -- >> Peter Xu >> Yep. -- Andrey Gruzdev, Principal Engineer Virtuozzo GmbH +7-903-247-6397 virtuzzo.com