linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Adam Litke <agl@us.ibm.com>
To: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: wli@holomorphy.com, lee.schermerhorn@hp.com, linux-mm@kvack.org
Subject: Re: [PATCH 1/3] hugetlb: numafy several functions
Date: Fri, 08 Feb 2008 10:37:24 -0600	[thread overview]
Message-ID: <1202488644.11987.5.camel@localhost.localdomain> (raw)
In-Reply-To: <20080206231558.GI3477@us.ibm.com>

On Wed, 2008-02-06 at 15:15 -0800, Nishanth Aravamudan wrote:
> @@ -141,6 +149,18 @@ static void free_huge_page(struct page *page)
>   * balanced by operating on them in a round-robin fashion.
>   * Returns 1 if an adjustment was made.
>   */
> +static int adjust_pool_surplus_node(int delta, int nid)
> +{
> +	if (delta < 0 && !surplus_huge_pages_node[nid])
> +		return 0;
> +	if (delta > 0 && surplus_huge_pages_node[nid] >=
> +					nr_huge_pages_node[nid])
> +		return 0;
> +	surplus_huge_pages += delta;
> +	surplus_huge_pages_node[nid] += delta;
> +	return 1;
> +}
> +
>  static int adjust_pool_surplus(int delta)
>  {
>  	static int prev_nid;
> @@ -152,19 +172,9 @@ static int adjust_pool_surplus(int delta)
>  		nid = next_node(nid, node_online_map);
>  		if (nid == MAX_NUMNODES)
>  			nid = first_node(node_online_map);
> -
> -		/* To shrink on this node, there must be a surplus page */
> -		if (delta < 0 && !surplus_huge_pages_node[nid])
> -			continue;
> -		/* Surplus cannot exceed the total number of pages */
> -		if (delta > 0 && surplus_huge_pages_node[nid] >=
> -						nr_huge_pages_node[nid])
> -			continue;

Unless I am misreading the diff, it seems the above comments were lost
in translation.  I vote for preserving them :)  Otherwise this looks
pretty good to me.

-- 
Adam Litke - (agl at us.ibm.com)
IBM Linux Technology Center

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2008-02-08 16:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-06 23:15 Nishanth Aravamudan
2008-02-06 23:18 ` [PATCH 2/3] hugetlb: add per-node nr_hugepages sysfs attribute Nishanth Aravamudan
2008-02-06 23:19   ` [PATCH 3/3] hugetlb: interleave dequeing of huge pages Nishanth Aravamudan
2008-02-06 23:23   ` [UPDATED][PATCH 2/3] hugetlb: add per-node nr_hugepages sysfs attribute Nishanth Aravamudan
2008-02-07  0:03   ` [PATCH " Greg KH
2008-02-07  0:59     ` Nishanth Aravamudan
2008-02-07 18:35 ` [PATCH 1/3] hugetlb: numafy several functions Lee Schermerhorn
2008-02-07 18:52   ` Nishanth Aravamudan
2008-02-08 16:47     ` Lee Schermerhorn
2008-02-08 17:08       ` Nishanth Aravamudan
2008-02-08 16:37 ` Adam Litke [this message]
2008-02-08 16:48   ` Nishanth Aravamudan

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=1202488644.11987.5.camel@localhost.localdomain \
    --to=agl@us.ibm.com \
    --cc=lee.schermerhorn@hp.com \
    --cc=linux-mm@kvack.org \
    --cc=nacc@us.ibm.com \
    --cc=wli@holomorphy.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