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] [day] [month] [year] [list]
Message-ID: <86818555-c61e-476c-8317-e8f523bb2054@linux.alibaba.com>
Date: Sun, 29 Sep 2024 10:02:59 +0800
From: Tianchen Ding <dtcccc@...ux.alibaba.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: kprateek.nayak@....com, wuyun.abel@...edance.com,
 youssefesmat@...omium.org, tglx@...utronix.de, efault@....de,
 mingo@...hat.com, juri.lelli@...hat.com, vincent.guittot@...aro.org,
 dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
 mgorman@...e.de, vschneid@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 23/24] sched/eevdf: Propagate min_slice up the cgroup
 hierarchy

Hi Peter,

On 2024/7/27 18:27, Peter Zijlstra wrote:
> In the absence of an explicit cgroup slice configureation, make mixed
> slice length work with cgroups by propagating the min_slice up the
> hierarchy.

Will it be acceptable to introduce a cgroup interface (e.g., sth. like 
cpu.fair_runtime or cpu.fair_slice) to overwrite the caculated min_slice?
This could be useful in container scenarios.

> 
> This ensures the cgroup entity gets timely service to service its
> entities that have this timing constraint set on them.
> 
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
>   include/linux/sched.h |    1
>   kernel/sched/fair.c   |   57 +++++++++++++++++++++++++++++++++++++++++++++++++-
>   2 files changed, 57 insertions(+), 1 deletion(-)
> 
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -542,6 +542,7 @@ struct sched_entity {
>   	struct rb_node			run_node;
>   	u64				deadline;
>   	u64				min_vruntime;
> +	u64				min_slice;
>   
>   	struct list_head		group_node;
>   	unsigned char			on_rq;
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -782,6 +782,21 @@ static void update_min_vruntime(struct c
>   	cfs_rq->min_vruntime = __update_min_vruntime(cfs_rq, vruntime);
>   }
>   
> +static inline u64 cfs_rq_min_slice(struct cfs_rq *cfs_rq)
> +{
> +	struct sched_entity *root = __pick_root_entity(cfs_rq);
> +	struct sched_entity *curr = cfs_rq->curr;
> +	u64 min_slice = ~0ULL;
> +
> +	if (curr && curr->on_rq)
> +		min_slice = curr->slice;
> +
> +	if (root)
> +		min_slice = min(min_slice, root->min_slice);

If a sched_delayed se keeps the min_slice, then the parent se will receive a 
shorter slice (from the sched_delayed se) than it should be. Is it a problem?

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ