Re: [PATCH 04/10] lib: percpu_counter_mod64

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Peter Zijlstra <a.p.zijlstra@...>
Cc: <linux-mm@...>, <linux-kernel@...>, <miklos@...>, <neilb@...>, <dgc@...>, <tomoki.sekiyama.qu@...>, <nikita@...>, <trond.myklebust@...>, <yingchao.zhou@...>
Date: Saturday, April 21, 2007 - 3:21 pm

On Sat, 21 Apr 2007 13:02:26 +0200 Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:


ah, the mysterious bdi_writeout_norm().

I don't think it's possible to precisely halve a percpu_counter - there has
to be some error involved.  I guess that's acceptable within the
inscrutable bdi_writeout_norm().

otoh, there's a chance that the attempt to halve the counter will take the
counter negative, due to races.  Does the elusive bdi_writeout_norm()
handle that?  If not, it should.  If it does, then there should be comments
around the places where this is being handled, because it is subtle, and unobvious,
and others might break it by accident.

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 04/10] lib: percpu_counter_mod64, Peter Zijlstra, (Fri Apr 20, 11:51 am)
Re: [PATCH 04/10] lib: percpu_counter_mod64, Andrew Morton, (Sat Apr 21, 5:55 am)
Re: [PATCH 04/10] lib: percpu_counter_mod64, Peter Zijlstra, (Sat Apr 21, 7:02 am)
Re: [PATCH 04/10] lib: percpu_counter_mod64, Andrew Morton, (Sat Apr 21, 3:21 pm)
Re: [PATCH 04/10] lib: percpu_counter_mod64, Peter Zijlstra, (Sat Apr 21, 3:30 pm)