19191
Comment: start adding memory management changes
|
26055
Finish mm patches
|
Deletions are marked like this. | Additions are marked like this. |
Line 10: | Line 10: |
* Throttle allocators when reclaim cannot keep up with v2 memory.high limit [[https://git.kernel.org/linus/0e4b01df865935007bd712cbc8e7299005b28894|commit]] * Introduce gradual reclaim pressure between v2 memory.low and memory.min thresholds instead of the previous cliff behavior. [[https://git.kernel.org/linus/9783aa9917f8ae24759e67bf882f1aba32fe4ea1|commit]] [[https://git.kernel.org/linus/9de7ca46ad2688bd51e80f7119fefa301ad7f3fa|commit]] [[https://git.kernel.org/linus/1bc63fb1272be0773e925f78c0fbd06c89701d55|commit]] * Improve situation with multiple parallel reclaimers by letting each walk through the whole cgroup tree, resulting in fewer premature OOM kills. [[https://git.kernel.org/linus/1ba6fc9af35bf97c84567d9b3eeb26629d1e3af0|commit]] * Deprecate v1 kmem.limit_in_bytes due to causing unexpected ENOMEM failures and global OOM's. [[https://git.kernel.org/linus/0158115f702b0ba208ab0b5adf44cae99b3ebcc7|commit]] * Prevent premature OOM's due to deferred THP split queue. [[https://git.kernel.org/linus/364c1eebe453f06f0c1e837eb155a5725c9cd272|commit]] [[https://git.kernel.org/linus/7ae88534cdd96235cd775c03b32a75009355740b|commit]] [[https://git.kernel.org/linus/0a432dcbeb32edcd211a5d8f7847d0da7642a8b4|commit]] [[https://git.kernel.org/linus/87eaceb3faa59b9b4d940ec9554ce251325d83fe|commit]] * Introduce madvise() flags MADV_COLD, which marks pages as inactive (thus more easily reclaimed under memory pressure), but doesn't discard the contents like MADV_FREE does, and MADV_PAGEOUT, which reclaims pages immediately, but doesn't discard the contents like MADV_DONTNEED does. [[https://git.kernel.org/linus/9c276cc65a58faf98be8e56962745ec99ab87636|commit]] [[https://git.kernel.org/linus/8940b34a4e082ae11498ddae8432f2ac07685d1c|commit]] [[https://git.kernel.org/linus/1a4e58cce84ee88129d5d49c064bd2852b481357|commit]] [[https://git.kernel.org/linus/d616d5126503967bf365db0711ee3c78b356efe9|commit]] * Experientally enable THP support for text section (executable code) of non-shmem files (CONFIG_READ_ONLY_THP_FOR_FS) [[https://git.kernel.org/linus/585e5a7babd91fd85a5cc97b7324c6c2fc29e1ec|commit]] [[https://git.kernel.org/linus/31895438e702f48e25b7aa6d88f9c97c795c79c7|commit]] [[https://git.kernel.org/linus/520e5ba415906373186bcd3c7cffa3535bfdbdde|commit]] [[https://git.kernel.org/linus/60fbf0ab5da1c360e02b7f7d882bf1c0d8f7e32a|commit]] [[https://git.kernel.org/linus/579c571e2efdb8e5b50959ae66b6142e05bd704f|commit]] [[https://git.kernel.org/linus/99cb0dbd47a15d395bf3faa78dc122bc5efe3fc0|commit]] [[https://git.kernel.org/linus/09d91cda0e8207c1f14ee0d572f61a53dbcdaf85|commit]] * Change the handling of THP page faults so that they are tried first on a local NUMA node with no memory reclaim allowed, and if they not succeed, for madvise(MADV_HUGEPAGE) areas retry on all nodes, allowing reclaim. This should prevent swap storms observed on pre-5.3 kernels with some workloads and also fix the reported regression for a different workload on 5.3 kernel. [[https://lwn.net/Articles/790985/|LWN]] [[https://lwn.net/ml/linux-kernel/CAHk-=wgba5zOJtGBFCBP3Oc1m4ma+AR+80s=hy=BbvNr3GqEmA@mail.gmail.com/|merge]] [[https://git.kernel.org/linus/ac79f78dab892fcdc11fda8af5cc5e80d09dca8a|commit]] [[https://git.kernel.org/linus/19deb7695e072deaff025e03de40c61b525bd57e|commit]] [[https://git.kernel.org/linus/b39d0ee2632d2f4fb180e8e4eba33736283f23de|commit]] [[https://git.kernel.org/linus/76e654cc91bbe627aa6067916f02a4d3ac041620|commit]] [[https://git.kernel.org/linus/3f36d8669457605910cb7a40089b485949569c41|commit]] * Make uprobes uprobe THP-aware. Instead of splitting whole THP when installing uprobe, split only the huge PMD, and reinstate it after uprobes are removed. [[https://git.kernel.org/linus/010c164a5fa7e169deab0a4d8211611f1930c1cd|commit]] [[https://git.kernel.org/linus/fb4fb04ff4dd377b3132e9b31259263ec37b830a|commit]] [[https://git.kernel.org/linus/bfe7b00de6d1e25fee08484c4fbf1c1ed175be78|commit]] [[https://git.kernel.org/linus/5a52c9df62b422087d0c88fc79641028e4472a3b|commit]] [[https://git.kernel.org/linus/27e1f8273113adec0e98bf513e4091636b27cc2a|commit]] [[https://git.kernel.org/linus/f385cb85a42fc4ba92464c2bfd2e2049d65353d3|commit]] |
|
Line 13: | Line 22: |
* page_owner: when both page_owner and debug_pagealloc are enabled, store also the stack of who last freed the page and print it in dump_page() to improve debugging double free or use-after-free. [[https://git.kernel.org/linus/7e2f2a0cd17cfc42acb4b6a293d5cb6c7eda9862|commit]] [[https://git.kernel.org/linus/37389167a281f3ccb6bc958c32b2e088c7269fe0|commit]] [[https://git.kernel.org/linus/8974558f49a6a41b4a74db672e13bca616eff6d8|commit]] |
* page_owner: store also the stack of who last freed the page and print it in dump_page() to improve debugging double free or use-after-free, especially when debug_pagealloc or KASAN are also enabled [[https://git.kernel.org/linus/7e2f2a0cd17cfc42acb4b6a293d5cb6c7eda9862|commit]] [[https://git.kernel.org/linus/37389167a281f3ccb6bc958c32b2e088c7269fe0|commit]] [[https://git.kernel.org/linus/8974558f49a6a41b4a74db672e13bca616eff6d8|commit]] [[https://git.kernel.org/linus/5556cfe8d994d5e7b4d50fd91597b8dc0b3a82fd|commit]] [[https://git.kernel.org/linus/0fe9a448a029a11d7211fcc2ebe9023d7fd31792|commit]] [[https://git.kernel.org/linus/fdf3bf809162592b54c278b9b0e84f3e126f8844|commit]] * oom: add task UID, oom_score_adj and pgtables to OOM message [[https://git.kernel.org/linus/8ac3f8fe91a2119522a73fbc41d354057054e6ed|commit]] [[https://git.kernel.org/linus/70cb6d2677905121bfc7fdf5babfd8444218edd9|commit]] * Fix minuters or hours long stalls when setting nr_hugepages to too high values. [[https://git.kernel.org/linus/1c6c15971e4709953f75082a5d44212536b1c2b7|commit]] [[https://git.kernel.org/linus/5ee04716c46ce58989b1256a98af1af89f385db8|commit]] [[https://git.kernel.org/linus/494330855641269c8a49f1580f0d4e2ead693245|commit]] [[https://git.kernel.org/linus/f60858f9d327c4dd0c432abe9ec943a83929c229|commit]] * Provide a generic top-down mmap layout implementation and use it for riscv. [[https://git.kernel.org/linus/649775be63c8b2e0b56ecc5bbc96d38205ec5259|commit]] [[https://git.kernel.org/linus/28058ed61fc869d7e67916725a3f7e9de50e606b|commit]] [[https://git.kernel.org/linus/e8d54b62c55ab6201de6d195fc2c276294c1f6ae|commit]] [[https://git.kernel.org/linus/67f3977f805b34cf0e41090679800d2091d41d49|commit]] [[https://git.kernel.org/linus/e7142bf5d231f3ccdf6ea6764d5080999b8e299d|commit]] [[https://git.kernel.org/linus/af0f4297286f13a75edf93677b1fb2fc16c412a7|commit]] [[https://git.kernel.org/linus/86e568e9c0525fc40e76d827212d5e9721cf7504|commit]] [[https://git.kernel.org/linus/dba79c3df4a2275132759b0bc04c64b7a510af4a|commit]] [[https://git.kernel.org/linus/b1f61b5bde3a1f50392c97b4c8513d1b8efb1cf2|commit]] [[https://git.kernel.org/linus/b5fb861790bf54486b68644fc27d6969bf772dd8|commit]] [[https://git.kernel.org/linus/e548599fbe310754aa8f687d53c24d9cb5338ac4|commit]] [[https://git.kernel.org/linus/09036468c8d074b730a840657a896f81c1c92017|commit]] [[https://git.kernel.org/linus/9035bd29427921cd32d268a830aff78dcafb945b|commit]] [[https://git.kernel.org/linus/54c95a11cc1b5e1d578209e027adf5775395dafd|commit]] * zswap: let zswap use movable memory with zsmalloc [[https://git.kernel.org/linus/c165f25d23ecb2f9f121ced20435415b931219e2|commit]] [[https://git.kernel.org/linus/d2fcd82bb83aab47c6d63aa8c960cd5edb578065|commit]] * Guarantee alignment to size for kmalloc() allocations of power-of-two size, regardless of used sla*b allocator and activated debugging functions. [[https://lwn.net/Articles/787740/|LWN]] [[https://git.kernel.org/linus/6a486c0ad4dcdee3946842c64884d2978bfe2602|commit]] [[https://git.kernel.org/linus/59bb47985c1db229ccff8c5deebecd54fc77d2a9|commit]] |
Linux 5.4 changelog.
1. Memory management
- memory control group
Extend the shrink file to shrink all memcg caches for the slab cache. Before the commit, writing 1 to /sys/kernel/slab/<slab>/shrink was shrinking only the root cache. With SLUB_MEMCG_SYSFS_ON enabled and slub_memcg_sysfs=1 used, it was possible to shrink also memcg caches, but it was impractical. Now all memcg caches will be shrunk when writing to the "global" shrink file. commit
Throttle allocators when reclaim cannot keep up with v2 memory.high limit commit
Introduce gradual reclaim pressure between v2 memory.low and memory.min thresholds instead of the previous cliff behavior. commit commit commit
Improve situation with multiple parallel reclaimers by letting each walk through the whole cgroup tree, resulting in fewer premature OOM kills. commit
Deprecate v1 kmem.limit_in_bytes due to causing unexpected ENOMEM failures and global OOM's. commit
Prevent premature OOM's due to deferred THP split queue. commit commit commit commit
Introduce madvise() flags MADV_COLD, which marks pages as inactive (thus more easily reclaimed under memory pressure), but doesn't discard the contents like MADV_FREE does, and MADV_PAGEOUT, which reclaims pages immediately, but doesn't discard the contents like MADV_DONTNEED does. commit commit commit commit
Experientally enable THP support for text section (executable code) of non-shmem files (CONFIG_READ_ONLY_THP_FOR_FS) commit commit commit commit commit commit commit
Change the handling of THP page faults so that they are tried first on a local NUMA node with no memory reclaim allowed, and if they not succeed, for madvise(MADV_HUGEPAGE) areas retry on all nodes, allowing reclaim. This should prevent swap storms observed on pre-5.3 kernels with some workloads and also fix the reported regression for a different workload on 5.3 kernel. LWN merge commit commit commit commit commit
Make uprobes uprobe THP-aware. Instead of splitting whole THP when installing uprobe, split only the huge PMD, and reinstate it after uprobes are removed. commit commit commit commit commit commit
kmemleak: make it more robust during early allocations (before slab subsystem is initialized) by using a single memory pool commit commit commit commit commit commit
KASAN: for software tag-based mode, enhance the memory corruption report with a guess whether it is "use-after-free" or "out-of-bound" error instead of "invalid-access" error. commit
Introduce page_shift(), page_size() and compound_nr() to make common operations with compound pages simpler and more readable. commit commit commit
page_owner: store also the stack of who last freed the page and print it in dump_page() to improve debugging double free or use-after-free, especially when debug_pagealloc or KASAN are also enabled commit commit commit commit commit commit
oom: add task UID, oom_score_adj and pgtables to OOM message commit commit
Fix minuters or hours long stalls when setting nr_hugepages to too high values. commit commit commit commit
Provide a generic top-down mmap layout implementation and use it for riscv. commit commit commit commit commit commit commit commit commit commit commit commit commit commit
zswap: let zswap use movable memory with zsmalloc commit commit
Guarantee alignment to size for kmalloc() allocations of power-of-two size, regardless of used sla*b allocator and activated debugging functions. LWN commit commit
This changelog is not complete, meanwhile you can read about it here:
or, instead, you can take a look at the list of merge requests: