From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752214AbbEHGRm (ORCPT ); Fri, 8 May 2015 02:17:42 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:35173 "EHLO e32.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751923AbbEHGRj (ORCPT ); Fri, 8 May 2015 02:17:39 -0400 Date: Thu, 7 May 2015 23:17:34 -0700 From: "Paul E. McKenney" To: Ingo Molnar Cc: Andy Lutomirski , fweisbec@redhat.com, Paolo Bonzini , Thomas Gleixner , X86 ML , Peter Zijlstra , Ingo Molnar , Heiko Carstens , Mike Galbraith , "linux-kernel@vger.kernel.org" , Rik van Riel , williams@redhat.com Subject: Re: [PATCH 3/3] context_tracking,x86: remove extraneous irq disable & enable from context tracking on syscall entry Message-ID: <20150508061734.GR5381@linux.vnet.ibm.com> Reply-To: paulmck@linux.vnet.ibm.com References: <20150501064044.GA18957@gmail.com> <554399D1.6010405@redhat.com> <1430659432.4233.3.camel@gmail.com> <55465B2D.6010300@redhat.com> <55466E72.8060602@redhat.com> <20150507104845.GB14924@gmail.com> <20150507124437.GB17443@gmail.com> <20150507124938.GA17675@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150507124938.GA17675@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15050806-0005-0000-0000-00000AA09458 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 07, 2015 at 02:49:39PM +0200, Ingo Molnar wrote: > > * Ingo Molnar wrote: > > > The TIF_RCU_QS thing is just a fancy way for synchronize_rcu() > > (being executed on some other CPU not doing RT work) to > > intelligently wait for the remote (RT work doing) CPU to finish > > executing kernel code, without polling or so. > > it's basically a cheap IPI being inserted on the remote CPU. > > We need the TIF_RCU_QS callback not just to wait intelligently, but > mainly to elapse a grace period, otherwise synchronize_rcu() might not > ever make progress: think a SCHED_FIFO task doing some kernel work, > synchronize_rcu() stumbling upon it - but the SCHED_FIFO task > otherwise never scheduling and never getting any timer irqs either, > and thus never entering quiescent state. > > (Cc:-ed Paul too, he might be interested in this as well.) Hmmm... So the point is that a NO_HZ_FULL CPU periodically posts callbacks to indicate that it has passed through a quiescent state, for example, upon entry to and/or exit from userspace? These callbacks would then be offloaded to some other CPU. But the callback would not be invoked until RCU saw a grace period, so I must be missing something here... Probably that the TIF_RCU_QS callback is not an RCU callback, but something else? Thanx, Paul