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: <20230621124933.GE2053369@hirez.programming.kicks-ass.net>
Date:   Wed, 21 Jun 2023 14:49:33 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     David Vernet <void@...ifault.com>
Cc:     linux-kernel@...r.kernel.org, mingo@...hat.com,
        juri.lelli@...hat.com, vincent.guittot@...aro.org,
        rostedt@...dmis.org, dietmar.eggemann@....com, bsegall@...gle.com,
        mgorman@...e.de, bristot@...hat.com, vschneid@...hat.com,
        joshdon@...gle.com, roman.gushchin@...ux.dev, tj@...nel.org,
        kernel-team@...a.com
Subject: Re: [RFC PATCH 2/3] sched/fair: Add SWQUEUE sched feature and
 skeleton calls

On Tue, Jun 13, 2023 at 12:20:03AM -0500, David Vernet wrote:

I can't help but read this thing as software-queue :/ Can we please pick
a better name?

> @@ -6368,6 +6390,9 @@ enqueue_task_fair(struct rq *rq, struct task_struct *p, int flags)
>  	if (!task_new)
>  		update_overutilized_status(rq);
>  
> +	if (sched_feat(SWQUEUE))
> +		swqueue_enqueue(rq, p, flags);
> +
>  enqueue_throttle:
>  	assert_list_leaf_cfs_rq(rq);
>  
> @@ -6449,6 +6474,9 @@ static void dequeue_task_fair(struct rq *rq, struct task_struct *p, int flags)
>  dequeue_throttle:
>  	util_est_update(&rq->cfs, p, task_sleep);
>  	hrtick_update(rq);
> +
> +	if (sched_feat(SWQUEUE))
> +		swqueue_remove_task(p);
>  }
>  
>  #ifdef CONFIG_SMP

_enqueue() should obviously be complemented by _dequeue(). This naming
is offensive :-)

> @@ -8155,12 +8183,18 @@ done: __maybe_unused;
>  
>  	update_misfit_status(p, rq);
>  
> +	if (sched_feat(SWQUEUE))
> +		swqueue_remove_task(p);
> +
>  	return p;
>  
>  idle:
>  	if (!rf)
>  		return NULL;
>  
> +	if (sched_feat(SWQUEUE) && swqueue_pick_next_task(rq, rf))
> +		return RETRY_TASK;
> +
>  	new_tasks = newidle_balance(rq, rf);
>  
>  	/*

That's either not correct or insufficient or both.

It fails to consider the whole core-scheduling mess. But it also fails
to consider the regular (non optimized) pick case that should do newidle
through put_prev_task_balance() -> balance_fair().

I think placing the pick call in newidle_balance() itself is the
simplest solution.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ