Messages in this thread |  | | Date | Mon, 11 Sep 2000 17:10:43 +0200 (CEST) | From | Andrea Arcangeli <> | Subject | Re: (reiserfs) Re: More on 2.2.18pre2aa2 |
| |
On Mon, 11 Sep 2000, Andi Kleen wrote:
>Given, but adding the unlock_kernel() does not really need much effort, >it is a very cheap (programmer time wise) optimization.
Well, since there seems to be interest in this (and it's indeed very cheap programmer time wise :) I will try to add such SMP optimization for the next 2.2.xaa release.
BTW, unlock_kernel() isn't enough. I think the right implementation is:
int old_lock_depth = current->lock_depth; if (old_lock_depth >= 0) { current->lock_depth = -1; spin_unlock(&kernel_flag); }
/* copy user */
if (old_lock_depth >= 0) { if (current->lock_depth != -1) BUG(); current->lock_depth = old_lock_depth; spin_lock(&kernel_flag); }
Andrea
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |