On Wed, Dec 28, 2016 at 8:08 PM, Nicholas Piggin wrote: > > Okay. The name could be a bit better though I think, for readability. > Just a BUILD_BUG_ON if it is not constant and correct bit numbers? I have a slightly edited patch - moved the comments around and added some new comments (about both the sign bit, but also about how the smp_mb() shouldn't be necessary even for the non-atomic fallback). I also did a BUILD_BUG_ON(), except the other way around - keeping it about the sign bit in the byte, just just verifying that yes, PG_waiters is that sign bit. > BTW. I just notice in your patch too that you didn't use "nr" in the > generic version. And I fixed that too. Of course, I didn't test the changes (apart from building it). But I've been running the previous version since yesterday, so far no issues. Linus