The bytes matched. The page is marked modified. These two observations may well be true at the same time. In a hypothetical analysis of a Linux program, the saved memory snapshot was compared with the later contents and no differences were found, but soft-dirty was set in the pagemap. This sometimes leads to a hasty conclusion: either the comparison missed data or the kernel made a mistake. Meanwhile, the evidence answers different questions. A byte-by-byte comparison describes two selected contents. Soft-dirty refers to the history of writes or mapping renewal after a certain observation boundary.
Let’s start with the simplest possible event. The program wrote into the cell accessible to it the value that was already there. The bytes before and after are the same. A write was still attempted. If the corresponding write is actually executed by the machine and is covered by the tracking mechanism, soft-dirty can flag it. This does not require the resulting content to be different. The name dirty itself provokes the expectation of a visible stain, but the indicator does not compare the old and new memory photos. It uses a different detection method.
Another possibility is that the value was changed and then reverted back to its original value. Comparing the final snapshots again will not show the difference. For the write history, this does not mean no event occurred. Therefore, the conclusion “the page was not touched” is stronger than what equality of the two byte arrays establishes. In an investigation, it is useful to leave such wording different, even when the monitoring interface offers a single “changed” column. One word too easily confuses the current difference, the write that occurred, and the need to save the area for recovery.
The mark has a starting point
Linux kernel documentation on Soft-Dirty PTEs describes clearing marks via the value 4 in /proc/PID/clear_refs and then reading the pagemap. Here this is a description of the interface, not a command for changing someone else’s process. It is essential that the observation begins with a specific reset operation. If it is unknown when it occurred and whether it was successful, the set bit cannot be confidently assigned to the interval of interest. Having a mark without a temporal basis leaves the story incomplete.
In pagemap, a virtual page has a 64-bit record, where soft-dirty occupies bit 55. Other bits describe other properties. The pagemap manual lists present, swapped, and physical frame information separately. Bit 55 being set does not by itself indicate that the page is currently present in RAM, nor does it indicate its amount of written data or name the thread. The parser must read the required field, and not label the entire non-zero record as a sign of changed content.
Let’s say a process touches one byte in a 4096-byte page. The mark applies to the page, not to one precise offset. The total size of flagged pages describes a page-granular observation. Calling it the number of bytes rewritten would be an error in units. One byte and several thousand writes within the same page can leave the same final sign. From a binary mark it is impossible to reconstruct either the frequency of accesses or the distribution of addresses within it. For such questions you need a different tool.
Even the example of writing a previous value requires a caveat at the program level. The compiler is capable of removing redundant assignments if the rules of the language allow it. Therefore, the source-code statement is not evidence of an executed machine write. We consider a hypothetical case in which the access actually occurred. This precision is important for comparing evidence: the program statement list, instruction trace, page mark, and final bytes refer to different observations. You cannot quietly replace one with the other and then blame the kernel for the discrepancy in conclusions.
The reset mechanism explains the origin of the mark. The kernel clears the write permission in the corresponding PTEs. The next time you try to write to a region that is otherwise writable, a page fault occurs; the kernel restores the required permission and sets soft-dirty. This is a service monitoring path and not a mandatory page load from disk. Therefore, the word fault does not prove a lack of RAM or an application error. The meaning of the exception is established by the handler and mapping state. The same general architectural entry point serves different reasons.
In a relatively simple case, the page is already associated with physical memory, and the handler does not need to look for its contents in external storage. But this does not mean that tracking is free. Resetting rights and first writes create additional work, and the actual cost depends on the load and memory organization. The document describes a fast path relative to more expensive cases. It does not contain latency measurements of our program. There is no benchmark here; a claim that there was no effect on performance would be a fictitious result.

Another object could appear at the same address
Now for a more unpleasant explanation. The process deleted the mapping and then created a new one at the same virtual address. If you only monitor the address, you get the illusion of the continuous life of one page. But the PTE of the previous mapping has already disappeared. The kernel documentation specifically explains that new and expanded regions are marked soft-dirty so that such replacement will not be lost to the observer. This means that the set flag is able to report an update to the area, even if the simple story “written to the old page” does not describe what happened.
This is not a false positive regarding the recovery task. If the previous snapshot contains another area at the same address, leaving it without updating is dangerous for the correctness of the checkpoint. A conservative mark preserves the ability to account for new memory. The error appears when the analyst renames such a signal into proof that a particular thread wrote to a particular old object. The interface provided a broader basis for updating the saved representation of the process. Additional details cannot be obtained from the certainty of the wording.
Mapping identity is therefore essential along with the virtual address. For investigation, stored information about areas and their changes is needed. Two pagemap lines read at the same offset at different times do not prove that they refer to the same continuously existing object. Here the address is similar to the room number: the space remains, the contents and the reason for its use may have changed. Metaphor is limited; it only explains the loss of identity when comparing the same arrangement, and not the design of physical memory modules.
There is also an independent boundary: soft-dirty refers to tracking through a process’s address space. If the same physical data is accessed by another mapping or process, one pagemap cannot be declared to be a complete log of all changes to that data without verification. Particular care must be taken when handling shared memory. The evidence of access through selected PTEs and the assertion of the immutability of physical content across all access paths have different scales. The interface in question does not relieve the recovery system from coordinating shared memory.
The name should also not be confused with the dirty state of the file cache. A file page may need a writeback, while soft-dirty is needed for another accounting task. Their values and update times need not coincide. Therefore, it cannot be inferred from the observed bit that the entire page must be written to the drive. Conversely, the absence of such a mark in one process is not universal proof of the cleanliness of the corresponding file. The coincidence of the human word dirty does not create a single semantics for different subsystems.
Reading a snapshot takes time
Even a correct field can be misread as a simultaneous picture of the entire process. As long as the observer reads records sequentially, the program can continue to write, create, and delete mappings. Each fragment read has its own moment. Therefore, a consistent checkpoint requires a protocol that allows for ongoing execution. You can’t turn a long read of the /proc file into an instant photo with just the name snapshot. The marking mechanism itself helps such a system, but does not constitute the entire state persistence protocol.
In an illustrative example, one can imagine pausing the process for the duration of the final coordination. Another architecture uses iterative transfer of changed areas and a separate finalization phase. Here we do not propose an implementation of CRIU and do not claim to perform recovery. It is important to distinguish between an observation tool and a guarantee of results. A list of pages worth reviewing does not prove that all registers, shared memory connections, and the rest of the process have been preserved. A convenient local mark is useful precisely within a more complete agreement.
proc_pid_clear_refs(5) describes several control interface values. The value 4 has a special meaning for soft-dirty; other modes refer to other types of metering reset. Therefore, the phrase “cleared references” is not sufficient for a reproducible report. You need to know which mode was actually used. This detail is essential to the observation log. It determines what the subsequently read bit can establish about the selected period.
Access to /proc also has restrictions. Description proc_pid_pagemap(5) specifies access checks, and physical frame information is further limited. Missing access and a null physical address field cannot be indiscriminately interpreted as a lack of mapping. First, they find out what the interface really allows to see. Monitoring that silently replaces a read error with a zero can create a particularly convincing report of completely unchanged memory. The evidence itself was missing, but the table does not show this.
Huge pages, special mappings, and specific kernel configurations require you to read the applicable rules separately. Our explanatory model intentionally relies on a regular virtual page and does not promise byte precision for any memory organization. The date the current documentation was checked does not confirm the reader’s version of the installed kernel. It is important to maintain this boundary in the software tool: the properties of the running system must be established from that system, and not by the number in the header of the web manual.
At the very beginning, the two byte arrays coincided, and the attribute was set. Now this is not a conflict. The same value could be written, the previous content returned, or the mapping replaced. More data is needed to differentiate between the options. An honest conclusion is narrower than a confident narrative: this area requires attention according to the soft-dirty rules after a known reset. If the analysis needs to prove a specific content change, that’s a separate comparison and coordination task that one bit has not completed.
Repeated reset during observation may lose the selected beginning of the story. If one instrument has cleared marks after another, the late reader no longer sees the entire interval originally intended. Therefore, such observers must negotiate the use of a control interface. Sharing a control file does not automatically create multiple independent epochs. This is especially easy to miss in a monitoring system, where each small component considers its request to be local and harmless.
The same reason limits the comparison of two ready-made reports. A larger number of flagged pages may reflect a longer interval, a different set of mappings, or a different reset boundary. Without this information, an increase in the number does not prove an increase in write load. For meaningful comparison, the definition of the sample is retained. The system is able to provide a useful binary trace, but the observer does not receive the speed and frequency of events for free along with this trace.
Sources were checked on November 6, 2026; the text explaining the mechanism in the documentation is dated April 9, 2013 and is not presented as a new development. No other processes were changed, RAM tests were not performed. The resulting observation must retain the reset time, reading time, selected process, and mapping information. Then soft-dirty remains useful evidence with a known scope. Without such context, a mark too easily becomes a story of events that the observer did not actually see.



