[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <200808281427.24566.borntraeger@de.ibm.com>
Date: Thu, 28 Aug 2008 14:27:24 +0200
From: Christian Borntraeger <borntraeger@...ibm.com>
To: Jeremy Fitzhardinge <jeremy@...p.org>
Cc: Ingo Molnar <mingo@...e.hu>, Jens Axboe <jens.axboe@...cle.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Rusty Russell <rusty@...tcorp.com.au>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Arjan van de Ven <arjan@...radead.org>
Subject: Re: [PATCH RFC 1/3] Add a trigger API for efficient non-blocking waiting
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists