Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2658218yba; Fri, 10 May 2019 16:10:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxl9BBKUp/sIzpoRpGAUR+n8eDPtVjCu0JlsO8gdPpAi2KfZ6+ZA6WoIGJPftv+aogamI6D X-Received: by 2002:a17:902:3343:: with SMTP id a61mr16149035plc.90.1557529805148; Fri, 10 May 2019 16:10:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557529805; cv=none; d=google.com; s=arc-20160816; b=UPEcDpaUN7+H2w+db1Tyg9HZS1Fb5h5AEwi6q8vvSbjTheCa8EVnQODfnM1Z98acg2 18aLOyAIzbQpNtexZTcTHAsbeuRbEm4hsrzHu2v+QiP3fXkIbJfpbXIuK4Mwai4fKaZu 4G5UdPJmdgn689I/riMsw21lYntVs/JwJO8r05l8KmuirxWDO7BaCt1j7w6MGVtbJ0yF eeL0YL2C48V59zArxMwj60khvoLuLSwiDBMErGv7nd1tcNY3CjTJYR0M1wci6PXI7tuo LpXyDn2MazRBuyX/pAdUd+vcpSsKA3kAuWtVRP+rMCQjMMQI1ii7bQ5y2Ph4GltkYEMs R2VQ== 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; bh=OpEHuyqESYhsfba6yEXlwGE8tHiQhoy/WhFw5AFa9/M=; b=pfayhoEWdjDEh4TZ6LeRxU7NOppU4XiP9EynKaWzSn0UEIe4xbLVZ96P+0IDiBFx3t BrEQtDRYC5geRbwaUH6up/fB8tYbptsK+MOYSwLI7nOpsV5yJCUyQdq7xHLZ3tP+8j+R zE9BCEI3IO16472LdUr+bAnBcci95iGYuMRiTqX/LOdnhVtHlDtuOiuYkCC/IWtS+74K pnpiswItCAFyhX68J5cKseUWTMUDMfnksxNaZAMpTngFsyOvxf0hki5YXYxUOMmMhn6f f5OnS6l/13dE95/RgyFh22MmAmUKEx5Z0eAtxVMsqVTnz7sD+ZwQRGKBtO5tt4v5nTqO Q3kQ== 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 q73si9388935pfi.5.2019.05.10.16.09.48; Fri, 10 May 2019 16:10:05 -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 S1728138AbfEJXHu (ORCPT + 99 others); Fri, 10 May 2019 19:07:50 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:59692 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726944AbfEJXHt (ORCPT ); Fri, 10 May 2019 19:07:49 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x4AMqNZC103375 for ; Fri, 10 May 2019 19:07:48 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0b-001b2d01.pphosted.com with ESMTP id 2sdfhqee62-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 10 May 2019 19:07:47 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 11 May 2019 00:07:47 +0100 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Sat, 11 May 2019 00:07:42 +0100 Received: from b01ledav003.gho.pok.ibm.com (b01ledav003.gho.pok.ibm.com [9.57.199.108]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x4AN7fbf11075730 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 10 May 2019 23:07:41 GMT Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 856C6B205F; Fri, 10 May 2019 23:07:41 +0000 (GMT) Received: from b01ledav003.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 58551B2065; Fri, 10 May 2019 23:07:41 +0000 (GMT) Received: from paulmck-ThinkPad-W541 (unknown [9.70.82.216]) by b01ledav003.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 10 May 2019 23:07:41 +0000 (GMT) Received: by paulmck-ThinkPad-W541 (Postfix, from userid 1000) id 1C70116C3968; Fri, 10 May 2019 16:07:42 -0700 (PDT) Date: Fri, 10 May 2019 16:07:42 -0700 From: "Paul E. McKenney" To: Peter Zijlstra Cc: Steven Rostedt , linux-kernel@vger.kernel.org, andrea.parri@amarulasolutions.com, Thomas Gleixner , Ingo Molnar , Juri Lelli , Morten Rasmussen , joelaf@google.com, Vincent Guittot , Sebastian Andrzej Siewior Subject: Re: Question about sched_setaffinity() Reply-To: paulmck@linux.ibm.com References: <20190430100318.GP2623@hirez.programming.kicks-ass.net> <20190430105129.GA3923@linux.ibm.com> <20190430115551.GT2623@hirez.programming.kicks-ass.net> <20190501191213.GX3923@linux.ibm.com> <20190501151655.51469a4c@gandalf.local.home> <20190501202713.GY3923@linux.ibm.com> <20190507221613.GA11057@linux.ibm.com> <20190509173654.GA23530@linux.ibm.com> <20190509193625.GA12455@linux.ibm.com> <20190510120819.GR2589@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190510120819.GR2589@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 19051023-2213-0000-0000-0000038BE1E7 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00011083; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000285; SDB=6.01201504; UDB=6.00630509; IPR=6.00982400; MB=3.00026837; MTD=3.00000008; XFM=3.00000015; UTC=2019-05-10 23:07:46 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19051023-2214-0000-0000-00005E62CD58 Message-Id: <20190510230742.GY3923@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-05-10_16:,, 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 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1905100145 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 10, 2019 at 02:08:19PM +0200, Peter Zijlstra wrote: > On Thu, May 09, 2019 at 12:36:25PM -0700, Paul E. McKenney wrote: > > I forward-ported the relevant patches from -rcu and placed them on -rcu > > branch peterz.2019.05.09a, and this is what produced the output above. > > > > Any other debugging thoughts? > > > > Or, if you wish, you can reproduce by running the following: > > > > nohup tools/testing/selftests/rcutorture/bin/kvm.sh --cpus 8 --duration 2 --configs "TRIVIAL" --bootargs "trace_event=sched:sched_switch,sched:sched_wakeup ftrace=function_graph ftrace_graph_filter=sched_setaffinity,migration_cpu_stop" --kconfig "CONFIG_FUNCTION_TRACER=y CONFIG_FUNCTION_GRAPH_TRACER=y" > > > > This gets me the following summary output: > > > > --- Thu May 9 12:08:31 PDT 2019 Test summary: > > Results directory: /home/git/linux-2.6-tip/tools/testing/selftests/rcutorture/res/2019.05.09-12:08:31 > > tools/testing/selftests/rcutorture/bin/kvm.sh --cpus 8 --duration 2 --configs TRIVIAL --bootargs trace_event=sched:sched_switch,sched:sched_wakeup ftrace=function_graph ftrace_graph_filter=sched_setaffinity,migration_cpu_stop --kconfig CONFIG_FUNCTION_TRACER=y CONFIG_FUNCTION_GRAPH_TRACER=y > > TRIVIAL ------- 2177 GPs (18.1417/s) [trivial: g0 f0x0 ] > > :CONFIG_HOTPLUG_CPU: improperly set > > WARNING: BAD SEQ 2176:2176 last:2177 version 4 > > /home/git/linux-2.6-tip/tools/testing/selftests/rcutorture/res/2019.05.09-12:08:31/TRIVIAL/console.log > > WARNING: Assertion failure in /home/git/linux-2.6-tip/tools/testing/selftests/rcutorture/res/2019.05.09-12:08:31/TRIVIAL/console.log > > WARNING: Summary: Warnings: 1 Bugs: 1 Call Traces: 5 Stalls: 8 > > So I could reproduce... > > I must first complain about your scripts; it does "make mrproper" on the > source tree every time you run it, this is not appreciated. For one, it > deletes my 'tags' file. This is because it builds in a different directory, and "make O=/path" complains if you don't have the source directory pristine. But there really is no longer any reason to build in a different directory, I suppose. This is a largish change, but working on it. > Getting it to not rebuild the whole kernel every time wasn't easy > either. You trust "make" far more than I do! I am thinking of adding a "--trust-make" argument that suppresses the "make clean". Maybe if I grow to trust "make" in the fulness of time, I can remove the "make clean" entirely. But given ccache, and given the duration of the typical rcutorture run, and given that there are multiple rcutorture scenarios each with a different .config, this hasn't been a priority. The build step is already omitted for repeated runs. > Aside from that it seems to 'work'. > > The below trace explain the issue. Some Paul person did it, see below. > It's broken per construction :-) *facepalm* Hence the very strange ->cpus_allowed mask. I really should have figured that one out. The fix is straightforward. I just added "rcutorture.shuffle_interval=0" to the TRIVIAL.boot file, which stops rcutorture from shuffling its kthreads around. Please accept my apologies for the hassle, and thank you for tracking this down!!! Thanx, Paul