This is a note to let you know that I've just added the patch titled Revert "memcg: drop kmem.limit_in_bytes" to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: revert-memcg-drop-kmem.limit_in_bytes.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 19cf24ef28d43eb50b0f1f79eb644938f5ec59e5 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Date: Wed, 20 Sep 2023 12:57:00 +0200 Subject: Revert "memcg: drop kmem.limit_in_bytes" From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> This reverts commit 21ef9e11205fca43785eecf7d4a99528d4de5701 which is commit 86327e8eb94c52eca4f93cfece2e29d1bf52acbf upstream. It breaks existing runc systems, as the tool always thinks the file should be present. Reported-by: Jeremi Piotrowski <jpiotrowski@xxxxxxxxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20230920081101.GA12096@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Cc: Michal Hocko <mhocko@xxxxxxxx> Cc: Shakeel Butt <shakeelb@xxxxxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Roman Gushchin <roman.gushchin@xxxxxxxxx> Cc: Muchun Song <muchun.song@xxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- Documentation/admin-guide/cgroup-v1/memory.rst | 2 ++ mm/memcontrol.c | 10 ++++++++++ 2 files changed, 12 insertions(+) --- a/Documentation/admin-guide/cgroup-v1/memory.rst +++ b/Documentation/admin-guide/cgroup-v1/memory.rst @@ -91,6 +91,8 @@ Brief summary of control files. memory.oom_control set/show oom controls. memory.numa_stat show the number of memory usage per numa node + memory.kmem.limit_in_bytes This knob is deprecated and writing to + it will return -ENOTSUPP. memory.kmem.usage_in_bytes show current kernel memory allocation memory.kmem.failcnt show the number of kernel memory usage hits limits --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3841,6 +3841,10 @@ static ssize_t mem_cgroup_write(struct k case _MEMSWAP: ret = mem_cgroup_resize_max(memcg, nr_pages, true); break; + case _KMEM: + /* kmem.limit_in_bytes is deprecated. */ + ret = -EOPNOTSUPP; + break; case _TCP: ret = memcg_update_tcp_max(memcg, nr_pages); break; @@ -5052,6 +5056,12 @@ static struct cftype mem_cgroup_legacy_f }, #endif { + .name = "kmem.limit_in_bytes", + .private = MEMFILE_PRIVATE(_KMEM, RES_LIMIT), + .write = mem_cgroup_write, + .read_u64 = mem_cgroup_read_u64, + }, + { .name = "kmem.usage_in_bytes", .private = MEMFILE_PRIVATE(_KMEM, RES_USAGE), .read_u64 = mem_cgroup_read_u64, Patches currently in stable-queue which might be from gregkh@xxxxxxxxxxxxxxxxxxx are queue-6.1/nvme-avoid-bogus-crto-values.patch queue-6.1/attr-block-mode-changes-of-symlinks.patch queue-6.1/btrfs-fix-lockdep-splat-and-potential-deadlock-after-failure-running-delayed-items.patch queue-6.1/misc-open-dice-make-open_dice-depend-on-has_iomem.patch queue-6.1/md-put-the-right-device-in-md_seq_next.patch queue-6.1/scsi-megaraid_sas-fix-deadlock-on-firmware-crashdump.patch queue-6.1/btrfs-release-path-before-inode-lookup-during-the-ino-lookup-ioctl.patch queue-6.1/tracing-increase-trace-array-ref-count-on-enable-and-filter-files.patch queue-6.1/btrfs-check-for-btrfs_fs_error-in-pending-ordered-assert.patch queue-6.1/tracefs-add-missing-lockdown-check-to-tracefs_create_dir.patch queue-6.1/ata-libahci-clear-pending-interrupt-status.patch queue-6.1/dm-don-t-attempt-to-queue-io-under-rcu-protection.patch queue-6.1/btrfs-fix-a-compilation-error-if-debug-is-defined-in-btree_dirty_folio.patch queue-6.1/scsi-pm8001-setup-irqs-on-resume.patch queue-6.1/tracing-have-event-inject-files-inc-the-trace-array-ref-count.patch queue-6.1/nfsd-fix-change_info-in-nfsv4-rename-replies.patch queue-6.1/selinux-fix-handling-of-empty-opts-in-selinux_fs_context_submount.patch queue-6.1/tracing-have-current_trace-inc-the-trace-array-ref-count.patch queue-6.1/misc-fastrpc-fix-incorrect-dma-mapping-unmap-request.patch queue-6.1/ext4-fix-rec_len-verify-error.patch queue-6.1/ovl-fix-incorrect-fdput-on-aio-completion.patch queue-6.1/ata-libata-disallow-dev-initiated-lpm-transitions-to-unsupported-states.patch queue-6.1/revert-memcg-drop-kmem.limit_in_bytes.patch queue-6.1/usb-ehci-add-workaround-for-chipidea-portsc.pec-bug.patch queue-6.1/usb-chipidea-add-workaround-for-chipidea-pec-bug.patch queue-6.1/ovl-fix-failed-copyup-of-fileattr-on-a-symlink.patch queue-6.1/revert-drm-amd-disable-s-g-for-apus-when-64gb-or-more-host-memory.patch queue-6.1/usb-gadget-fsl_qe_udc-validate-endpoint-index-for-ch.patch queue-6.1/io_uring-net-fix-iter-retargeting-for-selected-buf.patch queue-6.1/media-dvb-usb-v2-af9035-fix-null-ptr-deref-in-af9035.patch queue-6.1/tracing-have-option-files-inc-the-trace-array-ref-count.patch queue-6.1/i2c-aspeed-reset-the-i2c-controller-when-timeout-occurs.patch queue-6.1/serial-cpm_uart-avoid-suspicious-locking.patch queue-6.1/usb-cdns3-put-the-cdns-set-active-part-outside-the-s.patch queue-6.1/tracing-have-tracing_max_latency-inc-the-trace-array-ref-count.patch queue-6.1/revert-sunrpc-fail-faster-on-bad-verifier.patch queue-6.1/drm-amd-display-fix-the-white-screen-issue-when-64gb-dram.patch queue-6.1/kobject-add-sanity-check-for-kset-kobj.ktype-in-kset.patch