From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2] core, x86: Add user return notifiers Date: Tue, 22 Sep 2009 17:45:05 +0300 Message-ID: <4AB8E2F1.6030401@redhat.com> References: <4AB3CDEC.5050902@zytor.com> <1253342422-13811-1-git-send-email-avi@redhat.com> <4AB8980D.5070803@redhat.com> <20090922143223.GA31702@elte.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Peter Zijlstra , "H. Peter Anvin" , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Marcelo Tosatti To: Ingo Molnar Return-path: In-Reply-To: <20090922143223.GA31702@elte.hu> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 09/22/2009 05:32 PM, Ingo Molnar wrote: > * Avi Kivity wrote: > > >> On 09/19/2009 09:40 AM, Avi Kivity wrote: >> >>> Add a general per-cpu notifier that is called whenever the kernel is >>> about to return to userspace. The notifier uses a thread_info flag >>> and existing checks, so there is no impact on user return or context >>> switch fast paths. >>> >>> >> Ingo/Peter? >> > Would be nice to convert some existing open-coded return-to-user-space > logic to this facility. One such candidate would be lockdep_sys_exit? > I only implemented this for x86, while lockdep is arch independent. If arch support is added, it should be trivial. I think perf counters could use preempt notifiers though, these are arch independent. -- error compiling committee.c: too many arguments to function