Received: by 10.192.165.148 with SMTP id m20csp3476947imm; Mon, 23 Apr 2018 07:14:15 -0700 (PDT) X-Google-Smtp-Source: AIpwx48jD3vV2bYojzZDwj8wNItZNExA4Re3424Cj6bduB0TDLlhIzAJvoZPAVuiaF435koneZKO X-Received: by 10.101.99.206 with SMTP id n14mr611604pgv.316.1524492855113; Mon, 23 Apr 2018 07:14:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524492855; cv=none; d=google.com; s=arc-20160816; b=qC6FeRD1kCnjMviUgVqnUYG1D84bd+rOp0IqByWkDifpjiTWHtmJQkJa+blMLb6AKP 07vawJtCawJD1XQDP4jV4is1b1WLzKDMlj7NqW6oKbyfStRDJ7KYaTKnXI1xAgjA6inf VkTqEhyaJ1EIW/yOPy9HrjTyvskl9WQ1orT2DO3/yEzTqGwfSuEDfCQQvNVhoQy8tqDR zM9Clhbai97VaJbxBhwnzlT+voydkbZjgmOaLIrbK5lW1Eo284WwEiGkuorOkWVrKJB1 A+P/k0YPs31ZIzdREQO6g2l54Xr3A3erYgr1km3qYBVRGNoPCF2y3c7vAA0bq/bqmMvj kYDA== 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=K0C3rKAjyZWEBYJTlmYKP055nW5L1ZdOGUx/+/R/du4=; b=h2lqqG+W10Wi4mYDqrxWZs48bc5KuOfO8GE46chxEnxkx+8Rm2Kw/o/EbpmA+5NBtA Q8nnZQRiQoNATfdLv0alrlDlYoyiQXxu8rB6kXE4PxIK3YrW9AhFVHfVB8VeDchPMhYe qcHYUGE6ImQJd20OZUZCXfTREngnt5wCUplw7ihjAp2gkfrYXOfDb8rGD25cr/FEjTtI S3NAV1T8mefvy/JzuA608SEXslyDueBSUR4OhVm20+dJc3MUyOvzePE2yVkhSSoqVbm4 UiSKC3lqFsnyXuGvlmp0Hym9XV/hcQeb2xksBmUz/AqRf+S1p3bHMzBw26YXFOVVCvlU OcGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UFmk9BMw; 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 j10-v6si11754993plg.396.2018.04.23.07.14.00; Mon, 23 Apr 2018 07:14:15 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UFmk9BMw; 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 S932081AbeDWOMF (ORCPT + 99 others); Mon, 23 Apr 2018 10:12:05 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46344 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755579AbeDWOLY (ORCPT ); Mon, 23 Apr 2018 10:11:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=K0C3rKAjyZWEBYJTlmYKP055nW5L1ZdOGUx/+/R/du4=; b=UFmk9BMwB1dodUmcqclAaVZSU yDG6WguqOOP/Rn7OKsCrUNKiidu75VsYK3VpM40BMVOdPDGw8//l3zt2HQZ1FxxNm++1qStGqc8MI LomOuUbjaxAkILye3AOdf58NeHZvCZsE+92YpvE5KepbPaZcivOY4YNFX8s/iDED1T4AQD3V4THAU 1eHkAbKMOqdI2O7BgL6VnqOfnwssZj2q3wSRHR5sCHvFKcpVcS4Oume9kQrx3LLCFb9uuvMmwSYGF lprRUIyIBWyfVpNQb/Kjmj9kGQcpHQ6LMYqR/npYO9V5KXDb6MyrN8F4OH4+PtU1b9ONH2HsIWW9n Doj1WOyZw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fAcAy-0001C5-73; Mon, 23 Apr 2018 14:10:40 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A767E203BF9C7; Mon, 23 Apr 2018 16:10:38 +0200 (CEST) Date: Mon, 23 Apr 2018 16:10:38 +0200 From: Peter Zijlstra To: Steven Rostedt Cc: "Paul E. McKenney" , linux-kernel@vger.kernel.org, mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com, joel.opensrc@gmail.com Subject: Re: [PATCH tip/core/rcu 01/22] sched: Make non-production PREEMPT cond_resched() help Tasks RCU Message-ID: <20180423141038.GA4064@hirez.programming.kicks-ass.net> References: <20180423023150.GA21533@linux.vnet.ibm.com> <1524450747-22778-1-git-send-email-paulmck@linux.vnet.ibm.com> <20180423085127.GR4064@hirez.programming.kicks-ass.net> <20180423124000.GL26088@linux.vnet.ibm.com> <20180423094742.6582e19d@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180423094742.6582e19d@gandalf.local.home> User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 23, 2018 at 09:47:42AM -0400, Steven Rostedt wrote: > On Mon, 23 Apr 2018 05:40:00 -0700 > "Paul E. McKenney" wrote: > > > > I'm confused.. why is having this conditional on TRACEPOINT_BENCHMARK a > > > sane idea? > > > > Because the TRACEPOINT_BENCHMARK tests are insane, so a similar > > level of insanity is required to make things work. Plus having this > > be unconditional would not be good for performance, as 0day has been > > telling me frequently over the past couple of years. > > Just for some context. The tracepoint benchmark (which should never be > enabled in any production machine), will start a thread when the > benchmark trace event is enabled. This thread will never exit (until > the trace event is disabled), and does a benchmark loop and constantly > calls "cond_resched()" to allow other tasks to run. The point is, this > thread will never have a quiescent state for task_rcu, unless we tell > rcu that cond_resched() is a quiescent state. But this is only required > because the tracepoint benchmark has this nasty thread, that is only > used for debugging and benchmarking the tracepoint (during development). > > I also suggested having a direct call into RCU from the thread to tell > RCU that it entered a quiescent state, but Paul didn't like that idea > as it caused the tracepoint benchmark to call too deep into RCU > internals. > > http://lkml.kernel.org/r/20180227153646.GD3777@linux.vnet.ibm.com That thread using cond_resched_task_rcu_qs() seems like a _lot_ better than having cond_resched() semantics change depending on random !scheduler config parameters.