Which makes me really want some kind of VirtualAlloc flag :) I don't think there's any practical reason we can't have close to the 6/0ms case with 4k pages, if it's handled in bulk, rather than as a continuous series of faults?
-
Show this thread
-
(And just to be clear, the reason I can't "just use 2mb pages" is because you basically can't ship something that uses 2mb pages - it requires the user to do a manual group policy edit to enable!)
1 reply 0 retweets 18 likesShow this thread -
Replying to @cmuratori
wait what!? so they added bigger pages to the ISA and we just don't use them?
1 reply 0 retweets 0 likes -
Replying to @codaaaaaaaaa
Correct. You can see a 2011 legacy explanation from Raymond Chen here: https://devblogs.microsoft.com/oldnewthing/20110128-00/?p=11643 … In my opinion, none of the things he says are true today, but, I guess this part of the kernel has still not been updated since then? I don't know :(
2 replies 0 retweets 5 likes -
Replying to @cmuratori @codaaaaaaaaa
So what would you do if you had to page in a 2MB page when there isn't 2MB of contiguous physical memory?
2 replies 0 retweets 0 likes -
Replying to @ChenCravat @codaaaaaaaaa
I understand that this is apparently a concern, but I'm not sure I understand why. On modern machines that all have 16+gb of memory, is there some reason the OS can't just sub-divide 4k pages from 2mb pages, and evict all 512 4k pages when deciding to swap in a 2mb page?
2 replies 0 retweets 3 likes -
Replying to @cmuratori @codaaaaaaaaa
A device driver may have locked pages for DMA. As my owner noted, you can create artificial pages, but you have to maintain the ruse consistently down to the driver level. And you can get most of the same effect via prefetch.https://devblogs.microsoft.com/oldnewthing/?p=105200 …
1 reply 0 retweets 0 likes -
Replying to @ChenCravat @codaaaaaaaaa
I still don't understand how this is relevant. With all 4k pages you still have the problem of locked pages, and have to pick a different page to evict if the one you were going to evict is locked. The rule would just be that if a 4k page is locked inside a 2mb page, it's locked.
1 reply 0 retweets 0 likes -
I fail to see how this is any different whatsoever to the driver having locked the entire 2mb page, which it could have done?
1 reply 0 retweets 0 likes -
Replying to @cmuratori @codaaaaaaaaa
The system caps the number of locked pages so a driver can't just lock all the memory in the system. The problem here is that just 9 locked pages could prevent a 16GB system from paging in a 2MB page. I'll ask my owner to discuss this further on the blog.
3 replies 0 retweets 3 likes
Did your owner ever decide whether he was going to cover this in his blog? I still don't understand how the 9 locked pages example would work in practice.
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.