Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp308992ybg; Wed, 3 Jun 2020 01:08:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxW+WaJUOgp1PbmtIKf11mCjlLDqsl9/tqUqJBjaRDrVLcLuWpdrp+LOkIVQCpyxSuPiy9 X-Received: by 2002:a17:906:543:: with SMTP id k3mr2003637eja.262.1591171692520; Wed, 03 Jun 2020 01:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591171692; cv=none; d=google.com; s=arc-20160816; b=Z5poVSP7N8UWK0bYg4tsoDDP5IlNni+qoeJ0/bRmlLni3xzCHTftcj6qfYkVwg1ZID 94TrMyMJMNdmsZ1WccKstpR4RO3cUWxl7iZoRu6D7RBc+fWlsstUjKUTZlhjOrpmhPA2 0GH/V3tce0uhOTRIKsmLIplACPa6wZJx9t2TR4FfCcznuqqsdrkcl//LsExONcQxZEtE GRj3nANw/E/fekPBSBOMtdVQF2O98jhqc8uB3gvGrw/dZK8Axx+Fj4yiAYt5xAqnC2yA +34IKg/KEmY+YULAG+Px9UbxHJ9BnX6qPxUsRlsk+8WlOJJjmIjDy8909ba4lLV9I3bf kgkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=qFnSecnoMuEqCch5U9ppmRDc2yJOGzvr8qOahPhzoSc=; b=HeJxZP6kOXL7muU8JiVAtj1CiQl+6Lfoi0Fw1GbAwHS1hw2KeampOKyIHWsJQQHvwT HdaAuk0LO1dxyuNZQvEEfxjblWYXnKn8A5rK4gEUO9RThQseaanNshbVkriG6ZY2cksQ T8J38KAIzfPIGJ6ARtwgoCD3Bm6Ut+Bf93s2llDGfcHvSvEjwd9Ct/XDbMqfi9/o4R5e 32FJvpEL2bSR/IYKBD2lb0b4QGQRcNpn6Y+5t2bZfMiBfA58tp+DftNvDX6Izjg8ITpy rmgxsz31gphk98V7cB6K6MTmE4LFRIK1K8c4zN4c81fT73KuL6dK4OgFVyuEwacK0k3B IuBg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s4si705396edy.21.2020.06.03.01.07.49; Wed, 03 Jun 2020 01:08:12 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726219AbgFCID1 (ORCPT + 99 others); Wed, 3 Jun 2020 04:03:27 -0400 Received: from foss.arm.com ([217.140.110.172]:58236 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726177AbgFCIDY (ORCPT ); Wed, 3 Jun 2020 04:03:24 -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 9A86F1045; Wed, 3 Jun 2020 01:03:23 -0700 (PDT) Received: from macbook.arm.com (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5766B3F52E; Wed, 3 Jun 2020 01:03:22 -0700 (PDT) From: Dietmar Eggemann To: Ingo Molnar , Peter Zijlstra Cc: Vincent Guittot , Steven Rostedt , Juri Lelli , linux-kernel@vger.kernel.org Subject: [PATCH 2/4] sched/core: Remove redundant 'preempt' param from sched_class->yield_to_task() Date: Wed, 3 Jun 2020 10:03:02 +0200 Message-Id: <20200603080304.16548-3-dietmar.eggemann@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200603080304.16548-1-dietmar.eggemann@arm.com> References: <20200603080304.16548-1-dietmar.eggemann@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 6d1cafd8b56e ("sched: Resched proper CPU on yield_to()") moved the code to resched the CPU from yield_to_task_fair() to yield_to() making the preempt parameter in sched_class->yield_to_task() unnecessary. Remove it. No other sched_class implements yield_to_task(). Signed-off-by: Dietmar Eggemann --- kernel/sched/core.c | 2 +- kernel/sched/fair.c | 2 +- kernel/sched/sched.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 95e457d4ed1c..687b16047f92 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5812,7 +5812,7 @@ int __sched yield_to(struct task_struct *p, bool preempt) if (task_running(p_rq, p) || p->state) goto out_unlock; - yielded = curr->sched_class->yield_to_task(rq, p, preempt); + yielded = curr->sched_class->yield_to_task(rq, p); if (yielded) { schedstat_inc(rq->yld_count); /* diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index dda9b194d225..5c4a559d0dae 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -7158,7 +7158,7 @@ static void yield_task_fair(struct rq *rq) set_skip_buddy(se); } -static bool yield_to_task_fair(struct rq *rq, struct task_struct *p, bool preempt) +static bool yield_to_task_fair(struct rq *rq, struct task_struct *p) { struct sched_entity *se = &p->se; diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 4b32cff0dcbe..12a0d0c7c164 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1752,7 +1752,7 @@ struct sched_class { void (*enqueue_task) (struct rq *rq, struct task_struct *p, int flags); void (*dequeue_task) (struct rq *rq, struct task_struct *p, int flags); void (*yield_task) (struct rq *rq); - bool (*yield_to_task)(struct rq *rq, struct task_struct *p, bool preempt); + bool (*yield_to_task)(struct rq *rq, struct task_struct *p); void (*check_preempt_curr)(struct rq *rq, struct task_struct *p, int flags); -- 2.17.1