Re: [PATCH] percpu: preemptless __per_cpu_counter_add

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

 



On Fri, 2011-04-29 at 22:43 +0800, Tejun Heo wrote:
> Hello,
> 
> On Fri, Apr 29, 2011 at 09:25:09AM -0500, Christoph Lameter wrote:
> > On Fri, 29 Apr 2011, Tejun Heo wrote:
> > 
> > > > If someone wants more accuracy then we need the ability to dynamically set
> > > > the batch limit similar to what the vm statistics do.
> > >
> > > So, if you can remove _sum() by doing the above without introducing
> > > excessive complexity or penalizing use cases which might not have too
> > > much commonality with vmstat, by all means, but please pay attention
> > > to the current users.  Actually take a look at them.
> > 
> > I am content to be maintaining the vm statistics.... But Shaohua may want
> > to have a look at it?
> 
> It would be nice if vmstat can be merged with percpu counter tho so
> that the flushing can be done together.  If we such piggybacking, the
> flushing overhead becomes much easier to justify.
> 
> How does vmstat collect the percpu counters?  Does one cpu visit all
> of them or each cpu flush local counter to global one periodically?
I thought we can use a lglock like locking to address the issue. each
cpu holds its lock to do update. _sum hold all cpu's lock to get
consistent result. This will slow down _sum a little bit, but assume
this doesn't matter. I haven't checked if we can still make fast path
preemptless, but we use atomic now. This can still give me similar
performance boost like previous implementation.

Thanks,
Shaohua

--
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]