Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3668058imw; Mon, 11 Jul 2022 13:15:34 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t8HdfTWtuOesD2wd14nunKA0NGaVRF9WR2QgJG/3jt6ojVAvgMNNRrtG4AVEcnBS1mL0Mq X-Received: by 2002:a17:902:e842:b0:16c:5639:eb3e with SMTP id t2-20020a170902e84200b0016c5639eb3emr2436107plg.119.1657570534454; Mon, 11 Jul 2022 13:15:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657570534; cv=none; d=google.com; s=arc-20160816; b=MIkBAPk6nbwMQ+icJQNvu9baaTADATVo6QE89oP3WFzJ9oOK7+KFmvGE2L5zg9sjoY dIvcJES+AC+0j3/+bph0CKEL+3XT2sBHxbSxGwOD/TesC2+I/XieaczdTPiUfaIvUFOB u3cxjWEviTvMlUJi2BiXBG4PTJDUImGGuezOeSRDboiZdm74Q/nfLqisoK9WjsOiPIWc lNjlgdfxPIjf6uxzqF2iIkmzXbclu8OuHSoKH5/WDOQUNbuUt7OPnptT4fv7OyITiCWt TVS57Cojszx1aBjmhPiYxajy3s6YGMUx+NJslf62wyrRVZUMRet1GazPT547v/WyCDl2 NW7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=Ck8RIG4fmHwIj9BhQOMxEVBWNnEuICFMtDl+UpmbUoY=; b=EviDgYSCReJJnFJ8HT2FPbnCbdjwzOH6lGzmQIrAf+K8EyrGEDyRYxQI18KLjvU6da 7GpVhdHJVcMCTsYhc1FzTKIKlRjch5flKy3i2nip0GY5QpSCd9sbzXuB8YlmNJNNAIwS IUUx3sgt5OFIxcki3dbw5PdPshjID5Eu3KmrOnt8WeZR5kUrRvKne4kfMwJY9eCR2BQA a1nd8ijkHwYnmzk5ZKuDu3otCJAgSCAHhk9BC/2Z/9xriEGk3igdQ0WuycoAq/kX1r5R WIalvCoL/ZX45WVeTtf7hitYGiLWXS/x7AVIMCM1j6CHPlXi8cOzDJEsw8mh10GFqi5+ j+PA== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l10-20020a17090ac58a00b001efec8a14ecsi11025068pjt.99.2022.07.11.13.15.21; Mon, 11 Jul 2022 13:15:34 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229622AbiGKUKo (ORCPT + 99 others); Mon, 11 Jul 2022 16:10:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbiGKUKm (ORCPT ); Mon, 11 Jul 2022 16:10:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F08AADE80 for ; Mon, 11 Jul 2022 13:10:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8DB72615B7 for ; Mon, 11 Jul 2022 20:10:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF73EC34115; Mon, 11 Jul 2022 20:10:39 +0000 (UTC) Date: Mon, 11 Jul 2022 16:10:37 -0400 From: Steven Rostedt To: Schspa Shi Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 1/2] sched/rt: fix bad task migration for rt tasks Message-ID: <20220711161037.06b8c1ea@gandalf.local.home> In-Reply-To: References: <20220708211755.73637-1-schspa@gmail.com> <20220708172614.14191089@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, 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 Sat, 09 Jul 2022 05:32:25 +0800 Schspa Shi wrote: > >> +++ b/kernel/sched/rt.c > >> @@ -1998,11 +1998,14 @@ static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq) > >> * the mean time, task could have > >> * migrated already or had its affinity changed. > >> * Also make sure that it wasn't scheduled on its rq. > >> + * It is possible the task has running for a while, > > > > I don't understand the "running for a while" part. That doesn't make sense. > > > > When I say "run for a while" I mean as long as the task has > run capability, we should check the migrate disabled flag again. > > > The only way this can happen is that it was scheduled, set > > "migrate_disabled" and then got preempted where it's no longer on the run > > queue. > > Yes, it is the only case. Can we then change the comment, as the "running for a while" is not clear to what the issue is, and honestly, sounds misleading. -- Steve