Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-25 Thread Kristian Høgsberg
On Fri, 2007-06-22 at 23:59 +0200, Ingo Molnar wrote: so how about the following, different approach: anyone who has a tasklet in any performance-sensitive codepath, please yell now. We'll also do a proactive search for such places. We can convert those places to softirqs, or move them back

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-25 Thread Steven Rostedt
On Mon, 2007-06-25 at 14:48 -0400, Kristian Høgsberg wrote: OK, here's a yell. I'm using tasklets in the new firewire stack for all Thanks for speaking up! interrupt handling. All my interrupt handler does is read out the event mask and schedule the appropriate tasklets. Most of these

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-25 Thread Stephen Hemminger
On Mon, 25 Jun 2007 18:50:03 +0200 Tilman Schmidt [EMAIL PROTECTED] wrote: Ingo Molnar [EMAIL PROTECTED] wrote: so how about the following, different approach: anyone who has a tasklet in any performance-sensitive codepath, please yell now. Getting rid of tasklet's may seem like a good

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-25 Thread Kristian Høgsberg
On Mon, 2007-06-25 at 15:11 -0400, Steven Rostedt wrote: On Mon, 2007-06-25 at 14:48 -0400, Kristian Høgsberg wrote: ... However, I don't really understand how you can discuss a wholesale replacing of tasklets with workqueues, given the very different execution sematics of the two

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-25 Thread Steven Rostedt
On Mon, 2007-06-25 at 16:07 -0400, Kristian Høgsberg wrote: Maybe we should be looking at something like GENERIC_SOFTIRQ to run functions that a driver could add. But they would run only on the CPU that scheduled them, and do not guarantee non-reentrant as tasklets do today. Sounds

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-25 Thread Tilman Schmidt
Am 25.06.2007 19:06 schrieb Steven Rostedt: On Mon, 2007-06-25 at 18:50 +0200, Tilman Schmidt wrote: The Siemens Gigaset ISDN base driver uses tasklets in its isochronous data paths. [...] Does that qualify as performance sensitive for the purpose of this discussion? Actually, no. 16ms,

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-25 Thread Steven Rostedt
On Mon, 2007-06-25 at 22:50 +0200, Tilman Schmidt wrote: Ok, I'm reassured. I'll look into converting these to a work queue then, although I can't promise when I'll get around to it. In fact, if these timing requirements are so easy to meet, perhaps it doesn't even need its own work queue,

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-25 Thread Kristian Høgsberg
On Mon, 2007-06-25 at 16:31 -0400, Steven Rostedt wrote: On Mon, 2007-06-25 at 16:07 -0400, Kristian Høgsberg wrote: Maybe we should be looking at something like GENERIC_SOFTIRQ to run functions that a driver could add. But they would run only on the CPU that scheduled them, and do not

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-25 Thread Ingo Molnar
* Kristian H?gsberg [EMAIL PROTECTED] wrote: OK, here's a yell. I'm using tasklets in the new firewire stack for all interrupt handling. All my interrupt handler does is read out the event mask and schedule the appropriate tasklets. Most of these tasklets typically just end up

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-25 Thread Stefan Richter
Ingo Molnar wrote: regarding workqueues - would it be possible for you to test Steve's patch and get us performance numbers? Do you have any test with tons of tasklet activity that would definitely show the performance impact of workqueues? I can't speak for Kristian, nor do I have test

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-25 Thread Jonathan Corbet
A couple of days ago I said: The cafe_ccic (OLPC) camera driver uses a tasklet to move frames out of the DMA buffers in the streaming I/O path Obviously some testing is called for here. I will make an attempt to do that testing I've done that testing - I have an OLPC B3 unit running

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-25 Thread Steven Rostedt
On Tue, 2007-06-26 at 01:36 +0200, Stefan Richter wrote: I can't speak for Kristian, nor do I have test equipment for isochronous applications, but I know that there are people out there which do data acquisition on as many FireWire buses as they can stuff boards into their boxes. There are

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-25 Thread Steven Rostedt
On Mon, 2007-06-25 at 18:00 -0600, Jonathan Corbet wrote: A couple of days ago I said: The cafe_ccic (OLPC) camera driver uses a tasklet to move frames out of the DMA buffers in the streaming I/O path Obviously some testing is called for here. I will make an attempt to do that

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-25 Thread Dan Williams
so how about the following, different approach: anyone who has a tasklet in any performance-sensitive codepath, please yell now. We'll also do a proactive search for such places. We can convert those places to softirqs, or move them back into hardirq context. Once this is done - and i doubt it

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-25 Thread Steven Rostedt
On Mon, 2007-06-25 at 18:46 -0700, Dan Williams wrote: Context switches on this platform flush the L1 cache so bouncing between a workqueue and the MD thread is painful. Why is context switches between two kernel threads flushing the L1 cache? Is this a flaw in the ARM arch? I would think

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-25 Thread Dan Williams
On 6/25/07, Steven Rostedt [EMAIL PROTECTED] wrote: On Mon, 2007-06-25 at 18:46 -0700, Dan Williams wrote: Context switches on this platform flush the L1 cache so bouncing between a workqueue and the MD thread is painful. Why is context switches between two kernel threads flushing the L1

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-24 Thread Steven Rostedt
On Sun, 24 Jun 2007, Jonathan Corbet wrote: > > The cafe_ccic (OLPC) camera driver uses a tasklet to move frames out of > the DMA buffers in the streaming I/O path. With this change in place, > I'd worry that the possibility of dropping frames would increase, > especially considering that (1)

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-24 Thread Jonathan Corbet
Ingo Molnar <[EMAIL PROTECTED]> wrote: > so how about the following, different approach: anyone who has a tasklet > in any performance-sensitive codepath, please yell now. The cafe_ccic (OLPC) camera driver uses a tasklet to move frames out of the DMA buffers in the streaming I/O path. With

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-24 Thread Jonathan Corbet
Ingo Molnar [EMAIL PROTECTED] wrote: so how about the following, different approach: anyone who has a tasklet in any performance-sensitive codepath, please yell now. The cafe_ccic (OLPC) camera driver uses a tasklet to move frames out of the DMA buffers in the streaming I/O path. With this

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-24 Thread Steven Rostedt
On Sun, 24 Jun 2007, Jonathan Corbet wrote: The cafe_ccic (OLPC) camera driver uses a tasklet to move frames out of the DMA buffers in the streaming I/O path. With this change in place, I'd worry that the possibility of dropping frames would increase, especially considering that (1) this is

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-23 Thread Dave Airlie
Most of the tasklet uses are in rarely used or arcane drivers - in fact none of my 10 test-boxes utilizes _any_ tasklet in any way that could even get close to mattering to performance. In other words: i just cannot test this, nor do i think that others will really test this. I.e. if we dont

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-23 Thread Dave Airlie
Most of the tasklet uses are in rarely used or arcane drivers - in fact none of my 10 test-boxes utilizes _any_ tasklet in any way that could even get close to mattering to performance. In other words: i just cannot test this, nor do i think that others will really test this. I.e. if we dont

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Stephen Hemminger
On Fri, 22 Jun 2007 00:00:14 -0400 Steven Rostedt <[EMAIL PROTECTED]> wrote: > > There's a very nice paper by Matthew Willcox that describes Softirqs, > Tasklets, Bottom Halves, Task Queues, Work Queues and Timers[1]. > In the paper it describes the history of these items. Softirqs and >

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Daniel Walker
On Sat, 2007-06-23 at 00:44 +0200, Ingo Molnar wrote: > * Daniel Walker <[EMAIL PROTECTED]> wrote: > > > > remember, these changes have been in use in -rt for a while. there's > > > reason to believe that they aren't going to cause drastic problems. > > > > Since I've been working with -rt (~2

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Steven Rostedt
On Fri, 2007-06-22 at 23:59 +0200, Ingo Molnar wrote: > * Linus Torvalds <[EMAIL PROTECTED]> wrote: > > > If the numbers say that there is no performance difference (or even > > better: that the new code performs better or fixes some latency issue > > or whatever), I'll be very happy. But if

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Alan Cox
> As a second example, msr_seek() in arch/i386/kernel/msr.c... is the > inode semaphore enough or not? Who understands the implications well > enough to say? lseek is one of the nasty remaining cases. tty is another real horror that needs further work but we slowly get closer - drivers/char is

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Daniel Walker <[EMAIL PROTECTED]> wrote: > > remember, these changes have been in use in -rt for a while. there's > > reason to believe that they aren't going to cause drastic problems. > > Since I've been working with -rt (~2 years now I think) it's clear > that the number of testers of

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Roland Dreier
> > [ and on a similar notion, i still havent given up on seeing all BKL > > use gone from the kernel. I expect it to happen any decade now ;-) ] > 2.6.21 had 476 lock_kernel() calls. 2.6.22-git has 473 lock_kernel() > calls currently. With that kind of flux we'll see the BKL gone in

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Daniel Walker
On Fri, 2007-06-22 at 15:09 -0700, [EMAIL PROTECTED] wrote: > On Fri, 22 Jun 2007, Daniel Walker wrote: > > > > > On Fri, 2007-06-22 at 22:40 +0200, Ingo Molnar wrote: > > > >> > >> - tasklets have certain fairness limitations. (they are executed in > >>softirq context and thus preempt

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Daniel Walker <[EMAIL PROTECTED]> wrote: > > - tasklets have certain fairness limitations. (they are executed in > >softirq context and thus preempt everything, even if there is > >some potentially more important, high-priority task waiting to be > >executed.) > > Since -rt has

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread david
On Fri, 22 Jun 2007, Daniel Walker wrote: On Fri, 2007-06-22 at 22:40 +0200, Ingo Molnar wrote: - tasklets have certain fairness limitations. (they are executed in softirq context and thus preempt everything, even if there is some potentially more important, high-priority task

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Ingo Molnar <[EMAIL PROTECTED]> wrote: > [ and on a similar notion, i still havent given up on seeing all BKL > use gone from the kernel. I expect it to happen any decade now ;-) ] 2.6.21 had 476 lock_kernel() calls. 2.6.22-git has 473 lock_kernel() calls currently. With that kind of flux

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Linus Torvalds <[EMAIL PROTECTED]> wrote: > If the numbers say that there is no performance difference (or even > better: that the new code performs better or fixes some latency issue > or whatever), I'll be very happy. But if the numbers say that it's > worse, no amount of cleanliness

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Daniel Walker
On Fri, 2007-06-22 at 22:40 +0200, Ingo Molnar wrote: > > - tasklets have certain fairness limitations. (they are executed in >softirq context and thus preempt everything, even if there is some >potentially more important, high-priority task waiting to be >executed.) Since -rt has

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Linus Torvalds
On Fri, 22 Jun 2007, Ingo Molnar wrote: > > * Linus Torvalds <[EMAIL PROTECTED]> wrote: > > > Whether we actually then want to do 6 is another matter. I think we'd > > need some measuring and discussion about that. > > basically tasklets have a number of limitations: I'm not disputing that

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Thomas Gleixner
On Fri, 2007-06-22 at 22:00 +0100, Christoph Hellwig wrote: > Note that we also have a lot of inefficiency in the way we do deferred > processing. Think of a setup where you run a XFS filesystem runs over > a megaraid adapter. > > (1) we get a real hardirq, which just clears the interrupt and

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Christoph Hellwig <[EMAIL PROTECTED]> wrote: > Note that we also have a lot of inefficiency in the way we do deferred > processing. Think of a setup where you run a XFS filesystem runs over > a megaraid adapter. > > (1) we get a real hardirq, which just clears the interrupt and then >

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Christoph Hellwig
On Fri, Jun 22, 2007 at 10:40:58PM +0200, Ingo Molnar wrote: > when it comes to 'deferred processing', we've basically got two 'prime' > choices for deferred processing: > > - if it's high-performance then it goes into a softirq. > > - if performance is not important, or robustness and

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Linus Torvalds <[EMAIL PROTECTED]> wrote: > Whether we actually then want to do 6 is another matter. I think we'd > need some measuring and discussion about that. basically tasklets have a number of limitations: - tasklets have certain latency limitations over real tasks. (for example

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Christoph Hellwig
On Fri, Jun 22, 2007 at 10:16:47AM -0700, Linus Torvalds wrote: > > > On Fri, 22 Jun 2007, Steven Rostedt wrote: > > > > I just want to state that tasklets served their time well. But it's time > > to give them an honorable discharge. So lets get rid of tasklets and > > given them a standing

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Steven Rostedt
On Fri, 2007-06-22 at 10:16 -0700, Linus Torvalds wrote: > > So patches 1-4 all look fine to me. In fact, 5 looks ok too. Great! > Leaving patch 6 as a "only makes sense after we actually have some numbers > about it", and patch 5 is a "could go either way" as far as I'm concerned > (ie I

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Linus Torvalds
On Fri, 22 Jun 2007, Steven Rostedt wrote: > > I just want to state that tasklets served their time well. But it's time > to give them an honorable discharge. So lets get rid of tasklets and > given them a standing salute as they leave :-) Well, independently of whether we actually discharge

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Arjan van de Ven
> > This is stated on the assumption that pretty much all performance > critical tasklets have been removed (although Christoph just mentioned > megaraid_sas, but after I made this statement). > > We've been running tasklets as threads in the -rt kernel for some time > now, and that hasn't

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Steven Rostedt
On Fri, 2007-06-22 at 07:25 -0700, Arjan van de Ven wrote: > > The most part, tasklets today are not used for time critical functions. > > Running tasklets in thread context is not harmful to performance of > > the overall system. > > That is a bold statement... > > > But running them in

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Steven Rostedt
On Fri, 2007-06-22 at 15:12 +0200, Ingo Molnar wrote: > * Steven Rostedt <[EMAIL PROTECTED]> wrote: > > yes, the softirq based tasklet implementation with workqueue based > implementation, but the tasklet API itself should still stay. done. > > ok, enough idle talking, lets see the next

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Arjan van de Ven
> The most part, tasklets today are not used for time critical functions. > Running tasklets in thread context is not harmful to performance of > the overall system. That is a bold statement... > But running them in interrupt context is, since > they increase the overall latency for high

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Andrew Morton <[EMAIL PROTECTED]> wrote: > > there are 120 tasklet_init()s in the tree and 224 > > tasklet_schedule()s. > > couple of hours? hm, what would you replace it with? Another new API? Or to workqueues with a manual adding of a local_bh_disable()/enable() pair around the worker

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Andrew Morton
> On Fri, 22 Jun 2007 15:26:22 +0200 Ingo Molnar <[EMAIL PROTECTED]> wrote: > > * Andrew Morton <[EMAIL PROTECTED]> wrote: > > > I do think that would be a better approach. Apart from the > > cleanliness issue, the driver-by-driver conversion would make it much > > easier to hunt down any

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Steven Rostedt
On Fri, 2007-06-22 at 06:13 -0700, Andrew Morton wrote: > > On Fri, 22 Jun 2007 08:58:44 -0400 Steven Rostedt <[EMAIL PROTECTED]> wrote: > > On Fri, 2007-06-22 at 14:38 +0200, Ingo Molnar wrote: > > > * Steven Rostedt <[EMAIL PROTECTED]> wrote: > > > > Honestly, I highly doubted that this would

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Andrew Morton <[EMAIL PROTECTED]> wrote: > I do think that would be a better approach. Apart from the > cleanliness issue, the driver-by-driver conversion would make it much > easier to hunt down any regresions or various funnineses. there are 120 tasklet_init()s in the tree and 224

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Andrew Morton
> On Fri, 22 Jun 2007 08:58:44 -0400 Steven Rostedt <[EMAIL PROTECTED]> wrote: > On Fri, 2007-06-22 at 14:38 +0200, Ingo Molnar wrote: > > * Steven Rostedt <[EMAIL PROTECTED]> wrote: > > > > > > And this is something that might be fine for benchmarking, but not > > > > something > > > > we

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Steven Rostedt <[EMAIL PROTECTED]> wrote: > > that's where it belongs - but it first needs the cleanups suggested > > by Christoph. > > I had the impression that he didn't want it in, but instead wanted > each driver to be changed separately. that can be done too in a later stage. We

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Steven Rostedt
On Fri, 2007-06-22 at 14:38 +0200, Ingo Molnar wrote: > * Steven Rostedt <[EMAIL PROTECTED]> wrote: > > > > And this is something that might be fine for benchmarking, but not > > > something > > > we should put in. Keeping two wildly different implementation of core > > > functionality with

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Steven Rostedt <[EMAIL PROTECTED]> wrote: > > And this is something that might be fine for benchmarking, but not something > > we should put in. Keeping two wildly different implementation of core > > functionality with very different behaviour around is quite bad. Better > > kill tasklets

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Steven Rostedt
Christoph, Thanks for taking the time to look at my patches! On Fri, 2007-06-22 at 08:09 +0100, Christoph Hellwig wrote: > > I've developed this way to replace all tasklets with work queues without > > having to change all the drivers that use them. I created an API that > > uses the tasklet

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Christoph Hellwig <[EMAIL PROTECTED]> wrote: > > which actual in-kernel tasklets do you have in mind? I'm not aware > > of any in performance critical code. (now that both the RCU and the > > sched tasklet has been fixed.) > > the one in megaraid_sas for example is in a performance-critical

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Christoph Hellwig <[EMAIL PROTECTED]> wrote: > I think we probably want some numbers, at least for tasklets used in > potentially performance critical code. which actual in-kernel tasklets do you have in mind? I'm not aware of any in performance critical code. (now that both the RCU and the

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Christoph Hellwig
On Fri, Jun 22, 2007 at 09:51:35AM +0200, Ingo Molnar wrote: > > * Christoph Hellwig <[EMAIL PROTECTED]> wrote: > > > I think we probably want some numbers, at least for tasklets used in > > potentially performance critical code. > > which actual in-kernel tasklets do you have in mind? I'm not

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Christoph Hellwig
On Fri, Jun 22, 2007 at 12:00:14AM -0400, Steven Rostedt wrote: > The most part, tasklets today are not used for time critical functions. > Running tasklets in thread context is not harmful to performance of > the overall system. But running them in interrupt context is, since > they increase the

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Christoph Hellwig
On Fri, Jun 22, 2007 at 12:00:14AM -0400, Steven Rostedt wrote: The most part, tasklets today are not used for time critical functions. Running tasklets in thread context is not harmful to performance of the overall system. But running them in interrupt context is, since they increase the

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Christoph Hellwig [EMAIL PROTECTED] wrote: I think we probably want some numbers, at least for tasklets used in potentially performance critical code. which actual in-kernel tasklets do you have in mind? I'm not aware of any in performance critical code. (now that both the RCU and the

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Christoph Hellwig
On Fri, Jun 22, 2007 at 09:51:35AM +0200, Ingo Molnar wrote: * Christoph Hellwig [EMAIL PROTECTED] wrote: I think we probably want some numbers, at least for tasklets used in potentially performance critical code. which actual in-kernel tasklets do you have in mind? I'm not aware of

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Christoph Hellwig [EMAIL PROTECTED] wrote: which actual in-kernel tasklets do you have in mind? I'm not aware of any in performance critical code. (now that both the RCU and the sched tasklet has been fixed.) the one in megaraid_sas for example is in a performance-critical path

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Steven Rostedt
Christoph, Thanks for taking the time to look at my patches! On Fri, 2007-06-22 at 08:09 +0100, Christoph Hellwig wrote: I've developed this way to replace all tasklets with work queues without having to change all the drivers that use them. I created an API that uses the tasklet API as

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Steven Rostedt [EMAIL PROTECTED] wrote: And this is something that might be fine for benchmarking, but not something we should put in. Keeping two wildly different implementation of core functionality with very different behaviour around is quite bad. Better kill tasklets once for

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Andrew Morton
On Fri, 22 Jun 2007 08:58:44 -0400 Steven Rostedt [EMAIL PROTECTED] wrote: On Fri, 2007-06-22 at 14:38 +0200, Ingo Molnar wrote: * Steven Rostedt [EMAIL PROTECTED] wrote: And this is something that might be fine for benchmarking, but not something we should put in. Keeping two

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Steven Rostedt
On Fri, 2007-06-22 at 14:38 +0200, Ingo Molnar wrote: * Steven Rostedt [EMAIL PROTECTED] wrote: And this is something that might be fine for benchmarking, but not something we should put in. Keeping two wildly different implementation of core functionality with very different

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Steven Rostedt [EMAIL PROTECTED] wrote: that's where it belongs - but it first needs the cleanups suggested by Christoph. I had the impression that he didn't want it in, but instead wanted each driver to be changed separately. that can be done too in a later stage. We cannot

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Steven Rostedt
On Fri, 2007-06-22 at 06:13 -0700, Andrew Morton wrote: On Fri, 22 Jun 2007 08:58:44 -0400 Steven Rostedt [EMAIL PROTECTED] wrote: On Fri, 2007-06-22 at 14:38 +0200, Ingo Molnar wrote: * Steven Rostedt [EMAIL PROTECTED] wrote: Honestly, I highly doubted that this would make it up to

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Andrew Morton
On Fri, 22 Jun 2007 15:26:22 +0200 Ingo Molnar [EMAIL PROTECTED] wrote: * Andrew Morton [EMAIL PROTECTED] wrote: I do think that would be a better approach. Apart from the cleanliness issue, the driver-by-driver conversion would make it much easier to hunt down any regresions or

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Andrew Morton [EMAIL PROTECTED] wrote: I do think that would be a better approach. Apart from the cleanliness issue, the driver-by-driver conversion would make it much easier to hunt down any regresions or various funnineses. there are 120 tasklet_init()s in the tree and 224

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Steven Rostedt
On Fri, 2007-06-22 at 07:25 -0700, Arjan van de Ven wrote: The most part, tasklets today are not used for time critical functions. Running tasklets in thread context is not harmful to performance of the overall system. That is a bold statement... But running them in interrupt context

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Arjan van de Ven
This is stated on the assumption that pretty much all performance critical tasklets have been removed (although Christoph just mentioned megaraid_sas, but after I made this statement). We've been running tasklets as threads in the -rt kernel for some time now, and that hasn't bothered

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Steven Rostedt
On Fri, 2007-06-22 at 15:12 +0200, Ingo Molnar wrote: * Steven Rostedt [EMAIL PROTECTED] wrote: yes, the softirq based tasklet implementation with workqueue based implementation, but the tasklet API itself should still stay. done. ok, enough idle talking, lets see the next round of

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Arjan van de Ven
The most part, tasklets today are not used for time critical functions. Running tasklets in thread context is not harmful to performance of the overall system. That is a bold statement... But running them in interrupt context is, since they increase the overall latency for high priority

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Andrew Morton [EMAIL PROTECTED] wrote: there are 120 tasklet_init()s in the tree and 224 tasklet_schedule()s. couple of hours? hm, what would you replace it with? Another new API? Or to workqueues with a manual adding of a local_bh_disable()/enable() pair around the worker function?

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Linus Torvalds
On Fri, 22 Jun 2007, Steven Rostedt wrote: I just want to state that tasklets served their time well. But it's time to give them an honorable discharge. So lets get rid of tasklets and given them a standing salute as they leave :-) Well, independently of whether we actually discharge them

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Steven Rostedt
On Fri, 2007-06-22 at 10:16 -0700, Linus Torvalds wrote: So patches 1-4 all look fine to me. In fact, 5 looks ok too. Great! Leaving patch 6 as a only makes sense after we actually have some numbers about it, and patch 5 is a could go either way as far as I'm concerned (ie I could merge

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Christoph Hellwig
On Fri, Jun 22, 2007 at 10:16:47AM -0700, Linus Torvalds wrote: On Fri, 22 Jun 2007, Steven Rostedt wrote: I just want to state that tasklets served their time well. But it's time to give them an honorable discharge. So lets get rid of tasklets and given them a standing salute as

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Linus Torvalds [EMAIL PROTECTED] wrote: Whether we actually then want to do 6 is another matter. I think we'd need some measuring and discussion about that. basically tasklets have a number of limitations: - tasklets have certain latency limitations over real tasks. (for example they

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Christoph Hellwig
On Fri, Jun 22, 2007 at 10:40:58PM +0200, Ingo Molnar wrote: when it comes to 'deferred processing', we've basically got two 'prime' choices for deferred processing: - if it's high-performance then it goes into a softirq. - if performance is not important, or robustness and flexibility

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Christoph Hellwig [EMAIL PROTECTED] wrote: Note that we also have a lot of inefficiency in the way we do deferred processing. Think of a setup where you run a XFS filesystem runs over a megaraid adapter. (1) we get a real hardirq, which just clears the interrupt and then

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Thomas Gleixner
On Fri, 2007-06-22 at 22:00 +0100, Christoph Hellwig wrote: Note that we also have a lot of inefficiency in the way we do deferred processing. Think of a setup where you run a XFS filesystem runs over a megaraid adapter. (1) we get a real hardirq, which just clears the interrupt and then

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Linus Torvalds
On Fri, 22 Jun 2007, Ingo Molnar wrote: * Linus Torvalds [EMAIL PROTECTED] wrote: Whether we actually then want to do 6 is another matter. I think we'd need some measuring and discussion about that. basically tasklets have a number of limitations: I'm not disputing that they aren't

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Daniel Walker
On Fri, 2007-06-22 at 22:40 +0200, Ingo Molnar wrote: - tasklets have certain fairness limitations. (they are executed in softirq context and thus preempt everything, even if there is some potentially more important, high-priority task waiting to be executed.) Since -rt has been

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Linus Torvalds [EMAIL PROTECTED] wrote: If the numbers say that there is no performance difference (or even better: that the new code performs better or fixes some latency issue or whatever), I'll be very happy. But if the numbers say that it's worse, no amount of cleanliness really

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Ingo Molnar [EMAIL PROTECTED] wrote: [ and on a similar notion, i still havent given up on seeing all BKL use gone from the kernel. I expect it to happen any decade now ;-) ] 2.6.21 had 476 lock_kernel() calls. 2.6.22-git has 473 lock_kernel() calls currently. With that kind of flux

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread david
On Fri, 22 Jun 2007, Daniel Walker wrote: On Fri, 2007-06-22 at 22:40 +0200, Ingo Molnar wrote: - tasklets have certain fairness limitations. (they are executed in softirq context and thus preempt everything, even if there is some potentially more important, high-priority task

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Daniel Walker [EMAIL PROTECTED] wrote: - tasklets have certain fairness limitations. (they are executed in softirq context and thus preempt everything, even if there is some potentially more important, high-priority task waiting to be executed.) Since -rt has been

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Daniel Walker
On Fri, 2007-06-22 at 15:09 -0700, [EMAIL PROTECTED] wrote: On Fri, 22 Jun 2007, Daniel Walker wrote: On Fri, 2007-06-22 at 22:40 +0200, Ingo Molnar wrote: - tasklets have certain fairness limitations. (they are executed in softirq context and thus preempt everything, even if

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Roland Dreier
[ and on a similar notion, i still havent given up on seeing all BKL use gone from the kernel. I expect it to happen any decade now ;-) ] 2.6.21 had 476 lock_kernel() calls. 2.6.22-git has 473 lock_kernel() calls currently. With that kind of flux we'll see the BKL gone in about

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Ingo Molnar
* Daniel Walker [EMAIL PROTECTED] wrote: remember, these changes have been in use in -rt for a while. there's reason to believe that they aren't going to cause drastic problems. Since I've been working with -rt (~2 years now I think) it's clear that the number of testers of the patch

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Alan Cox
As a second example, msr_seek() in arch/i386/kernel/msr.c... is the inode semaphore enough or not? Who understands the implications well enough to say? lseek is one of the nasty remaining cases. tty is another real horror that needs further work but we slowly get closer - drivers/char is

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Steven Rostedt
On Fri, 2007-06-22 at 23:59 +0200, Ingo Molnar wrote: * Linus Torvalds [EMAIL PROTECTED] wrote: If the numbers say that there is no performance difference (or even better: that the new code performs better or fixes some latency issue or whatever), I'll be very happy. But if the numbers

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Daniel Walker
On Sat, 2007-06-23 at 00:44 +0200, Ingo Molnar wrote: * Daniel Walker [EMAIL PROTECTED] wrote: remember, these changes have been in use in -rt for a while. there's reason to believe that they aren't going to cause drastic problems. Since I've been working with -rt (~2 years now I

Re: [RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-22 Thread Stephen Hemminger
On Fri, 22 Jun 2007 00:00:14 -0400 Steven Rostedt [EMAIL PROTECTED] wrote: There's a very nice paper by Matthew Willcox that describes Softirqs, Tasklets, Bottom Halves, Task Queues, Work Queues and Timers[1]. In the paper it describes the history of these items. Softirqs and tasklets were

[RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-21 Thread Steven Rostedt
There's a very nice paper by Matthew Willcox that describes Softirqs, Tasklets, Bottom Halves, Task Queues, Work Queues and Timers[1]. In the paper it describes the history of these items. Softirqs and tasklets were created to replace bottom halves after a company (Mindcraft) showed that

[RFC PATCH 0/6] Convert all tasklets to workqueues

2007-06-21 Thread Steven Rostedt
There's a very nice paper by Matthew Willcox that describes Softirqs, Tasklets, Bottom Halves, Task Queues, Work Queues and Timers[1]. In the paper it describes the history of these items. Softirqs and tasklets were created to replace bottom halves after a company (Mindcraft) showed that

<    1   2