From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752131AbbEGM3V (ORCPT ); Thu, 7 May 2015 08:29:21 -0400 Received: from mail-wg0-f45.google.com ([74.125.82.45]:32948 "EHLO mail-wg0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750889AbbEGM3S (ORCPT ); Thu, 7 May 2015 08:29:18 -0400 Date: Thu, 7 May 2015 14:29:13 +0200 From: Ingo Molnar To: Frederic Weisbecker Cc: Rik van Riel , Andy Lutomirski , Mike Galbraith , "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: <20150507122913.GA17443@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> <1430659432.4233.3.camel@gmail.com> <55465B2D.6010300@redhat.com> <55466E72.8060602@redhat.com> <20150507104845.GB14924@gmail.com> <20150507121848.GB32271@lerouge> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150507121848.GB32271@lerouge> 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 * Frederic Weisbecker wrote: > > > We cannot take the lock_trace(task) from irq context, and we > > > probably do not need to anyway, since we do not care about a > > > precise stack trace for the task. > > > > So one worry with this and similar approaches of statistically > > detecting user mode would be the fact that on the way out to > > user-space we don't really destroy the previous call trace - we > > just pop off the stack (non-destructively), restore RIPs and are > > gone. > > > > We'll need that percpu flag I suspect. > > Note we have the context tracking state which tells where the > current task is: user/system/guest. Yes, but that overhead is what I'm suggesting we get rid of, I thought Rik was trying to find a mechanism that would be independent of that? Thanks, Ingo