From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933759AbcI0OsS (ORCPT ); Tue, 27 Sep 2016 10:48:18 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46005 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933362AbcI0OsI (ORCPT ); Tue, 27 Sep 2016 10:48:08 -0400 Date: Tue, 27 Sep 2016 07:48:00 -0700 From: "Paul E. McKenney" To: Frederic Weisbecker Cc: Andy Lutomirski , Chris Metcalf , Thomas Gleixner , "linux-doc@vger.kernel.org" , Christoph Lameter , Michal Hocko , Gilad Ben Yossef , Andrew Morton , Viresh Kumar , Linux API , Steven Rostedt , Ingo Molnar , Tejun Heo , Rik van Riel , Will Deacon , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Catalin Marinas , Peter Zijlstra Subject: Re: [PATCH v15 04/13] task_isolation: add initial support Reply-To: paulmck@linux.vnet.ibm.com References: <20160830075854.GZ10153@twins.programming.kicks-ass.net> <3f84f736-ed7f-adff-d5f0-4f7db664208f@mellanox.com> <20160927142219.GC6242@lerouge> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160927142219.GC6242@lerouge> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16092714-0020-0000-0000-000009E41836 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00005817; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000185; SDB=6.00761890; UDB=6.00362995; IPR=6.00536917; BA=6.00004761; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00012798; XFM=3.00000011; UTC=2016-09-27 14:48:05 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16092714-0021-0000-0000-000055F6C525 Message-Id: <20160927144800.GE14933@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-09-27_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609020000 definitions=main-1609270271 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Sep 27, 2016 at 04:22:20PM +0200, Frederic Weisbecker wrote: > On Fri, Sep 02, 2016 at 10:28:00AM -0700, Andy Lutomirski wrote: > > > > Unless I'm missing something (which is reasonably likely), couldn't > > the isolation code just force or require rcu_nocbs on the isolated > > CPUs to avoid this problem entirely. > > rcu_nocb is already implied by nohz_full. Which means that RCU callbacks > are offlined outside the nohz_full set of CPUs. Indeed, at boot time, RCU makes any nohz_full CPU also be a rcu_nocb CPU. > > I admit I still don't understand why the RCU context tracking code > > can't just run the callback right away instead of waiting however many > > microseconds in general. I feel like paulmck has explained it to me > > at least once, but that doesn't mean I remember the answer. > > The RCU context tracking doesn't take care of callbacks. It's only there > to tell the RCU core whether the CPU runs code that may or may not run > RCU read side critical sections. This is assumed by "kernel may use RCU, > userspace can't". And RCU has to wait for read-side critical sections to complete before invoking callbacks. Thanx, Paul