Hi, All This is a patch for SEDF Scheduler slice time fix. At real-time domain, the slice time is relative time (from "s_time_t now"). But current code, slice time is caliculated from 0(absolute time) It needs to be fix the code to compare relative time from "s_time_t now" On each value meanings, You should read the comment on sched-sedf.c (the comment also exists in patch.) Effect: In case of "CPU slice time < waitq time", Time slice is selected to CPU slice time by this patch. Without this patch, CPU slice time is over allocated. (Because CPU slice time is absolute time at this moment(large value), but waitq time is relative time(small value), and MIN() selects smaller value(waitq).) Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com> Thanks, Atsushi SAKAI ------------------------------------------------------------ 富士通(株) プラットフォーム技術開発本部 仮想システム開発統括部 酒井 敦 Email sakaia@jp.fujitsu.com TEL 7124-4167(4月7日より) _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 19 May 2006, at 03:46, Atsushi SAKAI wrote:> Without this patch, CPU slice time is over allocated. > (Because CPU slice time is absolute time at this moment(large value), > but waitq time is relative time(small value), > and MIN() selects smaller value(waitq).)A question then: you change the parameter to MIN() to no longer have ''now'' added to it. Because both values are supposed to be relative not absolute. If that''s the case, should we be subtracting ''now'' from the result of MIN()? We currently do, and your patch does not change that. So it seems a bit odd to me. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Hello, Keir. Thank you for you comments, and Sorry for disturbing you. After your comments, I read the code again I found my mistake. The real code is ret.time = MIN(now + runinf->slice - runinf->cputime, PERIOD_BEGIN(waitinf)) - now; But I mis-reading the code of '')'' position like this. (This is not real code! in sched_sedf.c, I imagined code) ret.time = MIN(runinf->slice - runinf->cputime, PERIOD_BEGIN(waitinf) - now); ^ ^ I must check carefully the code. Atsushi SAKAI> >On 19 May 2006, at 03:46, Atsushi SAKAI wrote: > >> Without this patch, CPU slice time is over allocated. >> (Because CPU slice time is absolute time at this moment(large value), >> but waitq time is relative time(small value), >> and MIN() selects smaller value(waitq).) > >A question then: you change the parameter to MIN() to no longer have >''now'' added to it. Because both values are supposed to be relative not >absolute. If that''s the case, should we be subtracting ''now'' from the >result of MIN()? We currently do, and your patch does not change that. >So it seems a bit odd to me. > > -- Keir > > >Atsushi SAKAI _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel