Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2365925imm; Sat, 12 May 2018 10:27:29 -0700 (PDT) X-Google-Smtp-Source: AB8JxZofC6W/p4GLXuoQEuni+tyWIgmptRbf9yNcUABWsSElK+pRMHYfIZjNZgDpOXIRU5h8Zz1+ X-Received: by 2002:a17:902:3103:: with SMTP id w3-v6mr2798546plb.37.1526146049419; Sat, 12 May 2018 10:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526146049; cv=none; d=google.com; s=arc-20160816; b=ybkLjuVM29Gp/zzp5af+WgQo4iCUnWAszHKcpSVxNkOKODMEvQTIqCdwgFoGEJTcDC UPMXde1ieH1ywCagN+DfIwquWYit1g3O7vul7tEAfaGSLf7F19xaGw0nSNFtlZ+r8Zh4 sO9NwDxOyGskhCK6teHWDt+iYQOriRJx0F2vo5JETZwznMqL3mHfJe9Uql7RlKH7AxUZ g2TReypIw4y67wvKX+BvgKWkZFtXsBwZ6MRnd3I0A/4SYC3DrEDJBWQkmUnI6tqB+4Vw Qfwd1zTfaccJCODzMXwweO8eoLj81Zk+eH1JMdQxvSUe7vonSfNMXICFpA59sevyx3mu 1ngA== 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=49OeYu7QAIzizRKPOtEpmkI5mO4f3NRBOkqjabCGg7Y=; b=o8M/lwiwHQBTLu+bIhqF1ywd8QcBXfHLwM/aZOZAAb8o21dDi2QGowkJ0oGaFnt+vs NwJWjPwFeiJtWGzk5tOMiL7jQ5hwNcMR5VtmrMTtuWOVLcIpOajhvnbyw8B/Luk/sI+Z qGWS2COZEAnEKMXfIb7K+9XR/v7f3vZr+xCYoExssbU322BRLk29CV5C43npo48ZRxz8 QZLIGwNXLNoWwoCEW5U5GgkzLBoaNiHqpNIT4ginhzq7S7/BPhPfIedSCiPS3Vtnsvlb doVoONdPnLsYtTUHTqDBp7t6to5wua/BkwT8Oq0AQOfTnaKRusNYF2K/Ujbo5mhxNlKW Trqw== 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 r4-v6si4530318pgt.613.2018.05.12.10.27.00; Sat, 12 May 2018 10:27:29 -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 S1751362AbeELR0v (ORCPT + 99 others); Sat, 12 May 2018 13:26:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:40662 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751010AbeELR0u (ORCPT ); Sat, 12 May 2018 13:26:50 -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 38B1A21747; Sat, 12 May 2018 17:26:49 +0000 (UTC) Date: Sat, 12 May 2018 13:26:47 -0400 From: Steven Rostedt To: "Paul E. McKenney" Cc: Joel Fernandes , 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: <20180512132647.2923f7cf@gandalf.local.home> In-Reply-To: <20180512144119.GJ26088@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> <20180511224138.GA89902@joelaf.mtv.corp.google.com> <20180512050824.GF26088@linux.vnet.ibm.com> <20180512063037.GC192642@joelaf.mtv.corp.google.com> <20180512144119.GJ26088@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 Sat, 12 May 2018 07:41:19 -0700 "Paul E. McKenney" wrote: > Don't get me wrong, this discussion was quite useful to me. We probably > need to at least change the comments, and perhaps the code as well. But > I agree that we need input from Peter and Steven to make much more forward > progress. It's the weekend so I skimmed more than read this thread, but I will just add this. The table Joel posted is interesting, and perhaps we should keep things consistent with that. But that said, with respect to task-RCU, as nothing on a trampoline should ever call cond_resched() (and perhaps I should add code in lockdep that verifies this), we just want a quiescent state that tells us that the task has left the trampoline. A cond_resched() should be one of those points that does. It really has nothing to do with scheduling or preemption. The issue is that if a task is on a trampoline and gets preempted, there's no knowing when it is off that trampoline where we can free it. We need to have places in the kernel that we know is a quiescent state to move task-RCU forward. cond_resched() seems to be one of them. schedule itself can not be, because it can be called from an interrupt preempting a task while it is on the trampoline. -- Steve