Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp664162rwe; Fri, 26 Aug 2022 11:52:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR7MeNNdrSc1EuGXne91qOijadWNXTpllQFjhB8RnaLN39ttAup413rwoViPT6mvqTHOEy+9 X-Received: by 2002:a05:6402:510a:b0:43d:ab25:7d68 with SMTP id m10-20020a056402510a00b0043dab257d68mr7662143edd.102.1661539944577; Fri, 26 Aug 2022 11:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661539944; cv=none; d=google.com; s=arc-20160816; b=l1LY2BRpAgW2r2lYPHYyAXbiOMklKWZUeR+1tWUpPkuflUgQD33nR/tpxcW2FxPVvd u5TUBzW1AMU8VUv+A62YPMFpVyv8gIM6UzBbKslAB+HY3QJyUcl0RNRsa522uPAwZ9eh l8MATxbRl6wOz+rL2veZ7lU0J7AIiPuBP2sbnri4+7gE8EKHtc/LgB9I1l729wLyRIA3 5ZIMYnuTR7LkCOaUnkhlh/QQ2aUJsQhLgWtlDduTEYSWBG1JdCT/7Sb5C3Ya8KoMq+58 oX6Y+cg1f72TW5SSh3mgpGIZirq728ZaJtYRB1gRDtU28uEHZS0M4EVDDel4qJEG+vE0 byWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=PyoVdroyPyvhja59XO1QXkr32AykO6CQ9CQO4c2weZU=; b=h5ciJLcr+N0rWnJ+XoLaTqwLKKmh7fYkrRCsiOoNlJGpQEmqr6vAT1u8bHpwbTyGX1 y65Au7GZYztQ+lzDuQALzGaFaVyXMK0FBZx5jn9k8uQhetpfCMkYscIxPB2QShVadbe6 gBP63r2jqwnIXURwwYyxR7ubRMW35/RqhR0asndM+X4ud2wtyNvIE9TItzm+b7XzJFWu TBmxnqUZQXYHcK2DhkiyWLGfyVJOm4idqkGdW8pYemtfkhbbafoBCaSFAH46BttSVcG8 t1tJAxWMh+RHY/vDkvHpAR34Dqa8yns1Z2RNKaiPRHT5Yz1Pk/0+gEi1iLr0HaUbYMHY UFsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i33-20020a0564020f2100b00447e9724023si1509209eda.270.2022.08.26.11.51.59; Fri, 26 Aug 2022 11:52:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345268AbiHZSts (ORCPT + 99 others); Fri, 26 Aug 2022 14:49:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345263AbiHZStH (ORCPT ); Fri, 26 Aug 2022 14:49:07 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B14BEEA179 for ; Fri, 26 Aug 2022 11:46:05 -0700 (PDT) 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 0B41CD6E; Fri, 26 Aug 2022 11:46:10 -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 5F6433F93E; Fri, 26 Aug 2022 11:46:02 -0700 (PDT) Message-ID: <43de1f15-42cf-45ea-db5c-30de976a6828@arm.com> Date: Fri, 26 Aug 2022 20:45:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v7 1/2] sched/rt: fix bad task migration for rt tasks Content-Language: en-US To: Schspa Shi , mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com Cc: linux-kernel@vger.kernel.org, zhaohui.shi@horizon.ai References: <20220713134823.95141-1-schspa@gmail.com> From: Dietmar Eggemann In-Reply-To: <20220713134823.95141-1-schspa@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 13/07/2022 15:48, Schspa Shi wrote: > Commit 95158a89dd50 ("sched,rt: Use the full cpumask for balancing") > allow find_lock_lowest_rq to pick a task with migration disabled. > This commit is intended to push the current running task on this CPU > away. > > There is a race scenario, which allows a migration disabled task to > be migrated to another CPU. > > When there is a RT task with higher priority, rt sched class was > intended to migrate higher priority task to lowest rq via push_rt_tasks, > this BUG will happen here. ^^^ You mean the warning in set_task_cpu()? > With the system running on PREEMPT_RT, rt_spin_lock will disable > migration, this will make the problem easier to reproduce. > > I have seen this crash on PREEMPT_RT, from the logs, there is a race ^^^^^ ? We still talking about the set_task_cpu() warning, right? [...] Reviewed-by: Dietmar Eggemann You should carry the Reviewed-by:'s you got in previous versions.