lkml.org 
[lkml]   [2009]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ltt-dev] [PATCH] Fix dirty page accounting in redirty_page_for_writepage()
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.






\
 
 \ /
  Last update: 2009-05-01 22:41    [W:1.260 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site