lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <xhsmh5xwqa48q.mognet@vschneid-thinkpadt14sgen2i.remote.csb>
Date: Tue, 09 Apr 2024 18:29:57 +0200
From: Valentin Schneider <vschneid@...hat.com>
To: John Stultz <jstultz@...gle.com>, LKML <linux-kernel@...r.kernel.org>
Cc: Connor O'Brien <connoro@...gle.com>, Joel Fernandes <joelaf@...gle.com>,
 Qais Yousef <qyousef@...gle.com>, Ingo Molnar <mingo@...hat.com>, Peter
 Zijlstra <peterz@...radead.org>, Juri Lelli <juri.lelli@...hat.com>,
 Vincent Guittot <vincent.guittot@...aro.org>, Dietmar Eggemann
 <dietmar.eggemann@....com>, Steven Rostedt <rostedt@...dmis.org>, Ben
 Segall <bsegall@...gle.com>, Zimuzo Ezeozue <zezeozue@...gle.com>, Youssef
 Esmat <youssefesmat@...gle.com>, Mel Gorman <mgorman@...e.de>, Daniel
 Bristot de Oliveira <bristot@...hat.com>, Will Deacon <will@...nel.org>,
 Waiman Long <longman@...hat.com>, Boqun Feng <boqun.feng@...il.com>, "Paul
 E. McKenney" <paulmck@...nel.org>, Metin Kaya <Metin.Kaya@....com>, Xuewen
 Yan <xuewen.yan94@...il.com>, K Prateek Nayak <kprateek.nayak@....com>,
 Thomas Gleixner <tglx@...utronix.de>, kernel-team@...roid.com, John Stultz
 <jstultz@...gle.com>
Subject: Re: [RESEND][PATCH v9 4/7] sched: Add do_push_task helper

On 01/04/24 16:44, John Stultz wrote:
> From: Connor O'Brien <connoro@...gle.com>
>
> Switch logic that deactivates, sets the task cpu,
> and reactivates a task on a different rq to use a
> helper that will be later extended to push entire
> blocked task chains.
>
> This patch was broken out from a larger chain migration
> patch originally by Connor O'Brien.
>
> Cc: Joel Fernandes <joelaf@...gle.com>
> Cc: Qais Yousef <qyousef@...gle.com>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Juri Lelli <juri.lelli@...hat.com>
> Cc: Vincent Guittot <vincent.guittot@...aro.org>
> Cc: Dietmar Eggemann <dietmar.eggemann@....com>
> Cc: Valentin Schneider <vschneid@...hat.com>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Ben Segall <bsegall@...gle.com>
> Cc: Zimuzo Ezeozue <zezeozue@...gle.com>
> Cc: Youssef Esmat <youssefesmat@...gle.com>
> Cc: Mel Gorman <mgorman@...e.de>
> Cc: Daniel Bristot de Oliveira <bristot@...hat.com>
> Cc: Will Deacon <will@...nel.org>
> Cc: Waiman Long <longman@...hat.com>
> Cc: Boqun Feng <boqun.feng@...il.com>
> Cc: "Paul E. McKenney" <paulmck@...nel.org>
> Cc: Metin Kaya <Metin.Kaya@....com>
> Cc: Xuewen Yan <xuewen.yan94@...il.com>
> Cc: K Prateek Nayak <kprateek.nayak@....com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: kernel-team@...roid.com
> Tested-by: K Prateek Nayak <kprateek.nayak@....com>

Naming nit below notwithstanding:

Reviewed-by: Valentin Schneider <vschneid@...hat.com>

> Signed-off-by: Connor O'Brien <connoro@...gle.com>
> [jstultz: split out from larger chain migration patch]
> Signed-off-by: John Stultz <jstultz@...gle.com>

> diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
> index d2242679239e..16057de24ecd 100644
> --- a/kernel/sched/sched.h
> +++ b/kernel/sched/sched.h
> @@ -3472,5 +3472,14 @@ static inline void init_sched_mm_cid(struct task_struct *t) { }
>  
>  extern u64 avg_vruntime(struct cfs_rq *cfs_rq);
>  extern int entity_eligible(struct cfs_rq *cfs_rq, struct sched_entity *se);
> +#ifdef CONFIG_SMP
> +static inline
> +void do_push_task(struct rq *rq, struct rq *dst_rq, struct task_struct *task)

The naming IMO unfortunately clashes with the hotplug push_task /
balance_push() stuff.

AFAICT this is move_queued_task() but in a double rq lock
context. How about move_queued_task_locked()?

Interestingly, all the patched call sites end up with a resched_curr(), but
move_queued_task() has wakeup_preempt() instead.  

> +{
> +	deactivate_task(rq, task, 0);
> +	set_task_cpu(task, dst_rq->cpu);
> +	activate_task(dst_rq, task, 0);
> +}
> +#endif
>  
>  #endif /* _KERNEL_SCHED_SCHED_H */
> -- 
> 2.44.0.478.gd926399ef9-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ