On Thu, Jul 13, 2017 at 10:14:42AM +0200, Peter Zijlstra wrote: > +static void __crossrelease_end(unsigned int *stamp) > +{ [snip] > + > + /* > + * If we rewind past the tail; all of history is lost. > + */ > + if ((current->xhlock_idx_max - *stamp) < MAX_XHLOCKS_NR) > + return; > + > + /* > + * Invalidate the entire history.. > + */ > + for (i = 0; i < MAX_XHLOCKS_NR; i++) > + invalidate_xhlock(&xhlock(i)); > + > + current->xhlock_idx = 0; > + current->xhlock_idx_hard = 0; > + current->xhlock_idx_soft = 0; > + current->xhlock_idx_hist = 0; > + current->xhlock_idx_max = 0; I don't understand why you introduced this code, yet. Do we need this? The other of your suggestion looks very good though.. > +} -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>