Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp384919iog; Wed, 15 Jun 2022 04:25:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tTDbEU5rPoVyRBcCdZmI9R/xLOT+5ds6gbQzzwgnhtyqOWh5irYHdARg/onkp+8sIexGHy X-Received: by 2002:a05:6402:3482:b0:42d:e063:7c1d with SMTP id v2-20020a056402348200b0042de0637c1dmr12360210edc.40.1655292330076; Wed, 15 Jun 2022 04:25:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655292330; cv=none; d=google.com; s=arc-20160816; b=whimjzFhRWfv8vPC2P/k0vb/05UUBTY3t1GWBAk3xvWkkxI3JQ/25Q4o8Dyk51heSb rw+JmiUrq5FIsmO9HFvn9N9xcN056aVXyv8/yiYrtcRGRC0oDy1JMP8aEAllbFbboS2e JhaysMvmU60wfsXjV4KU72nEeKc4M124mmnXtpvxKKXjpfRaKOlYVHP2XRTILG08+6h8 X3bNzjyUemEfF+Su8UC5IX1gLbOJ8JhIyZ73H/tZET2J6n8tpClMRrjmffJdrnx5Oe3A 6WmMoBAmBx2jRh7J/IFmpGgCLf8UU3Gwc1RXuFGuYdg9P6v+4jyEZuRnSc8TuyOhs4SU 4BDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=uHh98GFud1PPMa8LMkyMEyW14ccPkBQOH1hhbDcKaMg=; b=xmzHq9V/WuH2KOsSLrJij2NnNL4lTz0pVg7l2BYaaqp4AKcFOJ6OofIlFEaEk0Lt90 1TMuoZ2Y1ZpjFPBmCBY6B1cwQ7Ufax4RofFyq2FYDrb9ISWzcRsuIDtqI4nhlpXjtAal iTWSwBD/Xv0D6p6VIng0RKMZIOo8aP04NuzzVtkhl9Uzk9vfDEIHSiA0hNNRguejz/Ey njg5ZM994obNcqmIA2SwqF9XDYu0RqlSBUbZTBKRKNAtrxY9UGqVqN0XCX6qZAJVn9Yh tqQck5Z+oGXEKNR4iT2+encJ7gpZQtgVvFcADpCx5tB4m97yfcD7BlfEuUle8bTEitYU IziQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eWa94p5G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y26-20020a170906519a00b006ff0dfd6267si13767309ejk.341.2022.06.15.04.25.05; Wed, 15 Jun 2022 04:25:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eWa94p5G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231751AbiFOKuY (ORCPT + 99 others); Wed, 15 Jun 2022 06:50:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243605AbiFOKuW (ORCPT ); Wed, 15 Jun 2022 06:50:22 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 57F4637A20 for ; Wed, 15 Jun 2022 03:50:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655290220; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uHh98GFud1PPMa8LMkyMEyW14ccPkBQOH1hhbDcKaMg=; b=eWa94p5GQyrGndI+0cPT/M6x5R5KSKzRjQJQrXXnqT4LColROrpTRyVVy1tFIFZMo4X0xR uj0G5utEbBL8DY6/8o9Kx+nwsrusJmxPpC7MMHZJ8KcTC/Ada2M9uSk8mvrt5tG+tOV8ca YU4vFu9cNMQxG3MrT3qxpaCWAjOjNi8= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-591-s4VAArG8M7y3nyNdKF4rqQ-1; Wed, 15 Jun 2022 06:50:19 -0400 X-MC-Unique: s4VAArG8M7y3nyNdKF4rqQ-1 Received: by mail-wm1-f69.google.com with SMTP id be12-20020a05600c1e8c00b0039c506b52a4so1427000wmb.1 for ; Wed, 15 Jun 2022 03:50:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=uHh98GFud1PPMa8LMkyMEyW14ccPkBQOH1hhbDcKaMg=; b=Kk78iTTFiyq5vs/QcvbN6yFpQoCT4gCt2OwoeR4ePytnL4UX39Jtte2mqHm1UM3XRE M8URPGlcoD7FKK5RzMg8PHRm7tw+FTGTP/CUiw7uiVwGedVMQWItrSnUrwhBrQqVtJHL I8/01VF20NvBoHTlTBNZvTaEt8Lm1iV4KkP6FIMT9bbeHfnDEGRhfC98XxArL1+ClaK5 NEUqa3GaN+Plnv73eR5yB7DeErTEjShTMLJn9UxrUK4PZEjitKFBH78kXV94qtszyzS7 jgYE0ZG+GtN+qRck71OfXZ1Z7lLxnhSXxbEFk5l0MGnplfnaNRGiOrQZ2y5BIuTbKOwy Odhg== X-Gm-Message-State: AJIora9OTQBCnMqiHGHAM6nB2atQRwjOoR0kXqrg5Ol8y8FYsDmnDvuf 6pC/hk5QMnoizdFtA9qzaZ/UjU72EP6GemscBbhJLXODoMaSIilFl25jYXvZZcFV2pjFV3yHKiT y5sLcOOpC9WD76MnlXrQ2agrM X-Received: by 2002:a05:6000:1861:b0:216:4519:18a1 with SMTP id d1-20020a056000186100b00216451918a1mr9255319wri.293.1655290218120; Wed, 15 Jun 2022 03:50:18 -0700 (PDT) X-Received: by 2002:a05:6000:1861:b0:216:4519:18a1 with SMTP id d1-20020a056000186100b00216451918a1mr9255298wri.293.1655290217900; Wed, 15 Jun 2022 03:50:17 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:9af8:e5f5:7516:fa89? ([2001:b07:6468:f312:9af8:e5f5:7516:fa89]) by smtp.googlemail.com with ESMTPSA id m6-20020a05600c3b0600b00397402ae674sm2044200wms.11.2022.06.15.03.50.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Jun 2022 03:50:16 -0700 (PDT) Message-ID: <7f6d9360-9254-88d6-fb34-13f248d2e542@redhat.com> Date: Wed, 15 Jun 2022 12:50:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: Commit 282d8998e997 (srcu: Prevent expedited GPs and blocking readers from consuming CPU) cause qemu boot slow Content-Language: en-US To: Neeraj Upadhyay , "zhangfei.gao@foxmail.com" , paulmck@kernel.org, zhangfei Cc: Shameerali Kolothum Thodi , "linux-kernel@vger.kernel.org" , "rcu@vger.kernel.org" , Lai Jiangshan , Josh Triplett , Mathieu Desnoyers , Matthew Wilcox , "mtosatti@redhat.com" , Auger Eric , "chenxiang (M)" References: <20220613035711.GY1790663@paulmck-ThinkPad-P17-Gen-1> <20220613041652.GA3976000@paulmck-ThinkPad-P17-Gen-1> <20220613121831.GA1790663@paulmck-ThinkPad-P17-Gen-1> <20220613145900.GC1790663@paulmck-ThinkPad-P17-Gen-1> <7b6c983b21d44119b61716a66de397ed@huawei.com> <20220614141712.GR1790663@paulmck-ThinkPad-P17-Gen-1> <042142db-aab2-fc4a-c1a5-371223c80440@quicinc.com> From: Paolo Bonzini In-Reply-To: <042142db-aab2-fc4a-c1a5-371223c80440@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/15/22 12:40, Neeraj Upadhyay wrote: > > This is useful data, thanks! Did you get chance to check between 100 and > 1000, to narrow down further, from which point (does need to be exact > value) between 100 and 1000,  you start seeing degradation at, for ex. > 250, 500 , ...? > > Is it also possible to try experiment 10 and 11 with below diff. > What I have done in below diff is, call srcu_get_delay() only once > in try_check_zero() (and not for every loop iteration); also > retry with a different delay for the extra iteration which is done > when srcu_get_delay(ssp) returns 0. > > Once we have this data, can you also try by changing > SRCU_RETRY_CHECK_LONG_DELAY   to 100, on top of below diff. > > #define SRCU_RETRY_CHECK_LONG_DELAY  100 Is there any data that you would like me to gather from the KVM side, for example with respect to how much it takes to do synchronize_srcu() on an unpatched kernel, or the duration of the read-sides? Thanks, Paolo