Commit e6aad404 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent c8e1cb33
......@@ -111,7 +111,7 @@ void virt_lock_hookgil(const VirtGilHooks *gilhooks)
//
// XXX temp hack to workaround that bug for now.
if (virtmem_gilhooks == gilhooks)
virtmem_gilhooks = NULL;
virtmem_gilhooks = NULL;
BUG_ON(virtmem_gilhooks); /* prevent registering multiple times */
virtmem_gilhooks = gilhooks;
......@@ -955,8 +955,15 @@ static int __ram_reclaim(RAM *ram)
/* can release ram only from loaded non-dirty pages
* NOTE PAGE_LOADING pages are not dropped - they just continue to load
* NOTE PAGE_LOADED_FOR_WRITE are not dropped - they are going to be dirtied in a moment */
if (page->state == PAGE_LOADED) {
*
* NOTE PAGE_LOADED_FOR_WRITE are dropped too - even if normally they
* are going to be dirtied in a moment, due to VM_RETRY logic and so
* VMA might be changing simultaneously to pagefault handling, a
* page might remain in pagemap in PAGE_LOADED_FOR_WRITE state
* indefinitely unused and without actually being dirtied.
*
* TODO drop PAGE_LOADED_FOR_WRITE only after all PAGE_LOADED have been reclaimed. */
if (page->state == PAGE_LOADED || page->state == PAGE_LOADED_FOR_WRITE) {
page_drop_memory(page);
batch--;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment