Re: [PATCH 1/1 v2] KVM: Reduce mmu_lock contention during dirty logging by cond_resched()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Tue, 1 May 2012 00:04:47 -0300
Marcelo Tosatti <mtosatti@xxxxxxxxxx> wrote:

> > Looking forward to it!
> > After your work, 8192 in my patch may better be lowered a bit.
> Why not simply use spin_is_contented again? Are you afraid of
> GET_DIRTY_LOG starved by pagefaults?

No, but not so confident.

I personally tested some extreme cases like "cond_resched for every
iteration" and did not see any significant slowdown.  That's all what
I know now.

I also think we should use spin_is_contended() again.

What I am thinking now is whether it is possible to change
cond_resched_lock() to satisfy our need like:

	cond_resched_lock(lock, spin_is_contended(lock)); // we want this
	cond_resched_lock(lock, spin_needbreak(lock));    // same as current
	cond_resched_lock(lock, false);            // never check contention

Although I have checked all callers, it is not certain whether they do
not want to check lock contention when CONFIG_PREEMPT=no.

I will send an RFC patch to get comments, if possible.

To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[KVM ARM]     [KVM ia64]     [KVM ppc]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Linux Kernel]     [Linux SCSI]     [XFree86]

Add to Google Powered by Linux