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: <20141008083721.GE10832@worktop.programming.kicks-ass.net>
Date:	Wed, 8 Oct 2014 10:37:21 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Mike Turquette <mturquette@...aro.org>
Cc:	Morten Rasmussen <morten.rasmussen@....com>, mingo@...hat.com,
	dietmar.eggemann@....com, pjt@...gle.com, bsegall@...gle.com,
	vincent.guittot@...aro.org, nicolas.pitre@...aro.org,
	rjw@...ysocki.net, linux-kernel@...r.kernel.org,
	tuukka.tikkanen@...aro.org
Subject: Re: [PATCH RFC 1/2] sched: cfs: introduce capacity_ops

On Tue, Oct 07, 2014 at 11:26:11PM -0700, Mike Turquette wrote:
> +struct capacity_ops {
> +	unsigned long (*get_capacity)(int cpu);
> +	spinlock_t lock;
> +};

Yeah, fail there. Ops vectors should not contain serialization, that
simply doesn't work. It means you cannot switch the entire vector out.

Secondly, I dislike this because indirect function calls are more
expensive than direct calls.

> +static unsigned long cfs_get_capacity(int cpu)
>  {
> -	return default_scale_load_capacity(cpu);
> +	unsigned long ret;
> +
> +	rcu_read_lock();
> +	ret = cfs_capacity_ops.get_capacity(cpu);
> +	rcu_read_unlock();
> +
> +	return ret;
> +}

So ideally we'd never change these things, so rcu or whatnot should not
be required.

> +/**
> + * set_default_capacity_ops - reset capacity ops to their default
> + * @eops - capacity_ops we are reseting
> + *
> + * Useful for loadable modules that supply custom capacity_ops callbacks.  When
> + * unloading these modules need to restore the originals before the custom
> + * callbacks disappear.

Yeah, like hell no. We do not want modules to affect scheduler
behaviour.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ