Re: [PATCH] Custom interleaved allocation
Andi Kleen <[email protected]> Mon, 26 Nov 2012 21:21:06 +0100
| Newsgroups | org.kernel.vger.linux-numa |
|---|---|
| Message-ID | <[email protected]> |
> +{
> + int i;
> + int nr_nodes = numa_num_configured_nodes();
> + int pagesize = numa_pagesize();
> + size_t *node_scores = calloc(nr_nodes, sizeof(*node_scores));
> + if (!node_scores) {
> + perror("malloc");
> + exit(1);
You cannot handle errors like this in the library.
It's not fully clear to me what the interface of your proposed new function
is. Can you send a spec of the new user interface in a manpage like format?
Also it would be good to have some more information on the use case.
My first reaction is that you can create any interleaving scheme you
want anyways using the low level functions.
-Andi