Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1423031 > unrolled thread

[PATCH 3/5] sched/preempt: cond_resched_softirq() must check for softirq

Started byPaolo Abeni <pabeni@redhat.com>
First post2016-06-15 15:50 +0200
Last post2016-06-15 16:10 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 3/5] sched/preempt: cond_resched_softirq() must check for softirq Paolo Abeni <pabeni@redhat.com> - 2016-06-15 15:50 +0200
    Re: [PATCH 3/5] sched/preempt: cond_resched_softirq() must check for  softirq Peter Zijlstra <peterz@infradead.org> - 2016-06-15 15:50 +0200
      Re: [PATCH 3/5] sched/preempt: cond_resched_softirq() must check  for softirq Paolo Abeni <pabeni@redhat.com> - 2016-06-15 16:10 +0200

#1423031 — [PATCH 3/5] sched/preempt: cond_resched_softirq() must check for softirq

FromPaolo Abeni <pabeni@redhat.com>
Date2016-06-15 15:50 +0200
Subject[PATCH 3/5] sched/preempt: cond_resched_softirq() must check for softirq
Message-ID<rKjmF-3b4-3@gated-at.bofh.it>
Currently cond_resched_softirq() fails to reschedule if there
are pending softirq but no other running process. This happens
i.e. when receiving an interrupt with local bh disabled.

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
 kernel/sched/core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 7f2cae4..788625f 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -4837,7 +4837,8 @@ int __sched __cond_resched_softirq(void)
 {
 	BUG_ON(!in_softirq());
 
-	if (should_resched(SOFTIRQ_DISABLE_OFFSET)) {
+	if (should_resched(SOFTIRQ_DISABLE_OFFSET) ||
+	    local_softirq_pending()) {
 		local_bh_enable();
 		preempt_schedule_common();
 		local_bh_disable();
-- 
1.8.3.1

[toc] | [next] | [standalone]


#1423033 — Re: [PATCH 3/5] sched/preempt: cond_resched_softirq() must check for softirq

FromPeter Zijlstra <peterz@infradead.org>
Date2016-06-15 15:50 +0200
SubjectRe: [PATCH 3/5] sched/preempt: cond_resched_softirq() must check for softirq
Message-ID<rKjmF-3b4-13@gated-at.bofh.it>
In reply to#1423031
On Wed, Jun 15, 2016 at 03:42:04PM +0200, Paolo Abeni wrote:
> Currently cond_resched_softirq() fails to reschedule if there
> are pending softirq but no other running process. This happens
> i.e. when receiving an interrupt with local bh disabled.
> 
> Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>

All your patches appear to have this broken SoB chain.

As presented it suggests you wrote the patches, which matches with From,
however it then suggests Hannes collected and send them onwards, not so
much.

Please correct.

[toc] | [prev] | [next] | [standalone]


#1423054 — Re: [PATCH 3/5] sched/preempt: cond_resched_softirq() must check for softirq

FromPaolo Abeni <pabeni@redhat.com>
Date2016-06-15 16:10 +0200
SubjectRe: [PATCH 3/5] sched/preempt: cond_resched_softirq() must check for softirq
Message-ID<rKjG1-3xJ-13@gated-at.bofh.it>
In reply to#1423033
On Wed, 2016-06-15 at 15:48 +0200, Peter Zijlstra wrote:
> On Wed, Jun 15, 2016 at 03:42:04PM +0200, Paolo Abeni wrote:
> > Currently cond_resched_softirq() fails to reschedule if there
> > are pending softirq but no other running process. This happens
> > i.e. when receiving an interrupt with local bh disabled.
> > 
> > Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
> > Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> > Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
> 
> All your patches appear to have this broken SoB chain.
> 
> As presented it suggests you wrote the patches, which matches with From,
> however it then suggests Hannes collected and send them onwards, not so
> much.
> 
> Please correct.

My bad. I'll re-submit. The intention was to specify this is joint work
done together with Hannes.

Paolo

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web