From: Frederic Weisbecker on 29 Jun 2010 12:00 On Tue, Jun 29, 2010 at 05:46:32PM +0200, Tejun Heo wrote: > Hello, > > On 06/29/2010 02:18 PM, Frederic Weisbecker wrote: > >> Yeah, well, that's kind of the whole point of cmwq. It would try to > >> minimize the number of used workers but the provided concurrency will > >> still be enough. No async probe will be stalled due to lack of > >> execution context and the timings should be about the same between the > >> original async implemetnation and cmwq based one. > > > > Right. I just don't know what is supposed to be slow on boot that > > needs to use async. Is that because reading some ports is slow or > > because we need to do something and wait for some times to get the > > result. > > It's things like ATA bus resetting and probing. They're usually > composed of short CPU activities and rather long sleeps. Ok. > > If there is a question of slow ports to probe, then cmwq wouldn't seem the > > right thing here, as it only forks when we go to sleep. > > I lost you here. If something during boot has to burn cpu cycles > (which it shouldn't, really), it has to burn cpu cycles and having > multiple concurent threads won't help anything. It would on SMP. > If something doesn't > burn cpu cycles but takes long, it gotta sleep and cmwq will start a > new thread immediately. So, can you please elaborate why cmwq would > be problematic? No in this case it's not problematic, as far as the things that were using async have a small cpu burn and long sleep waiting, it looks like cmwq fits :) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Arjan van de Ven on 29 Jun 2010 12:50 On 6/29/2010 8:55 AM, Tejun Heo wrote: > Hello, > > On 06/29/2010 05:52 PM, Frederic Weisbecker wrote: > >>>> If there is a question of slow ports to probe, then cmwq wouldn't seem the >>>> right thing here, as it only forks when we go to sleep. >>>> >>> I lost you here. If something during boot has to burn cpu cycles >>> (which it shouldn't, really), it has to burn cpu cycles and having >>> multiple concurent threads won't help anything. >>> >> It would on SMP. >> > Oh, I see. Parallel cpu hogs. We don't have such users for async and > I think using padata would be the right solution for those situations. > 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 ??? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Tejun Heo on 29 Jun 2010 13:10 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? Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Tejun Heo on 29 Jun 2010 13:20 On 06/29/2010 06:59 PM, 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? Thinking more about it. It's now not difficult to add a gcwq for an unbound pseudo CPU number and use it as host for workers which can run on any CPU. The automatic concurrency management doesn't make much sense for those workers, so @max_active can be used as the explicit concurrency throttle. It's not even gonna take a lot of code but I'm just not convinced that there's much benefit in doing that. So, yeah, if necessary, sure, but let's think whether it's gonna be actually useful. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Arjan van de Ven on 29 Jun 2010 14:10 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. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: workqueue: update cwq alignement Next: [PATCH] VMware balloon: force compiling as a module |