From: "Albert Cahalan" <acahalan@gmail.com>
To: akpm@osdl.org, alan@lxorguk.ukuu.org.uk, arjan@infradead.org,
hawkes@sgi.com, jdaiker@osdl.org, jes@sgi.com,
linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org,
tony.luck@gmail.com, tony.luck@intel.com
Subject: Re: [PATCH] ia64: change usermode HZ to 250
Date: Thu, 29 Jun 2006 14:09:54 +0000 [thread overview]
Message-ID: <787b0d920606290709k255c6c24k6d3dd502d85bd1ca@mail.gmail.com> (raw)
In-Reply-To: <20060627220139.3168.69409.sendpatchset@tomahawk.engr.sgi.com>
> Fixing param.h to have #define HZ sysconf(_SC_CLK_TCK) sounds
> like a plausible solution, many incorrect uses will be fixed
> automagically by the next rebuild. But some more obscure usages
> of HZ may not compile (which is good, then they can be fixed
> properly) or worse may compile, but not do the right thing.
This makes compiles fail on one of the non-glibc libraries,
either uClibc or dietlibc, which does not provide sysconf.
The order in which procps tries things is:
1. walk off the end of environ to get the ELF notes
2. /proc/uptime to /proc/stat ratio
3. HZ
4. lame guess based on endianness and word size
I do not want sysconf. It is is an unreliable piece of shit
that gives me poor guesses instead of returning appropriate
error codes. It does this swell job while being damn slow.
I can do no worse with my own random guess.
(on my TODO list: count CPUs myself, because glibc often
thinks there are zero -- and this is not an error code)
> The ultimate safe solution might be:
>
> #define HZ Fix your program to use sysconf(_SC_CLK_TCK)! \
> (and BTW, you should not include kernel headers)
>
> Which is highly likely to cause a compile failure (but should
> at least provide a clue to the user on what they should do).
This breaks perfectly fine code, except that it will be yet one more
thing for people to patch out when making headers for userspace.
next prev parent reply other threads:[~2006-06-29 14:09 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-27 22:01 [PATCH] ia64: change usermode HZ to 250 hawkes
2006-06-27 22:26 ` Luck, Tony
2006-06-27 23:09 ` Lee Revell
2006-06-28 8:43 ` Arjan van de Ven
2006-06-28 10:47 ` Alan Cox
2006-06-28 10:34 ` Arjan van de Ven
2006-06-28 14:46 ` Christoph Lameter
2006-06-28 8:39 ` Arjan van de Ven
2006-06-28 15:43 ` John Hawkes
2006-06-28 16:21 ` Alan Cox
2006-06-28 16:11 ` John Daiker
2006-06-28 16:50 ` Alan Cox
2006-06-28 17:36 ` Luck, Tony
2006-06-29 9:37 ` Jes Sorensen
2006-06-29 10:46 ` Alan Cox
2006-06-29 10:48 ` Jes Sorensen
2006-06-29 10:55 ` Arjan van de Ven
2006-06-29 12:56 ` Jes Sorensen
2006-07-08 0:14 ` Jeremy Higdon
2006-07-08 2:51 ` Tony Luck
2006-07-08 6:42 ` Arjan van de Ven
2006-07-08 13:07 ` David Mosberger-Tang
2006-07-10 20:22 ` Jeremy Higdon
2006-07-11 3:01 ` David Mosberger-Tang
2006-07-11 9:53 ` Alan Cox
2006-07-11 18:37 ` Jeremy Higdon
2006-07-12 2:02 ` David Mosberger-Tang
2006-06-29 11:34 ` Alan Cox
2006-06-29 14:09 ` Albert Cahalan [this message]
2006-07-09 19:18 ` Luck, Tony
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=787b0d920606290709k255c6c24k6d3dd502d85bd1ca@mail.gmail.com \
--to=acahalan@gmail.com \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjan@infradead.org \
--cc=hawkes@sgi.com \
--cc=jdaiker@osdl.org \
--cc=jes@sgi.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@gmail.com \
--cc=tony.luck@intel.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