On Wed, 2006-06-28 at 17:34 -0400, Elad Lahav wrote: > Hi all, > Hi, > I am trying to profile a system serving as a VPN gateway (user and > kernel, using OProfile). For some reason, it seems that 40% of the time an UP system ? > is spent in get_offset_pmtmr(). I couldn't find any information on this > function, but since the PM timer is a part of ACPI, I tried disabling > that subsystem on the server (with acpi=off). Now I see that the system > is spending 34% of its time in apm_get_info(). > Can someone please enlighten me: > 1. What does the PM timer do? Does it substitute HPET, or am I confusing > two unrelated issues? you're really close; pmtimer basically is a predecessor of hpet, but it's a lot more expensive to read, so should be avoided if at all possible Btw you can just pick a different timer; in fact I remember vaguely that pm timer even is a kernel config option... but you can put clock=tsc on the kernel commandline and it should use the tsc instead (which is inside the cpu and thus cheap). tsc is not a good option on complex SMP systems though; but as long as you're single (physical) processor you're fine > 2. Can the system actually be spending 40% of its time updating this timer? reading the timer most likely. Something is doing gettimeofday() a LOT. That can be userspace, but some of the kernel tcp/ip stack needs this as well, especially when something like tcpdump is running (because then it needs to timestamp each packet in that case). Greetings, Arjan van de Ven -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/