On Fri, Jan 2, 2009 at 5:43 PM, Henrik Austad <henrik@xxxxxxxxx> wrote:
On Friday 02 January 2009 09:22:30 Shyam Burkule wrote:ah, ok, see below :-)
> Thanks for your replay.
>
> On Fri, Jan 2, 2009 at 2:23 AM, Henrik Austad <henrik@xxxxxxxxx> wrote:
> > On Tuesday 30 December 2008 23:25:39 Shyam Burkule wrote:
> > > Hi All,
> >
> > Hi!
> >
> > > Linux kernel make use list_head to link process descriptor. I am
> > > reading scheduler part of Linux kernel. There is structure *runqueue*
> >
> > that
> >
> > > contains list of all runnable process. The *runqueue* has pointer to
> > > *prio_array_t* structre that have field *queue*(array of struct
> > > prio_array_t) which list process according to priority. The scheduler
> >
> > gets
> >
> > > head_list from this queue.
> >
> > First, which version of the kernel are you working with?
>
> I am working with kernel version 2.6.27.6.
Ah, ok. I get it. Your problem is that UTLK is a bit outdaten on the
> > From what you ask, it
> > sounds like you are working with the O(1) scheduler setup.
> >
> > as Peter said, there's a individual instance of the runqueue,
> > (kernel/sched.c
> > struct rq). In this rq, you will find a cfs_rq struct (the runqueue for
> > normal tasks) as well as a rt_rq struct. In these runqueues are the tasks
> > runnable on a given CPU.
> >
> > The only place you will find prio_array, will be in the rt_rq runqueue,
> > which
> > has been renamed to rt_prio_array (as normal tasks do not use prio-array
> > but
> > red-black trees nowadays).
>
> But in UTLK I read that prio_array_t is used for both real-time and normal
> processes.
scheduling part. UTLK covers 2.6.10 (as stated in the preface I think), and
CFS was introduced (together with a lot of other new features) in the
scheduler in 2.6.23.
I have made an attempt to explain the difference, and how CFS works in my
specialization project (http://folk.ntnu.no/henrikau/sched/rt_sched_pro.pdf
section 2.3)
Hopefully this can clearify a few things.
The rest of the container_of was answered brilliantly by Alexander, so I'll
snip that part off.
--
-> henrik