Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753685Ab3EINNz (ORCPT ); Thu, 9 May 2013 09:13:55 -0400 Received: from mga02.intel.com ([134.134.136.20]:8850 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753108Ab3EINNx (ORCPT ); Thu, 9 May 2013 09:13:53 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.87,641,1363158000"; d="scan'208";a="334289502" Message-ID: <518BA108.8070802@intel.com> Date: Thu, 09 May 2013 21:13:44 +0800 From: Alex Shi User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120912 Thunderbird/15.0.1 MIME-Version: 1.0 To: Paul Turner CC: Peter Zijlstra , Morten Rasmussen , Ingo Molnar , Thomas Gleixner , Andrew Morton , Borislav Petkov , Namhyung Kim , Mike Galbraith , Vincent Guittot , Preeti U Murthy , Viresh Kumar , LKML , Mel Gorman , Rik van Riel , Michael Wang Subject: Re: [PATCH v5 3/7] sched: set initial value of runnable avg for new forked task References: <1367804711-30308-1-git-send-email-alex.shi@intel.com> <1367804711-30308-4-git-send-email-alex.shi@intel.com> <5187760D.8060900@intel.com> <51886460.3020009@intel.com> <20130507095715.GE4068@e103034-lin> <5188DFEF.6010403@intel.com> <20130508113442.GB6803@dyad.programming.kicks-ass.net> <518B5CC8.6070601@intel.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 772 Lines: 28 On 05/09/2013 05:24 PM, Paul Turner wrote: >> > >> > +#ifdef CONFIG_SMP >> > +void set_task_runnable_avg(struct task_struct *p) >> > +{ >> > + u64 slice; >> > + >> > + slice = sched_slice(task_cfs_rq(p), &p->se); >> > + p->se.avg.runnable_avg_sum = slice; >> > + p->se.avg.runnable_avg_period = slice; > This needs to be >> 10 right? sched_slice is in ns. Yes, I omitted this. > > We also still want to set load_avg_contrib right? yes, and seem set it here seems better. :) > -- Thanks Alex -- 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/