Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2723586ybk; Tue, 12 May 2020 06:40:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWTrtZDh23XX3VPoJz1svIgK7LplaJ+4YH3O7SlE21a+m9RlTSDNG9xgGNdYD2d/z18xWg X-Received: by 2002:aa7:dc49:: with SMTP id g9mr6827500edu.62.1589290823380; Tue, 12 May 2020 06:40:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589290823; cv=none; d=google.com; s=arc-20160816; b=i/vAelBAeZR+Nx/aKZ9RRJ+Jai/zQDXEDmOBsUl4SVKEWZiM1lhEWMIbguik3q/3Wi +qhDhdS21pU80AhYDWm/9AQXWFyFotYiQ/nzryKvU84+fsPP8OdICYz+kYW1TUtqZysm gSnXv9QP9om92w65OPDlk0sMHLvNWG6+BLkK7c/vZEjlT6xQ5fD/89n1s2CLewiIcOKP jdG3g1nJesxTEdKZxXObS54/AI0Ym5ssE/5aXwG8f/euOpjImtUMpFmXzzDRqZRheWX8 KEs83/Hm3N9tqRE1hG3SIEMb/virpIwV3rlWCXFh/uNUWZDce5zLqlNaxfZNXMXLJECt yTCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=vpuG4LdlTObF0DQc+LqTI9SVhJ+s5m4hiTckSgBvBgM=; b=eu9GexPkHzapfFq79IKErNC3sN0846I/8jGXpBRTe3LDULt4YvY94nc3qY91ScgtRA heDWesBzv2AF+1fHPQ+LP/FNuL96RNRwxmojWO/ZEWAhy1pb5bC+ZxNFHLYVcQyMyX4K l13UKRzyYnrrhW+KhEGXtziJMDw953CUsu+NcCtcf4xvT3YhiacSd3fmqBdNy3l/tq3e +q5v3ScQFZ0DNOhEQGHQrx+i8G8nAsTMJ8A2gjj0/o0oq6cKAlMkpg4n/F3TApE73iQ3 kVaBV72ZWvfFx417Vh8KK4Hfj9xyz/oX7zH+SGDWX32syYw26RWbs9Hz6Ja3DGcJo/NC a4fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZhPd6Wjn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ca3si8047999edb.164.2020.05.12.06.39.58; Tue, 12 May 2020 06:40:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZhPd6Wjn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729962AbgELNiH (ORCPT + 99 others); Tue, 12 May 2020 09:38:07 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:54415 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729336AbgELNiG (ORCPT ); Tue, 12 May 2020 09:38:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589290685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=vpuG4LdlTObF0DQc+LqTI9SVhJ+s5m4hiTckSgBvBgM=; b=ZhPd6WjnqmvTGcHvYJFEqus0mmgYJbpub7KbhTdmEpGNqr16ZAkE+HzYQwVs/x7jx1lG19 pepx7R3gaf8yVnSELFnYTxA0fTRW5KWb1N1jnJCa2UGGZmSxXjYg2p6/hWXHEWh6yFBNxX litQxE8lGGp9a5ROAqI5pvTSuzNVvIY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-324-YKWHldjWOECPGJJQik2Ejg-1; Tue, 12 May 2020 09:38:01 -0400 X-MC-Unique: YKWHldjWOECPGJJQik2Ejg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7AEA5475; Tue, 12 May 2020 13:38:00 +0000 (UTC) Received: from lorien.usersys.redhat.com (ovpn-114-4.phx2.redhat.com [10.3.114.4]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F19AA75291; Tue, 12 May 2020 13:37:56 +0000 (UTC) Date: Tue, 12 May 2020 09:37:55 -0400 From: Phil Auld To: Dietmar Eggemann Cc: Vincent Guittot , Peter Zijlstra , linux-kernel , Ingo Molnar , Juri Lelli Subject: Re: [PATCH v2] sched/fair: Fix enqueue_task_fair warning some more Message-ID: <20200512133755.GB2201@lorien.usersys.redhat.com> References: <20200506141821.GA9773@lorien.usersys.redhat.com> <20200507203612.GF19331@lorien.usersys.redhat.com> <20200511204410.GI13245@lorien.usersys.redhat.com> <9b95fb7d-68e2-bb69-1293-af2017be4cdb@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9b95fb7d-68e2-bb69-1293-af2017be4cdb@arm.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dietmar, On Tue, May 12, 2020 at 11:00:16AM +0200 Dietmar Eggemann wrote: > On 11/05/2020 22:44, Phil Auld wrote: > > On Mon, May 11, 2020 at 09:25:43PM +0200 Vincent Guittot wrote: > >> On Thu, 7 May 2020 at 22:36, Phil Auld wrote: > >>> > >>> sched/fair: Fix enqueue_task_fair warning some more > >>> > >>> The recent patch, fe61468b2cb (sched/fair: Fix enqueue_task_fair warning) > >>> did not fully resolve the issues with the rq->tmp_alone_branch != > >>> &rq->leaf_cfs_rq_list warning in enqueue_task_fair. There is a case where > >>> the first for_each_sched_entity loop exits due to on_rq, having incompletely > >>> updated the list. In this case the second for_each_sched_entity loop can > >>> further modify se. The later code to fix up the list management fails to do > >>> what is needed because se no longer points to the sched_entity which broke > >>> out of the first loop. > >>> > >>> Address this by calling leaf_add_rq_list if there are throttled parents while > >>> doing the second for_each_sched_entity loop. > >>> > >> > >> Fixes: fe61468b2cb (sched/fair: Fix enqueue_task_fair warning) > >> > >>> Suggested-by: Vincent Guittot > >>> Signed-off-by: Phil Auld > >>> Cc: Peter Zijlstra (Intel) > >>> Cc: Vincent Guittot > >>> Cc: Ingo Molnar > >>> Cc: Juri Lelli > >> > >> With the Fixes tag and the typo mentioned by Tao > >> > > > > Right, that last line of the commit message should read "list_add_leaf_cfs_rq" > > > > > >> Reviewed-by: Vincent Guittot > > > > Thanks Vincent. > > > > Peter/Ingo, do you want me to resend or can you fix when applying? > > > Maybe you could add that 'the throttled parent was already added back to > the list by a task enqueue in a parallel child hierarchy'. > > IMHO, this is part of the description because otherwise the throttled > parent would have connected the branch. > > And the not-adding of the intermediate child cfs_rq would have gone > unnoticed. Okay, I'll add that statement. For those curious here are the lines from about 70ms earlier in the trace where the throttled parent (0xffffa085e48ce000) is added to the list. bz1738415-test-6264 [005] 1271.315046: sched_waking: comm=bz1738415-test pid=6269 prio=120 target_cpu=005 bz1738415-test-6264 [005] 1271.315048: sched_migrate_task: comm=bz1738415-test pid=6269 prio=120 orig_cpu=5 dest_cpu=17 bz1738415-test-6264 [005] 1271.315050: bprint: enqueue_task_fair: se 0xffffa081e6d7de80 on_rq 0 cfs_rq = 0xffffa085e48ce000 bz1738415-test-6264 [005] 1271.315051: bprint: enqueue_entity: Add_leaf_rq: cpu 17: nr_r 2; cfs 0xffffa085e48ce000 onlist 0 tmp_a_b = 0xffffa085ef92c868 &rq->l_c_r_l = 0xffffa085ef92c868 bz1738415-test-6264 [005] 1271.315053: bprint: enqueue_entity: Add_leaf_rq: cpu 17: nr_r 2: parent onlist Set tmp_alone_branch to 0xffffa085ef92c868 bz1738415-test-6264 [005] 1271.315053: bprint: enqueue_task_fair: current se = 0xffffa081e6d7de80, orig_se = 0xffffa081e6d7de80 bz1738415-test-6264 [005] 1271.315055: bprint: enqueue_task_fair: Add_leaf_rq: cpu 17: nr_r 2; cfs 0xffffa085e48ce000 onlist 1 tmp_a_b = 0xffffa085ef92c868 &rq->l_c_r_l = 0xffffa085ef92c868 bz1738415-test-6264 [005] 1271.315056: sched_wake_idle_without_ipi: cpu=17 > > Reviewed-by: Dietmar Eggemann Thanks, Phil > > [...] > --