Re: [PATCH 2/2] sched: fix cpupri priocount

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Peter Zijlstra <peterz@...>
Cc: Ingo Molnar <mingo@...>, Steven Rostedt <rostedt@...>, <tglx@...>, Arnaldo Carvalho de Melo <acme@...>, <linux-kernel@...>, <linux-rt-users@...>
Date: Wednesday, June 4, 2008 - 5:52 pm

>>> On Wed, Jun 4, 2008 at  5:09 PM, in message
<1212613754.19205.25.camel@lappy.programming.kicks-ass.net>, Peter Zijlstra
<peterz@infradead.org> wrote: 

Indeed.  Here is a new version:

(Thanks, Peter!)

------

    sched: fix cpupri priocount

    A rounding error was pointed out by Peter Zijlstra which would result
    in the structure holding priorities to be off by one.

    Signed-off-by: Gregory Haskins <ghaskins@novell.com>
    CC: Peter Zijlstra <peterz@infradead.org>

diff --git a/kernel/sched_cpupri.h b/kernel/sched_cpupri.h
index 16d29b9..51e6553 100644
--- a/kernel/sched_cpupri.h
+++ b/kernel/sched_cpupri.h
@@ -4,7 +4,7 @@
 #include <linux/sched.h>

 #define CPUPRI_NR_PRIORITIES 2+MAX_RT_PRIO
-#define CPUPRI_NR_PRI_WORDS CPUPRI_NR_PRIORITIES/BITS_PER_LONG
+#define CPUPRI_NR_PRI_WORDS BITS_TO_LONGS(CPUPRI_NR_PRIORITIES)

 #define CPUPRI_INVALID -1
 #define CPUPRI_IDLE     0

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/2] sched: hotplug and cpupri fixes (v2), Gregory Haskins, (Wed Jun 4, 3:03 pm)
[PATCH 2/2] sched: fix cpupri priocount, Gregory Haskins, (Wed Jun 4, 3:04 pm)
Re: [PATCH 2/2] sched: fix cpupri priocount, Peter Zijlstra, (Wed Jun 4, 5:09 pm)
Re: [PATCH 2/2] sched: fix cpupri priocount, Gregory Haskins, (Wed Jun 4, 5:52 pm)
RE: [PATCH 2/2] sched: fix cpupri priocount, Rune Torgersen, (Wed Jun 4, 5:35 pm)
[PATCH 1/2] sched: fix cpupri hotplug support, Gregory Haskins, (Wed Jun 4, 3:04 pm)