2013-03-19 15:05:51

by Peter Zijlstra

[permalink] [raw]
Subject: Re: [PATCH 7/8] sched: prevent to re-select dst-cpu in load_balance()

On Thu, 2013-02-14 at 14:48 +0900, Joonsoo Kim wrote:
> Commit 88b8dac0 makes load_balance() consider other cpus in its group.
> But, in that, there is no code for preventing to re-select dst-cpu.
> So, same dst-cpu can be selected over and over.
>
> This patch add functionality to load_balance() in order to exclude
> cpu which is selected once.

Oh man.. seriously? Did you see this happen? Also, can't we simply
remove it from lb->cpus?


2013-03-20 07:43:09

by Joonsoo Kim

[permalink] [raw]
Subject: Re: [PATCH 7/8] sched: prevent to re-select dst-cpu in load_balance()

On Tue, Mar 19, 2013 at 04:05:46PM +0100, Peter Zijlstra wrote:
> On Thu, 2013-02-14 at 14:48 +0900, Joonsoo Kim wrote:
> > Commit 88b8dac0 makes load_balance() consider other cpus in its group.
> > But, in that, there is no code for preventing to re-select dst-cpu.
> > So, same dst-cpu can be selected over and over.
> >
> > This patch add functionality to load_balance() in order to exclude
> > cpu which is selected once.
>
> Oh man.. seriously? Did you see this happen? Also, can't we simply
> remove it from lb->cpus?

I didn't see it, I do just logical thinking. :)
lb->cpus is for source cpus and dst-cpu is for dest cpus. So, it doesn't
works to remove it from lb->cpus.

Thanks.

>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2013-03-20 12:38:30

by Peter Zijlstra

[permalink] [raw]
Subject: Re: [PATCH 7/8] sched: prevent to re-select dst-cpu in load_balance()

On Wed, 2013-03-20 at 16:43 +0900, Joonsoo Kim wrote:
> On Tue, Mar 19, 2013 at 04:05:46PM +0100, Peter Zijlstra wrote:
> > On Thu, 2013-02-14 at 14:48 +0900, Joonsoo Kim wrote:
> > > Commit 88b8dac0 makes load_balance() consider other cpus in its group.
> > > But, in that, there is no code for preventing to re-select dst-cpu.
> > > So, same dst-cpu can be selected over and over.
> > >
> > > This patch add functionality to load_balance() in order to exclude
> > > cpu which is selected once.
> >
> > Oh man.. seriously? Did you see this happen? Also, can't we simply
> > remove it from lb->cpus?
>
> I didn't see it, I do just logical thinking. :)
> lb->cpus is for source cpus and dst-cpu is for dest cpus. So, it doesn't
> works to remove it from lb->cpus.

How about we interpret ->cpus as the total mask to balance; so both
source and destination. That way clearing a cpu means we won't take nor
put tasks on it.

2013-03-20 13:48:38

by Joonsoo Kim

[permalink] [raw]
Subject: Re: [PATCH 7/8] sched: prevent to re-select dst-cpu in load_balance()

2013/3/20 Peter Zijlstra <[email protected]>:
> On Wed, 2013-03-20 at 16:43 +0900, Joonsoo Kim wrote:
>> On Tue, Mar 19, 2013 at 04:05:46PM +0100, Peter Zijlstra wrote:
>> > On Thu, 2013-02-14 at 14:48 +0900, Joonsoo Kim wrote:
>> > > Commit 88b8dac0 makes load_balance() consider other cpus in its group.
>> > > But, in that, there is no code for preventing to re-select dst-cpu.
>> > > So, same dst-cpu can be selected over and over.
>> > >
>> > > This patch add functionality to load_balance() in order to exclude
>> > > cpu which is selected once.
>> >
>> > Oh man.. seriously? Did you see this happen? Also, can't we simply
>> > remove it from lb->cpus?
>>
>> I didn't see it, I do just logical thinking. :)
>> lb->cpus is for source cpus and dst-cpu is for dest cpus. So, it doesn't
>> works to remove it from lb->cpus.
>
> How about we interpret ->cpus as the total mask to balance; so both
> source and destination. That way clearing a cpu means we won't take nor
> put tasks on it.

In my quick thought, it may be possible.
I will try to do it.

Thanks.

> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/