Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1534174imm; Wed, 23 May 2018 18:45:11 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoSDjcav6Y7C23OTnNavxAMrjeCyKs7FKMmuDLmmmL5ZFZzkxJwmVCmLpOohYQqRQQU8RNQ X-Received: by 2002:a62:ae13:: with SMTP id q19-v6mr5076249pff.155.1527126311480; Wed, 23 May 2018 18:45:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527126311; cv=none; d=google.com; s=arc-20160816; b=HCEWOJHo4rTK6iofFabIhhPRNA/UEBnVUmGPdVi8OxcVjCdO6Z7NZq+5T+uBu6OJ0U /2rS2XAUjUNpmNDedZO7mBUVW1Ij74NFPZDV3Xna7WsnY5LPd5YA/SPhDpwcJn8s5RVg fv5BN+0mzy3r4hdWG35JgnXcp3+siE+z5sbSPcUL5jH5crcKzz4NPO0ha7l108YiDOp6 7ruLeIaPTSaITlQYfpvkKdVnm37b+13f1qW02uQWuQRbOMXXJkSbUlNb1sWLe4fls+Qr Ozi0qXHJbKqZOtnnAH6Q2PboBBoFFUVgiySVnQLDUOkWrymz3VMd70R975IDGx85lB1b c3eA== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=aTjc7mbzfL244PYUBMKgho6T/LPmTzdPME/4Bzey6cM=; b=Jp91Qor3Vfh0LycqaVS2AUiH0yjaidnIqmPsfpsXNhdYCfGobzs8Z2Bkk8BwpHXCb3 zl9j/UpTyc7Rw6Y51PxReIsj6Dv9Cn5m05X57TFzuHhmbo/fQyyHGlxQEwf9RKqvESOQ aa3/sZWX98A3hqeGh3KZEv8cRyolDMtjSAHZz9ogbvLyqDQg6i5K5PoB+Zf69wka4hip 5aTkBtrWLhE1ldtD4o4yHX8BKkWbR3sRTcrJOu+V0AiFB1WcJiXlklQpNpWY290l7C3P IF4ylQgoKLNGcdoTX4kWgEo9rl8oF0fYWzRk9q/2DZ/XVo9JpohRaemYXlTupWUWBfpw nW9A== ARC-Authentication-Results: i=1; mx.google.com; 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 e9-v6si15723336pgr.477.2018.05.23.18.44.56; Wed, 23 May 2018 18:45:11 -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; 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 S935333AbeEXBgA (ORCPT + 99 others); Wed, 23 May 2018 21:36:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:47666 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935109AbeEXBf5 (ORCPT ); Wed, 23 May 2018 21:35:57 -0400 Received: from gandalf.local.home (cpe-66-24-56-78.stny.res.rr.com [66.24.56.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B0E222087F; Thu, 24 May 2018 01:35:55 +0000 (UTC) Date: Wed, 23 May 2018 21:35:53 -0400 From: Steven Rostedt To: Joel Fernandes Cc: "Paul E. McKenney" , Joel Fernandes , linux-kernel@vger.kernel.org, Peter Zilstra , Ingo Molnar , Boqun Feng , byungchul.park@lge.com, kernel-team@android.com, Josh Triplett , Lai Jiangshan , Mathieu Desnoyers Subject: Re: [PATCH 1/4] rcu: Speed up calling of RCU tasks callbacks Message-ID: <20180523213553.7a0ffd6d@gandalf.local.home> In-Reply-To: <20180524005119.GA170821@joelaf.mtv.corp.google.com> References: <20180523063815.198302-1-joel@joelfernandes.org> <20180523063815.198302-2-joel@joelfernandes.org> <20180523155734.GK3803@linux.vnet.ibm.com> <20180523124531.7b0e972a@gandalf.local.home> <20180523170303.GR3803@linux.vnet.ibm.com> <20180523151337.469bba34@gandalf.local.home> <20180523200458.GD3803@linux.vnet.ibm.com> <20180524005119.GA170821@joelaf.mtv.corp.google.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 23 May 2018 17:51:19 -0700 Joel Fernandes wrote: > Shouldn't this assignment be done outside the loop? I believe the variable > will be initialized on each iteration. > > A program like this doesn't terminate: > > #include > > int main() { > for (;;) { > int i = 10; > if (!(i--)) > break; > } > > return 0; > } Hey, it compiled, booted and tested. SHIP IT! ;-) But yeah, a little egg on my face for that one. I blame it for the first code I wrote right off of coming back from vacation. > > Otherwise looks good to me, I would initialize fract to 10 so its consistent > with "HZ/10" in other parts of the code but I'm ok with either number. I was thinking about that, but for some reason I thought 15. Not sure why. I'm fine with dropping it down to 10. I'll send out a more proper patch tomorrow. Thanks! -- Steve