From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965121AbcKQRpo (ORCPT ); Thu, 17 Nov 2016 12:45:44 -0500 Received: from smtprelay0132.hostedemail.com ([216.40.44.132]:43992 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752323AbcKQRpm (ORCPT ); Thu, 17 Nov 2016 12:45:42 -0500 X-Greylist: delayed 1585 seconds by postgrey-1.27 at vger.kernel.org; Thu, 17 Nov 2016 12:45:42 EST X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:2904:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3870:3871:3872:3874:5007:6119:6261:7875:7903:10004:10400:10450:10455:10848:10967:11026:11232:11473:11658:11914:12043:12296:12438:12740:12760:13069:13149:13230:13311:13357:13439:13972:14096:14097:14181:14659:14664:14721:14822:19904:19999:21080:21250:21433:30054:30083:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: pig48_7b3c1165fce03 X-Filterd-Recvd-Size: 2572 Date: Thu, 17 Nov 2016 10:17:25 -0500 From: Steven Rostedt To: Mathieu Desnoyers Cc: "Paul E. McKenney" , Lai Jiangshan , linux-kernel , Josh Triplett , stable Subject: Re: [PATCH] Fix: disable sys_membarrier when nohz_full is enabled Message-ID: <20161117101725.3abcb413@gandalf.local.home> In-Reply-To: <1466810760.5394.1479394938124.JavaMail.zimbra@efficios.com> References: <1478190568-5829-1-git-send-email-mathieu.desnoyers@efficios.com> <604945667.4957.1479383194368.JavaMail.zimbra@efficios.com> <20161117134015.GT3612@linux.vnet.ibm.com> <11301812.5114.1479390867218.JavaMail.zimbra@efficios.com> <20161117095011.1857bca5@gandalf.local.home> <1466810760.5394.1479394938124.JavaMail.zimbra@efficios.com> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; 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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 17 Nov 2016 15:02:18 +0000 (UTC) Mathieu Desnoyers wrote: > That's an interesting approach. I would be tempted to give it a > per-thread (rather than per-process) scope. Sure, per thread, but have it inherit to child processes. > > E.g., a thread could do the following to ask to be > interrupted by IPIs: > > membarrier(MEMBARRIER_CMD_REGISTER_EXPEDITED, 0) > > and could unregister with: > > membarrier(MEMBARRIER_CMD_UNREGISTER_EXPEDITED, 0) Sure why not ;-) > > We can then keep a per-thread refcount internally. > (not sure the "EXPEDITED" is the right word there... > do we want it to be "NOHZ_FULL" instead ?) No, it shouldn't mention NOHZ_FULL. Perhaps have all tasks do this regardless, even though it will only affect nohz full ones. But in the future it may be other tasks as well. > > Then in membarrier(MEMBARRIER_CMD_SHARED, 0), for each > nohz_full cpu, we grab the rq lock, and only send an IPI > if the running thread is registered as "expedited". Yeah, something like that. That way it wont interrupt tasks that are running in no-hz-full and don't care about this syscall. -- Steve