lkml.org 
[lkml]   [2008]   [Aug]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH RFC 1/3] Add a trigger API for efficient non-blocking waiting
    Date
    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.


    \
     
     \ /
      Last update: 2008-08-28 14:29    [W:4.526 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site