lkml.org 
[lkml]   [2010]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] lib: percpu counter add unless less than functionality
On Mon, Nov 29, 2010 at 01:08:50PM +0100, Peter Zijlstra wrote:
> On Mon, 2010-11-29 at 11:36 +1100, Dave Chinner wrote:
> > +int percpu_counter_add_unless_lt(struct percpu_counter *fbc, s64 amount,
> > + s64 threshold);
>
> It might make sense to implement that as;
>
> __percpu_counter_add_unless_lt(struct percpu_counter *fbc,
> s64 amount,
> s64 threshold,
> s32 batch);
>
> That way its consistent with the __percpu_counter_add() implementation
> where you can also specify the batch value.

Good point. I'll fix that up.

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com


\
 
 \ /
  Last update: 2010-11-30 05:33    [W:2.252 / U:0.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site