[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130704144018.GS1875@suse.de>
Date: Thu, 4 Jul 2013 15:40:18 +0100
From: Mel Gorman <mgorman@...e.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
Ingo Molnar <mingo@...nel.org>,
Andrea Arcangeli <aarcange@...hat.com>,
Johannes Weiner <hannes@...xchg.org>,
Linux-MM <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 13/13] sched: Account for the number of preferred tasks
running on a node when selecting a preferred node
On Thu, Jul 04, 2013 at 04:06:13PM +0200, Peter Zijlstra wrote:
> On Thu, Jul 04, 2013 at 02:54:15PM +0100, Mel Gorman wrote:
> > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> > index 9247345..387f28d 100644
> > --- a/kernel/sched/fair.c
> > +++ b/kernel/sched/fair.c
> > @@ -863,9 +863,13 @@ find_idlest_cpu_node(int this_cpu, int nid)
> > load = weighted_cpuload(i);
> >
> > if (load < min_load) {
> > - /* Do not preempt a task running on a preferred node */
> > + /*
> > + * Do not preempt a task running on a preferred node or
> > + * tasks are are pinned to their current CPU
> > + */
> > struct task_struct *p = cpu_rq(i)->curr;
> > - if (p->numa_preferred_nid != nid) {
> > + if (p->numa_preferred_nid != nid &&
> > + cpumask_weight(tsk_cpus_allowed(p)) > 1) {
>
> We have p->nr_cpus_allowed for that.
>
/me slaps self
That's a bit easier to calculate, thanks.
--
Mel Gorman
SUSE Labs
--
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