From: Jeremi Piotrowski <jpiotrowski@linux.microsoft.com>
To: Michal Hocko <mhocko@suse.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org, patches@lists.linux.dev,
Shakeel Butt <shakeelb@google.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Muchun Song <muchun.song@linux.dev>, Tejun Heo <tj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, regressions@lists.linux.dev,
mathieu.tortuyaux@gmail.com
Subject: Re: [REGRESSION] Re: [PATCH 6.1 033/219] memcg: drop kmem.limit_in_bytes
Date: Wed, 20 Sep 2023 12:04:48 +0200 [thread overview]
Message-ID: <101987a1-b1ab-429d-af03-b6bdf6216474@linux.microsoft.com> (raw)
In-Reply-To: <ZQqwzK/fDm+GLiKM@dhcp22.suse.cz>
On 9/20/2023 10:43 AM, Michal Hocko wrote:
> On Wed 20-09-23 01:11:01, Jeremi Piotrowski wrote:
>> On Sun, Sep 17, 2023 at 09:12:40PM +0200, Greg Kroah-Hartman wrote:
>>> 6.1-stable review patch. If anyone has any objections, please let me know.
>>>
>>> ------------------
>>
>> Hi Greg/Michal,
>>
>> This commit breaks userspace which makes it a bad commit for mainline and an
>> even worse commit for stable.
>>
>> We ingested 6.1.54 into our nightly testing and found that runc fails to gather
>> cgroup statistics (when reading kmem.limit_in_bytes). The same code is vendored
>> into kubelet and kubelet fails to start if this operation fails. 6.1.53 is
>> fine.
>
> Could you expand some more on why is the file read? It doesn't support
> writing to it for some time so how does reading it helps in any sense?
>
> Anyway, I do agree that the stable backport should be reverted.
>
This file is read together with all the other memcg files. Each prefix:
memory
memory.memsw
memory.kmem
memory.kmem.tcp
is combined with these suffixes
.usage_in_bytes
.max_usage_in_bytes
.failcnt
.limit_in_bytes
and read, the values are then forwarded on to other components for scheduling decisions.
You want to know the limit when checking the usage (is the usage close to the limit or not).
Userspace tolerates MEMCG/MEMCG_KMEM being disabled, but having a single file out of the
set missing is an anomaly. So maybe we could keep the dummy file just for the
sake of consistency? Cgroupv1 is legacy after all.
>>> Address this by wiping out the file completely and effectively get back to
>>> pre 4.5 era and CONFIG_MEMCG_KMEM=n configuration.
>>
>> On reads, the runc code checks for MEMCG_KMEM=n by checking
>> kmem.usage_in_bytes. If it is present then runc expects the other cgroup files
>> to be there (including kmem.limit_in_bytes). So this change is not effectively
>> the same.
>>
>> Here's a link to the PR that would be needed to handle this change in userspace
>> (not merged yet and would need to be propagated through the ecosystem):
>>
>> https://github.com/opencontainers/runc/pull/4018.
>
> Thanks. Does that mean the revert is still necessary for the Linus tree
> or do you expect that the fix can be merged and propagated in a
> reasonable time?
>
We can probably get runc and currently supported kubernetes versions patched in time
before 6.6 (or the next LTS kernel) hits LTS distros.
But there's still a bunch of users running cgroupv1 with unsupported kubernetes
versions that are still taking kernel updates as they come, so this might get reported
again next year if it stays in mainline.
next prev parent reply other threads:[~2023-09-20 10:04 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-17 19:12 [PATCH 6.1 000/219] 6.1.54-rc1 review Greg Kroah-Hartman
2023-09-17 20:47 ` SeongJae Park
2023-09-18 5:34 ` Takeshi Ogasawara
2023-09-18 6:42 ` Bagas Sanjaya
2023-09-18 11:24 ` Conor Dooley
2023-09-18 12:08 ` Ron Economos
2023-09-18 12:48 ` Jon Hunter
2023-09-18 18:34 ` Florian Fainelli
2023-09-18 18:41 ` Guenter Roeck
2023-09-18 20:56 ` Naresh Kamboju
2023-09-18 22:21 ` Shuah Khan
[not found] ` <20230917191042.204185566@linuxfoundation.org>
2023-09-20 8:11 ` [REGRESSION] Re: [PATCH 6.1 033/219] memcg: drop kmem.limit_in_bytes Jeremi Piotrowski
2023-09-20 8:43 ` Michal Hocko
2023-09-20 9:25 ` Greg Kroah-Hartman
2023-09-20 10:21 ` Jeremi Piotrowski
2023-09-20 10:45 ` Greg Kroah-Hartman
2023-09-20 11:08 ` Michal Hocko
2023-09-20 11:16 ` Greg Kroah-Hartman
2023-09-20 10:04 ` Jeremi Piotrowski [this message]
2023-09-20 11:07 ` Michal Hocko
2023-09-20 13:25 ` Jeremi Piotrowski
2023-09-20 13:47 ` Michal Hocko
2023-09-20 15:32 ` Shakeel Butt
2023-09-20 16:55 ` Michal Hocko
2023-09-20 19:46 ` Shakeel Butt
2023-09-20 20:08 ` Michal Hocko
2023-09-20 21:46 ` Shakeel Butt
2023-09-21 7:52 ` Michal Hocko
2023-09-21 10:43 ` Jeremi Piotrowski
2023-09-21 11:21 ` Michal Hocko
2023-09-21 17:25 ` Shakeel Butt
2023-09-21 19:50 ` Michal Hocko
2023-09-22 13:30 ` Johannes Weiner
2023-09-25 7:40 ` Michal Hocko
2023-09-22 23:00 ` Roman Gushchin
2023-09-25 7:41 ` Michal Hocko
2023-09-26 2:49 ` Roman Gushchin
2023-09-22 11:14 ` Linux regression tracking #adding (Thorsten Leemhuis)
2023-09-21 13:04 ` [PATCH 6.1 000/219] 6.1.54-rc1 review Conor Dooley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=101987a1-b1ab-429d-af03-b6bdf6216474@linux.microsoft.com \
--to=jpiotrowski@linux.microsoft.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.tortuyaux@gmail.com \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=patches@lists.linux.dev \
--cc=regressions@lists.linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeelb@google.com \
--cc=stable@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox