Commit graph

991 commits

Author SHA1 Message Date
Jérôme Gardou
6f2b94c023 [NTOS:MM] Wake up the balancer as soon as we are low on page.
Fixes installing on a system with 64MB of RAM, if you feel like it.
2021-02-03 13:42:39 +01:00
Jérôme Gardou
cc9607e94e [NTOS:CC] Fix use of uninitialized variable 2021-02-03 13:35:17 +01:00
Jérôme Gardou
0699dcb50c [NTOS:EX] Restore sysinfo 2021-02-03 10:29:28 +01:00
Jérôme Gardou
14077e3f4e [NTOS:MM] Simplify a check 2021-02-03 09:41:24 +01:00
Jérôme Gardou
b7eb0fddf3 Address PR review 2021-02-03 09:41:24 +01:00
Jérôme Gardou
c0bf352069 [NTOS:MM] Fix regression of MmCanFileBeTruncated 2021-02-03 09:41:24 +01:00
Jérôme Gardou
7f7abc9838 [NTOS:MM] Simplify code & fix MSVC x64 build 2021-02-03 09:41:23 +01:00
Jérôme Gardou
2ba1926037 [NTOS:MM][NTOS:CC] Performance improvement again
Read files by 64kb chunks instead of page-sized chunks.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
625f273361 [NTOS:MM] More fine-tuning of the memory balancer 2021-02-03 09:41:23 +01:00
Jérôme Gardou
41475dfcd7 [NTOS:CC] Performance improvements
Do not ditch the pages as soon as the section are unmapped
Improve MmBalancer "algorithm" (or whatever you call that)
Various needed fixes to get this going.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
7fbf90d6fd [NTOS:CC] Fix a bug 2021-02-03 09:41:23 +01:00
Jérôme Gardou
ea354c4bc7 [NTOS:MM] Unconditionally purge cache on image section creation. 2021-02-03 09:41:23 +01:00
Jérôme Gardou
c1c51e31e4 [NTOS:MM] Keep a ref on the segment when mapping a page & keep trace of what is the highest offset mapped. 2021-02-03 09:41:23 +01:00
Jérôme Gardou
91a4e62376 [NTOS:MM] Improve MmCanFileBeTruncated 2021-02-03 09:41:23 +01:00
Jérôme Gardou
3e43aa1305 [NTOS:MM] Use 64-bit integer to count references on segments 2021-02-03 09:41:23 +01:00
Jérôme Gardou
cc6bc02b91 [NTOS:CC] Make sure to purge the Mm side in CcPurgeCacheSection 2021-02-03 09:41:23 +01:00
Jérôme Gardou
d0bf98663b [NTOS:CC] Be sure to flush the whole file in CcFlushCache 2021-02-03 09:41:23 +01:00
Jérôme Gardou
90c6a65efe [NTOS:MM] Introduce MmPurgeSegment & MmFlushSegment
Those will back CcFlushCache and CcPurgeCache.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
8a8b4db447 [NTOS:MM] Make the page LRU list a real LRU list.
Also, implement flushing mapped sections to disk on shutdown.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
bde2ee571a [NTOS:FSRTL] Properly leave FsRtl when returning STATUS_CANT_WAIT 2021-02-03 09:41:23 +01:00
Jérôme Gardou
3efc5b1734 [NTOS:MM] Fix unlocking on failure path 2021-02-03 09:41:23 +01:00
Jérôme Gardou
d23dbdda4c [NTOS:MM] Remove unused field 2021-02-03 09:41:23 +01:00
Jérôme Gardou
f201b8af78 [NTOS:MM] Do not acquire Pfn lock in MmGetRmapListHead
All callers already hold it
2021-02-03 09:41:23 +01:00
Jérôme Gardou
727e73f253 |NTOS:MM] Simplify some code 2021-02-03 09:41:23 +01:00
Jérôme Gardou
48e1c8593f [NTOS:PO] Flush dirty pages after flushing volumes 2021-02-03 09:41:23 +01:00
Jérôme Gardou
5949d5095d [NTOS:CC][NTOS:MM] Try respecting ValidDataLength 2021-02-03 09:41:23 +01:00
Jérôme Gardou
bdb73edab7 [NTOS:CC] Flush the whole VACB
Let Mm know what it has to do.
2021-02-03 09:41:23 +01:00
Jérôme Gardou
804f5a41ed [NTOS:CC] Improve trace messages 2021-02-03 09:41:23 +01:00
Jérôme Gardou
20fe42c9e9 [NTOS:CC] Simplify CcFlushCache implementation 2021-02-03 09:41:23 +01:00
Jérôme Gardou
9b6240ee03 [NTOS:CC] Get rid of ROS_VACB:Valid 2021-02-03 09:41:23 +01:00
Jérôme Gardou
e46f1a9af3 [NTOS:MM] Disable APC while performing Paged Read 2021-02-03 09:41:23 +01:00
Jérôme Gardou
02167f2fb3 [NTOS:CC] Properly return the public BCBs 2021-02-03 09:41:23 +01:00
Jérôme Gardou
33cde28312 [NTOS:CC] Simplify CcRosDeleteFileCache 2021-02-03 09:41:23 +01:00
Jérôme Gardou
a9193b5cc2 [NTOS:CC] Remove dead code 2021-02-03 09:41:23 +01:00
Jérôme Gardou
8ed15a49a7 [NTOS:MM] Fix a race 2021-02-03 09:41:23 +01:00
Jérôme Gardou
11eee4eeec [NTOS:MM] Check that we don't add rmap for NULL process 2021-02-03 09:41:23 +01:00
Jérôme Gardou
caf89b9582 [NTOS:MM] Fix a race condition when unmapping sections views 2021-02-03 09:41:23 +01:00
Jérôme Gardou
57ee31ee33 [NTOS:CC] Perform sanity checks before doing anything else 2021-02-03 09:41:23 +01:00
Jérôme Gardou
cff3c399c6 [NTOS:MM] Fix input validation/correction in MmMapViewInSystemSpace 2021-02-03 09:41:23 +01:00
Jérôme Gardou
8287a098b9 [NTOS:CC] Fix potnetial use-after-free 2021-02-03 09:41:23 +01:00
Jérôme Gardou
358d06c47c [NTOS:CC] Always honor WriteThrough parameter in CcUnpinRepinnedBcb 2021-02-03 09:41:23 +01:00
Jérôme Gardou
1505abbc09 [NTOS:CC] Do not write behind concurrently the same file 2021-02-03 09:41:23 +01:00
Jérôme Gardou
347a4f146b [NTOS] Loop again and again until the whole cache is empty when sutting down 2021-02-03 09:41:23 +01:00
Jérôme Gardou
addf824d87 [NTOS:MM] Keep image maps & file maps coherent at the time of creating the image map 2021-02-03 09:41:23 +01:00
Jérôme Gardou
543112008a Fix physical memory section creation 2021-02-03 09:41:22 +01:00
Jérôme Gardou
91f6fa0259 Disable CcScheduleReadAhead call 2021-02-03 09:41:22 +01:00
Jérôme Gardou
6d97d8d2e1 [NTOS:CC] Fix some tests, complain where the current implementation won't let us do the right thing 2021-02-03 09:41:22 +01:00
Jérôme Gardou
674ab3dce3 [NTOS:MM] Remove a check for now 2021-02-03 09:41:22 +01:00
Jérôme Gardou
1f796267bc [NTOS:MM] Do not reference the section when mapping it.
Referencing the segment is enough.
2021-02-03 09:41:22 +01:00
Jérôme Gardou
3c2b1bf59b [NTOS:MM] Save the dirty bit when sharing a segment page 2021-02-03 09:41:22 +01:00