Re: [patch] lockless, scalable get_pid(), for_each_process()

Ingo Molnar (mingo@elte.hu)
Wed, 18 Sep 2002 19:28:09 +0200 (CEST)


On Wed, 18 Sep 2002, Linus Torvalds wrote:

> Where did this NMI oopser argument come from? get_pid() doesn't even
> disable interrupts. And we hold the read lock, and other interrupts
> aren't allowed to take the write lock anyway. [...]

the read lock makes all writers wait (and there are a number of places
that use write_lock_irq(&tasklist_lock)) - which frequently come either
from IRQ-disabled paths, or disable interrupts themselves.

Sure, we could 'fix' this artifact by tweaking the write-lock to re-enable
interrupts while looping, but this still leaves us with complete system
silence potentially for minutes.

(plus this still leaves us with 30 places in the kernel that do stupid
for_each_process() and for_each_thread() loops which really could be loops
over the session list or process group list.)

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/