From owner-svn-src-head@freebsd.org Fri Apr 1 06:50:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7DC58AE618E; Fri, 1 Apr 2016 06:50:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id F22381CD4; Fri, 1 Apr 2016 06:50:32 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA06193; Fri, 01 Apr 2016 09:50:25 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1alsuX-0001fd-2v; Fri, 01 Apr 2016 09:50:25 +0300 Subject: Re: svn commit: r297481 - head/sys/kern To: Mateusz Guzik , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <20160401061250.GA24248@dft-labs.eu> From: Andriy Gapon Message-ID: <56FE19F8.10905@FreeBSD.org> Date: Fri, 1 Apr 2016 09:49:28 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <20160401061250.GA24248@dft-labs.eu> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2016 06:50:34 -0000 On 01/04/2016 09:12, Mateusz Guzik wrote: > Author: mjg > Date: Wed Apr 1 08:10:00 2016 > New Revision: 280963 > URL: https://svnweb.freebsd.org/changeset/base/297481 > > Log: > Increase responsiveness under load by being more aggressive with > priority changes. > > MFC after: 1 week > > Modified: > head/sys/kern/sched_ule.c > > Modified: head/sys/kern/sched_ule.c > =================================================================== > --- sys/kern/sched_ule.c (revision 297480) > +++ sys/kern/sched_ule.c (working copy) > @@ -1696,15 +1696,10 @@ > } > ts = td->td_sched; > THREAD_LOCK_ASSERT(td, MA_OWNED); > - if (td->td_priority == prio) > - return; > /* > - * If the priority has been elevated due to priority > - * propagation, we may have to move ourselves to a new > - * queue. This could be optimized to not re-add in some > - * cases. > + * DOES THIS WORK LOL It does! Nice one! > */ > - if (TD_ON_RUNQ(td) && prio < td->td_priority) { > + if (TD_ON_RUNQ(td) && prio != td->td_priority) { > sched_rem(td); > td->td_priority = prio; > sched_add(td, SRQ_BORROWING); > -- Andriy Gapon