public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <aarcange@redhat.com>
To: Hillf Danton <dhillf@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] autonuma: fix typo in blind balance
Date: Mon, 19 Mar 2012 18:35:22 +0100	[thread overview]
Message-ID: <20120319173522.GG24602@redhat.com> (raw)
In-Reply-To: <CAJd=RBAYQYCaUFUY1xNOFhjLyvoYWUAKJy5Xgk197Z1VH5Q8Tg@mail.gmail.com>

On Mon, Mar 19, 2012 at 08:59:59PM +0800, Hillf Danton wrote:
> Since it is certain that nid is not online in each round of for-loop,
> it is replaced with given node id.
> 
> Signed-off-by: Hillf Danton <dhillf@gmail.com>
> ---
> 
> --- a/kernel/sched/numa.c	Sat Mar 17 11:01:40 2012
> +++ b/kernel/sched/numa.c	Mon Mar 19 20:04:00 2012
> @@ -34,7 +34,7 @@ static int autonuma_balance_blind(struct
>  		selected_nid = cpu_nid;
> 
>  		nr_mm_max = 0;
> -		for_each_cpu_and(cpu, cpumask_of_node(nid), allowed) {
> +		for_each_cpu_and(cpu, cpumask_of_node(cpu_nid), allowed) {
>  			struct rq *rq = cpu_rq(cpu);
>  			if (rq->curr->mm == mm)
>  				nr_mm_max++;

Correct! gcc should have spwaned an unintialized warning too? I may
have broke it by accident with the editor after I disabled the
function. AUTONUMA_BALANCE_BLIND is not set so this function isn't
getting built right now.

I tried to keep enabled only the minimum, kind of stuff that if you
remove it, something will degrade significantly. 

With the algorithms I developed before the current
sched_autonuma_balance, having autonuma_balance_blind made huge
difference, not anymore once I had something way better as a core
balancer, so then I considered autonuma_balance_blind more like an
hack and I disabled it.

I'm impressed how fast you found these two bugs, appreciated!

If you've high level opinions on the design, comments welcome.

Thanks,
Andrea

      reply	other threads:[~2012-03-19 17:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19 12:59 [PATCH 2/2] autonuma: fix typo in blind balance Hillf Danton
2012-03-19 17:35 ` Andrea Arcangeli [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120319173522.GG24602@redhat.com \
    --to=aarcange@redhat.com \
    --cc=dhillf@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox