public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Nick Garnett <nickg@ecoscentric.com>
To: Sergei Organov <osv@javad.com>
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS]  Re: DSR stops running after heavy interrupts. Spurious Interrupt!
Date: Tue, 11 Apr 2006 08:43:00 -0000	[thread overview]
Message-ID: <m3u0907bap.fsf@xl5.calivar.com> (raw)
In-Reply-To: <e1faam$omn$2@sea.gmane.org>

 Sergei Organov <osv@javad.com> writes:

> Nick Garnett <nickg@ecoscentric.com> writes:
> > "Joe Porthouse" <jporthouse@toptech.com> writes:
> [...]
> 
> >> Was there a reason why interrupt_end() should not be
> >> called on spurious interrupts?
> >
> > I guess it was an attempt to avoid doing more than the absolute
> > minimum on spurious interrupts. It looks like there is a bug in there,
> > since the scheduler lock doesn't get decremented. In general, spurious
> > interrupts shouldn't happen, which is why it has managed to lurk here
> > for so long.
> 
> Well, I think the right question here is why scheduler lock is
> incremented at all? I mean if SMP implementations happen to increment it
> inside the interrupt_end(), then it should be safe for ARM HAL to
> increment it just before calling interrupt_end(), isn't it? This way
> spurious interrupt handling code will avoid both scheduler lock
> increment and interrupt_end() call. Makes sense?

The scheduler lock has several duties. As well as disabling thread
suspension and controlling when DSRs are called, it also does duty as
an interrupt nesting counter. We only want DSRs to be called when all
nested interrupts have been unwound and we are about to return from
the first one. The scheduler lock count does this implicitly. But for
this to work properly, the scheduler lock must be incremented in the
VSR before interrupts are re-enabled and the ISR is called.

In the SMP case I decided, at least initially, that nested interrupts
would not be supported. It was hard enough keeping track of interrupts
going off on different CPUs. This allowed me to move the lock
operation into interrupt_end(), and avoided having to write any asm
code to go into the VSR.

SMP is really still in its development phase, there are a number of
things that a little experimental in there. Moving the scheduler
locking to interrupt_end() was one of them. I certainly would not want
to do that for any other configuration.


-- 
Nick Garnett                                 eCos Kernel Architect
http://www.ecoscentric.com            The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  reply	other threads:[~2006-04-11  8:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-05 21:09 [ECOS] DSR stops running after heavy interrupts Joe Porthouse
2006-04-06  6:49 ` Andrew Lunn
2006-04-06  9:02   ` Stefan Sommerfeld
2006-04-06 21:09     ` Joe Porthouse
2006-04-06 21:19       ` Andrew Lunn
2006-04-08  4:18         ` [ECOS] DSR stops running after heavy interrupts. Bug found? Joe Porthouse
2006-04-09 12:33           ` Andrew Lunn
2006-04-10  4:50             ` [ECOS] " Sergei Organov
2006-04-10  9:36               ` Nick Garnett
2006-04-10 10:44                 ` Sergei Organov
2006-04-10 10:59                   ` Nick Garnett
2006-04-10 11:15                     ` Sergei Organov
2006-04-10 13:20                       ` Joe Porthouse
2006-04-10 16:41                 ` [ECOS] Re: DSR stops running after heavy interrupts. Spurious Interrupt! Joe Porthouse
2006-04-10 17:20                   ` Nick Garnett
2006-04-10 17:44                     ` Andrew Lunn
2006-04-10 20:49                     ` Joe Porthouse
2006-04-11  4:07                       ` Sergei Organov
2006-04-11  8:31                       ` Nick Garnett
2006-04-11  4:15                     ` Sergei Organov
2006-04-11  8:43                       ` Nick Garnett [this message]
2006-04-13  7:58                 ` [ECOS] How to use the ARM directive DCB in Vectors.S Birahim Larou Fall
2006-04-13 13:28                   ` Andrew Lunn
2006-04-13 13:32                     ` Birahim Larou Fall
2006-04-21  7:40                       ` [ECOS] " Daniel Néri

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=m3u0907bap.fsf@xl5.calivar.com \
    --to=nickg@ecoscentric.com \
    --cc=ecos-discuss@sources.redhat.com \
    --cc=osv@javad.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).