lkml.org 
[lkml]   [2008]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] fastboot: Introduce an asynchronous function call mechanism
    On Wed, 15 Oct 2008 01:41:17 -0700
    Andrew Morton <akpm@linux-foundation.org> wrote:
    > > +static int async_active = 0;
    >
    > ?
    ok will add comment

    >
    > Please talk to Evgeniy about his new thread_pool stuff which I've
    > suggested become a generic library.
    >
    > (looks at changelog, doesn't really understand the need for the
    > thread pool thing, doesn't understand the comment about device
    > numbers)

    it's very simple. Take the case of doing each sata port probe as an
    asynchronous item. In order to keep a stable device naming/ordering,
    all the sata probes need to be done in sequence, but, say, the USB
    probing can be done in parallel. This means that we need to assign the
    various async tasks to specific pools (based on which device number
    space they will put devices in) and can't just arbitrarily spawn them
    to arbitrary threads.

    >
    > > +
    > > +void call_async(int pool_number, int argc, ...)
    >
    > This looks like schedule_work(). Why cannot that be used (perhaps
    > after suitable modification)?

    as I said in the comments... the object lifetimes don't work.
    We need to be able to schedule one per sata port (as per Linus'
    suggest) which means we need a new work struct per function call. And
    then we need something that garbage collects these, now dynamically
    allocated, work structs. Which work queues just don't do. If you make
    them do that... you end up with the code I wrote.

    >
    >
    >


    --
    Arjan van de Ven Intel Open Source Technology Centre
    For development, discussion and tips for power savings,
    visit http://www.lesswatts.org


    \
     
     \ /
      Last update: 2008-10-15 13:55    [W:0.023 / U:60.000 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site