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=-9.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 5062FC433DF for ; Wed, 1 Jul 2020 10:07:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2283120722 for ; Wed, 1 Jul 2020 10:07:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mg.codeaurora.org header.i=@mg.codeaurora.org header.b="hFP91GHw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729818AbgGAKHR (ORCPT ); Wed, 1 Jul 2020 06:07:17 -0400 Received: from mail29.static.mailgun.info ([104.130.122.29]:64549 "EHLO mail29.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728755AbgGAKHR (ORCPT ); Wed, 1 Jul 2020 06:07:17 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1593598036; h=Message-Id: Date: Subject: Cc: To: From: Sender; bh=IX2RpUwX2wMUnm6+qGm+VBcSWDXoYxftzP9dlgQzBWI=; b=hFP91GHw8EkesLmJvth1WF89HaQAbYT10g4XaNOOiJsPhJjKcru3P92UE2ag2336aWNjoc94 8P/EHsCiWpmqQWCU8ANlEpSJ2NgQ41r4RABpxrmeczLrtK9N9AirfOlgvE4kmOGtO0KwAKQa sbUAn8QSl3749+Mt3axKuYvoxpA= X-Mailgun-Sending-Ip: 104.130.122.29 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n11.prod.us-west-2.postgun.com with SMTP id 5efc6053e144dd511543b22d (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 01 Jul 2020 10:07:15 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 9D607C433CA; Wed, 1 Jul 2020 10:07:15 +0000 (UTC) Received: from zijuhu-gv.qualcomm.com (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: zijuhu) by smtp.codeaurora.org (Postfix) with ESMTPSA id 08E5BC433C8; Wed, 1 Jul 2020 10:07:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 08E5BC433C8 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=zijuhu@codeaurora.org From: Zijun Hu To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org Cc: dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, linux-kernel@vger.kernel.org, zijuhu@codeaurora.org Subject: [PATCH v1] sched/cfs: Fix pick_next_entity() implementation error Date: Wed, 1 Jul 2020 18:07:06 +0800 Message-Id: <1593598026-2451-1-git-send-email-zijuhu@codeaurora.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org sched_entity @se not static @left should be compared to pick up @cfs_rq->next. Signed-off-by: Zijun Hu --- kernel/sched/fair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 658aa7a2ae6f..4790f2d851ad 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4452,13 +4452,13 @@ pick_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *curr) /* * Prefer last buddy, try to return the CPU to a preempted task. */ - if (cfs_rq->last && wakeup_preempt_entity(cfs_rq->last, left) < 1) + if (cfs_rq->last && wakeup_preempt_entity(cfs_rq->last, se) < 1) se = cfs_rq->last; /* * Someone really wants this to run. If it's not unfair, run it. */ - if (cfs_rq->next && wakeup_preempt_entity(cfs_rq->next, left) < 1) + if (cfs_rq->next && wakeup_preempt_entity(cfs_rq->next, se) < 1) se = cfs_rq->next; clear_buddies(cfs_rq, se); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project