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 161706 Details for
Bug 253103
/proc/loadavgrt issues weird results
[?]
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.
loadavg_fixes_weird_loads.patch
loadavg_fixes_weird_loads.patch (text/x-patch), 1.89 KB, created by
Luis Claudio R. Goncalves
on 2007-08-17 00:26:14 UTC
(
hide
)
Description:
loadavg_fixes_weird_loads.patch
Filename:
MIME Type:
Creator:
Luis Claudio R. Goncalves
Created:
2007-08-17 00:26:14 UTC
Size:
1.89 KB
patch
obsolete
>Fixes spurious system load spikes observed in /proc/loadavgrt, as described in: > > Bug 253103 Processed: /proc/loadavgrt issues weird results > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=253103 > > >Signed-off-by: Luis Claudio R. Goncalves <lclaudio@uudg.org> >--- > >diff --git a/kernel/sched.c b/kernel/sched.c >index 811a502..c61609a 100644 >--- a/kernel/sched.c >+++ b/kernel/sched.c >@@ -2520,6 +2520,13 @@ unsigned long rt_nr_uninterruptible(void) > for_each_online_cpu(i) > sum += cpu_rq(i)->rt_nr_uninterruptible; > >+ /* >+ * Since we read the counters lockless, it might be slightly >+ * inaccurate. Do not allow it to go below zero though: >+ */ >+ if (unlikely((long)sum < 0)) >+ sum = 0; >+ > return sum; > } > >diff --git a/linux-2.6.21.x86_64/kernel/timer.c b/linux-2.6.21.x86_64_lc/kernel/timer.c >index 882ca9d..0e49bf6 100644 >--- a/linux-2.6.21.x86_64/kernel/timer.c >+++ b/linux-2.6.21.x86_64_lc/kernel/timer.c >@@ -1432,23 +1432,25 @@ unsigned long avenrun_rt[3]; > static inline void calc_load(unsigned long ticks) > { > unsigned long active_tasks; /* fixed-point */ >+ unsigned long active_rt_tasks; /* fixed-point */ > static int count = LOAD_FREQ; > > count -= ticks; > if (unlikely(count < 0)) { > active_tasks = count_active_tasks(); >+ active_rt_tasks = count_active_rt_tasks(); > do { > CALC_LOAD(avenrun[0], EXP_1, active_tasks); > CALC_LOAD(avenrun[1], EXP_5, active_tasks); > CALC_LOAD(avenrun[2], EXP_15, active_tasks); >- count += LOAD_FREQ; >- } while (count < 0); > #ifdef CONFIG_PREEMPT_RT >- active_tasks = count_active_rt_tasks(); >- CALC_LOAD(avenrun_rt[0], EXP_1, active_tasks); >- CALC_LOAD(avenrun_rt[1], EXP_5, active_tasks); >- CALC_LOAD(avenrun_rt[2], EXP_15, active_tasks); >+ CALC_LOAD(avenrun_rt[0], EXP_1, active_tasks); >+ CALC_LOAD(avenrun_rt[1], EXP_5, active_tasks); >+ CALC_LOAD(avenrun_rt[2], EXP_15, active_tasks); > #endif >+ count += LOAD_FREQ; >+ >+ } while (count < 0); > } > } >
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 Raw
Actions:
View
Attachments on
bug 253103
: 161706 |
172421