Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 205451 Details for
Bug 305011
[RHEL 5.1.z]: Tick divider bugs on x86_64
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to fix some of the tick divider problems
linux-2.6.18-x86_64-tick-divide-fix2.patch (text/plain), 3.29 KB, created by
Chris Lalancette
on 2007-09-25 13:16:34 UTC
(
hide
)
Description:
Patch to fix some of the tick divider problems
Filename:
MIME Type:
Creator:
Chris Lalancette
Created:
2007-09-25 13:16:34 UTC
Size:
3.29 KB
patch
obsolete
>diff -urp linux-2.6.18.noarch.orig/arch/x86_64/kernel/apic.c linux-2.6.18.noarch/arch/x86_64/kernel/apic.c >--- linux-2.6.18.noarch.orig/arch/x86_64/kernel/apic.c 2007-09-24 17:13:24.000000000 -0400 >+++ linux-2.6.18.noarch/arch/x86_64/kernel/apic.c 2007-09-24 17:14:40.000000000 -0400 >@@ -811,7 +811,7 @@ static int __init calibrate_APIC_clock(v > printk(KERN_INFO "Detected %d.%03d MHz APIC timer.\n", > result / 1000 / 1000, result / 1000 % 1000); > >- return result * APIC_DIVISOR / HZ; >+ return result * APIC_DIVISOR / REAL_HZ; > } > > static unsigned int calibration_result; >@@ -941,10 +941,13 @@ void setup_APIC_extened_lvt(unsigned cha > > void smp_local_timer_interrupt(struct pt_regs *regs) > { >- profile_tick(CPU_PROFILING, regs); >+ int i; >+ for (i = 0; i < tick_divider; i++) { >+ profile_tick(CPU_PROFILING, regs); > #ifdef CONFIG_SMP >- update_process_times(user_mode(regs)); >+ update_process_times(user_mode(regs)); > #endif >+ } > if (apic_runs_main_timer > 1 && smp_processor_id() == boot_cpu_id) > main_timer_handler(regs); > /* >diff -urp linux-2.6.18.noarch.orig/arch/x86_64/kernel/pmtimer.c linux-2.6.18.noarch/arch/x86_64/kernel/pmtimer.c >--- linux-2.6.18.noarch.orig/arch/x86_64/kernel/pmtimer.c 2006-09-19 23:42:06.000000000 -0400 >+++ linux-2.6.18.noarch/arch/x86_64/kernel/pmtimer.c 2007-09-24 17:15:18.000000000 -0400 >@@ -64,8 +64,8 @@ int pmtimer_mark_offset(void) > > delta += offset_delay; > >- lost = delta / (USEC_PER_SEC / HZ); >- offset_delay = delta % (USEC_PER_SEC / HZ); >+ lost = delta / (USEC_PER_SEC / REAL_HZ); >+ offset_delay = delta % (USEC_PER_SEC / REAL_HZ); > > rdtscll(tsc); > vxtime.last_tsc = tsc - offset_delay * (u64)cpu_khz / 1000; >diff -urp linux-2.6.18.noarch.orig/arch/x86_64/kernel/time.c linux-2.6.18.noarch/arch/x86_64/kernel/time.c >--- linux-2.6.18.noarch.orig/arch/x86_64/kernel/time.c 2007-09-24 17:13:25.000000000 -0400 >+++ linux-2.6.18.noarch/arch/x86_64/kernel/time.c 2007-09-24 17:15:13.000000000 -0400 >@@ -65,6 +65,8 @@ static int notsc __initdata = 0; > #define NSEC_PER_TICK (NSEC_PER_SEC / HZ) > #define FSEC_PER_TICK (FSEC_PER_SEC / HZ) > >+#define USEC_PER_REAL_TICK (USEC_PER_SEC / REAL_HZ) >+ > #define NS_SCALE 10 /* 2^10, carefully chosen */ > #define US_SCALE 32 /* 2^32, arbitralrily chosen */ > >@@ -304,7 +306,7 @@ unsigned long long monotonic_clock(void) > this_offset = hpet_readl(HPET_COUNTER); > } while (read_seqretry(&xtime_lock, seq)); > offset = (this_offset - last_offset); >- offset *= NSEC_PER_TICK / hpet_tick; >+ offset *= NSEC_PER_TICK / hpet_tick_real; > } else { > do { > seq = read_seqbegin(&xtime_lock); >@@ -406,7 +408,7 @@ void main_timer_handler(struct pt_regs * > } > > monotonic_base += >- (offset - vxtime.last) * NSEC_PER_TICK / hpet_tick; >+ (offset - vxtime.last) * NSEC_PER_TICK / hpet_tick_real; > > vxtime.last = offset; > #ifdef CONFIG_X86_PM_TIMER >@@ -415,14 +417,14 @@ void main_timer_handler(struct pt_regs * > #endif > } else { > offset = (((tsc - vxtime.last_tsc) * >- vxtime.tsc_quot) >> US_SCALE) - USEC_PER_TICK; >+ vxtime.tsc_quot) >> US_SCALE) - USEC_PER_REAL_TICK; > > if (offset < 0) > offset = 0; > >- if (offset > USEC_PER_TICK) { >- lost = offset / USEC_PER_TICK; >- offset %= USEC_PER_TICK; >+ if (offset > USEC_PER_REAL_TICK) { >+ lost = offset / USEC_PER_REAL_TICK; >+ offset %= USEC_PER_REAL_TICK; > } > > /* FIXME: 1000 or 1000000? */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 305011
: 205451