Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4999625imm; Mon, 14 May 2018 17:36:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq2n3TL0f4w82oov6ZECngtDnjXGGdLZ4KTW+Yw2VxXbScbkew1tngeFiaGPg4p0hGBMRCq X-Received: by 2002:a17:902:b788:: with SMTP id e8-v6mr12106024pls.263.1526344585596; Mon, 14 May 2018 17:36:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526344585; cv=none; d=google.com; s=arc-20160816; b=e8keUlM5osLuUv7EKvxsAzLJxces2sArANci+JP1waSw0bdJ8GKH/425JG7tild0u+ O1vuWwRAyZAzmEOE74+cJ0/ATZSx3Glh30LtLfKVZe37iQZuStf1X3xi3XEID8x9QCy0 RHZETQMp3BJDjp9iZs0okI2HWBVJdUwlO4x0EqBf1unzpU5RYZB0mnSfUZVcqTjHMu6f rVQ/1G3bI7TeJRmpuSq4UQHGoLbUuBrbo4vqPkmh3ed3TrPdsH9JhAc5BJzQBa11HigP VQpvka0E7THgGNjdjIXMij8+k1HBGZdHXn564DJDX1S9BgMxu7lRA0+Vikr+8EISMpbt 9OVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=VT/qaBgXGfmv/1kmQFnOpxVRIBAQpvYMdGkNp5+J6zE=; b=LwSP/PJXzFLIsxl84k1m9jv5pIPkrYUVwacl4u4fgVO1bG753Apx6o2kQDLBaQO0iw Ww/+zKwtW7bdUfF1EY3KcSUx5ywQZIsW7I2RLSXNskIrV4LT34zCzjDtoIzQO3ga+l+Y 1wIJNKHuaIj+/tHr6AGAkLqrmD3Rhs7N2yqOOIGsBFMeujhr2j0jUqZ45dIw+L8JzV9y i9+/QQe6gwxZrVPi0wZAFPhn6ybQ+75u5Ofy5j0pFAOtLXdLUhJkR4eTspNxcO+HbQaf oYBXG9bbQjS1Vpaa8wmsGicO1N7Nqb/o8h/XQB+4QnkBINVa/bifVw9u3Fd4kvQIgJfY HuJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@joelfernandes-org.20150623.gappssmtp.com header.s=20150623 header.b=X4a//TRV; 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 u17-v6si8303150pge.240.2018.05.14.17.36.11; Mon, 14 May 2018 17:36:25 -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=pass header.i=@joelfernandes-org.20150623.gappssmtp.com header.s=20150623 header.b=X4a//TRV; 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 S1752483AbeEOAf6 (ORCPT + 99 others); Mon, 14 May 2018 20:35:58 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:34896 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752382AbeEOAf5 (ORCPT ); Mon, 14 May 2018 20:35:57 -0400 Received: by mail-pl0-f66.google.com with SMTP id i5-v6so8325033plt.2 for ; Mon, 14 May 2018 17:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=joelfernandes-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=VT/qaBgXGfmv/1kmQFnOpxVRIBAQpvYMdGkNp5+J6zE=; b=X4a//TRVnATbNG0GkbeKDY2djgPNx6NKe1J+R0BbwW/sCk9Z03raSzPHqNlC/Dd6PN JlXg9zRWAiubOgkD4GDpjF8JaaS1mUHyFYgN3WPy5tOYRiTA5UM3CpmoN+Q6ACqzgsS/ v/RHEGXISxWJnfGbLzs5FOugRRKazfKKyopHZwB3y4I9JeNS1sTCcotKpTMXK5LeZT/Q TtT9ajyQzKvfScMsyj9DNm8/lqmgQDDyhepY32MxFXedUvRyFWbzO/kxmNOM+AahbBh9 Rbc80WiMIr8bO1RiQR6C82uAJW11ZmI7KjuSNiEsl8SrZtgKxoKRQ7DdNgaXlzD0fcyx ncxQ== 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:user-agent; bh=VT/qaBgXGfmv/1kmQFnOpxVRIBAQpvYMdGkNp5+J6zE=; b=Iqn0vL3SiZrFbBRHDEfXOOqCa73Ngt2W07o7nMtLdWzpKLNUEwNs/t38z4lfC/0zNy iOnMr+ZCJ/MMI84VX/a3T0Iv258NbbrJ8vhTkjarDU7VqBI2a9jp3Xqcxmd7FiCw7He9 L+zuJKpqiN6yorvSpDCYannzcaeC073L9istP1Jlg6+HoCCFKzjsg+HsIsTdhOv50ksJ wxQmDc+2gvhQZeFYh5eMAoBvfZlZ45yUlCUPUD66WyYFaGibkLM2VlOuEm6vxqy2j3l9 iPaWZUWf4mavfsIy8zrswy9Ysuj2Rb5pmLjT9nZU8BTZ7ie9mT8+Y4pamCP/vZVejvDn KdMQ== X-Gm-Message-State: ALKqPwcskXf3I8826VLsagFctMzvPEbx3StLrbRFFwJgC2ceL7ef+gPY 8vZyzyL4pvZg9jGZGFmmAxpY8g== X-Received: by 2002:a17:902:988b:: with SMTP id s11-v6mr11935525plp.304.1526344556407; Mon, 14 May 2018 17:35:56 -0700 (PDT) Received: from localhost ([2620:0:1000:1600:3122:ea9c:d178:eb]) by smtp.gmail.com with ESMTPSA id v2-v6sm10324370pgf.57.2018.05.14.17.35.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 May 2018 17:35:55 -0700 (PDT) Date: Mon, 14 May 2018 17:35:55 -0700 From: Joel Fernandes To: "Paul E. McKenney" Cc: Steven Rostedt , linux-kernel@vger.kernel.org, Josh Triplett , Mathieu Desnoyers , Lai Jiangshan , byungchul.park@lge.com, kernel-team@android.com Subject: Re: [PATCH RFC 2/8] rcu: Clarify usage of cond_resched for tasks-RCU Message-ID: <20180515003555.GA209519@joelaf.mtv.corp.google.com> References: <20180514031541.67247-1-joel@joelfernandes.org> <20180514031541.67247-3-joel@joelfernandes.org> <20180514105454.45946ad3@gandalf.local.home> <20180514172205.GZ26088@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180514172205.GZ26088@linux.vnet.ibm.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 14, 2018 at 10:22:05AM -0700, Paul E. McKenney wrote: > On Mon, May 14, 2018 at 10:54:54AM -0400, Steven Rostedt wrote: > > On Sun, 13 May 2018 20:15:35 -0700 > > "Joel Fernandes (Google)" wrote: > > > > > Recently we had a discussion about cond_resched unconditionally > > > recording a voluntary context switch [1]. > > > > > > Lets add a comment clarifying that how this API is to be used. > > > > > > [1] https://lkml.kernel.org/r/1526027434-21237-1-git-send-email-byungchul.park@lge.com > > > > > > Signed-off-by: Joel Fernandes (Google) > > > --- > > > include/linux/rcupdate.h | 11 ++++++++--- > > > 1 file changed, 8 insertions(+), 3 deletions(-) > > > > > > diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h > > > index 743226176350..a9881007ece6 100644 > > > --- a/include/linux/rcupdate.h > > > +++ b/include/linux/rcupdate.h > > > @@ -159,8 +159,12 @@ static inline void rcu_init_nohz(void) { } > > > } while (0) > > > > > > /* > > > - * Note a voluntary context switch for RCU-tasks benefit. This is a > > > - * macro rather than an inline function to avoid #include hell. > > > + * Note an attempt to perform a voluntary context switch for RCU-tasks benefit. > > > + * > > > + * This is called even in situations where a context switch didn't really > > > + * happen even though it was requested. The caller uses it to indicate > > > + * traversal of an RCU-tasks quiescent state. This is a macro rather than an > > > + * inline function to avoid #include hell. > > > > I don't know. I just don't like the wording. It sounds too much like > > it was written by someone that was confused for it being called when a > > context switch didn't occur ;-) True :) > > > > What about something more like: > > > > /* > > * This is called to denote a RCU-task quiescent state. It is placed at > > * voluntary preemption points, as RCU-task critical sections may not > > * perform voluntary preemption or scheduling calls. It does not matter > > * if the task is scheduled out or not, just that a voluntary preemption > > * may be done. > > */ > > s/RCU-task/RCU-tasks/ and I am good with this. Ok. I like Steve's comment better too. Btw, I see you just posted a change of the macro name from rcu_note_voluntary_context_switch_lite to rcu_tasks_qs which actually in itself is much more descriptive. Considering this, I feel the new name is quite self-documenting in itself. So I am more inclined to drop this patch in any series reposting, but let me know if you feel otherwise. thanks, - Joel