Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932946AbbLOAlS (ORCPT ); Mon, 14 Dec 2015 19:41:18 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:35124 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932743AbbLOAlQ (ORCPT ); Mon, 14 Dec 2015 19:41:16 -0500 Subject: Re: PELT initial task load and wake_up_new_task() To: Yuyang Du References: <566B8009.2090006@linaro.org> <20151213191319.GA28098@intel.com> Cc: Peter Zijlstra , Ingo Molnar , Morten Rasmussen , Dietmar Eggemann , Patrick Bellasi , Juri Lelli , Vincent Guittot , "linux-kernel@vger.kernel.org" From: Steve Muckle X-Enigmail-Draft-Status: N1110 Message-ID: <566F61AA.4020904@linaro.org> Date: Mon, 14 Dec 2015 16:41:14 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20151213191319.GA28098@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1249 Lines: 32 Hi Yuyang, On 12/13/2015 11:13 AM, Yuyang Du wrote: > Hi Steve, > > On Fri, Dec 11, 2015 at 06:01:45PM -0800, Steve Muckle wrote: >> In init_entity_runnable_average() the last_update_time is initialized to >> zero. The task is given max load and utilization as a pessimistic >> initial estimate. >> >> But if in wake_up_new_task() the task is placed on a CPU other than >> where it was created, __update_load_avg() will be called via >> set_task_cpu() -> migrate_task_rq_fair() -> remove_entity_load_avg(). >> >> Since last_update_time is zero the delta will be huge and the task's >> load will be entirely decayed away before it is enqueued at the >> destination CPU. > > Since the new task's last_update_time is equal to 0, it will not be decayed. Can you point me to the code for that logic? I don't see anything that prevents the decay when a newly woken task is placed on a different CPU via the call chain I mentioned above. My testing also shows the load being decayed to zero. thanks Steve -- 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/