Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1060358imm; Fri, 11 May 2018 10:27:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqpw1XHGUpmfPQr2WYmr6f+PA9khblh71sw7OZIskjLYved1oGJ5+Ni67HXAt0o0mBn5aKO X-Received: by 2002:a17:902:2d24:: with SMTP id o33-v6mr6399285plb.14.1526059645053; Fri, 11 May 2018 10:27:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526059645; cv=none; d=google.com; s=arc-20160816; b=D2RrE/zY2QlRWR4rSegZE/pGiXD5z8k1rmsjqkoXdBYGnubLjKkG6em5c3666tozOV o3ZPL3nDeCJed3gXjsKd6j5hvxBAo6Y25bxbmDaF3mhumttNCTwk9Z+vMtDUYiZ8IfLz PItYCnr9Ji2KX1KbmUuX1wa/TpIb68L5+uenbhKcxOwRYt/2woz7oW/hF4whcJfCvrr/ YtRAR8zg8we8YqzH4g5aeTzujWo6i61YRzsDDdAF+I12zWZjm552xp7GzDJKELXWXi2a uWuTTHvMnRRT/o6Iuj0M6BP61y50hNO+v9mJqKWq9BstyX5oeW72kHNqbgI3S4qrsS3w KYUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:in-reply-to :content-disposition:mime-version:references:reply-to:subject:cc:to :from:date:arc-authentication-results; bh=G9+ZeQn5V59/q/4FC/+2f1JDQdTHUTG/DUwCO7lQTV8=; b=Rpqc+SMtyfBdCWj4E0Jf5CJyr2leHTfd49CpPWMv4ZD5YMXSNJry85SWOgjpSQhOtl e9DUWRQcrpSGe6//Uz7sfWGv9JEKRv2jpVGg9WgMn6aglfw/KEeoCchOomU0POF5P16d qXN1O+46eZhQGmQZIMiFmafWJxUiQeSZlR/PJvapiQTLQdbIelFYQCJao3CdbGKscUE2 1BYVAnpfMWe5oeuSjsUYnLWg5PpYZ8XJTcjl/7AVXcPtnoZdV2dbnnS8VFR/+xixp60N h/7sCrenvqUQUj6pNMvVQu0W0NILFxVbfTtITAPzssxvZfgJT0g+/P+3d3mnY3aZUJyj 5NmA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com 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.27.09; Fri, 11 May 2018 10:27: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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751338AbeEKR0M (ORCPT + 99 others); Fri, 11 May 2018 13:26:12 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:37032 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750711AbeEKR0L (ORCPT ); Fri, 11 May 2018 13:26:11 -0400 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w4BHO7tO125886 for ; Fri, 11 May 2018 13:26:11 -0400 Received: from e19.ny.us.ibm.com (e19.ny.us.ibm.com [129.33.205.209]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hwfcfgfkp-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 11 May 2018 13:26:11 -0400 Received: from localhost by e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 11 May 2018 13:26:10 -0400 Received: from b01cxnp22035.gho.pok.ibm.com (9.57.198.25) by e19.ny.us.ibm.com (146.89.104.206) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 11 May 2018 13:26:07 -0400 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w4BHQ60155640262; Fri, 11 May 2018 17:26:06 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 315A1B2056; Fri, 11 May 2018 14:28:05 -0400 (EDT) Received: from paulmck-ThinkPad-W541 (unknown [9.85.188.179]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP id 00792B2058; Fri, 11 May 2018 14:28:05 -0400 (EDT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 54C3916C11B2; Fri, 11 May 2018 10:27:35 -0700 (PDT) Date: Fri, 11 May 2018 10:27:35 -0700 From: "Paul E. McKenney" To: Steven Rostedt 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 Reply-To: paulmck@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180511122712.2d67992b@gandalf.local.home> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 18051117-0056-0000-0000-0000044D0351 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009007; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000260; SDB=6.01030821; UDB=6.00526848; IPR=6.00809952; MB=3.00021051; MTD=3.00000008; XFM=3.00000015; UTC=2018-05-11 17:26:09 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18051117-0057-0000-0000-00000891140E Message-Id: <20180511172735.GB26088@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-05-11_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1805110162 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanx, Paul