diff options
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r-- | Documentation/filesystems/proc.txt | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 1e4a6cc1b6ea..402ab99e409f 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -1605,16 +1605,16 @@ Documentation/accounting. | |||
1605 | --------------------------------------------------------------- | 1605 | --------------------------------------------------------------- |
1606 | When a process is dumped, all anonymous memory is written to a core file as | 1606 | When a process is dumped, all anonymous memory is written to a core file as |
1607 | long as the size of the core file isn't limited. But sometimes we don't want | 1607 | long as the size of the core file isn't limited. But sometimes we don't want |
1608 | to dump some memory segments, for example, huge shared memory. Conversely, | 1608 | to dump some memory segments, for example, huge shared memory or DAX. |
1609 | sometimes we want to save file-backed memory segments into a core file, not | 1609 | Conversely, sometimes we want to save file-backed memory segments into a core |
1610 | only the individual files. | 1610 | file, not only the individual files. |
1611 | 1611 | ||
1612 | /proc/<pid>/coredump_filter allows you to customize which memory segments | 1612 | /proc/<pid>/coredump_filter allows you to customize which memory segments |
1613 | will be dumped when the <pid> process is dumped. coredump_filter is a bitmask | 1613 | will be dumped when the <pid> process is dumped. coredump_filter is a bitmask |
1614 | of memory types. If a bit of the bitmask is set, memory segments of the | 1614 | of memory types. If a bit of the bitmask is set, memory segments of the |
1615 | corresponding memory type are dumped, otherwise they are not dumped. | 1615 | corresponding memory type are dumped, otherwise they are not dumped. |
1616 | 1616 | ||
1617 | The following 7 memory types are supported: | 1617 | The following 9 memory types are supported: |
1618 | - (bit 0) anonymous private memory | 1618 | - (bit 0) anonymous private memory |
1619 | - (bit 1) anonymous shared memory | 1619 | - (bit 1) anonymous shared memory |
1620 | - (bit 2) file-backed private memory | 1620 | - (bit 2) file-backed private memory |
@@ -1623,20 +1623,22 @@ The following 7 memory types are supported: | |||
1623 | effective only if the bit 2 is cleared) | 1623 | effective only if the bit 2 is cleared) |
1624 | - (bit 5) hugetlb private memory | 1624 | - (bit 5) hugetlb private memory |
1625 | - (bit 6) hugetlb shared memory | 1625 | - (bit 6) hugetlb shared memory |
1626 | - (bit 7) DAX private memory | ||
1627 | - (bit 8) DAX shared memory | ||
1626 | 1628 | ||
1627 | Note that MMIO pages such as frame buffer are never dumped and vDSO pages | 1629 | Note that MMIO pages such as frame buffer are never dumped and vDSO pages |
1628 | are always dumped regardless of the bitmask status. | 1630 | are always dumped regardless of the bitmask status. |
1629 | 1631 | ||
1630 | Note bit 0-4 doesn't effect any hugetlb memory. hugetlb memory are only | 1632 | Note that bits 0-4 don't affect hugetlb or DAX memory. hugetlb memory is |
1631 | effected by bit 5-6. | 1633 | only affected by bit 5-6, and DAX is only affected by bits 7-8. |
1632 | 1634 | ||
1633 | Default value of coredump_filter is 0x23; this means all anonymous memory | 1635 | The default value of coredump_filter is 0x33; this means all anonymous memory |
1634 | segments and hugetlb private memory are dumped. | 1636 | segments, ELF header pages and hugetlb private memory are dumped. |
1635 | 1637 | ||
1636 | If you don't want to dump all shared memory segments attached to pid 1234, | 1638 | If you don't want to dump all shared memory segments attached to pid 1234, |
1637 | write 0x21 to the process's proc file. | 1639 | write 0x31 to the process's proc file. |
1638 | 1640 | ||
1639 | $ echo 0x21 > /proc/1234/coredump_filter | 1641 | $ echo 0x31 > /proc/1234/coredump_filter |
1640 | 1642 | ||
1641 | When a new process is created, the process inherits the bitmask status from its | 1643 | When a new process is created, the process inherits the bitmask status from its |
1642 | parent. It is useful to set up coredump_filter before the program runs. | 1644 | parent. It is useful to set up coredump_filter before the program runs. |