mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: K Prateek Nayak <kprateek.nayak@amd.com>
To: Vincent Guittot <vincent.guittot@linaro.org>, <mingo@redhat.com>,
	<peterz@infradead.org>, <juri.lelli@redhat.com>,
	<dietmar.eggemann@arm.com>, <rostedt@goodmis.org>,
	<bsegall@google.com>, <mgorman@suse.de>, <vschneid@redhat.com>,
	<linux-kernel@vger.kernel.org>
Cc: <pauld@redhat.com>, <efault@gmx.de>, <luis.machado@arm.com>
Subject: Re: [PATCH 10/10 v2] sched/fair: Fix variable declaration position
Date: Sat, 30 Nov 2024 00:00:09 +0530	[thread overview]
Message-ID: <38a2431d-4c5a-4273-8f1e-7e2f65748501@amd.com> (raw)
In-Reply-To: <20241129161756.3081386-11-vincent.guittot@linaro.org>

Hello Vincent,

On 11/29/2024 9:47 PM, Vincent Guittot wrote:
> Move variable declaration at the beginning of the function
> 
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> ---
>   kernel/sched/fair.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index c34874203da2..87552870958c 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -5632,6 +5632,7 @@ static int dequeue_entities(struct rq *rq, struct sched_entity *se, int flags);
>   static struct sched_entity *
>   pick_next_entity(struct rq *rq, struct cfs_rq *cfs_rq)
>   {
> +	struct sched_entity *se;
>   	/*
>   	 * Enabling NEXT_BUDDY will affect latency but not fairness.
>   	 */
> @@ -5642,7 +5643,7 @@ pick_next_entity(struct rq *rq, struct cfs_rq *cfs_rq)
>   		return cfs_rq->next;
>   	}
>   
> -	struct sched_entity *se = pick_eevdf(cfs_rq);
> +	se = pick_eevdf(cfs_rq);
>   	if (se->sched_delayed) {
>   		dequeue_entities(rq, se, DEQUEUE_SLEEP | DEQUEUE_DELAYED);
>   		SCHED_WARN_ON(se->sched_delayed);

Perhaps also squash in:

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 3356315d7e64..321e3f9e2ac4 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5476,6 +5476,7 @@ static bool
  dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
  {
  	bool sleep = flags & DEQUEUE_SLEEP;
+	int action = UPDATE_TG;
  
  	update_curr(cfs_rq);
  
@@ -5502,7 +5503,6 @@ dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
  		}
  	}
  
-	int action = UPDATE_TG;
  	if (entity_is_task(se) && task_on_rq_migrating(task_of(se)))
  		action |= DO_DETACH;
  
--

while at it :)

-- 
Thanks and Regards,
Prateek


  reply	other threads:[~2024-11-29 18:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-29 16:17 [PATCH 0/10 v2] sched/fair: Fix statistics with delayed dequeue Vincent Guittot
2024-11-29 16:17 ` [PATCH 01/10 v2] sched/eevdf: More PELT vs DELAYED_DEQUEUE Vincent Guittot
2024-11-29 16:17 ` [PATCH 02/10 v2] sched/fair: Rename h_nr_running into h_nr_queued Vincent Guittot
2024-11-29 16:17 ` [PATCH 03/10 v2] sched/fair: Add new cfs_rq.h_nr_runnable Vincent Guittot
2024-12-02  9:54   ` Peter Zijlstra
2024-12-02  9:57     ` Vincent Guittot
2024-11-29 16:17 ` [PATCH 04/10 v2] sched/fair: Removed unsued cfs_rq.h_nr_delayed Vincent Guittot
2024-11-29 16:17 ` [PATCH 05/10 v2] sched/fair: Rename cfs_rq.idle_h_nr_running into h_nr_idle Vincent Guittot
2024-11-29 16:17 ` [PATCH 06/10 v2] sched/fair: Remove unused cfs_rq.idle_nr_running Vincent Guittot
2024-11-29 16:17 ` [PATCH 07/10 v2] sched/fair: Rename cfs_rq.nr_running into nr_queued Vincent Guittot
2024-11-29 16:17 ` [PATCH 08/10 v2] sched/fair: Do not try to migrate delayed dequeue task Vincent Guittot
2024-11-29 16:17 ` [PATCH 09/10 v2] sched/fair: Fix sched_can_stop_tick() for fair tasks Vincent Guittot
2024-11-29 18:26   ` K Prateek Nayak
2024-12-02  9:18     ` Vincent Guittot
2024-11-29 16:17 ` [PATCH 10/10 v2] sched/fair: Fix variable declaration position Vincent Guittot
2024-11-29 18:30   ` K Prateek Nayak [this message]
2024-12-02  9:19     ` Vincent Guittot
2024-12-01 13:30 ` [PATCH 0/10 v2] sched/fair: Fix statistics with delayed dequeue Mike Galbraith
2024-12-02  9:17   ` Vincent Guittot
2024-12-02  9:23     ` Luis Machado
2024-12-02  9:59       ` Vincent Guittot
2024-12-02 13:52         ` Dietmar Eggemann
2024-12-02  9:58     ` K Prateek Nayak
2024-12-02 11:42       ` Vincent Guittot
2024-12-02 14:24         ` Vincent Guittot
2024-12-02 18:34     ` Mike Galbraith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38a2431d-4c5a-4273-8f1e-7e2f65748501@amd.com \
    --to=kprateek.nayak@amd.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=efault@gmx.de \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luis.machado@arm.com \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=pauld@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®