On Apr 10, 2006 18:09 -0700, Mingming Cao wrote: > +static void __percpu_counter_mod(struct percpu_counter *fbc, long amount, > + int ul_overflow_check) > { > + * Before updating the global counter, if we detect the > + * updated new value will cause overflow, then we should not > + * do the update from this local counter at this moment. (i.e. > + * the local counter will not be cleared right now). The update > + * will be deferred at some point until either other local > + * counter updated the global counter first, or the local > + * counter's value will not cause global counter overflow. Wouldn't it be better to update the counter by the maximum amount possible to avoid overflow/underflow? Cheers, Andreas -- Andreas Dilger Principal Software Engineer Cluster File Systems, Inc. - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html