Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2955116imm; Thu, 24 May 2018 19:50:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpxfrKxbfMsp51B0BkD09r+zbINqv3Jtj1Pc2ZQrHF94rH/ljQVcDwPPP7bjDIUPqyWbLWM X-Received: by 2002:a17:902:8207:: with SMTP id x7-v6mr654220pln.100.1527216620412; Thu, 24 May 2018 19:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527216620; cv=none; d=google.com; s=arc-20160816; b=MNU7sCJ9OHAOQnltYOEM+xBUB8mQx/ADr2AAG3Ig7+TVqEeTuap/MUFom7DxVWli6m s6XCkvKq4qA1ytgEKCzBg7+t/AY8eM36Nx92pQcjY0a9/2OX6/TcpkzGU0HubpUVsxB3 a+uUnyRX3DYiVwcVlGZhAhc1opZrpVWZfFKMIP7IRoiKt3XeN0BFcw6hk+XAeRxwi/LX sDFQK+vkyg+AkD625zA3/kXl3k0GOfi6o/IAiyMtMQ4D8DP4iYzn9y04G1xF5BX24Pxz 1sxS3X3MDLY4SfeDlmYkWGjv9Gf9wGzxoOl2oFlgAK/99vBRLWK+npYILDcir62LfJt8 7s/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:from:subject:dkim-signature :arc-authentication-results; bh=BMitOAmHayI4qJcltE8og+WdwcPyq3XtgVxojHqqTSs=; b=r5Ilsm/uhUmlzPTW75QBmo+rvwQcw8EXpy1R1AXugqoCM3SzPcRN44wAnbbr9N99D/ vjBFcov62M3cNo+0LWVWb91O71ui2sSzG9Yl4bVsbDA7u+k2DlsLpcGondp8AOWd5gky McunHVduiwO10RQpohq7kWE9xjMvxDQdPXWr6UNGEgUyeLAC9BlSTwM9saRYzwXeD0zl Dk8kCHLlYSdXfpGQL+DmNpV2L0YYCP+cktxAs8JKLYjmPwvvDToHpAOW4oldWLdZf55p yUR2BZKoJNUGF4PZ7uCJpgPYKcps/YhlSRAZ5njkAgBILLJDlfUkjVC7oLP5Zcb3AWxy 7F0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=BLYzCBQ3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z9-v6si23828974pll.423.2018.05.24.19.50.06; Thu, 24 May 2018 19:50:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=BLYzCBQ3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S970322AbeEYAPG (ORCPT + 99 others); Thu, 24 May 2018 20:15:06 -0400 Received: from merlin.infradead.org ([205.233.59.134]:59126 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S970068AbeEYAPF (ORCPT ); Thu, 24 May 2018 20:15:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:References:Cc:To:From:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=BMitOAmHayI4qJcltE8og+WdwcPyq3XtgVxojHqqTSs=; b=BLYzCBQ3xmROW9dcTDSm1SHhyB GLQ9fxR5+vUEIFdUl6VjnudcW5qHLD1FjSZwCk6e3wH+R21rXMCwkxncH8IGGlSh/p2H8vpZD1bVD miQ7VjumuyFRYydRmu1xY7vOPkeWwWiU5960iERWvF4l6ObZTSt6QyrpN1qjIH5J0Sqd69DGNpYnX cqIpvIsgxGoNfIc9BYTQcp105MXBLI4Lv3WjF65NGw85DXvFGQpiLVbT3PXHljiLfv2yTmuJbT2jv jjZ6WVmQ7uguuN4uiQP4ahOrypz5pJYC6DSjS10GDHWzjphAP26ge/KQ++LbBjzgMkXQWqmbuEwvq LBI8prRA==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fM0Ne-0002hJ-LN; Fri, 25 May 2018 00:14:50 +0000 Subject: Re: [PATCH v4] rcu: Speed up calling of RCU tasks callbacks From: Randy Dunlap To: Steven Rostedt , Joel Fernandes Cc: LKML , "Paul E. McKenney" , Peter Zilstra , Ingo Molnar , Boqun Feng , byungchul.park@lge.com, kernel-team@android.com, Josh Triplett , Lai Jiangshan , Mathieu Desnoyers References: <20180524184946.5fa82d19@gandalf.local.home> <20180524231918.GA98334@joelaf.mtv.corp.google.com> <20180524192247.759f7572@gandalf.local.home> <076566f7-43ff-5cc8-03ba-ebde9c19418c@infradead.org> Message-ID: Date: Thu, 24 May 2018 17:14:47 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <076566f7-43ff-5cc8-03ba-ebde9c19418c@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/24/2018 04:26 PM, Randy Dunlap wrote: > On 05/24/2018 04:22 PM, Steven Rostedt wrote: >> On Thu, 24 May 2018 16:19:18 -0700 >> Joel Fernandes wrote: >> >>> On Thu, May 24, 2018 at 06:49:46PM -0400, Steven Rostedt wrote: >>>> >>>> From: Steven Rostedt (VMware) >>>> >>>> Joel Fernandes found that the synchronize_rcu_tasks() was taking a >>>> significant amount of time. He demonstrated it with the following test: >>>> >>>> # cd /sys/kernel/tracing >>>> # while [ 1 ]; do x=1; done & >>>> # echo '__schedule_bug:traceon' > set_ftrace_filter >>>> # time echo '!__schedule_bug:traceon' > set_ftrace_filter; >>>> >>>> real 0m1.064s >>>> user 0m0.000s >>>> sys 0m0.004s >>>> >>>> Where it takes a little over a second to perform the synchronize, >>>> because there's a loop that waits 1 second at a time for tasks to get >>>> through their quiescent points when there's a task that must be waited >>>> for. >>>> >>>> After discussion we came up with a simple way to wait for holdouts but >>>> increase the time for each iteration of the loop but no more than a >>>> full second. >>>> >>>> With the new patch we have: >>>> >>>> # time echo '!__schedule_bug:traceon' > set_ftrace_filter; >>>> >>>> real 0m0.131s >>>> user 0m0.000s >>>> sys 0m0.004s >>>> >>>> Which drops it down to 13% of what the original wait time was. >>> >>> Should be 90% of original? >> >> That would be if I said "drops it down X" but I said "drops it down to >> X of what the original wait time was". And 0.131 is 13% of 1.064. :-) > > I think that you are confusing "drops it down to" with "drops it down by". > You said the former. You should say the latter. > IOW, I agree with Joel. Please forget this. After reading the numbers, your comments look correct. -- ~Randy