Re: [PATCH v2] core, x86: Add user return notifiers

2009-10-01 Thread Avi Kivity
On 09/22/2009 06:19 PM, H. Peter Anvin wrote: Ingo Molnar wrote: * Avi Kivity a...@redhat.com 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

Re: [PATCH v2] core, x86: Add user return notifiers

2009-10-01 Thread H. Peter Anvin
On 10/01/2009 08:21 AM, Avi Kivity wrote: Re-ping? If accepted, please merge just the core patch and I will carry all of them in parallel. Once tip is merged I'll drop my copy of the first patch. I was just talking to Ingo about this... would you consider this .32 or .33 material at his

Re: [PATCH v2] core, x86: Add user return notifiers

2009-10-01 Thread Avi Kivity
On 10/01/2009 05:25 PM, H. Peter Anvin wrote: On 10/01/2009 08:21 AM, Avi Kivity wrote: Re-ping? If accepted, please merge just the core patch and I will carry all of them in parallel. Once tip is merged I'll drop my copy of the first patch. I was just talking to Ingo about

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Avi Kivity
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? -- error

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Arjan van de Ven
On Tue, 22 Sep 2009 12:25:33 +0300 Avi Kivity a...@redhat.com 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

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Avi Kivity
On 09/22/2009 12:37 PM, Arjan van de Ven wrote: On Tue, 22 Sep 2009 12:25:33 +0300 Avi Kivitya...@redhat.com 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

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Ingo Molnar
* Avi Kivity a...@redhat.com 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

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Avi Kivity
On 09/22/2009 05:32 PM, Ingo Molnar wrote: * Avi Kivitya...@redhat.com 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

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread H. Peter Anvin
Ingo Molnar wrote: * Avi Kivity a...@redhat.com 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

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Avi Kivity
On 09/22/2009 05:45 PM, Avi Kivity wrote: 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

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Peter Zijlstra
On Tue, 2009-09-22 at 16:32 +0200, Ingo Molnar wrote: * Avi Kivity a...@redhat.com 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

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Avi Kivity
On 09/22/2009 07:50 PM, Peter Zijlstra wrote: 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? And here I was thinking this was one of the hottest code paths in the whole kernel... If you're

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Peter Zijlstra
On Tue, 2009-09-22 at 19:52 +0300, Avi Kivity wrote: On 09/22/2009 07:50 PM, Peter Zijlstra wrote: 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? And here I was thinking this was one of the

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Avi Kivity
On 09/22/2009 07:55 PM, Peter Zijlstra wrote: If you're using lockdep, surely that's not your biggest worry? No, but that's all under #ifdef and fully disappears when not enabled. Generic return-tu-user notifiers don't sound like they will though. They will if not selected. If

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Avi Kivity
On 09/22/2009 06:50 PM, Avi Kivity wrote: On 09/22/2009 05:45 PM, Avi Kivity wrote: 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.

Re: [PATCH v2] core, x86: Add user return notifiers

2009-09-22 Thread Peter Zijlstra
On Tue, 2009-09-22 at 16:32 +0200, Ingo Molnar wrote: 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 don't really like lockdep_sys_exit() in such a call, lockdep_sys_exit() is currently placed such

[PATCH v2] core, x86: Add user return notifiers

2009-09-19 Thread Avi Kivity
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. Signed-off-by: Avi Kivity a...@redhat.com --- v2: include new files in