Skip to contentSkip to conversation

linux-2.5 varenet

parisc-linux Richard Hirst 2 participants 2 messages Oct 24, 2002 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 10 lines · Thibaut Varene

CVSROOT: /var/cvs
Module name: linux-2.5
Changes by: varenet 02/10/23 10:46:11

Modified files:
include/asm-parisc: param.h

Log message:
Switched to HZ == 1000 for CONFIG_PA20.
Patch submitted by Laurent Canet.

Don't know if this was simply a #define change, but if so... Robert Love has been arguing lately that you can't just do that as various userspace stuff is compiled with a knowledge of the kernel HZ value for your specific arch and uses that in interpreting various entries in /proc. He had a patch that kept the userspace view consistent. That was 2.4 though; maybe 2.5 is better in this respect.

Richard

#2 lore raw

Le jeudi, 24 oct 2002, =E0 09:18 Europe/Paris, Richard Hirst a =E9crit :

Quoted 12 lines · Thibaut Varene
Quoted 10 lines

CVSROOT: /var/cvs
Module name: linux-2.5
Changes by: varenet 02/10/23 10:46:11

Modified files:
include/asm-parisc: param.h

Log message:
Switched to HZ =3D=3D 1000 for CONFIG_PA20.
Patch submitted by Laurent Canet.

Quoted 6 lines

Don't know if this was simply a #define change, but if so... Robert Love has been arguing lately that you can't just do that as various userspace stuff is compiled with a knowledge of the kernel HZ value for your specific arch and uses that in interpreting various entries in /proc. He had a patch that kept the userspace view consistent. That was 2.4 though; maybe 2.5 is better in this respect.

Hm, I'm not sure we really broke something, we added the lines marked=20 '->':

#ifdef __KERNEL__
-># ifdef CONFIG_PA20
-># define HZ 1000 /* Faster machines */
-># else
# define HZ 100 /* Internal kernel timer=20
frequency */
-># endif

# define USER_HZ        100             /* .. some user interfaces are=20=

in "ticks
" */

# define CLOCKS_PER_SEC (USER_HZ)       /* like times() */
#endif

#ifndef HZ
#define HZ 100
#endif

As you can see, these defines are protected by a #ifdef __KERNEL__,=20 otherwise HZ is 100 in all cases. Since userspace stuff isn't supposed=20=

to define __KERNEL__ at compile time, HZ from a userspace point of view=20=

hasn't changed.

If you look at other archs (like i386, ppc64) they also have different=20=

HZ vs USER_HZ and *__KERNEL__* HZ.

In 2.4, there wasn't such #ifdef protection, so such change could have=20=

broken things.
In 2.5, I think this is quite safe IMHO.

HTH,

Thibaut VARENE
The PA/Linux ESIEE Team
http://pateam.esiee.fr/=