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.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 0EE79C07E95 for ; Thu, 8 Jul 2021 00:23:52 +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 70DE561C53 for ; Thu, 8 Jul 2021 00:23:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 70DE561C53 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:41476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1HpW-000838-4R for qemu-devel@archiver.kernel.org; Wed, 07 Jul 2021 20:23:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1How-0007ON-9u for qemu-devel@nongnu.org; Wed, 07 Jul 2021 20:23:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:29302) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1Hos-0003M9-Mq for qemu-devel@nongnu.org; Wed, 07 Jul 2021 20:23:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625703789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=qFBCeRD7HLdBvWfEpmPFh6DhKXq4HO8Ap1ymbhNl6Dk=; b=Nt5uO0sVTEiyrKAlOxbSyuhurMpoWxCLGLIrfthfIhcWJ0CnBLNXIVcbYTwPmgc9rKF3k7 HhcRxcMPwYiW4TPvEf21M+0RjLGOzGxOg4hCaQnVbn9Ew4jUicHko2Z9HMAYuMW7tvuBTh mM9Zyi1/kHlCVJx+hbRb2/Ts0rmyZ3Y= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-298-EZAGDxVMNbeODNfKkHi_3g-1; Wed, 07 Jul 2021 20:23:08 -0400 X-MC-Unique: EZAGDxVMNbeODNfKkHi_3g-1 Received: by mail-qk1-f197.google.com with SMTP id o14-20020a05620a0d4eb02903a5eee61155so2669363qkl.9 for ; Wed, 07 Jul 2021 17:23:08 -0700 (PDT) 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:in-reply-to; bh=qFBCeRD7HLdBvWfEpmPFh6DhKXq4HO8Ap1ymbhNl6Dk=; b=RCXLI4BOual1K2rXYK5Kca0zc/AR7G0uh5ltGYHVsfnHCGXVEonHNqbZme/GjZO4V2 uObALqVDuE+HxQrqQR+R7zy9LfLZ1uYEBz2pVaYTJZ1gweDca9xUnOC95suE37ysL2TV UR0RHrL69zpaxWR4K0m8YYtsmVF2jgb+LSb5ELOnKT+sZy00gadbEIHYYjbKaEHIuoNj hNR3zFDpUhFEtTNCFF4rSgKUPnjhcVWR2ImzMHxERNvRYL0re8CgveS6nOGXobLW6s3b 6VEHSAr0UwiKOJpP57mGv6E1WDCzkEYP1AtXhGI6BbDa+qjSasE9aGZm5VGYcyIcv2Ya MV7g== X-Gm-Message-State: AOAM533gz6ITBxpaTFiYJlXb3HgezCDUnpGBMMmpuyW/ocoD44eBVjUp JhgDduw9ygOg5FKSCqhIvrI/lXFr7WOMBzuo4aSaK3mkT+NKqZsffQCxBhee+7c8c/w71mwRoMM ArmvlkvhzvbG/7q0= X-Received: by 2002:a05:622a:134d:: with SMTP id w13mr24396734qtk.275.1625703787857; Wed, 07 Jul 2021 17:23:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3KDp9w6IUARVtuSb2WSC/lqav9PK1hONhYfRhsSpmqUW0SZANeAlRRvkYb2B10Op6WIrcqg== X-Received: by 2002:a05:622a:134d:: with SMTP id w13mr24396715qtk.275.1625703787594; Wed, 07 Jul 2021 17:23:07 -0700 (PDT) Received: from t490s (bras-base-toroon474qw-grc-65-184-144-111-238.dsl.bell.ca. [184.144.111.238]) by smtp.gmail.com with ESMTPSA id j28sm71455qki.52.2021.07.07.17.21.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jul 2021 17:23:06 -0700 (PDT) Date: Wed, 7 Jul 2021 20:21:22 -0400 From: Peter Xu To: "Wang, Wei W" Subject: Re: [PATCH] migration: Move bitmap_mutex out of migration_bitmap_clear_dirty() Message-ID: References: <604935aa45114d889800f6ccc23c6b13@intel.com> <824a1d77-eab0-239f-5104-49c49d6ad285@redhat.com> <562b42cbd5674853af21be3297fbaada@intel.com> <7f3e27272da9469281d8fa5820978e51@intel.com> MIME-Version: 1.0 In-Reply-To: <7f3e27272da9469281d8fa5820978e51@intel.com> Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=peterx@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Received-SPF: pass client-ip=170.10.133.124; envelope-from=peterx@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.439, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=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: , Cc: Hailiang Zhang , Juan Quintela , David Hildenbrand , "qemu-devel@nongnu.org" , "Dr . David Alan Gilbert" , Leonardo Bras Soares Passos Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Wed, Jul 07, 2021 at 11:25:50PM +0000, Wang, Wei W wrote: > On Thursday, July 8, 2021 12:45 AM, Peter Xu wrote: > > On Wed, Jul 07, 2021 at 12:45:32PM +0000, Wang, Wei W wrote: > > > Btw, what would you think if we change mutex to QemuSpin? It will also reduce > > the overhead, I think. > > > > As I replied at the other place, the bottleneck we encountered is the lock taking > > not sleeping, so I'm afraid spinlock will have the same issue. Thanks, > > I suspect the overhead you observed might be caused by the syscalls for mutex. Per-page syscall might be too much. > If possible, you could have another test of the 3GB guest migration using QemuSpin. I'm a bit confused.. Why taking a mutex with no contention would need a syscall? Please feel free to strace on a general version glibc impl of pthread mutex which qemu uses, I believe it didn't need to. Thanks, -- Peter Xu