lkml.org 
[lkml]   [2000]   [Sep]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: (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/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.044 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site