This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: AW: FIFO DSRs... the 2nd


"Neundorf, Alexander" <Alexander.Neundorf@jenoptik.com> writes:

> > Von: ecos-patches-owner@ecos.sourceware.org
> > 
> > Sergei Organov <osv@javad.com> writes:
> > 
> > > Attached is modified patch that implements FIFO scheduling 
> > of DSRs and
> > > makes it the default.
> > > 
> > > Compared to the original patch, less files are modified, 
> > more assertions
> > > are added, and FIFO variant of the call_pending_DSRs_inner() is
> > > optimized both for single DSR and for multiple DSRs in the list.
> > > 
> > > In addition, two related minor fixes to the comments in the 
> > kernel tests
> > > are provided.
> > > 
> > > Tested on ARM.
> > 
> > This has now been checked in, the actual patch committed is attached.
> 
> Nice, but wouldn't it be better to keep the old behaviour as default ?
> The changed behaviour might cause surprises for some people.

I thought hard about this. In the end, code should not rely on DSRs
being called in any particular order, so FIFO is just as valid as
LIFO as far as system semantics are concerned. However, there are a
few situations where FIFO ordering is better, particularly when
dealing with high interrupt rates, since LIFO ordering can lead to
starvation for the DSRs at the bottom of the stack. So from a
performance point of view, FIFO is to be preferred very slightly.

The only real risk we are taking with this code is that there might be
an undiscovered bug in it, and I don't think there is.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]