Re: move_pages fails on 2 node system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 17, 2014 at 4:08 AM, David Rientjes <rientjes@xxxxxxxxxx> wrote:
> On Tue, 16 Sep 2014, Filipe Brandenburger wrote:
>
>> On Tue, Sep 16, 2014 at 1:22 PM, David Rientjes <rientjes@xxxxxxxxxx> wrote:
>> > If this patch fixes it, then why is numa_max_node() returning 1 on a 2
>> > node system?
>>
>> Because the node ids are 0 and 1 :-)
>>
>> Patch makes sense to me. In particular, both test/migrate_pages.c and
>> test/mbind_mig_pages.c have "nr_nodes = numa_max_node()+1;" in them.
>>
>
> Patch makes no sense to me if there's no node 0.
yes, one more bug(likely), if no nodes, this function should return
-1, but it returns 0.
for no nodes case, if function returns -1, then +1 makes sense for all cases.
--- libnuma.c.orig      2014-09-17 08:58:21.119671188 +0530
+++ libnuma.c   2014-09-17 08:59:14.731333190 +0530
@@ -330,7 +330,7 @@

        d = opendir("/sys/devices/system/node");
        if (!d) {
-               maxconfigurednode = 0;
+               maxconfigurednode = -1;
        } else {
                while ((de = readdir(d)) != NULL) {
                        int nd;



thanks
Ganapat
--
To unsubscribe from this list: send the line "unsubscribe linux-numa" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [Devices]

  Powered by Linux