From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.4 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B34BDC4338F for ; Fri, 30 Jul 2021 12:22:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9088060230 for ; Fri, 30 Jul 2021 12:22:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238698AbhG3MW0 (ORCPT ); Fri, 30 Jul 2021 08:22:26 -0400 Received: from foss.arm.com ([217.140.110.172]:41336 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230325AbhG3MWZ (ORCPT ); Fri, 30 Jul 2021 08:22:25 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 45EE1D6E; Fri, 30 Jul 2021 05:22:20 -0700 (PDT) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4726E3F70D; Fri, 30 Jul 2021 05:22:19 -0700 (PDT) Subject: Re: WARNING: CPU: 112 PID: 2041 at kernel/sched/sched.h:1453 From: Dietmar Eggemann To: Bruno Goncalves Cc: CKI Project , linux-kernel@vger.kernel.org, nathan@kernel.org, Memory Management , linux-arm-kernel@lists.infradead.org References: Message-ID: <1ea2fa5c-ae81-2389-7f02-2227636582e4@arm.com> Date: Fri, 30 Jul 2021 14:22:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/07/2021 16:38, Dietmar Eggemann wrote: > On 29/07/2021 14:36, Bruno Goncalves wrote: >> On Wed, Jul 28, 2021 at 5:55 PM Dietmar Eggemann >> wrote: >>> >>> On 28/07/2021 15:11, Bruno Goncalves wrote: > > [...] > >>> Can't reproduce it on my Juno (arm64) (slow-switching (scpi-cpufreq >>> driver)). >> >> We seem to be able to reproduce this only on Ampere Altra machines, >> specifically on mtjade and mtsnow cpus. >> >> # cpupower frequency-info >> analyzing CPU 0: >> driver: cppc_cpufreq >> CPUs which run at the same hardware frequency: 0 >> CPUs which need to have their frequency coordinated by software: 0 >> maximum transition latency: Cannot determine or is not supported. >> hardware limits: 1000 MHz - 2.80 GHz >> available cpufreq governors: conservative ondemand userspace >> powersave performance schedutil >> current policy: frequency should be within 2.00 GHz and 2.80 GHz. >> The governor "schedutil" may decide which speed to use >> within this range. >> current CPU frequency: 1.55 GHz (asserted by call to hardware) >> >> # ps -eTo comm,pid,pri,class | grep sugov >> sugov:0 1082 140 DLN >> sugov:1 1085 140 DLN >> ... >> sugov:78 1319 140 DLN >> sugov:79 1320 140 DLN > > Thanks! In the meantime I got access to an Ampere Altra so I can try > 5.14.0-rc1 later today. The task causing this seem to be the new `cppc_fie` DL task introduced by commit 1eb5dde674f5 "cpufreq: CPPC: Add support for frequency invariance" in v5.14-rc1. With `CONFIG_ACPI_CPPC_CPUFREQ_FIE=y` and schedutil cpufreq governor on slow-switching system: DL task curr=`sugov:X` makes p=`cppc_fie` migrate and since it is in `non_contending` state, migrate_task_rq_dl() calls sub_running_bw()->__sub_running_bw()->cpufreq_update_util()-> rq_clock()->assert_clock_updated() on p. Can you try this snippet? It should fix it. --8<-- From: Dietmar Eggemann Date: Fri, 30 Jul 2021 14:03:40 +0200 Subject: [PATCH] sched/deadline: Fix missing clock update in migrate_task_rq_dl() Signed-off-by: Dietmar Eggemann --- kernel/sched/deadline.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index aaacd6cfd42f..4920f498492f 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -1733,6 +1733,7 @@ static void migrate_task_rq_dl(struct task_struct *p, int new_cpu __maybe_unused */ raw_spin_rq_lock(rq); if (p->dl.dl_non_contending) { + update_rq_clock(rq); sub_running_bw(&p->dl, &rq->dl); p->dl.dl_non_contending = 0; /* -- 2.25.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B539DC4338F for ; Fri, 30 Jul 2021 12:24:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 85FB760F0F for ; Fri, 30 Jul 2021 12:24:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 85FB760F0F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:References:Cc:To:From:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=OMAjcEdz8di9REHVw9Um8ZM+SjK5+ht4TUAWZ1jLIpI=; b=Wwz+J1Z38j+7e5WZnRGY0EAbQG y7+UoXCbSg0IOUbX3E1DN0ofWAR/NDYTWv6eEKZDqwvIdGWpilRM6PaFX4kF4zJs0OOXAkBWR/FcY r2VkKyNv8Gb9uD/tw+KdwRbrCIYsb0l1aqurkj2ak6jG9ESxImA6E8uDEqCHmMBiPNLIDoD6+5FWR IKTkq0uJavzESQBONO9q8a/yaq1E0dsrqDI7QyvpN5i1zD6dM4yk8pL38Bud7I5Nd72cTUzZwQhmL sw/VBH/mdyFm9ZPMyAoQmv50jNKJhC+/BJRvh8Z4pFhMNAntU5U0LcF8wsqsUGGmQGFfzYpJQPRqJ GghlZ+FQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m9RX0-008ZM8-AL; Fri, 30 Jul 2021 12:22:26 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m9RWw-008ZKs-1d for linux-arm-kernel@lists.infradead.org; Fri, 30 Jul 2021 12:22:23 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 45EE1D6E; Fri, 30 Jul 2021 05:22:20 -0700 (PDT) Received: from [192.168.178.6] (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4726E3F70D; Fri, 30 Jul 2021 05:22:19 -0700 (PDT) Subject: Re: WARNING: CPU: 112 PID: 2041 at kernel/sched/sched.h:1453 From: Dietmar Eggemann To: Bruno Goncalves Cc: CKI Project , linux-kernel@vger.kernel.org, nathan@kernel.org, Memory Management , linux-arm-kernel@lists.infradead.org References: Message-ID: <1ea2fa5c-ae81-2389-7f02-2227636582e4@arm.com> Date: Fri, 30 Jul 2021 14:22:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210730_052222_217587_41482D7E X-CRM114-Status: GOOD ( 19.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 29/07/2021 16:38, Dietmar Eggemann wrote: > On 29/07/2021 14:36, Bruno Goncalves wrote: >> On Wed, Jul 28, 2021 at 5:55 PM Dietmar Eggemann >> wrote: >>> >>> On 28/07/2021 15:11, Bruno Goncalves wrote: > > [...] > >>> Can't reproduce it on my Juno (arm64) (slow-switching (scpi-cpufreq >>> driver)). >> >> We seem to be able to reproduce this only on Ampere Altra machines, >> specifically on mtjade and mtsnow cpus. >> >> # cpupower frequency-info >> analyzing CPU 0: >> driver: cppc_cpufreq >> CPUs which run at the same hardware frequency: 0 >> CPUs which need to have their frequency coordinated by software: 0 >> maximum transition latency: Cannot determine or is not supported. >> hardware limits: 1000 MHz - 2.80 GHz >> available cpufreq governors: conservative ondemand userspace >> powersave performance schedutil >> current policy: frequency should be within 2.00 GHz and 2.80 GHz. >> The governor "schedutil" may decide which speed to use >> within this range. >> current CPU frequency: 1.55 GHz (asserted by call to hardware) >> >> # ps -eTo comm,pid,pri,class | grep sugov >> sugov:0 1082 140 DLN >> sugov:1 1085 140 DLN >> ... >> sugov:78 1319 140 DLN >> sugov:79 1320 140 DLN > > Thanks! In the meantime I got access to an Ampere Altra so I can try > 5.14.0-rc1 later today. The task causing this seem to be the new `cppc_fie` DL task introduced by commit 1eb5dde674f5 "cpufreq: CPPC: Add support for frequency invariance" in v5.14-rc1. With `CONFIG_ACPI_CPPC_CPUFREQ_FIE=y` and schedutil cpufreq governor on slow-switching system: DL task curr=`sugov:X` makes p=`cppc_fie` migrate and since it is in `non_contending` state, migrate_task_rq_dl() calls sub_running_bw()->__sub_running_bw()->cpufreq_update_util()-> rq_clock()->assert_clock_updated() on p. Can you try this snippet? It should fix it. --8<-- From: Dietmar Eggemann Date: Fri, 30 Jul 2021 14:03:40 +0200 Subject: [PATCH] sched/deadline: Fix missing clock update in migrate_task_rq_dl() Signed-off-by: Dietmar Eggemann --- kernel/sched/deadline.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/deadline.c b/kernel/sched/deadline.c index aaacd6cfd42f..4920f498492f 100644 --- a/kernel/sched/deadline.c +++ b/kernel/sched/deadline.c @@ -1733,6 +1733,7 @@ static void migrate_task_rq_dl(struct task_struct *p, int new_cpu __maybe_unused */ raw_spin_rq_lock(rq); if (p->dl.dl_non_contending) { + update_rq_clock(rq); sub_running_bw(&p->dl, &rq->dl); p->dl.dl_non_contending = 0; /* -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel