From: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
To: george anzinger <george@mvista.com>
Cc: Keith Owens <kaos@ocs.com.au>, linux-kernel@vger.kernel.org
Subject: Re: 2.4.20 kernel/timer.c may incorrectly reenable interrupts
Date: Tue, 15 Apr 2003 22:32:05 +0200 [thread overview]
Message-ID: <20030415223205.P659@nightmaster.csn.tu-chemnitz.de> (raw)
In-Reply-To: <3E9B2CF3.70103@mvista.com>; from george@mvista.com on Mon, Apr 14, 2003 at 02:49:39PM -0700
Hi George,
hi Keith,
hi lkml,
On Mon, Apr 14, 2003 at 02:49:39PM -0700, george anzinger wrote:
> Ingo Oeser wrote:
> > On Fri, Apr 11, 2003 at 02:21:38PM -0700, george anzinger wrote:
> >
> >>Ingo Oeser wrote:
> Yes, I believe this is what RTLinux and RTIA do. The sti macro then
> needs to check for pending interrupt work, much as the bh_unlock does.
Ok, NOW we are talking ;-)
> > Not suitable for drivers. They must read the registers, set some
> > other registers and ACK the IRQ in the ISR. There is no way
> > around that.
>
> The lock has two sides, the reader and the writer. The writer still
> takes the irq/ spinlock, only the reader gets the speed up.
But the read can read garbage and may need a retry. This is not
acceptable for me, since one of my cards will do destructive
reads. They implement a hardware FIFO (of one element depth),
where the register I read from is removing the element while
reading. This is a common design you'll find in PCI-bridge chips
(I used the S5933 from AMCC for this).
So this scheme still doesn't help me and is not the proper
drop-in replacement, we are looking for.
BTW: Please note, that you can assume I know the semantics of all
the locking functions currently in Linus' tree. So you can
stop explaining me the details of them and continue with
defining a proper cli/sti replacement. Thanks!
> > So if there would be a schedule_work_deadline() then this would
> > be nice. The routine called later in process context called will
> > be noticed, if the deadline is missed or not and can act
> > correctly.
[...]
> > We currently have timers, but they are not suitable for doing the
> > work only for triggering it and that's a source of complexity in
> > driver design.
>
> Something of this sort is present in the workqueues design. There is
> a schedule work for later call.
Yes, but it doesn't solve the problem, that I've illustrated. You'll not
know, WHEN this scheduled work will trigger (kernel tells us: ASAP)
and you need another kernel thingie again. And you must check,
whether the deadline is over yourself.
This isn't that nice design. I just don't feel that experienced,
that I can change the scheduler.
But maybe we can talk about that now, that we both know that we
know the current kernel API well enough ;-)
Regards
Ingo Oeser
prev parent reply other threads:[~2003-04-16 8:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-11 6:47 Keith Owens
2003-04-11 7:15 ` george anzinger
2003-04-11 9:27 ` Ingo Oeser
2003-04-11 21:21 ` george anzinger
2003-04-12 8:55 ` Ingo Oeser
2003-04-14 21:49 ` george anzinger
2003-04-15 20:32 ` Ingo Oeser [this message]
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=20030415223205.P659@nightmaster.csn.tu-chemnitz.de \
--to=ingo.oeser@informatik.tu-chemnitz.de \
--cc=george@mvista.com \
--cc=kaos@ocs.com.au \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®