On Fri, 2008-08-22 at 11:29 -0700, Mingming Cao wrote: > 在 2008-08-22五的 19:04 +0530,Aneesh Kumar K.V写道: > > fbc->count is of type s64. The change was introduced by > > 0216bfcffe424a5473daa4da47440881b36c1f4 which changed the type > > from long to s64. Moving to s64 also means on 32 bit architectures > > we can get wrong values on fbc->count. > > > > percpu_counter_read is used within interrupt context also. So > > use the irq safe version of spinlock while reading > > > > It's quit expensive to hold the lock to do percpu_counter_read on 32 > bit arch, the common case. > > The type of the global counter and local counter were explictly > specified using s64 and s32 The global counter is changed from long to > s64, while the local counter is changed from long to s32, so we could > avoid doing 64 bit update in most cases. After all the percpu counter > read is not a accurate value. seqlocks come to mind. -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html