Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751718AbdGaKpy (ORCPT ); Mon, 31 Jul 2017 06:45:54 -0400 Received: from merlin.infradead.org ([205.233.59.134]:36084 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750869AbdGaKpx (ORCPT ); Mon, 31 Jul 2017 06:45:53 -0400 Date: Mon, 31 Jul 2017 12:45:38 +0200 From: Peter Zijlstra To: Josef Bacik Cc: mingo@redhat.com, linux-kernel@vger.kernel.org, umgwanakikbuti@gmail.com, tj@kernel.org, kernel-team@fb.com, Josef Bacik Subject: Re: [PATCH 1/7] sched/fair: use reweight_entity to reweight tasks Message-ID: <20170731104538.2a7n3ovhyegryvy6@hirez.programming.kicks-ass.net> References: <1500038464-8742-1-git-send-email-josef@toxicpanda.com> <1500038464-8742-2-git-send-email-josef@toxicpanda.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1500038464-8742-2-git-send-email-josef@toxicpanda.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 743 Lines: 19 On Fri, Jul 14, 2017 at 01:20:58PM +0000, Josef Bacik wrote: > From: Josef Bacik > > reweight_task only accounts for the load average change in the cfs_rq, but > doesn't account for the runnable_average change in the cfs_rq. We need to do > everything reweight_entity does, and then we just set our inv_weight > appropriately. The difference is in the calling convention. If you look at the callsite: set_user_nice() set_load_weight() reweight_task() You'll see that ->on_rq will always be false. That said, I think you're right in that we're missing a se->runnable_weight update, because while __update_load_avg*() doesn't use it (and will in fact (re)set it), there are other users that could come before that.