OpenSolaris

Printable Version Enter a New Search
Bug ID 6464161
Synopsis Dead KSLICE code should be removed
State 10-Fix Delivered (Fix available in build)
Category:Subcategory kernel:sched
Keywords dispatcher | scheduler
Responsible Engineer Alexander Kolbasov
Reported Against
Duplicate Of
Introduced In
Commit to Fix snv_61
Fixed In snv_61
Release Fixed solaris_nevada(snv_61) , solaris_10u5(s10u5_02) (Bug ID:2151100)
Related Bugs 6327235 , 6466380
Submit Date 25-August-2006
Last Update Date 24-September-2007
Description
The change is made as part of 6327235 CPU caps.
The CPU caps project implementation uses the following piece of code:

void
cap_thread_charge(kthread_t *t, hrtime_t *total_cpu, short *new_ticks)
{
        uint64_t new_usage = mstate_thread_onproc_time(t);

        ASSERT3U(new_usage, >=, old_usage);
        ...

The ASSERT above triggers once in a while. 

Extra debugging info was added (such as saving previous results, including all of per-state
microstate buckets along with scaled and unscaled aggregations).  It wasn't
enough to figure out what is going on.  There are two possibilities -
(a) gethrtime_unscaled can return values going backwards (quick code
inspection shows that it is possible, on x86 at least); or (b) there is
a problem with how microstate accounting is done -- that is, we might be
doing syscall_mstate() transition from LMS_USER to LMS_SYSTEM, when we're
currently in LMS_SLEEP (or any other state, other than LMS_USER/SYSTEM/TRAP)
according to t->t_mstate.  See mstate_thread_onproc_time() in msacct.c
for details.
There is a bunch of dispatcher code compiled with #ifdef KSLICE. This code is not used and should be removed.
Work Around
N/A
Comments
N/A