On Wed, Apr 02, 2008 at 12:03:50PM -0700, Christoph Lameter wrote: > + /* > + * Callback may return a positive value to indicate a > count > + * or a negative error code. We keep the first error > code > + * but continue to perform callbacks to other subscribed > + * subsystems. > + */ > + if (x && result >= 0) { > + if (x >= 0) > + result += x; > + else > + result = x; > + } > } > +
Now think of when one of the kernel janitors will micro-optimize PG_dirty to be returned by invalidate_page so a single set_page_dirty will be invoked... Keep in mind this is a kernel internal APIs, ask Greg if we can change it in order to optimize later in the future. I think my #v9 is optimal enough while being simple at the same time, but anyway it's silly to be hardwired to such an interface that worst of all requires switch statements instead of proper pointer to functions and a fixed set of parameters and retval semantics for all methods. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel