lkml.org 
[lkml]   [2008]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/42] percpu counter: clean up percpu_counter_sum_and_set()
On Thu, Oct 09, 2008 at 10:52:52AM +0200, Peter Zijlstra wrote:
> On Thu, 2008-10-09 at 00:05 -0400, Theodore Ts'o wrote:
> > From: Mingming Cao <cmm@us.ibm.com>
> >
> > percpu_counter_sum_and_set() and percpu_counter_sum() is the same except
> > the former updates the global counter after accounting. Since we are
> > taking the fbc->lock to calculate the precise value of the counter in
> > percpu_counter_sum() anyway, it should simply set fbc->count too, as the
> > percpu_counter_sum_and_set() does.
> >
> > This patch merge these two interfaces into one.
>
> I totally missed the patch introducing this _and_set() horror, but this
> does look like a good cleanup.

Note: this patch was in the -mm tree (Andrew signed off on it), but
given that a number of ext4 patches depend on it, we have a copy of it
in the ext4 tree.

- Ted


\
 
 \ /
  Last update: 2008-10-09 18:55    [W:0.188 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site