[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DCEAAC0833DD314AB0B58112AD99B93B047FE4EA@ismail.innsys.innovsys.com>
Date: Wed, 4 Jun 2008 16:35:28 -0500
From: "Rune Torgersen" <runet@...ovsys.com>
To: "Peter Zijlstra" <peterz@...radead.org>,
"Gregory Haskins" <ghaskins@...ell.com>
Cc: "Ingo Molnar" <mingo@...e.hu>,
"Thomas Gleixner" <tglx@...utonix.de>,
"Steven Rostedt" <rostedt@...dmis.org>,
"Arnaldo Carvalho de Melo" <acme@...hat.com>,
<linux-kernel@...r.kernel.org>, <linux-rt-users@...r.kernel.org>
Subject: RE: [PATCH 2/2] sched: fix cpupri priocount
> > -#define CPUPRI_NR_PRI_WORDS CPUPRI_NR_PRIORITIES/BITS_PER_LONG
> > +#define CPUPRI_NR_PRI_WORDS (CPUPRI_NR_PRIORITIES + >
BITS_PER_LONG/2)/BITS_PER_LONG
>
> (33 + 16) / 32 = 49 / 32 = 1
>
It should not round to neares but round up....
So... #define CPUPRI_NR_PRI_WORDS (CPUPRI_NR_PRIORITIES + BITS_PER_LONG
- 1)/BITS_PER_LONG
=> (33+31)/32 = 64/32 = 2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists