Skip to contentSkip to conversation

NUMA system and get_a_numa_node()

LTP Han Pingtian 3 participants 7 messages Nov 14, 2014 – Nov 28, 2014

lore
Share & tools
lore
#0 lore raw

Hey there,

We have a system which only has one NUMA node. When trying to run ksm02 on it, becase the code calling get_allowed_nodes() with a count 2 as below:

972 /* Warning: *DO NOT* use this function in child */ 973 unsigned int get_a_numa_node(void (*cleanup_fn) (void)) 974 {
975 unsigned int nd1, nd2;
976 int ret;
977

 978         ret = get_allowed_nodes(0, 2, &nd1, &nd2);
 979         switch (ret) { 
 980         case 0:

981 break;
982 case -3:
983 tst_brkm(TCONF, cleanup_fn, "requires a NUMA system.");

it always failed with "requires a NUMA system.".

I think a NUMA system may have only one node, right? If so, could we change the count to 1?

Thanks in advance!

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#1 lore raw

Hi!

Quoted 13 lines

We have a system which only has one NUMA node. When trying to run ksm02 on it, becase the code calling get_allowed_nodes() with a count 2 as below:

972 /* Warning: *DO NOT* use this function in child */ 973 unsigned int get_a_numa_node(void (*cleanup_fn) (void)) 974 {
975 unsigned int nd1, nd2;
976 int ret;
977

 978         ret = get_allowed_nodes(0, 2, &nd1, &nd2);
 979         switch (ret) { 
 980         case 0:
Quoted 8 lines

981 break;
982 case -3:
983 tst_brkm(TCONF, cleanup_fn, "requires a NUMA system.");

it always failed with "requires a NUMA system.".

I think a NUMA system may have only one node, right? If so, could we change the count to 1?

Hmm, are you sure that the testcases are actually applicable to a system with only one node?

Because what the testcases do in the setup is to write 1 to /sys/kernel/mm/ksm/merge_across_nodes so I would expect that the test needs at least two nodes...

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#2 lore raw
Quoted 23 lines · Cyril Hrubis

Hi!

Quoted 13 lines

We have a system which only has one NUMA node. When trying to run ksm02 on it, becase the code calling get_allowed_nodes() with a count 2 as below:

972 /* Warning: *DO NOT* use this function in child */ 973 unsigned int get_a_numa_node(void (*cleanup_fn) (void)) 974 {
975 unsigned int nd1, nd2;
976 int ret;
977

 978         ret = get_allowed_nodes(0, 2, &nd1, &nd2);
 979         switch (ret) { 
 980         case 0:
Quoted 8 lines

981 break;
982 case -3:
983 tst_brkm(TCONF, cleanup_fn, "requires a NUMA system.");

it always failed with "requires a NUMA system.".

I think a NUMA system may have only one node, right? If so, could we change the count to 1?

Quoted 7 lines

Hmm, are you sure that the testcases are actually applicable to a system with only one node?

Because what the testcases do in the setup is to write 1 to /sys/kernel/mm/ksm/merge_across_nodes so I would expect that the test needs at least two nodes...

I think if there is only one NUMA node, then this is a special case for this testcase, it'll test if set "merge_across_nodes" to 1, any problem will be triggered.

I have tried to change the node count to 1 in get_allowed_nodes() and recompiled ksm02. It works successfully.

Thanks.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#3 lore raw
Quoted 31 lines · Han Pingtian
Quoted 23 lines · Cyril Hrubis

Hi!

Quoted 13 lines

We have a system which only has one NUMA node. When trying to run ksm02 on it, becase the code calling get_allowed_nodes() with a count 2 as below:

972 /* Warning: *DO NOT* use this function in child */ 973 unsigned int get_a_numa_node(void (*cleanup_fn) (void)) 974 {
975 unsigned int nd1, nd2;
976 int ret;
977

 978         ret = get_allowed_nodes(0, 2, &nd1, &nd2);
 979         switch (ret) { 
 980         case 0:
Quoted 8 lines

981 break;
982 case -3:
983 tst_brkm(TCONF, cleanup_fn, "requires a NUMA system.");

it always failed with "requires a NUMA system.".

I think a NUMA system may have only one node, right? If so, could we change the count to 1?

Quoted 7 lines

Hmm, are you sure that the testcases are actually applicable to a system with only one node?

Because what the testcases do in the setup is to write 1 to /sys/kernel/mm/ksm/merge_across_nodes so I would expect that the test needs at least two nodes...

Quoted 7 lines

I think if there is only one NUMA node, then this is a special case for this testcase, it'll test if set "merge_across_nodes" to 1, any problem will be triggered.

I have tried to change the node count to 1 in get_allowed_nodes() and recompiled ksm02. It works successfully.

Do you think ONLY ONE NODE can be called NUMA?

http://en.wikipedia.org/wiki/Non-uniform_memory_access

Thanks,
Wanlong Gao

Quoted 14 lines

Thanks.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#4 lore raw
Quoted 36 lines · Wanlong Gao
Quoted 35 lines · Han Pingtian
Quoted 23 lines · Cyril Hrubis

Hi!

Quoted 13 lines

We have a system which only has one NUMA node. When trying to run ksm02 on it, becase the code calling get_allowed_nodes() with a count 2 as below:

972 /* Warning: *DO NOT* use this function in child */ 973 unsigned int get_a_numa_node(void (*cleanup_fn) (void)) 974 {
975 unsigned int nd1, nd2;
976 int ret;
977

 978         ret = get_allowed_nodes(0, 2, &nd1, &nd2);
 979         switch (ret) { 
 980         case 0:
Quoted 8 lines

981 break;
982 case -3:
983 tst_brkm(TCONF, cleanup_fn, "requires a NUMA system.");

it always failed with "requires a NUMA system.".

I think a NUMA system may have only one node, right? If so, could we change the count to 1?

Quoted 7 lines

Hmm, are you sure that the testcases are actually applicable to a system with only one node?

Because what the testcases do in the setup is to write 1 to /sys/kernel/mm/ksm/merge_across_nodes so I would expect that the test needs at least two nodes...

I think if there is only one NUMA node, then this is a special case for this testcase, it'll test if set "merge_across_nodes" to 1, any problem will be triggered.

Quoted 9 lines
Quoted 3 lines

I have tried to change the node count to 1 in get_allowed_nodes() and recompiled ksm02. It works successfully.

Do you think ONLY ONE NODE can be called NUMA?

http://en.wikipedia.org/wiki/Non-uniform_memory_access

I think it's not a problem to run the testcase on a non-NUMA system, if we take it as a special case?

Thanks.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#5 lore raw
Quoted 42 lines · Han Pingtian
Quoted 41 lines · Wanlong Gao
Quoted 38 lines · Han Pingtian
Quoted 23 lines · Cyril Hrubis

Hi!

Quoted 13 lines

We have a system which only has one NUMA node. When trying to run ksm02 on it, becase the code calling get_allowed_nodes() with a count 2 as below:

972 /* Warning: *DO NOT* use this function in child */ 973 unsigned int get_a_numa_node(void (*cleanup_fn) (void)) 974 {
975 unsigned int nd1, nd2;
976 int ret;
977

 978         ret = get_allowed_nodes(0, 2, &nd1, &nd2);
 979         switch (ret) { 
 980         case 0:
Quoted 8 lines

981 break;
982 case -3:
983 tst_brkm(TCONF, cleanup_fn, "requires a NUMA system.");

it always failed with "requires a NUMA system.".

I think a NUMA system may have only one node, right? If so, could we change the count to 1?

Quoted 7 lines

Hmm, are you sure that the testcases are actually applicable to a system with only one node?

Because what the testcases do in the setup is to write 1 to /sys/kernel/mm/ksm/merge_across_nodes so I would expect that the test needs at least two nodes...

I think if there is only one NUMA node, then this is a special case for this testcase, it'll test if set "merge_across_nodes" to 1, any problem will be triggered.

I have tried to change the node count to 1 in get_allowed_nodes() and recompiled ksm02. It works successfully.

Quoted 7 lines
Quoted 4 lines

Do you think ONLY ONE NODE can be called NUMA?

http://en.wikipedia.org/wiki/Non-uniform_memory_access

I think it's not a problem to run the testcase on a non-NUMA system, if we take it as a special case?

It's meaningless, the "special case" you said is already there, it's ksm01.

Thanks,
Wanlong Gao

Quoted 4 lines

Thanks.

Quoted 11 lines

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#6 lore raw
Quoted 5 lines · Wanlong Gao
Quoted 4 lines · Han Pingtian
Quoted 4 lines

Do you think ONLY ONE NODE can be called NUMA?

Quoted 8 lines
Quoted 5 lines
Quoted 2 lines

http://en.wikipedia.org/wiki/Non-uniform_memory_access

I think it's not a problem to run the testcase on a non-NUMA system, if we take it as a special case?

It's meaningless, the "special case" you said is already there, it's ksm01.

All right. I hope I can figure out what features is ksm02 testing.

But looks like ksm02 tests "set_mempolicy()" and "cpuset", which ksm01 doesn't deal with. Isn't there any meanings to test them on a single node system?

Thanks.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list