public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Manfred Spraul <manfred@colorfullife.com>
Cc: kernel list <linux-kernel@vger.kernel.org>
Subject: softirq buggy [Re: Serial port latency]
Date: Wed, 4 Apr 2001 01:07:59 +0200	[thread overview]
Message-ID: <20010404010759.A102@bug.ucw.cz> (raw)
In-Reply-To: <000401c0b319517fea9@local> <20010325231013.A34@(none)> <000401c0b828$bbdf7380$5517fea9@local> <20010331003645.F1579@atrey.karlin.mff.cuni.cz> <3AC6559E.575C4BAA@colorfullife.com>
In-Reply-To: <3AC6559E.575C4BAA@colorfullife.com>; from Manfred Spraul on Sun, Apr 01, 2001 at 12:09:34AM +0200

Hi!

> > Seems floppy and console is buggy, then.
> >
> 
> No. The softirq implementation is buggy.
> I can trigger the problem with the TASKLET_HI (floppy), and both net rx
> and tx (ping -l)
> 
> > > What about creating a special cpu_is_idle() function that the idle
> > > functions must call before sleeping?
> > 
> > I'd say just fix all the bugs.
> >
> 
> Ok, there are 2 bugs that are (afaics) impossible to fix without
> checking for pending softirq's in cpu_idle():
> 
> a)
> queue_task(my_task1, tq_immediate);
> mark_bh();
> schedule();
> ;within schedule: do_softirq()
> ;within my_task1:
> mark_bh();
> ; bh returns, but do_softirq won't loop
> ; do_softirq returns.
> ; schedule() clears current->need_resched
> ; idle thread scheduled.
> --> idle can run although softirq's are pending

Or anything else can run altrough softirqs are pending. If it is
computation job, softinterrupts are delayed quiet a bit, right?

So right fix seems to be "loop in do_softirq".

								Pavel

> I assume I trigger this race with the floppy driver.
> 
> b)
> hw interrupt
> do_softirq
> within the net_rx handler: another hw interrupt, additional packets are
> queued
> do_softirq won't loop.
> returns to idle thread. --> packets delayed unnecessary.
> 
> What about the attached patch? Obviously the other idle cpu must be
> converted to use the function as well.

-- 
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at discuss@linmodems.org

  reply	other threads:[~2001-04-04 20:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <000401c0b319517fea9@local>
2001-03-25 23:10 ` Serial port latency Pavel Machek
2001-03-29  7:58   ` Manfred Spraul
2001-03-30 22:36     ` Pavel Machek
2001-03-31 22:09       ` Manfred Spraul
2001-04-03 23:07         ` Pavel Machek [this message]
2001-04-04 21:18           ` softirq buggy [Re: Serial port latency] Manfred Spraul
2001-04-06 12:00             ` Pavel Machek
2001-04-07 22:28               ` Manfred Spraul
2001-04-08 16:58                 ` kuznet
2001-04-08 17:21                   ` Manfred Spraul
2001-04-08 17:58                     ` kuznet
2001-04-08 18:16                       ` Manfred Spraul
2001-04-08 21:35                       ` [PATCH] Re: softirq buggy Manfred Spraul
2001-04-09  8:42                         ` Albert D. Cahalan
2001-04-09 13:50                         ` Andrea Arcangeli
2001-04-09 15:26                           ` Manfred Spraul
2001-04-09 17:31                             ` Andrea Arcangeli
2001-04-09 17:48                             ` kuznet
2001-04-09 18:26                               ` Andrea Arcangeli
2001-04-10  0:37   ` Serial port latency Andrea Arcangeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010404010759.A102@bug.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox