From: Kurt Garloff <garloff@suse.de>
To: Artur Skawina <skawina@geocities.com>
Cc: linux-kernel@vger.rutgers.edu,
Harald Koerfgen <Harald.Koerfgen@home.ivm.de>
Subject: Re: [RFC] increasing and masquerading HZ
Date: Tue, 20 Jul 1999 10:55:51 +0200 [thread overview]
Message-ID: <19990720105551.C9486@bari.suse.de> (raw)
In-Reply-To: <3793EDBB.6B7D7E12@geocities.com>; from Artur Skawina on Tue, Jul 20, 1999 at 05:32:11AM +0200
[-- Attachment #1: Type: text/plain, Size: 3059 bytes --]
On Tue, Jul 20, 1999 at 05:32:11AM +0200, Artur Skawina wrote:
> The attached patch increases HZ to 800 for kernels compiled for 686
> It tries to hide the HZ change from userspace. The places I found were:
>
> o /proc/stat
> o /proc/<pid>/stat
> o /proc/<pid>/cpu
> o BSD Process Accounting
> o siginfo
> o sys_times
>
> Not handled:
> o the ip routing sysctls [defined in jiffies...:( ]
>
> also note there are drivers that assume HZ==100 (initio scsi for one).
>
>
> The numbers I've got so far doesn't look very good however,
> a 3% drop in performance (HZ=1024) is a bit much.
>
>
> [I did this patch from scratch so that the chance of spotting all
> places requiring updates would be greater. turned up to be a good
> thing - it handles a few more cases than the previously mentioned
> patch by Kurt Garloff]
>
> What did I miss? :)
Hi Artur,
nice work!
Yes, you spotted a few places which I missed.
Without looking into details, I saw a place, where I did HZ conversion where
you did not, but I may be completely wrong with it:
@@ -233,26 +237,26 @@
extern unsigned long total_forks;
unsigned long ticks;
- ticks = jiffies * smp_num_cpus;
+ ticks = jiffies * smp_num_cpus / HZ_TO_STD;
for (i = 0 ; i < NR_IRQS ; i++)
sum += kstat_irqs(i);
More comments on your patch:
> --- /img/linux-2.3.5/include/asm-i386/param.h Tue Aug 1 15:08:17 1995
> +++ linux-2.3.5as/include/asm-i386/param.h Tue Jul 20 02:14:21 1999
> @@ -1,8 +1,18 @@
> #ifndef _ASMi386_PARAM_H
> #define _ASMi386_PARAM_H
>
> +#include <linux/config.h>
> +
> #ifndef HZ
> #define HZ 100
> +#endif
> +
> +#if HZ!=100
> +/*#define HZTOUSER(hz) (((hz)*100)/HZ) would be better, but could overflow*/
> +#define HZTOUSER(hz) ((hz)/(HZ/100))
> +/*#define HZFROMUSER(hz) ((hz)*(HZ/100)) hmm, these will be small values, right?*/
> +#define HZFROMUSER(hz) (((hz)*HZ)/100)
> +#define HZ_MASQUERADING (HZ/100) /* defined if masquerading, HZ/HZ_MASQUERADING==100 */
> #endif
>
> #define EXEC_PAGESIZE 4096
This seems to be the right thing to do, IMO. You should put a comment about
the fact, that only multiples of 100 are allowed, 1024 eg. is not.
(You would get very inaccurate results.)
You may want to merge your patch with one from
Harald Koerfgen <Harald.Koerfgen@home.ivm.de>
on
ftp://ftp.linux.sgi.com/pub/linux/mips/test/hz_patch.gz
He mailed me about necessary changes for his MIPS work. I did not yet find
time to answer him, but maybe you can contact him and get the changes merged.
Basically, independance of userspace from the internal HZ is good. This is
also Linus' opinion, IIRC, and you have got good chances that your patch will
go into the kernel (without the Makefile change, of course) if you submit it
to him. But look at it again in order to not miss anything ...
Regards,
--
Kurt Garloff <garloff@suse.de> SuSE GmbH, Nürnberg, FRG
Linux kernel development; SCSI drivers: tmscsim(DC390), DC395
[-- Attachment #2: Type: application/pgp-signature, Size: 289 bytes --]
next prev parent reply other threads:[~1999-07-20 8:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-07-20 3:32 [RFC] increasing and masquerading HZ Artur Skawina
1999-07-20 8:55 ` Kurt Garloff [this message]
1999-07-20 11:21 ` Artur Skawina
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=19990720105551.C9486@bari.suse.de \
--to=garloff@suse.de \
--cc=Harald.Koerfgen@home.ivm.de \
--cc=linux-kernel@vger.rutgers.edu \
--cc=skawina@geocities.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox