mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
![Naoya Horiguchi](/assets/img/avatar_default.png)
Soft dirty bit allows us to track which pages are written since the last clear_ref (by "echo 4 > /proc/pid/clear_refs".) This is useful for userspace applications to know their memory footprints. Note that the kernel exposes this flag via bit[55] of /proc/pid/pagemap, and the semantics is not a default one (scheduled to be the default in the near future.) However, it shifts to the new semantics at the first clear_ref, and the users of soft dirty bit always do it before utilizing the bit, so that's not a big deal. Users must avoid relying on the bit in page-types before the first clear_ref. Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Wu Fengguang <fengguang.wu@intel.com> Cc: Pavel Emelyanov <xemul@parallels.com> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
20 lines
466 B
C
20 lines
466 B
C
#ifndef LINUX_KERNEL_PAGE_FLAGS_H
|
|
#define LINUX_KERNEL_PAGE_FLAGS_H
|
|
|
|
#include <uapi/linux/kernel-page-flags.h>
|
|
|
|
|
|
/* kernel hacking assistances
|
|
* WARNING: subject to change, never rely on them!
|
|
*/
|
|
#define KPF_RESERVED 32
|
|
#define KPF_MLOCKED 33
|
|
#define KPF_MAPPEDTODISK 34
|
|
#define KPF_PRIVATE 35
|
|
#define KPF_PRIVATE_2 36
|
|
#define KPF_OWNER_PRIVATE 37
|
|
#define KPF_ARCH 38
|
|
#define KPF_UNCACHED 39
|
|
#define KPF_SOFTDIRTY 40
|
|
|
|
#endif /* LINUX_KERNEL_PAGE_FLAGS_H */
|