Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Feb 2005 13:57:23 -0500 (EST)
From:      Daniel Eischen <deischen@freebsd.org>
To:        Kazuaki Oda <kaakun@highway.ne.jp>
Cc:        threads@freebsd.org
Subject:   Re: thread accounting in libpthread
Message-ID:  <Pine.GSO.4.43.0502181355340.16670-100000@sea.ntplx.net>
In-Reply-To: <42161DFE.70701@highway.ne.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 19 Feb 2005, Kazuaki Oda wrote:
>
> And while looking at thr_kern.c, I've had one more question.
> In kse_switchout_thread, after calling thr_accounting thread is placed
> at the tail of run queue or at the head of it according to
> thread->slice_usec.
> But in kse_check_completed, thread is just placed at the tail of run queue.
> Is there any reason why thread is not placed at the head of run queue in
> case of thread->slice_usec != -1?

Because it already blocked and we don't want to needlessly
switch out a currently running thread that hasn't used its
quantum.

-- 
DE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.43.0502181355340.16670-100000>