public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Takuya Yoshikawa <takuya.yoshikawa@gmail.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>,
	kvm@vger.kernel.org, yoshikawa.takuya@oss.ntt.co.jp
Subject: Re: [PATCH 1/1 v2] KVM: Reduce mmu_lock contention during dirty logging by cond_resched()
Date: Tue, 1 May 2012 22:14:25 +0900	[thread overview]
Message-ID: <20120501221425.105eb68a2d6da2748a6e82ff@gmail.com> (raw)
In-Reply-To: <20120501030447.GA11921@amt.cnet>

On Tue, 1 May 2012 00:04:47 -0300
Marcelo Tosatti <mtosatti@redhat.com> 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.

Thanks,
	Takuya

  reply	other threads:[~2012-05-01 13:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-28 10:05 [PATCH 0/1 v2] KVM: Alleviate mmu_lock contention during dirty logging Takuya Yoshikawa
2012-04-28 10:07 ` [PATCH 1/1 v2] KVM: Reduce mmu_lock contention during dirty logging by cond_resched() Takuya Yoshikawa
2012-04-29 11:27   ` Avi Kivity
2012-04-29 12:17     ` Takuya Yoshikawa
2012-04-29 12:59       ` Avi Kivity
2012-04-29 14:24         ` Takuya Yoshikawa
2012-04-29 14:39           ` Avi Kivity
2012-04-29 14:55             ` Takuya Yoshikawa
2012-04-29 15:00               ` Avi Kivity
2012-04-29 15:13                 ` Takuya Yoshikawa
2012-04-29 15:20                   ` Avi Kivity
2012-04-30 14:06                     ` Takuya Yoshikawa
2012-05-01  3:04               ` Marcelo Tosatti
2012-05-01 13:14                 ` Takuya Yoshikawa [this message]
2012-05-01  3:07             ` Marcelo Tosatti
2012-05-02 11:24 ` Heavy memory_region_get_dirty() -- Re: [PATCH 0/1 v2] KVM: Alleviate mmu_lock contention during dirty logging Takuya Yoshikawa
2012-05-02 11:33   ` Avi Kivity
2012-05-02 14:20     ` Takuya Yoshikawa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120501221425.105eb68a2d6da2748a6e82ff@gmail.com \
    --to=takuya.yoshikawa@gmail.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=yoshikawa.takuya@oss.ntt.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox