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]
Date:	Thu, 29 May 2014 02:36:11 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Christoph Lameter <cl@...two.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Gilad Ben-Yossef <gilad@...yossef.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Tejun Heo <tj@...nel.org>, John Stultz <johnstul@...ibm.com>,
	Mike Frysinger <vapier@...too.org>,
	Minchan Kim <minchan.kim@...il.com>,
	Hakan Akkan <hakanakkan@...il.com>,
	Max Krasnyansky <maxk@...lcomm.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org, hughd@...gle.com,
	viresh.kumar@...aro.org, hpa@...or.com, mingo@...nel.org,
	peterz@...radead.org
Subject: Re: vmstat: On demand vmstat workers V5

On Wed, May 28, 2014 at 11:19:49AM -0500, Christoph Lameter wrote:
> On Wed, 28 May 2014, Frederic Weisbecker wrote:
> 
> > On Mon, May 12, 2014 at 01:18:10PM -0500, Christoph Lameter wrote:
> > >  #ifdef CONFIG_SMP
> > >  static DEFINE_PER_CPU(struct delayed_work, vmstat_work);
> > >  int sysctl_stat_interval __read_mostly = HZ;
> > > +static DECLARE_BITMAP(cpu_stat_off_bits, CONFIG_NR_CPUS) __read_mostly;
> > > +const struct cpumask *const cpu_stat_off = to_cpumask(cpu_stat_off_bits);
> > > +EXPORT_SYMBOL(cpu_stat_off);
> >
> > Is there no way to make it a cpumask_var_t, and allocate it from
> > start_shepherd_timer()?
> >
> > This should really take less space overall.
> 
> This was taken from the way things work with the other cpumasks in
> linux/kernel/cpu.c. Its compatible with the way done there and allows
> also the write protection of the cpumask outside of vmstat.c

The cpumasks in cpu.c are special as they are the base of the cpumask_var_t
definition. They are necessary to define nr_cpu_bits which is the base of
cpumask_var_t allocations. As such they must stay lower level and defined
on top of NR_CPUS.

But most other cases don't need that huge static bitmap. I actually haven't
seen any other struct cpumask than isn't based on cpumask_var_t.

> 
> > > +	schedule_delayed_work(this_cpu_ptr(&vmstat_work),
> > > +		__round_jiffies_relative(sysctl_stat_interval,
> > > +		HOUSEKEEPING_CPU));
> >
> > Maybe you can just make the shepherd work unbound and let bind it from userspace
> > once we have the workqueue user affinity patchset in.
> 
> Yes that is what V5 should have done. Looks like the final version was not
> posted. Sigh. The correct patch follows this message and it no longer uses
> HOUSEKEEPING_CPU.

Ok.

> 
> 
> > OTOH, it means you need to have a vmstat_update work on the housekeeping CPU as well.
> 
> Well the vnstat_udpate may not be needed on the processor where the
> shepherd runs so it may save something.

Ok, thanks!

> 
> From cl@...ux.com Thu Oct  3 12:41:21 2013
> Date: Thu, 3 Oct 2013 12:41:21 -0500 (CDT)
> From: Christoph Lameter <cl@...ux.com>
> To: Andrew Morton <akpm@...ux-foundation.org>
> Cc: Gilad Ben-Yossef <gilad@...yossef.com>, Thomas Gleixner <tglx@...utronix.de>, Tejun Heo <tj@...nel.org>, John Stultz <johnstul@...ibm.com>, Mike Frysinger <vapier@...too.org>, Minchan Kim <minchan.kim@...il.com>, Hakan Akkan <hakanakkan@...il.com>, Max Krasnyansky <maxk@...lcomm.com>, Frederic Weisbecker <fweisbec@...il.com>, Paul E. McKenney <paulmck@...ux.vnet.ibm.com>, linux-kernel@...r.kernel.org, linux-mm@...ck.org, hughd@...gle.com, viresh.kumar@...aro.org, hpa@...or.com, mingo@...nel.org, peterz@...radead.org
> Subject: vmstat: On demand vmstat workers V6

Please post it on a new thread so it gets noticed by others.

Thanks.
--
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