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:	Fri, 1 May 2009 16:43:55 -0400
From:	Mathieu Desnoyers <compudj@...stal.dyndns.org>
To:	Christoph Lameter <cl@...ux.com>
Cc:	Nick Piggin <nickpiggin@...oo.com.au>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Yuriy Lalym <ylalym@...il.com>, ltt-dev@...ts.casi.polymtl.ca,
	Tejun Heo <tj@...nel.org>, Ingo Molnar <mingo@...e.hu>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [ltt-dev] [PATCH] Fix dirty page accounting in
	redirty_page_for_writepage()

* Christoph Lameter (cl@...ux.com) wrote:
> On Fri, 1 May 2009, Mathieu Desnoyers wrote:
> 
> > So, back to my original point : do you agree on the usefulness of
> > separating fallback irq-disabling from the per-cpu atomic construct ?
> 
> No. Percpu operations are used for statistics and are like atomic
> operations. Aggregation of these leads to a can of worms that we better
> leave unopened.
> 
> > x86 would map :
> >
> > percpu_irqsave/restore to "nothing".
> > percpu_add_return_irq to xadd instruction. It is irq-safe by design.
> >
> > Other architectures (fallback) would map
> >
> > percpu_irqsave/restore to local_irq_save/restore.
> > percpu_add_return_irq to var += value; return var;
> 
> Shudder.... We have explored those types of macros before (while doing
> fastpath optimization for SLUB) and it significant increases the
> complexity. People may add additional instructions in between and now
> interrupts off could be on or off depending on the architecture. Sometimes
> percpu_irqsave does nothing. Very difficult to ensure that the usage is
> correct.
> 
> And we have barely any usage case for such macros.
> 

Then do you have a better idea on how to deal with
__inc_zone_state/inc_zone_state without duplicating the code and without
adding useless local_irq_save/restore on x86 ?

Mathieu

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68
--
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