mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hui Su <sh_def@163.com>
To: Peter Zijlstra <peterz@infradead.org>, Ingo Molnar <mingo@redhat.com>
Cc: Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	K Prateek Nayak <kprateek.nayak@amd.com>,
	Valentin Schneider <vschneid@redhat.com>,
	John Stultz <jstultz@google.com>, Chen Yu <yu.c.chen@intel.com>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	linux-kernel@vger.kernel.org, Hui Su <sh_def@163.com>
Subject: [PATCH v2 0/2] sched: Fix execution-context tick handling under proxy execution
Date: Thu,  3 Sep 2026 12:11:52 +0800	[thread overview]
Message-ID: <20260903041154.2479761-1-sh_def@163.com> (raw)

Proxy execution separates the scheduling context in rq->donor from the
execution context in rq->curr. sched_tick() dispatches the scheduling-class
task tick through rq->donor, while NUMA and cache task ticks consume state
belonging to the task actually executing.

Move both execution-context ticks to the scheduler core and run them when
rq->curr is a fair task. Keep the corresponding handling in
sched_tick_remote() for full-dynticks CPUs.

Changes in v2:
- Move NUMA and cache execution-context tick handling from task_tick_fair()
  to sched_tick().
- Invoke the hooks when rq->curr is a fair task, allowing them to run when
  the donor belongs to another scheduling class.
- Add the corresponding calls to sched_tick_remote() to preserve
  full-dynticks behavior.

Tested with a QEMU topology providing two NUMA nodes and two LLCs. With
an RT donor and a fair mutex owner, task_tick_numa() and
task_tick_cache() were observed with p == rq->curr while rq->donor was
a different RT task. The proxy test completed three episodes without
warnings or errors.

Also runtime-tested a QEMU guest with nohz_full=1. sched_tick_remote()
ran approximately once per second on the full-dynticks CPU and entered
the fair execution-context tick path. The relevant configurations,
including NUMA/cache feature combinations and CONFIG_NO_HZ_FULL=y, were
build-tested; the affected objects also passed a W=1 build.

Link: https://lore.kernel.org/r/20260902163336.1552840-1-sh_def@163.com

Hui Su (2):
  sched/numa: Drive NUMA task tick from execution context
  sched/cache: Drive cache task tick from execution context

 kernel/sched/core.c  | 13 +++++++++++++
 kernel/sched/fair.c  | 13 ++++---------
 kernel/sched/sched.h |  2 ++
 3 files changed, 19 insertions(+), 9 deletions(-)

-- 
2.54.0


             reply	other threads:[~2026-09-03  4:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03  4:11 Hui Su [this message]
2026-09-03  4:11 ` [PATCH v2 1/2] sched/numa: Drive NUMA task tick from execution context Hui Su
2026-09-03 12:41   ` Chen, Yu C
2026-09-03 21:30     ` Tim Chen
2026-09-04  5:16       ` Hui Su
2026-09-04 14:10       ` Hui Su
2026-09-04 20:15         ` Tim Chen
2026-09-05 13:58           ` Hui Su
2026-09-08  5:38             ` Chen, Yu C
2026-09-08 16:01               ` Tim Chen
2026-09-09 10:55                 ` Hui Su
2026-09-04 16:10       ` Chen Yu
2026-09-04 20:24         ` Tim Chen
2026-09-03  4:11 ` [PATCH v2 2/2] sched/cache: Drive cache " Hui Su
2026-09-03  4:37   ` K Prateek Nayak
2026-09-03  4:51     ` Hui Su
2026-09-03 17:23   ` Tim Chen
2026-09-04  4:03     ` Hui Su

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=20260903041154.2479761-1-sh_def@163.com \
    --to=sh_def@163.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=jstultz@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=kprateek.nayak@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tim.c.chen@linux.intel.com \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=yu.c.chen@intel.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®