|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH] Make HZ a boot-time configurable
I understand the trade-offs that xen is currently optimized for. However, I
don't think that HZ=100 is right for all places and all times. I also think that
users would appreciate it if they didn't have to go edit config.h and re-compile
if they wanted to change HZ. For those using xen as a platform for development
it probably makes sense if HZ is the same as the kernel they intend to ship. For
example, very early on in testing with HZ=1000 I hit an interrupt race condition
in XenFreeBSD that I have never seen before.
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2005/05/08 13:12:30-07:00 kmacy@xxxxxxxxxxxxxxxxxxxx
# Make HZ a boot-time configurable
# Signed-off-by: Kip Macy <kmacy@xxxxxxxxxx>
#
# BitKeeper/etc/logging_ok
# 2005/05/08 13:12:30-07:00 kmacy@xxxxxxxxxxxxxxxxxxxx +1 -0
# Logging to logging@xxxxxxxxxxxxxxx accepted
#
# xen/include/asm-x86/config.h
# 2005/05/08 13:12:15-07:00 kmacy@xxxxxxxxxxxxxxxxxxxx +3 -1
# make HZ a tunable
#
# xen/arch/x86/nmi.c
# 2005/05/08 13:12:15-07:00 kmacy@xxxxxxxxxxxxxxxxxxxx +2 -1
# make HZ tunable
#
# xen/arch/x86/apic.c
# 2005/05/08 13:12:15-07:00 kmacy@xxxxxxxxxxxxxxxxxxxx +3 -0
# make HZ tunable
#
diff -Nru a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c
--- a/xen/arch/x86/apic.c 2005-05-07 13:19:11 -07:00
+++ b/xen/arch/x86/apic.c 2005-05-07 13:19:11 -07:00
@@ -42,6 +42,9 @@
static int enabled_via_apicbase;
+unsigned int HZ = 100;
+integer_param("hz", HZ);
+
int get_maxlvt(void)
{
unsigned int v, ver, maxlvt;
diff -Nru a/xen/arch/x86/nmi.c b/xen/arch/x86/nmi.c
--- a/xen/arch/x86/nmi.c 2005-05-07 13:19:11 -07:00
+++ b/xen/arch/x86/nmi.c 2005-05-07 13:19:11 -07:00
@@ -29,7 +29,7 @@
unsigned int nmi_watchdog = NMI_NONE;
unsigned int watchdog_on = 0;
-static unsigned int nmi_hz = HZ;
+static unsigned int nmi_hz;
unsigned int nmi_perfctr_msr; /* the MSR to reset in NMI handler */
extern int logical_proc_id[];
@@ -227,6 +227,7 @@
void __pminit setup_apic_nmi_watchdog(void)
{
+ nmi_hz = HZ;
if (!nmi_watchdog)
return;
diff -Nru a/xen/include/asm-x86/config.h b/xen/include/asm-x86/config.h
--- a/xen/include/asm-x86/config.h 2005-05-07 13:19:11 -07:00
+++ b/xen/include/asm-x86/config.h 2005-05-07 13:19:11 -07:00
@@ -23,7 +23,9 @@
#define CONFIG_ACPI 1
#define CONFIG_ACPI_BOOT 1
-#define HZ 100
+#ifndef __ASSEMBLY__
+extern unsigned int HZ;
+#endif
#define OPT_CONSOLE_STR "com1,vga"
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH] Make HZ a boot-time configurable,
Kip Macy <=
|
|
|
|
|