lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Sat, 24 Nov 2007 18:56:13 +0530
From:	Nikanth Karthikesan <knikanth@...e.de>
To:	Dmitry Adamushko <dmitry.adamushko@...il.com>
Cc:	a.p.zijlstra@...llo.nl, linux-kernel@...r.kernel.org,
	vatsa@...ux.vnet.ibm.com, mingo@...e.hu
Subject: Re: [PATCH] sched: minor optimization

> On Fri, Nov 23, 2007 at  5:48 PM, "Dmitry Adamushko"
<dmitry.adamushko@...il.com> wrote:
> The only legitimate possibility of having the fair_sched_class
> returning no task in this case is when 'rq->nr_running ==
> rq->cfs.nr_running == 0'.

Yes, I think so.

> iow, a possible optimization would be just the following check :
>
> if (rq->nr_running == 0)
>         return idle_sched_class.pick_next_task(rq);
> at the beginning of pick_next_task().
>
> (or maybe put it at the beginning of the
> if (likely(rq->nr_running == rq->cfs.nr_running)) {} block as we
> already have 'likely()' there).
>

But that might add a test before the case we want to optimize the most.
I just thought of taking advantage of a case where we know
rq->nr_running==0, instead of throwing away that information.

Thanks
Nikanth
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ