Re: cvs commit: src/sys/sys sched.h src/sys/posix4 ksched.c src/sys/kern sched_4bsd.c sched_core.c sched_ule.c

[ Available lists | Index of cvs-src | Month of Jun 2006 | Week of 15 Jun 2006 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Xin LI <delphij@delphij.net>
Date
15 Jun 2006 09:49:05
Subject
Re: cvs commit: src/sys/sys sched.h src/sys/posix4 ksched.c src/sys/kern sched_4bsd.c sched_core.c sched_ule.c
Message-ID
1150364895.2108.13.camel@spirit


[ Hide this part ]
 2006-06-15 10:29 +0100Robert Watson
> On Thu, 15 Jun 2006, Xin LI wrote:
> [...]> A question that might be related: We have sched_sizeof_proc(), etc. in
> > every scheduler, which returns a constant. Is it worthy to convert them to
> > constants that just expand inline during the kernel compile?
>
> It should make no difference -- sched_sizeof_proc() is evaluated exactly once,
> when the process zone is created. After that, the size is cached in the
> process zone and never re-evaluated. The current model allows the size to be
> calculated based on data structures private to sched_foo.c, which has some
> nice implementation hiding advantages :-).

Oh... Yes that's quite reasonable. Thanks for the explanation!

Cheers,
--
Xin LI <delphij delphij net> http://www.delphij.net/


[ Show this part (application/pgp-signature) ]

Elapsed time: 0.128 seconds