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: <3ec57357-dc4e-be1b-963f-abcf760ecc5a@arm.com>
Date:   Fri, 7 Dec 2018 20:20:52 +0000
From:   Valentin Schneider <valentin.schneider@....com>
To:     Steve Sistare <steven.sistare@...cle.com>, mingo@...hat.com,
        peterz@...radead.org
Cc:     subhra.mazumdar@...cle.com, dhaval.giani@...cle.com,
        daniel.m.jordan@...cle.com, pavel.tatashin@...rosoft.com,
        matt@...eblueprint.co.uk, umgwanakikbuti@...il.com,
        riel@...hat.com, jbacik@...com, juri.lelli@...hat.com,
        vincent.guittot@...aro.org, quentin.perret@....com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 04/10] sched/fair: Dynamically update cfs_overload_cpus

Hi Steve,

On 06/12/2018 21:28, Steve Sistare wrote:
[...]
> @@ -3724,6 +3725,28 @@ static inline void update_misfit_status(struct task_struct *p, struct rq *rq)
>  	rq->misfit_task_load = task_h_load(p);
>  }
>  
> +static void overload_clear(struct rq *rq)

Nitpicky nit: cfs_overload_{clear, set} might be a bit better, just to
explicitly differentiate this from rq->rd->overload. Although I suppose
the naming problem will show up again if/when you try to expand this to
other classes...

> +{
> +	struct sparsemask *overload_cpus;
> +
> +	rcu_read_lock();
> +	overload_cpus = rcu_dereference(rq->cfs_overload_cpus);
> +	if (overload_cpus)
> +		sparsemask_clear_elem(overload_cpus, rq->cpu);
> +	rcu_read_unlock();
> +}
> +
> +static void overload_set(struct rq *rq)
> +{
> +	struct sparsemask *overload_cpus;
> +
> +	rcu_read_lock();
> +	overload_cpus = rcu_dereference(rq->cfs_overload_cpus);
> +	if (overload_cpus)
> +		sparsemask_set_elem(overload_cpus, rq->cpu);
> +	rcu_read_unlock();
> +}
> +
>  #else /* CONFIG_SMP */
>  
>  #define UPDATE_TG	0x0
[...]
> @@ -4468,8 +4495,12 @@ static void throttle_cfs_rq(struct cfs_rq *cfs_rq)
>  			dequeue = 0;
>  	}
>  
> -	if (!se)
> +	if (!se) {
>  		sub_nr_running(rq, task_delta);
> +		if (prev_nr >= 2 && prev_nr - task_delta < 2)
> +			overload_clear(rq);
> +
> +	}

Eventually it'd be nice to squash those into {add, sub}_nr_running(), but
you already mentioned wanting to stick to CFS for now, so I don't think
it's *too* much of a big deal.

>  
>  	cfs_rq->throttled = 1;
>  	cfs_rq->throttled_clock = rq_clock(rq);
> @@ -4499,6 +4530,7 @@ static void throttle_cfs_rq(struct cfs_rq *cfs_rq)
[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ