Subject: Re: Further works on yamt-idlelwp
To: None <tech-kern@netbsd.org>
From: Mindaugas R. <rmind@NetBSD.org>
List: tech-kern
Date: 03/15/2007 01:15:47
yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote:
> you actually splitted enqueueing action by the purpose, didn't you?
No, I would not call it so, because from dispatcher you see and use only one
and the same sched_enqueue().
> i do not understand the point to make it a part of sched_switch.
> implicit enqueue is confusing and should be avoided if possible, IMO.
Ok, understood. I fully agree, but in this case one could:
a) Split enqueueing into the two purposes as you suggest, which means
additional knowledge of purpose for dispatcher (what is unwanted) and
enlargement of API.
b) Define that sched_switch() must do enqueue i.e. give this anxiety to
scheduler.
Keeping in mind, that sched_switch() is called only from mi_switch(), and
probably will be called _only_ from there, I don't think that B variant could
confuse somebody, especially when there is a comment in that single place.
What do you think?
--
Best regards,
Mindaugas
www.NetBSD.org