Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5306118pxv; Wed, 21 Jul 2021 02:13:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnBcQciRbc9y0B7y1gYQru9ZBzC2WfWfUoAjyjq1BGeXtf4hEt5Nn6PPvH6k4c7en2JwvH X-Received: by 2002:a17:906:aaca:: with SMTP id kt10mr37600063ejb.127.1626858797576; Wed, 21 Jul 2021 02:13:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626858797; cv=none; d=google.com; s=arc-20160816; b=bGo0nnrYKmfthbLBqllWW/Tjmun0dedSxS8+bHyTnMXey766rVyuFXxYCtgmZyGGgT K3cgJFOm3MwmCzjvWCyE57nqg8ZnNQqTWQ5nwR1KarH71XImXKzqHHgrr9DYGfPUk2tu oBwxuQJGjOZMWe2CjVfOkzmjOxvhk0VfGTcmwcDyuJYaRuRjxLS1o50BUXM1FXcGqM2L QQ+AvZ9XqDlt1z4LRkcdRTTJbrhYRF2ule9tUwMMlS5yTCGOrDQ9KMOT92+TX/wzgZr/ otJygZ/gCJMYYmapM3K7NxWEsZ+mQc+YY9gyDnQgdevtoxrfllQTU6oLBtgh+f7Ui/+S LV+A== 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 :message-id:date:subject:cc:to:from; bh=2aVmq3lSg9Xy75OIncHS/DTFdoxYySK5iMaRj33Lqx8=; b=zhhY1zVhi1Trx0PGd2lYKGWA+ul3z0Jj5d/fTpBDNJdY/uYLCHo+HEwVYfCM5Eg5NI +y+YIc71kLelMQU2JU5CeFKsLdPtGCfcdFXF9CzkvYmjbd2D7o4xcVt4Ad1Otkv9mRWs aFw04Eo2zAN9pAzAosww3M4UAWpHeoxF89O/hkKWi4j8RDxRzSngE1anlZANfCaKmyD8 Gize15Tl+L/G6OgPQ1trOnhEowMJaSBkndbOI6ZoGYB338TFOzKzc/0ujxLfr4Mj91ZO gHipgqeTOIasSaJNyqFV8Asjx8GmZar2KsmYGmT+8bqymPlffjdUwx/X5JCiyYEGIFx9 9F/g== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y6si12665021edd.522.2021.07.21.02.12.54; Wed, 21 Jul 2021 02:13:17 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235743AbhGUI0m (ORCPT + 99 others); Wed, 21 Jul 2021 04:26:42 -0400 Received: from szxga01-in.huawei.com ([45.249.212.187]:7041 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238033AbhGUIZJ (ORCPT ); Wed, 21 Jul 2021 04:25:09 -0400 Received: from dggeml754-chm.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4GV8fR3Np8zYdrW; Wed, 21 Jul 2021 16:59:43 +0800 (CST) Received: from huawei.com (10.175.103.14) by dggeml754-chm.china.huawei.com (10.1.199.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Wed, 21 Jul 2021 17:05:29 +0800 From: Wang Hui To: , , , , , , , , CC: Subject: [PATCH -next] sched: remove redundant on_rq status change Date: Wed, 21 Jul 2021 17:11:09 +0800 Message-ID: <20210721091109.1406043-1-john.wanghui@huawei.com> X-Mailer: git-send-email 2.29.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.14] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggeml754-chm.china.huawei.com (10.1.199.153) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org activate_task/deactivate_task will change on_rq status, no need to do it again. Signed-off-by: Wang Hui --- kernel/sched/core.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 014ce8b385c7..a0c35da186d0 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5679,11 +5679,9 @@ static bool try_steal_cookie(int this, int that) if (p->core_occupation > dst->idle->core_occupation) goto next; - p->on_rq = TASK_ON_RQ_MIGRATING; deactivate_task(src, p, 0); set_task_cpu(p, this); activate_task(dst, p, 0); - p->on_rq = TASK_ON_RQ_QUEUED; resched_curr(dst); -- 2.29.0