public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: riel@redhat.com
Cc: linux-kernel@vger.kernel.org, mgorman@suse.de,
	jhladky@redhat.com, peterz@infradead.org, mingo@kernel.org,
	dedekind1@gmail.com
Subject: Re: [PATCH 2/2] numa,sched: only consider less busy nodes as numa balancing destination
Date: Thu, 28 May 2015 16:37:41 +0530	[thread overview]
Message-ID: <20150528110741.GA3370@linux.vnet.ibm.com> (raw)
In-Reply-To: <1432753468-7785-3-git-send-email-riel@redhat.com>

* riel@redhat.com <riel@redhat.com> [2015-05-27 15:04:28]:

> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index c47bf0dffb34..f655f2ad155d 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -1398,6 +1398,30 @@ static void task_numa_find_cpu(struct task_numa_env *env,
>  	}
>  }
>  
> +/* Only move tasks to a NUMA node less busy than the current node. */
> +static bool numa_has_capacity(struct task_numa_env *env)
> +{
> +	struct numa_stats *src = &env->src_stats;
> +	struct numa_stats *dst = &env->dst_stats;
> +
> +	if (src->has_free_capacity && !dst->has_free_capacity)
> +		return false;
> +
> +	/*
> +	 * Only consider a task move if the source has a higher destination
> +	 * than the destination, corrected for CPU capacity on each node.

In the above comment, did you mean source has higher load than the
destination?

> +	 *
> +	 *      src->load                dst->load
> +	 * --------------------- vs ---------------------
> +	 * src->compute_capacity    dst->compute_capacity
> +	 */
> +	if (src->load * dst->compute_capacity >
> +	    dst->load * src->compute_capacity)
> +		return true;
> +
> +	return false;
> +}
> +
> 

-- 
Thanks and Regards
Srikar Dronamraju


  parent reply	other threads:[~2015-05-28 11:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27 19:04 [PATCH 0/2] numa,sched: resolve conflict between load balancing and NUMA balancing riel
2015-05-27 19:04 ` [PATCH 1/2] revert 095bebf61a46 ("sched/numa: Do not move past the balance point if unbalanced") riel
2015-06-07 17:47   ` [tip:sched/core] Revert " tip-bot for Rik van Riel
2015-05-27 19:04 ` [PATCH 2/2] numa,sched: only consider less busy nodes as numa balancing destination riel
2015-05-28  8:29   ` Mel Gorman
2015-05-28 11:07   ` Srikar Dronamraju [this message]
2015-05-28 13:33     ` Rik van Riel
2015-05-28 13:37       ` Peter Zijlstra
2015-05-28 13:52         ` [PATCH v2 " Rik van Riel
2015-06-07 17:47           ` [tip:sched/core] sched/numa: Only consider less busy nodes as numa balancing destinations tip-bot for Rik van Riel
2015-05-29  7:44 ` [PATCH 0/2] numa,sched: resolve conflict between load balancing and NUMA balancing Artem Bityutskiy

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=20150528110741.GA3370@linux.vnet.ibm.com \
    --to=srikar@linux.vnet.ibm.com \
    --cc=dedekind1@gmail.com \
    --cc=jhladky@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    /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