Description
Let's open a bug for a WIP patch, fixing a few bugs.
Summary :
- There is no reason for subsections marked with IMAGE_SCN_CNT_UNINITIALIZED_DATA to always be considered as private.
- Fix a race condition : when paging out a file section, old Mm lists all of the process maps, removing them one after the other and lowering the page reference count in the process. Sometimes a page fault occur in the process, the mapping is added, but the page refcount is not bumped because it requires locking the corresponding segment. Fix is always doing both operation (Inserting virtual mapping + refcount bump) under the segment lock.
- Fix write instruction on COW mapping : always ensure the section is read from file before making a private copy.
- Let the zero page thread decide itself if it is active or not.
- Old Mm expects swap page file offsets to be non-zero when reading back from it. +1 / -1 when calling new API fixes that
Cc thfabba, pschweitzer,aminekhaldi for comments and testing.
Have fun breaking it hard. I tested that with Opera loading a truckload of heavy webpages on a 256 Mb VM. It survived much longer than my first attempts, but still hangs at a certain point in time. I don't expect that to fix the big-file copy bug, but who knows
Attachments
Issue Links
- is blocked by
-
CORE-12184 FastFat : acquire shared paging resource when performing paged write
- Resolved
-
CORE-12400 Regression, "Precision" demo executable doesn't load
- Resolved
- relates to
-
CORE-7347 mm: Aria2: ASSERT at MmGetRmapListHeadPage
- Resolved
-
CORE-11387 The system hangs while trying to copy the file to it, the amount of which more than 1,200 MB.
- Resolved