All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Hagar Hemdan <hagarhem@amazon.com>, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.6] Revert "sched/core: Reduce cost of sched_move_task when config autogroup"
Date: Tue, 25 Mar 2025 07:33:49 -0400	[thread overview]
Message-ID: <20250324203640-8a44c31bfa09fb2f@stable.kernel.org> (raw)
In-Reply-To: <20250324213706.8335-1-hagarhem@amazon.com>

[ Sasha's backport helper bot ]

Hi,

✅ All tests passed successfully. No issues detected.
No action required from the submitter.

The upstream commit SHA1 provided is correct: 76f970ce51c80f625eb6ddbb24e9cb51b977b598

WARNING: Author mismatch between patch and upstream commit:
Backport author: Hagar Hemdan<hagarhem@amazon.com>
Commit author: Dietmar Eggemann<dietmar.eggemann@arm.com>

Status in newer kernel trees:
6.13.y | Not found
6.12.y | Not found

Note: The patch differs from the upstream commit:
---
1:  76f970ce51c80 ! 1:  03098b8360be3 Revert "sched/core: Reduce cost of sched_move_task when config autogroup"
    @@
      ## Metadata ##
    -Author: Dietmar Eggemann <dietmar.eggemann@arm.com>
    +Author: Hagar Hemdan <hagarhem@amazon.com>
     
      ## Commit message ##
         Revert "sched/core: Reduce cost of sched_move_task when config autogroup"
     
    +    commit 76f970ce51c80f625eb6ddbb24e9cb51b977b598 upstream.
    +
         This reverts commit eff6c8ce8d4d7faef75f66614dd20bb50595d261.
     
         Hazem reported a 30% drop in UnixBench spawn test with commit
    @@ Commit message
         Tested-by: Hagar Hemdan <hagarhem@amazon.com>
         Cc: Linus Torvalds <torvalds@linux-foundation.org>
         Link: https://lore.kernel.org/r/20250314151345.275739-1-dietmar.eggemann@arm.com
    +    [Hagar: clean revert of eff6c8ce8dd7 to make it work on 6.6]
    +    Signed-off-by: Hagar Hemdan <hagarhem@amazon.com>
     
      ## kernel/sched/core.c ##
     @@ kernel/sched/core.c: void sched_release_group(struct task_group *tg)
    @@ kernel/sched/core.c: static struct task_group *sched_get_task_group(struct task_
      
      #ifdef CONFIG_FAIR_GROUP_SCHED
      	if (tsk->sched_class->task_change_group)
    -@@ kernel/sched/core.c: void sched_move_task(struct task_struct *tsk, bool for_autogroup)
    +@@ kernel/sched/core.c: void sched_move_task(struct task_struct *tsk)
      {
      	int queued, running, queue_flags =
      		DEQUEUE_SAVE | DEQUEUE_MOVE | DEQUEUE_NOCLOCK;
     -	struct task_group *group;
    + 	struct rq_flags rf;
      	struct rq *rq;
      
    - 	CLASS(task_rq_lock, rq_guard)(tsk);
    - 	rq = rq_guard.rq;
    - 
    + 	rq = task_rq_lock(tsk, &rf);
     -	/*
     -	 * Esp. with SCHED_AUTOGROUP enabled it is possible to get superfluous
     -	 * group changes.
     -	 */
     -	group = sched_get_task_group(tsk);
     -	if (group == tsk->sched_task_group)
    --		return;
    +-		goto unlock;
     -
      	update_rq_clock(rq);
      
    - 	running = task_current_donor(rq, tsk);
    -@@ kernel/sched/core.c: void sched_move_task(struct task_struct *tsk, bool for_autogroup)
    + 	running = task_current(rq, tsk);
    +@@ kernel/sched/core.c: void sched_move_task(struct task_struct *tsk)
      	if (running)
      		put_prev_task(rq, tsk);
      
     -	sched_change_group(tsk, group);
     +	sched_change_group(tsk);
    - 	if (!for_autogroup)
    - 		scx_cgroup_move_task(tsk);
    + 
    + 	if (queued)
    + 		enqueue_task(rq, tsk, queue_flags);
    +@@ kernel/sched/core.c: void sched_move_task(struct task_struct *tsk)
    + 		resched_curr(rq);
    + 	}
    + 
    +-unlock:
    + 	task_rq_unlock(rq, tsk, &rf);
    + }
      
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.6.y        |  Success    |  Success   |

      reply	other threads:[~2025-03-25 11:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-24 21:37 [PATCH 6.6] Revert "sched/core: Reduce cost of sched_move_task when config autogroup" Hagar Hemdan
2025-03-25 11:33 ` Sasha Levin [this message]

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=20250324203640-8a44c31bfa09fb2f@stable.kernel.org \
    --to=sashal@kernel.org \
    --cc=hagarhem@amazon.com \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.