login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
April
»
28
Re: [PATCH] sched: fair-group: fix a Div0 error of the fair group scheduler
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Ingo Molnar <mingo@...>
To: Miao Xie <miaox@...>
Cc: Peter Zijlstra <a.p.zijlstra@...>, Linux-Kernel <linux-kernel@...>
Subject:
Re: [PATCH] sched: fair-group: fix a Div0 error of the fair group scheduler
Date: Monday, April 28, 2008 - 8:51 am
* Miao Xie <miaox@cn.fujitsu.com> wrote:
quoted text
> When I echoed 0 into the "cpu.shares" file, a Div0 error occured. > > We found it is caused by the following calling. > > sched_group_set_shares(tg, shares) > set_se_shares(tg->se[i], shares/nr_cpu_ids) > __set_se_shares(se, shares) > div64_64((1ULL<<32), shares) > > When the echoed value was less than the number of processores, the > result of the sentence "shares/nr_cpu_ids" was 0, and then the system > called div64() to divide the result, the Div0 error occured. > > It is unnecessary that the shares value is divided by nr_cpu_ids, I > think. Because in the function __update_group_shares_cpu() and > init_tg_cfs_entry(), the shares value isn't divided by nr_cpu_ids when > setting shares of the sched entity. > > This patch fixes this bug. And echoing ULONG_MAX value into cpu.shares > also causes Div0 error, so we set a macro MAX_SHARES to limit the max > value of shares.
thanks, applied. Ingo --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] sched: fair-group: fix a Div0 error of the fair grou...
, Miao Xie
, (Mon Apr 28, 12:54 am)
Re: [PATCH] sched: fair-group: fix a Div0 error of the fair ...
, Ingo Molnar
, (Mon Apr 28, 8:51 am)
Re: [PATCH] sched: fair-group: fix a Div0 error of the fair ...
, Peter Zijlstra
, (Mon Apr 28, 4:34 am)
Re: [PATCH] sched: fair-group: fix a Div0 error of the fair ...
, Peter Zijlstra
, (Mon Apr 28, 1:45 am)
Re: [PATCH] sched: fair-group: fix a Div0 error of the fair ...
, Miao Xie
, (Mon Apr 28, 4:27 am)
Re: [PATCH] sched: fair-group: fix a Div0 error of the fair ...
, Peter Zijlstra
, (Mon Apr 28, 4:33 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Linus Torvalds
Linux 2.6.27-rc5
Greg KH
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Greg Kroah-Hartman
[PATCH 004/196] Chinese: add translation of SubmittingPatches
Trent Piepho
Re: [PATCH] [POWERPC] Improve (in|out)_beXX() asm code
git
:
linux-netdev
:
Christoph Hellwig
Re: [PATCH 06/32] IGET: Mark iget() and read_inode() as being obsolete [try #2]
Gerrit Renker
[PATCH 0/37] dccp: Feature negotiation - last call for comments
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
David Miller
[GIT]: Networking
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
10 users
and
631 guests
online.
Online users
troindow34
kengolfaccess9
irvinecarpetqa
automatedexter
tnavigator
kidneystoneguy
gavinjefferies
retroshowercur
ez_wpthemes
autoinsurancep
Syndicate