[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1268075392.2830.57.camel@sbs-t61.sc.intel.com>
Date: Mon, 08 Mar 2010 11:09:51 -0800
From: Suresh Siddha <suresh.b.siddha@...el.com>
To: Mike Galbraith <efault@....de>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...e.hu>,
Arjan van de Ven <arjan@...ux.jf.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Vaidyanathan Srinivasan <svaidy@...ux.vnet.ibm.com>,
Yanmin Zhang <yanmin_zhang@...ux.jf.intel.com>,
Gautham R Shenoy <ego@...ibm.com>
Subject: Re: [patch 1/2] sched: check for prev_cpu == this_cpu in
wake_affine()
hi Mike,
On Fri, 2010-03-05 at 11:36 -0800, Mike Galbraith wrote:
> Yeah, but with the 1 task + non-sync wakeup scenario, we miss the boat
> because select_idle_sibling() uses wake_affine() success as it's
> enabler.
But the wake_affine() decision is broken when this_cpu == prev_cpu. All
we need to do is to fix that, to recover that ~9% improvement.
> I have a slightly different patch for that in my tree. There's no need
> to even call wake_affine() since the result is meaningless.
I don't think your below fix is correct because:
> - if (affine_sd && wake_affine(affine_sd, p, sync))
> - return cpu;
> + if (affine_sd) {
> + if (cpu == prev_cpu)
> + return cpu;
by this time, we have overwritten cpu using the select_idle_sibling()
logic and cpu no longer points to this_cpu.
What we need is a comparison with this_cpu.
thanks,
suresh
--
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