From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753060AbdEEN0O (ORCPT ); Fri, 5 May 2017 09:26:14 -0400 Received: from mail-qk0-f196.google.com ([209.85.220.196]:36660 "EHLO mail-qk0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751741AbdEEN0M (ORCPT ); Fri, 5 May 2017 09:26:12 -0400 Date: Fri, 5 May 2017 09:26:04 -0400 From: Tejun Heo To: Vincent Guittot Cc: Ingo Molnar , Peter Zijlstra , linux-kernel , Linus Torvalds , Mike Galbraith , Paul Turner , Chris Mason , kernel-team@fb.com Subject: Re: [PATCH 3/3] sched/fair: Propagate runnable_load_avg independently from load_avg Message-ID: <20170505132604.GA8936@wtj.duckdns.org> References: <20170504202838.GA2647@htj.duckdns.org> <20170504203010.GD2647@htj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Fri, May 05, 2017 at 02:18:54PM +0200, Vincent Guittot wrote: > >> @@ -3354,8 +3367,10 @@ enqueue_entity_load_avg(struct cfs_rq *c > >> { > >> struct sched_avg *sa = &se->avg; > >> > >> - cfs_rq->avg.runnable_load_avg += sa->load_avg; > >> - cfs_rq->avg.runnable_load_sum += sa->load_sum; > >> + if (entity_is_task(se)) { > > > > Why don't you add the runnable_load_avg of a group_entity that is enqueued ? > > ok, i forgot that you propagate runnable_load_avg in entity now. But > this seems really weird and adds more exceptions to the normal > behavior of load tracking It seems cleaner this way to me. The actual runnable tracking is taking place for tasks only on their immediate queues and everything beyond that is pure propagation. The distinction is inherent as there's no point in calculating runnable for a task's se. Obviously, we can special-case dequeueing of nested group entities too but it's more code and fragility. Thanks. -- tejun