Do not acquire the thread lock in hardclock_cnt() unless needed.
This function only sets thread flags if a SIGPROF or SIGVTALRM timer has fired, which is almost never the case. MFC after: 2 weeks
This commit is contained in:
parent
d2f5f8db87
commit
ef89d843d9
@ -570,9 +570,11 @@ hardclock_cnt(int cnt, int usermode)
|
||||
flags |= TDF_PROFPEND | TDF_ASTPENDING;
|
||||
PROC_ITIMUNLOCK(p);
|
||||
}
|
||||
thread_lock(td);
|
||||
td->td_flags |= flags;
|
||||
thread_unlock(td);
|
||||
if (flags != 0) {
|
||||
thread_lock(td);
|
||||
td->td_flags |= flags;
|
||||
thread_unlock(td);
|
||||
}
|
||||
|
||||
#ifdef HWPMC_HOOKS
|
||||
if (PMC_CPU_HAS_SAMPLES(PCPU_GET(cpuid)))
|
||||
|
Loading…
x
Reference in New Issue
Block a user