Messages in this thread | | | From | Rusty Russell <> | Subject | Re: [PATCH] Process pinning | Date | Wed, 11 Apr 2001 21:05:47 +1000 |
| |
In message <20010409170823.C2316@engr.sgi.com> you write: > Changes to array.c expose cpus_allowed in proc/pid/stat.
Call me old fashioned, but I prefer my bitmasks in hex.
Please also consider changing:
still_running: c = goodness(prev, this_cpu, prev->active_mm); next = prev;
to:
still_running: if (prev & (1 << this_cpu)) { c = goodness(prev, this_cpu, prev->active_mm); next = prev; }
Otherwise, you will keep scheduling a RT process forever on a disallowed CPU on which it is already running. And even a non-RT process will stick on its disallowed CPU as long as nothing else runs there.
Learnt this the hard way from the hotplug CPU patch... Rusty. -- Premature optmztion is rt of all evl. --DK - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |