From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752023AbbEAQ1j (ORCPT ); Fri, 1 May 2015 12:27:39 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:37622 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751965AbbEAQ1h (ORCPT ); Fri, 1 May 2015 12:27:37 -0400 Date: Fri, 1 May 2015 18:27:31 +0200 From: Ingo Molnar To: Rik van Riel Cc: Andy Lutomirski , "linux-kernel@vger.kernel.org" , X86 ML , williams@redhat.com, Andrew Lutomirski , fweisbec@redhat.com, Peter Zijlstra , Heiko Carstens , Thomas Gleixner , Ingo Molnar , Paolo Bonzini Subject: Re: [PATCH 3/3] context_tracking,x86: remove extraneous irq disable & enable from context tracking on syscall entry Message-ID: <20150501162731.GA1327@gmail.com> References: <1430429035-25563-1-git-send-email-riel@redhat.com> <1430429035-25563-4-git-send-email-riel@redhat.com> <20150501064044.GA18957@gmail.com> <554399D1.6010405@redhat.com> <20150501155912.GA451@gmail.com> <5543A853.6090802@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5543A853.6090802@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Rik van Riel wrote: > On 05/01/2015 12:03 PM, Andy Lutomirski wrote: > > > The last time I asked, the impression I got was that we needed two things: > > > > 1. We can't pluck things from the RCU list without knowing whether the > > CPU is in an RCU read-side critical section, and we can't know that > > unless we have regular grade periods or we know that the CPU is idle. > > To make the CPU detectably idle, we need to set a bit somewhere. > > More than that. We also need a way for another CPU to identify the > callbacks they could run for us, without confusing them with new > callbacks queued after we transitioned back from USER to KERNEL > context. That's easy: a simple, constant-work IPI sent to nohz-full CPUs could just dequeue these callbacks, if it sees that we are still in user-mode. It's super easy because such an IPI would essentially be equivalent to a system call context from RCU's POV, if it uses this test: if (user_mode(regs)) { ... pluck RCU callbacks ... } That way we can have lots of overhead removed from the syscall call path ... Thanks, Ingo