lkml.org 
[lkml]   [1999]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] releasing kernel lock during copy_from/to_user
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 should 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)

Are you aware of other functions which could release the lock for long
operations?

I'll extract the patch from andrea5, but I'll release the lock
only in the codepath's where I have seen > 512 bytes.

A compile-time check is faster than the shortest runtime check:>

I'll post benchmarks later.
--
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    [W:0.044 / U:1.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site