Re: [PATCH v2 10/12] Maintain preemptability count even for !CONFIG_PREEMPT kernels

2009-11-30 Thread Gleb Natapov
On Tue, Nov 24, 2009 at 09:14:03AM -0600, Christoph Lameter wrote: On Tue, 24 Nov 2009, Gleb Natapov wrote: On Mon, Nov 23, 2009 at 11:30:02AM -0600, Christoph Lameter wrote: This adds significant overhead for the !PREEMPT case adding lots of code in critical paths all over the place.

Re: [PATCH v2 10/12] Maintain preemptability count even for !CONFIG_PREEMPT kernels

2009-11-30 Thread Gleb Natapov
On Mon, Nov 30, 2009 at 12:56:12PM +0200, Gleb Natapov wrote: On Tue, Nov 24, 2009 at 09:14:03AM -0600, Christoph Lameter wrote: On Tue, 24 Nov 2009, Gleb Natapov wrote: On Mon, Nov 23, 2009 at 11:30:02AM -0600, Christoph Lameter wrote: This adds significant overhead for the !PREEMPT

Re: [PATCH v2 10/12] Maintain preemptability count even for !CONFIG_PREEMPT kernels

2009-11-30 Thread Peter Zijlstra
On Mon, 2009-11-30 at 12:58 +0200, Gleb Natapov wrote: On Mon, Nov 30, 2009 at 12:56:12PM +0200, Gleb Natapov wrote: On Tue, Nov 24, 2009 at 09:14:03AM -0600, Christoph Lameter wrote: On Tue, 24 Nov 2009, Gleb Natapov wrote: On Mon, Nov 23, 2009 at 11:30:02AM -0600, Christoph Lameter

Re: [PATCH v2 10/12] Maintain preemptability count even for !CONFIG_PREEMPT kernels

2009-11-30 Thread Avi Kivity
On 11/30/2009 12:59 PM, Peter Zijlstra wrote: Forgot to tell. The results are average between 5 different runs. Would be good to also report the variance over those 5 runs, allows us to see if the difference is within the noise. That's the stddev column. -- error compiling

Re: [PATCH v2 10/12] Maintain preemptability count even for !CONFIG_PREEMPT kernels

2009-11-30 Thread Peter Zijlstra
On Mon, 2009-11-30 at 11:59 +0100, Peter Zijlstra wrote: On Mon, 2009-11-30 at 12:58 +0200, Gleb Natapov wrote: On Mon, Nov 30, 2009 at 12:56:12PM +0200, Gleb Natapov wrote: On Tue, Nov 24, 2009 at 09:14:03AM -0600, Christoph Lameter wrote: On Tue, 24 Nov 2009, Gleb Natapov wrote:

Re: [PATCH v2 10/12] Maintain preemptability count even for !CONFIG_PREEMPT kernels

2009-11-30 Thread Christoph Lameter
Ok so there is some variance in tests as usual due to cacheline placement. But it seems that overall we are looking at a 1-2% regression. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH v2 10/12] Maintain preemptability count even for !CONFIG_PREEMPT kernels

2009-11-24 Thread Christoph Lameter
On Tue, 24 Nov 2009, Gleb Natapov wrote: On Mon, Nov 23, 2009 at 11:30:02AM -0600, Christoph Lameter wrote: This adds significant overhead for the !PREEMPT case adding lots of code in critical paths all over the place. I want to measure it. Can you suggest benchmarks to try? AIM9 (reaim9)?

[PATCH v2 10/12] Maintain preemptability count even for !CONFIG_PREEMPT kernels

2009-11-23 Thread Gleb Natapov
Do not preempt kernel. Just maintain counter to know if task can be rescheduled. Asynchronous page fault may be delivered while spinlock is held or current process can't be preempted for other reasons. KVM uses preempt_count() to check if preemptions is allowed and schedule other process if

Re: [PATCH v2 10/12] Maintain preemptability count even for !CONFIG_PREEMPT kernels

2009-11-23 Thread Peter Zijlstra
On Mon, 2009-11-23 at 16:06 +0200, Gleb Natapov wrote: Do not preempt kernel. Just maintain counter to know if task can be rescheduled. Asynchronous page fault may be delivered while spinlock is held or current process can't be preempted for other reasons. KVM uses preempt_count() to check

Re: [PATCH v2 10/12] Maintain preemptability count even for !CONFIG_PREEMPT kernels

2009-11-23 Thread Gleb Natapov
On Mon, Nov 23, 2009 at 04:34:15PM +0100, Peter Zijlstra wrote: On Mon, 2009-11-23 at 16:06 +0200, Gleb Natapov wrote: Do not preempt kernel. Just maintain counter to know if task can be rescheduled. Asynchronous page fault may be delivered while spinlock is held or current process can't

Re: [PATCH v2 10/12] Maintain preemptability count even for !CONFIG_PREEMPT kernels

2009-11-23 Thread Christoph Lameter
This adds significant overhead for the !PREEMPT case adding lots of code in critical paths all over the place. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 10/12] Maintain preemptability count even for !CONFIG_PREEMPT kernels

2009-11-23 Thread Gleb Natapov
On Mon, Nov 23, 2009 at 11:30:02AM -0600, Christoph Lameter wrote: This adds significant overhead for the !PREEMPT case adding lots of code in critical paths all over the place. I want to measure it. Can you suggest benchmarks to try? -- Gleb. -- To unsubscribe from