From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Ingo Molnar <mingo@elte.hu>, Jens Axboe <jens.axboe@oracle.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Rusty Russell <rusty@rustcorp.com.au>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Arjan van de Ven <arjan@infradead.org>
Subject: Re: [PATCH RFC 1/3] Add a trigger API for efficient non-blocking waiting
Date: Thu, 28 Aug 2008 14:27:24 +0200 [thread overview]
Message-ID: <200808281427.24566.borntraeger@de.ibm.com> (raw)
In-Reply-To: <48A70185.2020600@goop.org>
Sorry for answering late, but here are some comments.
Am Samstag, 16. August 2008 schrieb Jeremy Fitzhardinge:
[...]
>
> - In a virtual environment, spinning virtual CPUs just waste CPU
> resources, and may steal CPU time from vCPUs which need it to make
> progress. The trigger API allows the vCPUs to give up their CPU
> entirely. The s390 people observed a problem with stop_machine
> taking a very long time (seconds) when there are more vcpus than
> available cpus.
Yes, we have seen some real contention if the number of vcpus is much higher
than the number of real cpus.
>
> The trigger API is simple:
>
> To initialize a trigger, you can either do it statically with:
>
> DEFINE_TRIGGER(trigger);
>
> or dynamically with
>
> trigger_init(&trigger);
>
> Then to use it, the wait side does:
>
> trigger_reset(&trigger);
>
> while(!condition)
> trigger_wait(&trigger);
>
> trigger_finish(&trigger);
>
> and when the condition is set true:
>
> condition = true;
> trigger_kick(&trigger);
Hmm, I currently try to build something with sigp_stop and sigp_start on
s390, not sure yet if this interface allows me to do that. At the moment
something is wrong in my prototype.
prev parent reply other threads:[~2008-08-28 12:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-16 16:34 Jeremy Fitzhardinge
2008-08-16 17:47 ` Arjan van de Ven
2008-08-17 23:02 ` Randy Dunlap
2008-08-20 6:21 ` Andrew Morton
2008-08-20 18:42 ` Jeremy Fitzhardinge
2008-08-20 19:25 ` Andrew Morton
2008-08-20 20:14 ` Jeremy Fitzhardinge
2008-08-25 0:53 ` Rusty Russell
2008-08-28 12:27 ` Christian Borntraeger [this message]
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=200808281427.24566.borntraeger@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=arjan@infradead.org \
--cc=jens.axboe@oracle.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rusty@rustcorp.com.au \
/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
all inboxes | Powered by JetHome®