Commit 0015190a authored by Mike Rapoport's avatar Mike Rapoport Committed by Jonathan Corbet
Browse files

docs/vm: soft-dirty.txt: convert to ReST format

parent 0c14398b
Loading
Loading
Loading
Loading
+12 −8
Original line number Diff line number Diff line
                            SOFT-DIRTY PTEs
.. _soft_dirty:

===============
Soft-Dirty PTEs
===============

The soft-dirty is a bit on a PTE which helps to track which pages a task
writes to. In order to do this tracking one should

  1. Clear soft-dirty bits from the task's PTEs.

     This is done by writing "4" into the /proc/PID/clear_refs file of the
     This is done by writing "4" into the ``/proc/PID/clear_refs`` file of the
     task in question.

  2. Wait some time.

  3. Read soft-dirty bits from the PTEs.

     This is done by reading from the /proc/PID/pagemap. The bit 55 of the
     This is done by reading from the ``/proc/PID/pagemap``. The bit 55 of the
     64-bit qword is the soft-dirty one. If set, the respective PTE was
     written to since step 1.