All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm-devel <kvm@vger.kernel.org>
Subject: Re: [PATCH] kvm: Drop obsolete cpu_get/put in make_all_cpus_request
Date: Wed, 22 Jul 2009 01:29:24 +0200	[thread overview]
Message-ID: <4A664F54.3080507@web.de> (raw)
In-Reply-To: <20090721171025.GA6959@amt.cnet>

[-- Attachment #1: Type: text/plain, Size: 1552 bytes --]

Marcelo Tosatti wrote:
> On Tue, Jul 21, 2009 at 10:24:08AM +0200, Jan Kiszka wrote:
>> Marcelo Tosatti wrote:
>>> Jan,
>>>
>>> This was suggested but we thought it might be safer to keep the
>>> get_cpu/put_cpu pair in case -rt kernels require it (which might be
>>> bullshit, but nobody verified).
>> -rt stumbles over both patterns (that's why I stumbled over it in the
>> first place: get_cpu disables preemption, but spin_lock is a sleeping
>> lock under -rt) and actually requires requests_lock to become
>> raw_spinlock_t. Reordering get_cpu and spin_lock would be another
>> option, but not really a gain for both scenarios.
> 
> I see.
> 
>> So unless there is a way to make the whole critical section preemptible
>> (thus migration-agnostic), I think we can micro-optimize it like this.
> 
> Can't you switch requests_lock to be raw_spinlock_t then? (or whatever
> is necessary to make it -rt compatible).
> 

raw_spinlock_t over -rt is not comparable to raw_spinlock_t over
mainline. So I'm currently carrying a local patch with

#ifdef CONFIG_PREEMPT_RT
	raw_spinlock_t some_lock;
#else
	spinlock_t some_lock;
#endif

for all locks that need it (there are three ATM).

That said, I'm suspecting there are more problems with kvm over -rt
right now. I'm seeing significant latency peeks on the host. Still
investigating, though.

However I don't think we should bother too much about -rt compliance in
mainline unless the diff is trivial and basically irrelevant for the
common non-rt cases.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

  reply	other threads:[~2009-07-21 23:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-20  9:30 [PATCH] kvm: Drop obsolete cpu_get/put in make_all_cpus_request Jan Kiszka
2009-07-20 19:46 ` Andrea Arcangeli
2009-07-21  0:00 ` Marcelo Tosatti
2009-07-21  8:24   ` Jan Kiszka
2009-07-21 17:10     ` Marcelo Tosatti
2009-07-21 23:29       ` Jan Kiszka [this message]
2009-07-21 23:37         ` Marcelo Tosatti
2009-08-03 12:18   ` Avi Kivity

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=4A664F54.3080507@web.de \
    --to=jan.kiszka@web.de \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.