Re: Tracing memory->memory copies in linux...

Robert L Krawitz (rlk@tiac.net)
Fri, 12 Apr 1996 16:45:37 -0400


Date: Fri, 12 Apr 1996 09:32:13 +0300 (EET DST)
From: Linus Torvalds <torvalds@cs.helsinki.fi>

> Does anyone have trace information on what fraction of the time
> linux spends performing memory->memory copies, how big these copies are,
> etc? Or a pointer to what I need to know to get the information myself?

Depending on what you do, the kernel may spend about 20% of the
time in just a loop that clears a page - you can get some
statistics with the kernel profiler code (I'm including my current
silly profiling code as an attachement: enable the code with a
kernel command line of "profile=2" at the LILO prompt for any
reasonably new kernel).

I found that it generally spent about 35% of its time doing a
combination of copying and zeroing blocks, as part of my development
work on the fast Pentium memcpy routine. Getting rid of the inlines
for big copies/memsets helped to show what was going on, as well as
reduce the size of the kernel somewhat.

-- 
Robert Krawitz <rlk@tiac.net>           http://www.tiac.net/users/rlk/

Member of the League for Programming Freedom -- mail lpf@uunet.uu.net Tall Clubs International -- tci-request@aptinc.com or 1-800-521-2512