Messages in this thread | | | Date | Fri, 29 Jan 1999 14:19:14 +0100 (CET) | From | MOLNAR Ingo <> | Subject | Re: [patch] fixed both processes in D state and the /proc/ oopses [Re: [patch] Fixed the race that was oopsing Linux-2.2.0] |
| |
On Fri, 29 Jan 1999, Andrea Arcangeli wrote:
> _Where_ do you want to run atomic_inc_and_test()? On random kernel data
note that in 99% of the cases we need the counter only in the clone(), exec() and exit() path, for these three cases we know implicitly that it's a valid buffer. (because we hold a reference to it) [subsequently we dont need any atomic_inc_and_test thing either for clone+exec+exit] An atomic counter is just about perfect for those uses, even in the 'no kernel lock' case.
I only looked at your last (fairly large) patch, which does not seem to have _any_ effect at all as far as bugfixes are concerned, except the array.c change (which again turned out to have nothing to do with the atomic vs. spinlock thing).
for 'other process' uses (for cases when we want to dereference an mm_struct pointer but do not hold a reference to it, eg. /proc or the VM scanning logic) we will have to do something smart when we remove the kernel lock in 2.3, but it should not increase the cost of the common case (clone() + exit()) if possible.
-- mingo
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |