Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1064427imm; Fri, 11 May 2018 10:30:57 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqRdPGYKl6Hvo+Ixk2YKrAv9PEaB/x5lwkmb5jQE6gCP4XSMhfC3Jer/lZNlo0O0W5/o/wX X-Received: by 2002:a62:9c93:: with SMTP id u19-v6mr6453320pfk.74.1526059857086; Fri, 11 May 2018 10:30:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526059857; cv=none; d=google.com; s=arc-20160816; b=bMBYBQJ25RAvceIMdrrB6VJi4a6p36DyI3EC6g2blBmVHORKkX38IMNm890Dl1GMvO 2KANcQ0D3W39TwLJduvoZplebwOwijuEXyq570oqQaZy2nTPoNX2cafmkWkUsHPsCsUC O08gq2aQDeN/3e1rwkbO1lqSyjKYBnQK/YGv/GlAvIY+/ddGhplElYMhxjMqbysPM9Ef t8KxCOlyEbgeTGWzhI6946K22q2D42iRdPttZpbyKDt77p8qDisKydWZQ5uteqydZeON 4TbHKwqUYCZe1LhM4r2GV2K2/XR/vj8TD981QgAv59PULxMsvZvIAOYrDZ7xvKAPw9zQ sWBg== 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=K3TCtARI+e/8yWV9LpUE7TjLXFnmxzr9rGVx+SCXHdQ=; b=dgY3j65n6XxPyLVVpLzLdPRgdb/h6b5E59KOtLgXrP7r6SdIxep4KVPJHWv3Rn1kpP vY6n5hOay0mxD0xzIg2DVRVQ2CtiKODYNHSzVWO1/CmtMtfG+iEhNLPnLbq+l8/rCrqt y9siqIM1fpYoflf9QB7QOiCdH4+9jrTtzUPysn702YwuxQg/TKx76GbFPz8VBlWXAEpZ OGvz5bSAOvc1nHFtf0k5lR6ITCeqgBRiB2L2CpSAsMmcGcHlE0d4ZKr7yMLVaQRdoFN8 eCWWvgxSGhXM+zpuYlpKlgxfrAEFHdAQEpkt4LQSCUrmoV2WglaZLge+wvTxhtj9KL+t 8H4w== 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 b6-v6si3331173plx.211.2018.05.11.10.30.40; Fri, 11 May 2018 10:30:57 -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 S1751338AbeEKR3O (ORCPT + 99 others); Fri, 11 May 2018 13:29:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:36132 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750746AbeEKR3N (ORCPT ); Fri, 11 May 2018 13:29:13 -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 5419F2177D; Fri, 11 May 2018 17:29:12 +0000 (UTC) Date: Fri, 11 May 2018 13:29:10 -0400 From: Steven Rostedt To: "Paul E. McKenney" Cc: Byungchul Park , jiangshanlai@gmail.com, josh@joshtriplett.org, mathieu.desnoyers@efficios.com, linux-kernel@vger.kernel.org, kernel-team@lge.com, peterz@infradead.org Subject: Re: [PATCH] rcu: Report a quiescent state when it's exactly in the state Message-ID: <20180511132910.4e729a26@gandalf.local.home> In-Reply-To: <20180511172735.GB26088@linux.vnet.ibm.com> References: <1526027434-21237-1-git-send-email-byungchul.park@lge.com> <3af4cec0-4019-e3ac-77f9-8631252fb6da@lge.com> <20180511161746.GX26088@linux.vnet.ibm.com> <20180511122321.722a12cc@gandalf.local.home> <20180511122528.2a398d24@gandalf.local.home> <20180511122712.2d67992b@gandalf.local.home> <20180511172735.GB26088@linux.vnet.ibm.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 Fri, 11 May 2018 10:27:35 -0700 "Paul E. McKenney" wrote: > On Fri, May 11, 2018 at 12:27:12PM -0400, Steven Rostedt wrote: > > On Fri, 11 May 2018 12:25:28 -0400 > > Steven Rostedt wrote: > > > > > I would also say that one should never call schedule() directly without > > > changing its state to something other than TASK_RUNNING. Hence, calling > > > schedule directly is saying you are ready to sleep. But that is not the > > > case with cond_resched() which should always be called with the state > > > as TASK_RUNNING. > > > > To continue this, with tracing, when a task is scheduled out in the > > RUNNING state, it is considered preempted, otherwise it is not. > > I suppose another option would be for cond_resched_tasks_rcu_qs() to set > (and later clear) a per-CPU variable that causes rcu_note_context_switch() > to ignore its "preempt" parameter. Byungchul's approach seems more > straightforward, though. I agree that I prefer Byungchul's approach better ;-) -- Steve