Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-12047

Fixes for legacy Mm Paging

    XMLWordPrintable

    Details

    • Module:

      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

        1. debug.log
          41 kB
        2. paging_fixes_2.diff
          16 kB
        3. paging_fixes.diff
          11 kB
        4. patch_v2.patch
          15 kB
        5. patch_v2.patch
          13 kB
        6. patch.patch
          12 kB
        7. r0.4.6RC1-firstException-then-frozen-notEvenDbgPromptUpdatedAnymore.log
          160 kB
        8. r0.4.6RC1-firstException-then-frozen-notEvenDbgPromptUpdatedAnymore.webm
          3.32 MB
        9. r72836-withPatch_whenCrashing.log
          74 kB
        10. r72836-withPatch-beforeCopy.png
          r72836-withPatch-beforeCopy.png
          39 kB
        11. r72836-withPatch-whenCrashing.png
          r72836-withPatch-whenCrashing.png
          37 kB
        12. r72836-withPatch-withoutTaskmgr-afterShellRestart.png
          r72836-withPatch-withoutTaskmgr-afterShellRestart.png
          35 kB
        13. r74518copy.log
          339 kB
        14. r74518copy.webm
          6.20 MB
        15. r74519copy.log
          221 kB
        16. r74519copy.webm
          6.27 MB
        17. react-r72831-withPatchOnTop.log
          4.68 MB
        18. react-r72935&paging_fixes_2-copyBig-BSODafterException.log
          243 kB
        19. react-r72957-paging_fixes_2.log
          267 kB
        20. react-r72957-paging_fixes_2.webm
          3.46 MB

          Issue Links

            Activity

              People

              • Assignee:
                zefklop zefklop
                Reporter:
                zefklop zefklop
              • Votes:
                3 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: