Date: Fri, 5 Jun 2015 08:26:39 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r284020 - stable/10/sys/kern Message-ID: <201506050826.t558QdBQ057724@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Jun 5 08:26:38 2015 New Revision: 284020 URL: https://svnweb.freebsd.org/changeset/base/284020 Log: MFC r283745: Do not raise priority of the idle thread on singal delivery. Modified: stable/10/sys/kern/kern_sig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Fri Jun 5 08:23:33 2015 (r284019) +++ stable/10/sys/kern/kern_sig.c Fri Jun 5 08:26:38 2015 (r284020) @@ -2371,9 +2371,12 @@ tdsigwakeup(struct thread *td, int sig, thread_lock(td); /* * Bring the priority of a thread up if we want it to get - * killed in this lifetime. + * killed in this lifetime. Be careful to avoid bumping the + * priority of the idle thread, since we still allow to signal + * kernel processes. */ - if (action == SIG_DFL && (prop & SA_KILL) && td->td_priority > PUSER) + if (action == SIG_DFL && (prop & SA_KILL) != 0 && + td->td_priority > PUSER && !TD_IS_IDLETHREAD(td)) sched_prio(td, PUSER); if (TD_ON_SLEEPQ(td)) { /* @@ -2411,7 +2414,7 @@ tdsigwakeup(struct thread *td, int sig, /* * Give low priority threads a better chance to run. */ - if (td->td_priority > PUSER) + if (td->td_priority > PUSER && !TD_IS_IDLETHREAD(td)) sched_prio(td, PUSER); wakeup_swapper = sleepq_abort(td, intrval);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506050826.t558QdBQ057724>