From: Guus Sliepen <guus@warande3094.warande.uu.nl>
To: linux-kernel@vger.kernel.org
Subject: Re: #define HZ 1024 -- negative effects?
Date: Sat, 28 Apr 2001 10:23:56 +0200 [thread overview]
Message-ID: <20010428102355.A341@sliepen.warande.net> (raw)
In-Reply-To: <fa.gh4u8sv.17i1q6@ifi.uio.no> <004f01c0cdf4$f17f4ce0$0701a8c0@morph>
In-Reply-To: <004f01c0cdf4$f17f4ce0$0701a8c0@morph>; from dmaas@dcine.com on Wed, Apr 25, 2001 at 10:02:26PM -0400
[-- Attachment #1: Type: text/plain, Size: 1777 bytes --]
On Wed, Apr 25, 2001 at 10:02:26PM -0400, Dan Maas wrote:
> > Are there any negative effects of editing include/asm/param.h to change
> > HZ from 100 to 1024? Or any other number? This has been suggested as a
> > way to improve the responsiveness of the GUI on a Linux system.
[...]
> Of course, the appearance of better interactivity could just be a placebo
> effect. Double-blind trials, anyone? =)
I tried HZ=1024 on my i386 kernel, to check two things. One was a timer
routine. The performance of the timer routine depends heavily on the
granularity of the nanosleep() or select() system call. Since those calls
always block at least 1/HZ seconds, the timer precision indeed increased by a
factor 10 when I changed the HZ value from 100 to 1024.
However, another thing I wanted to do was to generate profiling statistics for
freesci. Profiling is done with 1/HZ granularity. Any subroutine in a program
executed in less than 1/HZ cannot be profiled correctly (for example a routine
that executes in 1 nanosecond and one that needs 1/HZ/2 seconds both show up
as taking 1 sample).
Now, you would think that profiling would be a lot better with HZ=1024.
However, the program didn't even run anymore! The reason is that some system
calls are being interupted by SIGPROF every 1/HZ, and return something like
ERESTARTSYS to the libraries. The libraries then try to restart the system
call but a SIGPROF is bound to follow shortly, again interrupting the system
call, and so on...
-------------------------------------------
Met vriendelijke groet / with kind regards,
Guus Sliepen <guus@sliepen.warande.net>
-------------------------------------------
See also: http://tinc.nl.linux.org/
http://www.kernelbench.org/
-------------------------------------------
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next prev parent reply other threads:[~2001-04-28 10:30 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fa.gh4u8sv.17i1q6@ifi.uio.no>
2001-04-26 2:02 ` Dan Maas
2001-04-26 2:30 ` Werner Puschitz
2001-04-26 3:51 ` Mike Galbraith
2001-04-28 8:23 ` Guus Sliepen [this message]
2001-04-26 18:19 Adam J. Richter
2001-04-26 18:31 ` Rik van Riel
2001-04-26 20:24 ` Dan Mann
2001-04-27 10:04 ` Mike Galbraith
2001-04-27 15:06 ` Dan Mann
2001-04-27 19:26 ` Nigel Gamble
2001-04-27 20:28 ` Mike Galbraith
2001-04-27 23:22 ` Nigel Gamble
2001-04-28 4:57 ` Mike Galbraith
2001-04-29 8:46 ` george anzinger
-- strict thread matches above, loose matches on Subject: below --
2001-04-24 23:20 Michael Rothwell
2001-04-25 22:40 ` Nigel Gamble
2001-04-29 21:44 ` Jim Gettys
2001-04-29 21:59 ` Michael Rothwell
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=20010428102355.A341@sliepen.warande.net \
--to=guus@warande3094.warande.uu.nl \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®