lkml.org 
[lkml]   [2010]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 34/35] async: use workqueue for worker pool
    On 6/29/2010 9:59 AM, Tejun Heo wrote:
    > Hello, Arjan.
    >
    > On 06/29/2010 06:40 PM, Arjan van de Ven wrote:
    >
    >> uh? clearly the assumption is that if I have a 16 CPU machine, and 12
    >> items of work get scheduled,
    >> that we get all 12 running in parallel. All the smarts of cmwq surely
    >> only kick in once you've reached the
    >> "one work item per cpu" threshold ???
    >>
    > Hmmm... workqueue workers are bound to certain cpu, so if you schedule
    > a work on a specific CPU, it will run there. Once a cpu gets
    > saturated, the issuing thread will be moved elsewhere. I don't think
    > it matters to any of the current async users one way or the other,
    > would it?
    >

    we might be talking past eachother. ;-)

    let me define an example that is simple so that we can get on the same page

    assume a system with "enough" cpus, say 32.
    lets say we have 2 async tasks, that each do an mdelay(1000); (yes I
    know stupid, but exagerating things makes things easier to talk about)
    lets also assume that they get scheduled right back to back from the
    same code on the same cpu.

    will the end result be that the first mdelay() task complete before the
    second one gets started, or will the end result be that
    the 2nd one will notice the first cpu is busy, and find a second cpu to
    run in parallel with.





    \
     
     \ /
      Last update: 2010-06-29 20:09    [W:3.270 / U:0.408 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site