[PATCH rt-tests v4 12/16] rt-numa: Use CPU_SETSIZE as upper loop limit

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

 



The cpeset might not be dense, so user the CPU_SETSIZE as upper limit.

Signed-off-by: Daniel Wagner <dwagner@xxxxxxx>
---
 src/lib/rt-numa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/rt-numa.c b/src/lib/rt-numa.c
index 3a8441d5151c..45d4f1193d5f 100644
--- a/src/lib/rt-numa.c
+++ b/src/lib/rt-numa.c
@@ -60,7 +60,7 @@ static int cpu_for_thread_ua(int thread_num, int max_cpus)
 	num_cpus = CPU_COUNT(&cpuset);
 	m = thread_num % num_cpus;
 
-	for (i = 0, cpu = 0; i < max_cpus; i++) {
+	for (i = 0, cpu = 0; i < CPU_SETSIZE; i++) {
 		if (CPU_ISSET(i, &cpuset)) {
 			if (cpu == m)
 				return i;
-- 
2.30.0




[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux