All of lore.kernel.org
 help / color / mirror / Atom feed
From: bigeasy at linutronix.de (Sebastian Andrzej Siewior)
Subject: [PATCH] rcutorture: Tweak kvm options
Date: Thu, 25 Apr 2019 19:13:03 +0200	[thread overview]
Message-ID: <20190425171303.eofzt4hjp2445yon@linutronix.de> (raw)
In-Reply-To: <20190425164558.GA233442@google.com>

On 2019-04-25 12:45:58 [-0400], Joel Fernandes wrote:
> On Wed, Apr 24, 2019 at 09:34:46AM +0200, Sebastian Andrzej Siewior wrote:
> > In one of my rcutorture tests the TSC clocksource got marked unstable
> > due to a large difference in the TSC value. I'm not sure if the guest
> > run for a long time with disabled interrupts or if the host was very
> > busy and didn't schedule the guest for some time.
> > I took a look on the qemu/KVM options and decided to update the options:
> > - Use kvm{32|64} as CPU. We could probably use `host' (like ARM does)
> >   for maximum available features but since we don't run any userland I'm
> >   not sure if it makes any difference.
> > 
> > - Drop the "noapic" option, enable TSC deadline timer. There is no
> >   history why the APIC was disabled, I see no reason for it. The
> >   deadline timer is probably "nicer".
> 
> I was wondering why the tsc deadline timer can't just be the default in the
> kernel if it is "nicer" / "better" , and why does it need to be an option.

The tsc-deadline=on part tells qemu to expose it. Otherwise the kernel
can't use HW that isn't there.
I added q35 as the machine which should pass enough sane default
options. If this tsc-deadline timer is a problem we could probably drop
it. The local-apic should work.

> > - I didn't add a random HW device. It would make the random device ready
> >   earlier (not it doesn't complete the initialisation at all) but I
> >   doubt that there is any need for this.
> 
> Didn't follow this point about "random HW device". It looks like there is no
> part of the patch that matches this comment. There was no "random HW device"
> needed for this change of the clocksource, so could you clarify what this means?

I wanted to "upgrade" the kvm options and as part of it also add:
         -object rng-random,filename=/dev/urandom,id=rng0
         -device virtio-rng-pci,rng=rng0

With that change you would see
|random: crng init done

during boot. Now you should end up with "only" 
|random: fast init done

I mentioned it because I didn't see a reason why to do so. If someone
has an idea why it would make sense for rcutorture to use it, I can add
it.

> Otherwise lgtm, thanks!
> 
> Reviewed-by: Joel Fernandes (Google) <joel at joelfernandes.org>
> 
> - Joel

Sebastian

WARNING: multiple messages have this Message-ID (diff)
From: bigeasy@linutronix.de (Sebastian Andrzej Siewior)
Subject: [PATCH] rcutorture: Tweak kvm options
Date: Thu, 25 Apr 2019 19:13:03 +0200	[thread overview]
Message-ID: <20190425171303.eofzt4hjp2445yon@linutronix.de> (raw)
Message-ID: <20190425171303.XKnVMUOu5mF1pM8xVbP6saGPoVBerRJtWexSexz5Rjg@z> (raw)
In-Reply-To: <20190425164558.GA233442@google.com>

On 2019-04-25 12:45:58 [-0400], Joel Fernandes wrote:
> On Wed, Apr 24, 2019@09:34:46AM +0200, Sebastian Andrzej Siewior wrote:
> > In one of my rcutorture tests the TSC clocksource got marked unstable
> > due to a large difference in the TSC value. I'm not sure if the guest
> > run for a long time with disabled interrupts or if the host was very
> > busy and didn't schedule the guest for some time.
> > I took a look on the qemu/KVM options and decided to update the options:
> > - Use kvm{32|64} as CPU. We could probably use `host' (like ARM does)
> >   for maximum available features but since we don't run any userland I'm
> >   not sure if it makes any difference.
> > 
> > - Drop the "noapic" option, enable TSC deadline timer. There is no
> >   history why the APIC was disabled, I see no reason for it. The
> >   deadline timer is probably "nicer".
> 
> I was wondering why the tsc deadline timer can't just be the default in the
> kernel if it is "nicer" / "better" , and why does it need to be an option.

The tsc-deadline=on part tells qemu to expose it. Otherwise the kernel
can't use HW that isn't there.
I added q35 as the machine which should pass enough sane default
options. If this tsc-deadline timer is a problem we could probably drop
it. The local-apic should work.

> > - I didn't add a random HW device. It would make the random device ready
> >   earlier (not it doesn't complete the initialisation at all) but I
> >   doubt that there is any need for this.
> 
> Didn't follow this point about "random HW device". It looks like there is no
> part of the patch that matches this comment. There was no "random HW device"
> needed for this change of the clocksource, so could you clarify what this means?

I wanted to "upgrade" the kvm options and as part of it also add:
         -object rng-random,filename=/dev/urandom,id=rng0
         -device virtio-rng-pci,rng=rng0

With that change you would see
|random: crng init done

during boot. Now you should end up with "only" 
|random: fast init done

I mentioned it because I didn't see a reason why to do so. If someone
has an idea why it would make sense for rcutorture to use it, I can add
it.

> Otherwise lgtm, thanks!
> 
> Reviewed-by: Joel Fernandes (Google) <joel at joelfernandes.org>
> 
> - Joel

Sebastian

WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Joel Fernandes <joel@joelfernandes.org>
Cc: linux-kselftest@vger.kernel.org, rcu@vger.kernel.org,
	"Paul E. McKenney" <paulmck@linux.ibm.com>,
	Josh Triplett <josh@joshtriplett.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Shuah Khan <shuah@kernel.org>
Subject: Re: [PATCH] rcutorture: Tweak kvm options
Date: Thu, 25 Apr 2019 19:13:03 +0200	[thread overview]
Message-ID: <20190425171303.eofzt4hjp2445yon@linutronix.de> (raw)
In-Reply-To: <20190425164558.GA233442@google.com>

On 2019-04-25 12:45:58 [-0400], Joel Fernandes wrote:
> On Wed, Apr 24, 2019 at 09:34:46AM +0200, Sebastian Andrzej Siewior wrote:
> > In one of my rcutorture tests the TSC clocksource got marked unstable
> > due to a large difference in the TSC value. I'm not sure if the guest
> > run for a long time with disabled interrupts or if the host was very
> > busy and didn't schedule the guest for some time.
> > I took a look on the qemu/KVM options and decided to update the options:
> > - Use kvm{32|64} as CPU. We could probably use `host' (like ARM does)
> >   for maximum available features but since we don't run any userland I'm
> >   not sure if it makes any difference.
> > 
> > - Drop the "noapic" option, enable TSC deadline timer. There is no
> >   history why the APIC was disabled, I see no reason for it. The
> >   deadline timer is probably "nicer".
> 
> I was wondering why the tsc deadline timer can't just be the default in the
> kernel if it is "nicer" / "better" , and why does it need to be an option.

The tsc-deadline=on part tells qemu to expose it. Otherwise the kernel
can't use HW that isn't there.
I added q35 as the machine which should pass enough sane default
options. If this tsc-deadline timer is a problem we could probably drop
it. The local-apic should work.

> > - I didn't add a random HW device. It would make the random device ready
> >   earlier (not it doesn't complete the initialisation at all) but I
> >   doubt that there is any need for this.
> 
> Didn't follow this point about "random HW device". It looks like there is no
> part of the patch that matches this comment. There was no "random HW device"
> needed for this change of the clocksource, so could you clarify what this means?

I wanted to "upgrade" the kvm options and as part of it also add:
         -object rng-random,filename=/dev/urandom,id=rng0
         -device virtio-rng-pci,rng=rng0

With that change you would see
|random: crng init done

during boot. Now you should end up with "only" 
|random: fast init done

I mentioned it because I didn't see a reason why to do so. If someone
has an idea why it would make sense for rcutorture to use it, I can add
it.

> Otherwise lgtm, thanks!
> 
> Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
> 
> - Joel

Sebastian

  reply	other threads:[~2019-04-25 17:13 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-24  7:34 [PATCH] rcutorture: Tweak kvm options bigeasy
2019-04-24  7:34 ` Sebastian Andrzej Siewior
2019-04-24  7:34 ` Sebastian Andrzej Siewior
2019-04-24 10:38 ` paulmck
2019-04-24 10:38   ` Paul E. McKenney
2019-04-24 10:38   ` Paul E. McKenney
2019-04-24 18:30   ` paulmck
2019-04-24 18:30     ` Paul E. McKenney
2019-04-24 18:30     ` Paul E. McKenney
2019-04-25 19:46     ` paulmck
2019-04-25 19:46       ` Paul E. McKenney
2019-04-25 19:46       ` Paul E. McKenney
2019-04-26 10:54       ` bigeasy
2019-04-26 10:54         ` Sebastian Andrzej Siewior
2019-04-26 10:54         ` Sebastian Andrzej Siewior
2019-04-26 13:50         ` paulmck
2019-04-26 13:50           ` Paul E. McKenney
2019-04-26 13:50           ` Paul E. McKenney
2019-04-29  8:19           ` bigeasy
2019-04-29  8:19             ` Sebastian Andrzej Siewior
2019-04-29  8:19             ` Sebastian Andrzej Siewior
2019-04-29 14:49             ` paulmck
2019-04-29 14:49               ` Paul E. McKenney
2019-04-29 14:49               ` Paul E. McKenney
2019-04-29 15:06               ` paulmck
2019-04-29 15:06                 ` Paul E. McKenney
2019-04-29 15:06                 ` Paul E. McKenney
2019-05-02 18:41                 ` paulmck
2019-05-02 18:41                   ` Paul E. McKenney
2019-05-02 18:41                   ` Paul E. McKenney
2019-05-03  7:26                   ` bigeasy
2019-05-03  7:26                     ` Sebastian Andrzej Siewior
2019-05-03  7:26                     ` Sebastian Andrzej Siewior
2019-04-25 16:45 ` joel
2019-04-25 16:45   ` Joel Fernandes
2019-04-25 16:45   ` Joel Fernandes
2019-04-25 17:13   ` bigeasy [this message]
2019-04-25 17:13     ` Sebastian Andrzej Siewior
2019-04-25 17:13     ` Sebastian Andrzej Siewior

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=20190425171303.eofzt4hjp2445yon@linutronix.de \
    --to=unknown@example.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.