Re: [PATCH] percpu: preemptless __per_cpu_counter_add

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 28, 2011 at 06:59:56PM +0200, Eric Dumazet wrote:
> Le jeudi 28 avril 2011 à 11:52 -0500, Christoph Lameter a écrit :
> 
> > I can still add (batch - 1) without causing the seqcount to be
> > incremented.
> 
> It always had been like that, from the very beginning.

This doesn't matter.  At this level, the order of concurrent
operations is not well defined.  You might as well say "oh well, then
the update happened after the sum is calculated".

The problem I have with the interface are two-folds.

1. Is it even necessary?  With concurrent updates, we don't and can't
   define strict order of updates across multiple CPUs.  If we sweep
   the counters without being intervened (IRQ or, well, NMI), it
   should be and has been acceptable enough.

2. Let's say we need this.  Then, @maxfuzzy.  Few people are gonna
   understand it well and use it properly.  Why can't you track the
   actual deviation introduced since sum started instead of tracking
   the number of deviation events?

Thanks.

-- 
tejun

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]