mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Set P_NOLOAD on the pagezero kthread so that it doesn't artificially skew
the loadav. This is not real load. If you have a nice process running in the background, pagezero may sit in the run queue for ages and add one to the loadav, and thereby affecting other scheduling decisions.
This commit is contained in:
parent
4aca0b1510
commit
16e12eab5a
1 changed files with 7 additions and 1 deletions
|
|
@ -107,17 +107,23 @@ vm_page_zero_idle_wakeup(void)
|
|||
static void
|
||||
vm_pagezero(void)
|
||||
{
|
||||
struct thread *td = curthread;
|
||||
struct thread *td;
|
||||
struct proc *p;
|
||||
struct rtprio rtp;
|
||||
int pages = 0;
|
||||
int pri;
|
||||
|
||||
td = curthread;
|
||||
p = td->td_proc;
|
||||
rtp.prio = RTP_PRIO_MAX;
|
||||
rtp.type = RTP_PRIO_IDLE;
|
||||
mtx_lock_spin(&sched_lock);
|
||||
rtp_to_pri(&rtp, td->td_ksegrp);
|
||||
pri = td->td_priority;
|
||||
mtx_unlock_spin(&sched_lock);
|
||||
PROC_LOCK(p);
|
||||
p->p_flag |= P_NOLOAD;
|
||||
PROC_UNLOCK(p);
|
||||
|
||||
for (;;) {
|
||||
if (vm_page_zero_check()) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue