All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfreds@colorfullife.com>
To: "Stephen C. Tweedie" <sct@redhat.com>
Cc: linux-kernel@vger.rutgers.edu, linux-mm@kvack.org,
	"David S. Miller" <davem@dm.cobaltmicro.com>
Subject: Re: kernel_lock() profiling results
Date: Wed, 26 May 1999 19:41:11 +0200	[thread overview]
Message-ID: <374C3237.2D89878@colorfullife.com> (raw)
In-Reply-To: 14156.8862.155397.630098@dukat.scot.redhat.com

"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, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

  reply	other threads:[~1999-05-26 17:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-23 14:30 kernel_lock() profiling results Manfred Spraul
1999-05-26 16:34 ` Stephen C. Tweedie
1999-05-26 17:41   ` Manfred Spraul [this message]
1999-05-26 19:22     ` Stephen C. Tweedie
1999-05-29  0:45       ` Andrea Arcangeli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=374C3237.2D89878@colorfullife.com \
    --to=manfreds@colorfullife.com \
    --cc=davem@dm.cobaltmicro.com \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.org \
    --cc=masp0008@stud.uni-sb.de \
    --cc=sct@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.