Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-15 Thread Sebastian Andrzej Siewior
On 2018-02-15 17:13:52 [+0100], Frederic Weisbecker wrote: > Yeah that makes sense. These workqueues are too much headaches eventually. > I'm going to try that ksoftirqd thing. I may have something for that USB problem, I just need some testing before posting… > Thanks. Sebastian

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-15 Thread Sebastian Andrzej Siewior
On 2018-02-15 17:13:52 [+0100], Frederic Weisbecker wrote: > Yeah that makes sense. These workqueues are too much headaches eventually. > I'm going to try that ksoftirqd thing. I may have something for that USB problem, I just need some testing before posting… > Thanks. Sebastian

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-15 Thread Frederic Weisbecker
On Thu, Feb 08, 2018 at 06:44:52PM +0100, Sebastian Andrzej Siewior wrote: > On 2018-01-19 16:46:12 [+0100], Frederic Weisbecker wrote: > > diff --git a/kernel/softirq.c b/kernel/softirq.c > > index c8c6841..becb1d9 100644 > > --- a/kernel/softirq.c > > +++ b/kernel/softirq.c > > @@ -62,6 +62,19

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-15 Thread Frederic Weisbecker
On Thu, Feb 08, 2018 at 06:44:52PM +0100, Sebastian Andrzej Siewior wrote: > On 2018-01-19 16:46:12 [+0100], Frederic Weisbecker wrote: > > diff --git a/kernel/softirq.c b/kernel/softirq.c > > index c8c6841..becb1d9 100644 > > --- a/kernel/softirq.c > > +++ b/kernel/softirq.c > > @@ -62,6 +62,19

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-09 Thread Sebastian Andrzej Siewior
On 2018-02-09 05:11:08 [+0100], Mike Galbraith wrote: > On Thu, 2018-02-08 at 20:30 +, Dmitry Safonov wrote: > > On Thu, 2018-02-08 at 15:22 -0500, David Miller wrote: > > > Why do we need more than one per cpu? > > > > Ugh, yeah, I remember why I did it - I tried to reuse scheduler for > >

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-09 Thread Sebastian Andrzej Siewior
On 2018-02-09 05:11:08 [+0100], Mike Galbraith wrote: > On Thu, 2018-02-08 at 20:30 +, Dmitry Safonov wrote: > > On Thu, 2018-02-08 at 15:22 -0500, David Miller wrote: > > > Why do we need more than one per cpu? > > > > Ugh, yeah, I remember why I did it - I tried to reuse scheduler for > >

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-08 Thread Mike Galbraith
On Thu, 2018-02-08 at 20:30 +, Dmitry Safonov wrote: > On Thu, 2018-02-08 at 15:22 -0500, David Miller wrote: > > From: Dmitry Safonov > > Date: Thu, 08 Feb 2018 20:14:55 + > > > > > On Thu, 2018-02-08 at 13:45 -0500, David Miller wrote: > > >> From: Sebastian Andrzej

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-08 Thread Mike Galbraith
On Thu, 2018-02-08 at 20:30 +, Dmitry Safonov wrote: > On Thu, 2018-02-08 at 15:22 -0500, David Miller wrote: > > From: Dmitry Safonov > > Date: Thu, 08 Feb 2018 20:14:55 + > > > > > On Thu, 2018-02-08 at 13:45 -0500, David Miller wrote: > > >> From: Sebastian Andrzej Siewior > > >>

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-08 Thread Dmitry Safonov
On Thu, 2018-02-08 at 15:22 -0500, David Miller wrote: > From: Dmitry Safonov > Date: Thu, 08 Feb 2018 20:14:55 + > > > On Thu, 2018-02-08 at 13:45 -0500, David Miller wrote: > >> From: Sebastian Andrzej Siewior > >> Date: Thu, 8 Feb 2018 18:44:52

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-08 Thread Dmitry Safonov
On Thu, 2018-02-08 at 15:22 -0500, David Miller wrote: > From: Dmitry Safonov > Date: Thu, 08 Feb 2018 20:14:55 + > > > On Thu, 2018-02-08 at 13:45 -0500, David Miller wrote: > >> From: Sebastian Andrzej Siewior > >> Date: Thu, 8 Feb 2018 18:44:52 +0100 > >> > >> > May I instead suggest to

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-08 Thread David Miller
From: Dmitry Safonov Date: Thu, 08 Feb 2018 20:14:55 + > On Thu, 2018-02-08 at 13:45 -0500, David Miller wrote: >> From: Sebastian Andrzej Siewior >> Date: Thu, 8 Feb 2018 18:44:52 +0100 >> >> > May I instead suggest to stick to ksoftirqd? So you run

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-08 Thread David Miller
From: Dmitry Safonov Date: Thu, 08 Feb 2018 20:14:55 + > On Thu, 2018-02-08 at 13:45 -0500, David Miller wrote: >> From: Sebastian Andrzej Siewior >> Date: Thu, 8 Feb 2018 18:44:52 +0100 >> >> > May I instead suggest to stick to ksoftirqd? So you run in softirq >> > context (after return

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-08 Thread Dmitry Safonov
On Thu, 2018-02-08 at 13:45 -0500, David Miller wrote: > From: Sebastian Andrzej Siewior > Date: Thu, 8 Feb 2018 18:44:52 +0100 > > > May I instead suggest to stick to ksoftirqd? So you run in softirq > > context (after return from IRQ) and if takes too long, you offload >

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-08 Thread Dmitry Safonov
On Thu, 2018-02-08 at 13:45 -0500, David Miller wrote: > From: Sebastian Andrzej Siewior > Date: Thu, 8 Feb 2018 18:44:52 +0100 > > > May I instead suggest to stick to ksoftirqd? So you run in softirq > > context (after return from IRQ) and if takes too long, you offload > the > > vector to

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-08 Thread David Miller
From: Sebastian Andrzej Siewior Date: Thu, 8 Feb 2018 18:44:52 +0100 > May I instead suggest to stick to ksoftirqd? So you run in softirq > context (after return from IRQ) and if takes too long, you offload the > vector to ksoftirqd instead. You may want to play with the

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-08 Thread David Miller
From: Sebastian Andrzej Siewior Date: Thu, 8 Feb 2018 18:44:52 +0100 > May I instead suggest to stick to ksoftirqd? So you run in softirq > context (after return from IRQ) and if takes too long, you offload the > vector to ksoftirqd instead. You may want to play with the metric on > which you

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-08 Thread Sebastian Andrzej Siewior
On 2018-01-19 16:46:12 [+0100], Frederic Weisbecker wrote: > diff --git a/kernel/softirq.c b/kernel/softirq.c > index c8c6841..becb1d9 100644 > --- a/kernel/softirq.c > +++ b/kernel/softirq.c > @@ -62,6 +62,19 @@ const char * const softirq_to_name[NR_SOFTIRQS] = { … > +static void

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-02-08 Thread Sebastian Andrzej Siewior
On 2018-01-19 16:46:12 [+0100], Frederic Weisbecker wrote: > diff --git a/kernel/softirq.c b/kernel/softirq.c > index c8c6841..becb1d9 100644 > --- a/kernel/softirq.c > +++ b/kernel/softirq.c > @@ -62,6 +62,19 @@ const char * const softirq_to_name[NR_SOFTIRQS] = { … > +static void

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-01-21 Thread Frederic Weisbecker
On Sun, Jan 21, 2018 at 11:20:40PM +0530, Pavan Kondeti wrote: > On Sun, Jan 21, 2018 at 05:11:17PM +0100, Frederic Weisbecker wrote: > > On Sat, Jan 20, 2018 at 02:11:39PM +0530, Pavan Kondeti wrote: > > > > Hi Pavan, > > > > > > > I have couple questions/comments. > > > > > > (1) Since the

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-01-21 Thread Frederic Weisbecker
On Sun, Jan 21, 2018 at 11:20:40PM +0530, Pavan Kondeti wrote: > On Sun, Jan 21, 2018 at 05:11:17PM +0100, Frederic Weisbecker wrote: > > On Sat, Jan 20, 2018 at 02:11:39PM +0530, Pavan Kondeti wrote: > > > > Hi Pavan, > > > > > > > I have couple questions/comments. > > > > > > (1) Since the

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-01-21 Thread Pavan Kondeti
On Sun, Jan 21, 2018 at 05:11:17PM +0100, Frederic Weisbecker wrote: > On Sat, Jan 20, 2018 at 02:11:39PM +0530, Pavan Kondeti wrote: > > Hi Pavan, > > > > I have couple questions/comments. > > > > (1) Since the work is queued on a bounded per-cpu worker, we may run > > into a deadlock if a

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-01-21 Thread Pavan Kondeti
On Sun, Jan 21, 2018 at 05:11:17PM +0100, Frederic Weisbecker wrote: > On Sat, Jan 20, 2018 at 02:11:39PM +0530, Pavan Kondeti wrote: > > Hi Pavan, > > > > I have couple questions/comments. > > > > (1) Since the work is queued on a bounded per-cpu worker, we may run > > into a deadlock if a

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-01-21 Thread Frederic Weisbecker
On Sat, Jan 20, 2018 at 02:11:39PM +0530, Pavan Kondeti wrote: Hi Pavan, > I have couple questions/comments. > > (1) Since the work is queued on a bounded per-cpu worker, we may run > into a deadlock if a TASKLET is killed from another work running on > the same bounded per-cpu worker. > >

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-01-21 Thread Frederic Weisbecker
On Sat, Jan 20, 2018 at 02:11:39PM +0530, Pavan Kondeti wrote: Hi Pavan, > I have couple questions/comments. > > (1) Since the work is queued on a bounded per-cpu worker, we may run > into a deadlock if a TASKLET is killed from another work running on > the same bounded per-cpu worker. > >

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-01-20 Thread Pavan Kondeti
Hi Frederic, On Fri, Jan 19, 2018 at 04:46:12PM +0100, Frederic Weisbecker wrote: > Some softirq vectors can be more CPU hungry than others. Especially > networking may sometimes deal with packet storm and need more CPU than > IRQ tail can offer without inducing scheduler latencies. In this case

Re: [RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-01-20 Thread Pavan Kondeti
Hi Frederic, On Fri, Jan 19, 2018 at 04:46:12PM +0100, Frederic Weisbecker wrote: > Some softirq vectors can be more CPU hungry than others. Especially > networking may sometimes deal with packet storm and need more CPU than > IRQ tail can offer without inducing scheduler latencies. In this case

[RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-01-19 Thread Frederic Weisbecker
Some softirq vectors can be more CPU hungry than others. Especially networking may sometimes deal with packet storm and need more CPU than IRQ tail can offer without inducing scheduler latencies. In this case the current code defers to ksoftirqd that behaves nicer. Now this nice behaviour can be

[RFC PATCH 2/4] softirq: Per vector deferment to workqueue

2018-01-19 Thread Frederic Weisbecker
Some softirq vectors can be more CPU hungry than others. Especially networking may sometimes deal with packet storm and need more CPU than IRQ tail can offer without inducing scheduler latencies. In this case the current code defers to ksoftirqd that behaves nicer. Now this nice behaviour can be