linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Manfred Spraul <manfreds@colorfullife.com>
To: linux-kernel@vger.rutgers.edu, linux-mm@kvack.org
Subject: kernel_lock() profiling results
Date: Sun, 23 May 1999 16:30:52 +0200	[thread overview]
Message-ID: <3748111C.3F040C1F@colorfullife.com> (raw)

I've written a small patch that measures the duration how long the
kernel-lock is owned.
The main results:
- compiling:
* nearly 60% of all callers release the lock after less than 1024 CPU
cycles.
* a few callers own the lock very long, e.g. sys_bdflush for more than
10 milliseconds (>0.01 seconds).
- serving web pages with apache:
* only 17% need less than 1024 CPU cycles
* 55% need less than 2048 CPU cycles.

The patch and a list of all functions which owned the lock for more then
1.5 milliseconds is at
http://www.colorfullife.com/manfreds/kernel_lock/


OTHO, 2048 cpu cycles is about as long as __cpu_user() needs for 700
bytes if source,dest are currently not in the cache (I've tested it
with a 16 MB move from user mode). The memmove will be even
slower with faster CPU's (i.e. with a higher cpu clock/bus clock
multiplier)

My question:
Shouldn't we change file_read_actor() [mm/filemap.c, the function which
copies data from the page cache to user mode]:
we could release the kernel lock if we copy more than 1024 bytes.
(we currently do that only if the user mode memory is not paged in.)

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-23 14:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-05-23 14:30 Manfred Spraul [this message]
1999-05-26 16:34 ` Stephen C. Tweedie
1999-05-26 17:41   ` Manfred Spraul
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=3748111C.3F040C1F@colorfullife.com \
    --to=manfreds@colorfullife.com \
    --cc=linux-kernel@vger.rutgers.edu \
    --cc=linux-mm@kvack.org \
    --cc=masp0008@stud.uni-sb.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox