Received: by 10.192.165.148 with SMTP id m20csp3467840imm; Mon, 23 Apr 2018 07:06:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+cKI3e39cRkk7atkTnWx+DSRnUGpTjJhb5jxWLCtcatTpFq5ee8ENSgyVQ26gIFqrJ1uH/ X-Received: by 2002:a17:902:a5c2:: with SMTP id t2-v6mr21168647plq.360.1524492380739; Mon, 23 Apr 2018 07:06:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524492380; cv=none; d=google.com; s=arc-20160816; b=AwcuMY7SK9TlSIZvWvGnp02Dxt7TgF934DX1EqoFW1IvPJ2X65dx11uRdVfOgSOJE6 m2Mscque56OHU+4MQN2J2iaihTgvntR5JnNOzxloj7OJQa2zxTSokqh2VkF21gDVY/rJ FW5aVzYPONZQAzar07AzJyAP+/LaCXtLo94ulo6dDnzHCDm9dKHuw7QVxMl9k3SO2RPs nLSnwtAhBWdSgy3aBMzPJl/sRlf4+JZFZ1dpNY5b+BRK5Z2y7XFKImLi4HPu2TMDbyIM tJYedvpwMkLy/rHqPuk1Tz2Fo6RxtJkhMcPkMwNE4huKgRIqq8FXo+rTr+F0qjLSjn4X 0Hfg== 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=gbuG3YoXgXIq1y5Jsq9OrnoSoUk4+s4CvGb2CSFc80A=; b=h8kUqEyBnOYkgbuubV+GH7+Wnct6muGHFAz5K4Qm9Jo6EaWGmsFVc7ATZQ/ClJEWHa OFQ4nNWX/yUsQWhVvFByUEwJzlJxcVtSh5aVmQkH32EG07jCSlqlwEsywG3LDNL4PEsx NXPJIZUZAaMD/+bI6EWFIciLqiFUD539I0b6BwBv2+wzEAkxCoKj/CV/qf7skKz+DW5v 1/CcDu0Q1YqJw4Lxn7nvDl3WoyubPmi61KkNvpbuNKzc4AtSu1uzypHjfgWTF13kGMAr hI90p99gWksF9TTEN48z0ftY+oPISPFRAnqPywTGNDNM+Mn8oXcq+76gbUr3iHHNqwXn t0Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=S3CVzrEl; 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 d127si93159pgc.236.2018.04.23.07.06.06; Mon, 23 Apr 2018 07:06:20 -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=merlin.20170209 header.b=S3CVzrEl; 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 S1755397AbeDWOEQ (ORCPT + 99 others); Mon, 23 Apr 2018 10:04:16 -0400 Received: from merlin.infradead.org ([205.233.59.134]:51742 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755126AbeDWOEP (ORCPT ); Mon, 23 Apr 2018 10:04:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=gbuG3YoXgXIq1y5Jsq9OrnoSoUk4+s4CvGb2CSFc80A=; b=S3CVzrElOgc0n+9y/TAedf4wr PicttfLI/3FgiILUShIoNI0ymHIvbGcqJQYhtjlO2zANd6FryVwcrN0Wk58iiK3OFOtueWoC+6D7N YiVrKAwiYedDp0GyANh5SUytzE2o3UsHJoFkmLk0Otw/yaFArBuI75VyVjhdxd1zTyNd81WoOqb+w 6u8b817rv9VdI3RwKlHkWZ7DSOTTedGCCSIHKKNkY+FV1ffl3FtO3wK2IdIjXMyXjc/OnG9yLcxiR KdM9yDDaSAa+CbxBbeCUU/HKn0hCCTbiU73m4Kony7lH2WGLBJfhh3B6MPEkAEbObjVkyRse+uHPM /ZmGQ++XQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fAc4G-0001Nm-Fz; Mon, 23 Apr 2018 14:03:45 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 19279202A2A12; Mon, 23 Apr 2018 16:03:42 +0200 (CEST) Date: Mon, 23 Apr 2018 16:03:42 +0200 From: Peter Zijlstra To: "Paul E. McKenney" Cc: 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, rostedt@goodmis.org, 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: <20180423140342.GM4082@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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180423124000.GL26088@linux.vnet.ibm.com> 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 05:40:00AM -0700, Paul E. McKenney wrote: > On Mon, Apr 23, 2018 at 10:51:27AM +0200, Peter Zijlstra wrote: > > On Sun, Apr 22, 2018 at 07:32:06PM -0700, Paul E. McKenney wrote: > > > In CONFIG_PREEMPT=y kernels, cond_resched() is a complete no-op, and > > > thus cannot help advance Tasks-RCU grace periods. However, such grace > > > periods are only an issue in non-production benchmarking runs of the > > > Linux kernel. This commit therefore makes cond_resched() invoke > > > rcu_note_voluntary_context_switch() for kernels implementing Tasks RCU > > > even in CONFIG_PREEMPT=y kernels. > > > > 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. > > All that aside, I am very open to ideas. What would you suggest? Dunno; Steve how insane is that benchmark? Is it at all possible for an actual user to cause something like tha? Thing is, I find it very dodgy to have cond_resched() behaviour depend on a benchmark config. Either we should always have that (and somehow fix the performance issues) or we should not and then have the tracepoint crud not be insane, possibly adding a few of those cond_resched_trace_rcu_qs() things from the later patch.