> I'm heavily on the side of deterministic bounds here (these things trip
> the NMI oopser, so if the bounds aren't deterministic, neither is
> stability), so I favor manfred's proc_pid_readdir() algorithm.
no, the code in question here is worst-case O(nr_tasks). It is worst-case
quadratic only if the number of syscalls done during a full 'ps' readdir()
sequence is considered as well. This thing will never trigger the NMI
oopser. And in the common-case it has constant overhead.
Ingo
-
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/