This is the mail archive of the ecos-discuss@sources.redhat.com 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: Max number of priorities using mlqueue scheduler


Jonathan Larmour <jifl at eCosCentric dot com> writes:

> Daniel Lidsten wrote:
> > Hi,
> > I am currently in the position where i need more priority levels
> > than is
> > specified in the "legal values" of the mlqueue scheduler. Is it possible
> > to just increase the max legal value and then  set
> > CYGNUM_KERNEL_SCHED_PRIORITIES to the number of priorities needed?
> > I found an old post regarding this:
> > http://sources.redhat.com/ml/ecos-discuss/2002-01/msg00440.html
> 
> Good for you for looking!
> 
> > It says something about a complication due to the bitmap scheduler. Is
> > this still applicable to the newest source?
> 
> It's not the bitmap scheduler. It's a bitmap field used to record
> priorities, and it's a 32-bit integer, hence 32 priorities. If you
> editted the source you could change it to a cyg_uint64 and therefore
> it would be 64 priorities, although that means "long long"s which
> means a small amount of extra overhead any time you do anything.

It's actually the HAL_LSBIT_INDEX() macro that is the problem. On many
architectures this functionality is provided by a machine instruction,
which generally only work on 32 bit values. So just changing the value
to a 64 bit type will not solve anything.

> 
> More than 64 distinct priorities would require something much more radical.
> 

What's needed is to add a two-level bitmap. This is something I
started working on some time ago, but other commitments meant that it
was sidelined. Also, this is a fundamental change to the eCos
scheduler. It's something I would only be happy checking in to an
experimental branch for prolonged testing. Putting it straight into
the CVS repository is a big risk.

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


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


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