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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 14 Jan 2013 16:13:51 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Alex Shi <alex.shi@...el.com>
Cc:	Morten Rasmussen <Morten.Rasmussen@....com>,
	"mingo\@redhat.com" <mingo@...hat.com>,
	"peterz\@infradead.org" <peterz@...radead.org>,
	"tglx\@linutronix.de" <tglx@...utronix.de>,
	"akpm\@linux-foundation.org" <akpm@...ux-foundation.org>,
	"arjan\@linux.intel.com" <arjan@...ux.intel.com>,
	"bp\@alien8.de" <bp@...en8.de>, "pjt\@google.com" <pjt@...gle.com>,
	"efault\@gmx.de" <efault@....de>,
	"vincent.guittot\@linaro.org" <vincent.guittot@...aro.org>,
	"gregkh\@linuxfoundation.org" <gregkh@...uxfoundation.org>,
	"preeti\@linux.vnet.ibm.com" <preeti@...ux.vnet.ibm.com>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 17/22] sched: packing small tasks in wake/exec balancing

On Fri, 11 Jan 2013 11:47:03 +0800, Alex Shi wrote:
> On 01/11/2013 01:17 AM, Morten Rasmussen wrote:
>> On Sat, Jan 05, 2013 at 08:37:46AM +0000, Alex Shi wrote:
>>> If the wake/exec task is small enough, utils < 12.5%, it will
>>> has the chance to be packed into a cpu which is busy but still has space to
>>> handle it.
>>>
>>> Signed-off-by: Alex Shi <alex.shi@...el.com>
>>> ---
[snip]
>> I may be missing something, but could the expression be something like
>> the below instead?
>> 
>> Create a putil < 12.5% check before the loop. There is no reason to
>> recheck it every iteration. Then:

Agreed.  Also suggest that the checking local cpu can also be moved
before the loop so that it can be used without going through the loop if
it's vacant enough.

>> 
>> vacancy = FULL_UTIL - (rq->util + putil)
>> 
>> should be enough?
>> 
>>> +
>>> +		/* bias toward local cpu */
>>> +		if (vacancy > 0 && (i == this_cpu))
>>> +			return i;
>>> +
>>> +		if (vacancy > 0 && vacancy < min_vacancy) {
>>> +			min_vacancy = vacancy;
>>> +			idlest = i;
>> 
>> "idlest" may be a bit misleading here as you actually select busiest cpu
>> that have enough spare capacity to take the task.
>
> Um, change to leader_cpu?

vacantest? ;-)

Thanks,
Namhyung
--
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