xfs
[Top] [All Lists]

Re: [PATCH 1/3] lib: percpu counter add unless less than functionality

To: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Subject: Re: [PATCH 1/3] lib: percpu counter add unless less than functionality
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 30 Nov 2010 15:30:01 +1100
Cc: xfs@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
In-reply-to: <1291032530.32004.26.camel@laptop>
References: <1290991002-18680-1-git-send-email-david@xxxxxxxxxxxxx> <1290991002-18680-2-git-send-email-david@xxxxxxxxxxxxx> <1291032530.32004.26.camel@laptop>
User-agent: Mutt/1.5.20 (2009-06-14)
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@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>