lkml.org 
[lkml]   [1999]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kernel_lock() profiling results
"Stephen C. Tweedie" wrote:
> ftp://ftp.uk.linux.org/pub/linux/sct/performance
>
> contains a patch Dave Miller and I put together to drop the kernel lock
> during a number of key user mode copies.

1) Andrea noticed that 'unlock_kernel()' only releases the kernel lock
if the lock was obtained once.
He added two new functions: one stores the current lock depth,
releases the lock and sets current->lock_depth =-1.
The other reverses that.

I think we need these functions:
* it's save to call the functions without the kernel_lock held.
* the unlock is effective for recursive calls.

2) Here's a excerpt from an email I wrote a few days ago:
> I've modified uaccess.h, and I have now a list of all functions which
> called copy_to/from_user() for more than 512 bytes (apache, make clean;
> make fs; find /usr/bin)
>
> * read_file_actor()
> * ext2_file_write()
> * block_read()
> * copy_mount_options() << really rare
> * proc_file_read() << rare??
> * pipe_write()
> * pipe_read()
> * 2*vt_ioctl() << could be remote gdb.
> * tcp_do_sendmsg()
> * copy_strings() << only during fork()?
>
> Additionally, the following functions could also release the kernel
> lock:
> * padzero() in binfmt_elf:
> This function clears up to 4096 bytes user memory.
> The average should be 2048.
> * update_vm_mapping():
> the function can wait in wait_on_page(), we should break nothing
> * get_free_page():
> if GFP_WAIT, for memset(,0,PAGE_SIZE)
I didn't use NFS, knfsd, other fs except ext2.

--
Manfred

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:51    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog