From: David Rientjes <rientjes@google.com>
To: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: linux-mm@kvack.org, linux-numa@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Mel Gorman <mel@csn.ul.ie>,
Randy Dunlap <randy.dunlap@oracle.com>,
Nishanth Aravamudan <nacc@us.ibm.com>,
Adam Litke <agl@us.ibm.com>, Andy Whitcroft <apw@canonical.com>,
eric.whitney@hp.com, Christoph Lameter <cl@linux-foundation.org>
Subject: Re: [PATCH 4/10] hugetlb: derive huge pages nodes allowed from task mempolicy
Date: Fri, 2 Oct 2009 15:16:12 -0700 (PDT) [thread overview]
Message-ID: <alpine.DEB.1.00.0910021513090.18180@chino.kir.corp.google.com> (raw)
In-Reply-To: <20091001165832.32248.32725.sendpatchset@localhost.localdomain>
On Thu, 1 Oct 2009, Lee Schermerhorn wrote:
> Index: linux-2.6.31-mmotm-090925-1435/mm/hugetlb.c
> ===================================================================
> --- linux-2.6.31-mmotm-090925-1435.orig/mm/hugetlb.c 2009-09-30 12:48:45.000000000 -0400
> +++ linux-2.6.31-mmotm-090925-1435/mm/hugetlb.c 2009-10-01 12:13:25.000000000 -0400
> @@ -1334,29 +1334,71 @@ static struct hstate *kobj_to_hstate(str
> return NULL;
> }
>
> -static ssize_t nr_hugepages_show(struct kobject *kobj,
> +static ssize_t nr_hugepages_show_common(struct kobject *kobj,
> struct kobj_attribute *attr, char *buf)
> {
> struct hstate *h = kobj_to_hstate(kobj);
> return sprintf(buf, "%lu\n", h->nr_huge_pages);
> }
> -static ssize_t nr_hugepages_store(struct kobject *kobj,
> - struct kobj_attribute *attr, const char *buf, size_t count)
> +static ssize_t nr_hugepages_store_common(bool obey_mempolicy,
> + struct kobject *kobj, struct kobj_attribute *attr,
> + const char *buf, size_t len)
> {
> int err;
> - unsigned long input;
> + unsigned long count;
> struct hstate *h = kobj_to_hstate(kobj);
> + NODEMASK_ALLOC(nodemask, nodes_allowed);
>
[ FYI: I'm not sure clameter@sgi.com still works, you may want to try
cl@linux-foundation.org. ]
mm/hugetlb.c: In function 'nr_hugepages_store_common':
mm/hugetlb.c:1368: error: storage size of '_m' isn't known
mm/hugetlb.c:1380: warning: passing argument 1 of 'init_nodemask_of_mempolicy' from incompatible pointer type
mm/hugetlb.c:1382: warning: assignment from incompatible pointer type
mm/hugetlb.c:1390: warning: passing argument 1 of 'init_nodemask_of_node' from incompatible pointer type
mm/hugetlb.c:1392: warning: passing argument 3 of 'set_max_huge_pages' from incompatible pointer type
mm/hugetlb.c:1394: warning: comparison of distinct pointer types lacks a cast
mm/hugetlb.c:1368: warning: unused variable '_m'
mm/hugetlb.c: In function 'hugetlb_sysctl_handler_common':
mm/hugetlb.c:1862: error: storage size of '_m' isn't known
mm/hugetlb.c:1864: warning: passing argument 1 of 'init_nodemask_of_mempolicy' from incompatible pointer type
mm/hugetlb.c:1866: warning: assignment from incompatible pointer type
mm/hugetlb.c:1868: warning: passing argument 3 of 'set_max_huge_pages' from incompatible pointer type
mm/hugetlb.c:1870: warning: comparison of distinct pointer types lacks a cast
mm/hugetlb.c:1862: warning: unused variable '_m'
This can be fixed after my "nodemask: make NODEMASK_ALLOC more general"
patch is merged and the following is applied as I suggested in
http://marc.info/?l=linux-mm&m=125270872312494:
Signed-off-by: David Rientjes <rientjes@google.com>
---
mm/hugetlb.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -1365,7 +1365,7 @@ static ssize_t nr_hugepages_store_common(bool obey_mempolicy,
int nid;
unsigned long count;
struct hstate *h;
- NODEMASK_ALLOC(nodemask, nodes_allowed);
+ NODEMASK_ALLOC(nodemask_t, nodes_allowed);
err = strict_strtoul(buf, 10, &count);
if (err)
@@ -1859,7 +1859,7 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
proc_doulongvec_minmax(table, write, buffer, length, ppos);
if (write) {
- NODEMASK_ALLOC(nodemask, nodes_allowed);
+ NODEMASK_ALLOC(nodemask_t, nodes_allowed);
if (!(obey_mempolicy &&
init_nodemask_of_mempolicy(nodes_allowed))) {
NODEMASK_FREE(nodes_allowed);
--
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>
next prev parent reply other threads:[~2009-10-02 22:19 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-01 16:57 [PATCH 0/10] hugetlb: V8 numa control of persistent huge pages alloc/free Lee Schermerhorn
2009-10-01 16:57 ` [PATCH 1/10] hugetlb: rework hstate_next_node_* functions Lee Schermerhorn
2009-10-01 16:57 ` [PATCH 2/10] hugetlb: add nodemask arg to huge page alloc, free and surplus adjust fcns Lee Schermerhorn
2009-10-01 16:58 ` [PATCH 3/10] hugetlb: factor init_nodemask_of_node Lee Schermerhorn
2009-10-02 9:48 ` Mel Gorman
2009-10-02 11:38 ` Lee Schermerhorn
2009-10-03 17:25 ` Andrew Morton
2009-10-01 16:58 ` [PATCH 4/10] hugetlb: derive huge pages nodes allowed from task mempolicy Lee Schermerhorn
2009-10-02 10:11 ` Mel Gorman
2009-10-02 22:41 ` David Rientjes
2009-10-02 22:16 ` [patch] nodemask: make NODEMASK_ALLOC more general David Rientjes
2009-10-02 22:48 ` Christoph Lameter
2009-10-03 1:03 ` KAMEZAWA Hiroyuki
2009-10-06 3:46 ` David Rientjes
2009-10-03 0:59 ` KAMEZAWA Hiroyuki
2009-10-02 22:16 ` David Rientjes [this message]
2009-10-02 23:23 ` [PATCH 4/10] hugetlb: derive huge pages nodes allowed from task mempolicy Christoph Lameter
2009-10-05 11:15 ` Lee Schermerhorn
2009-10-05 20:58 ` David Rientjes
2009-10-06 2:54 ` Lee Schermerhorn
2009-10-06 3:33 ` David Rientjes
2009-10-01 16:58 ` [PATCH 5/10] hugetlb: add generic definition of NUMA_NO_NODE Lee Schermerhorn
2009-10-01 16:58 ` [PATCH 6/10] hugetlb: add per node hstate attributes Lee Schermerhorn
2009-10-01 16:58 ` [PATCH 7/10] hugetlb: update hugetlb documentation for NUMA controls Lee Schermerhorn
2009-10-01 19:47 ` Randy Dunlap
2009-10-02 11:43 ` Lee Schermerhorn
2009-10-01 16:58 ` [PATCH 8/10] hugetlb: use only nodes with memory for huge pages Lee Schermerhorn
2009-10-01 16:59 ` [PATCH 9/10] hugetlb: handle memory hot-plug events Lee Schermerhorn
2009-10-01 16:59 ` [PATCH 10/10] hugetlb: offload per node attribute registrations Lee Schermerhorn
2010-03-31 11:23 ` [APPLIED] [PATCH 0/10] hugetlb: V8 numa control of persistent huge pages alloc/free Andy Whitcroft
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=alpine.DEB.1.00.0910021513090.18180@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=agl@us.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=cl@linux-foundation.org \
--cc=eric.whitney@hp.com \
--cc=lee.schermerhorn@hp.com \
--cc=linux-mm@kvack.org \
--cc=linux-numa@vger.kernel.org \
--cc=mel@csn.ul.ie \
--cc=nacc@us.ibm.com \
--cc=randy.dunlap@oracle.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