Messages in this thread | | | Date | Wed, 11 Dec 2013 09:50:28 -0500 | From | Naoya Horiguchi <> | Subject | Re: [PATCH v5 8/8] sched/numa: drop unnecessary variable in task_weight |
| |
On Wed, Dec 11, 2013 at 09:21:23AM +0000, Mel Gorman wrote: > On Wed, Dec 11, 2013 at 08:50:01AM +0800, Wanpeng Li wrote: > > Drop unnecessary total_faults variable in function task_weight to unify > > task_weight and group_weight. > > > > Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> > > Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> > > Nak. > > task_weight is called for tasks other than current. If p handles a fault > in parallel then it can drop to 0 between when it's checked and used to > divide resulting in an oops.
So we have the same race on group_weight(), and we have to add a local variable to store p->numa_group->total_faults?
Thanks, Naoya Horiguchi
| |