On Mon, Mar 31, 2014 at 09:10:07AM -0700, Linus Torvalds wrote: > > It causes insane situations like this: > > #if _PAGE_BIT_FILE < _PAGE_BIT_PROTNONE > > which makes no sense *except* if you think that those bits can have > random odd hardware-defined values. But they really can't. They are > just random bit numbers we chose. I never understand this ifdef (I've asked once but got no reply). > It has *also* caused horrible pain with the whole "soft dirty" thing, > and we have absolutely ridiculous macros in pgtable-2level.h for the > insane soft-dirty case, trying to keep the swap bits spread out "just > right" to make soft-dirty (_PAGE_BIT_HIDDEN aka bit 11) not alias with > the bits we use for swap offsets etc. > > So how about we just say: > > - define the bits we use when PAGE_PRESENT==0 separately and explicitly > > - clean up the crazy soft-dirty crap, preferably by just making it > depend on a 64-bit pte (so you have to have X86_PAE enabled or be on > x86-64) Sounds good for me, i'll try my best (if noone object). > > that would sound like a good cleanup, because right now it's a > complete nightmare to think about which bits are used how when P is 0. > The above insane #if being the prime example of that confusion. Cyrill -- 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>