Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1290369rdb; Wed, 20 Sep 2023 05:23:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGvIjZHb61T9yeaTDGFji4dQiEXl8YqnKVZfZLcHMPRAKCL/bqj7D2MKxieZK1UJWmTbvXG X-Received: by 2002:a05:6a21:819d:b0:14b:f8cf:c2f8 with SMTP id pd29-20020a056a21819d00b0014bf8cfc2f8mr2305658pzb.34.1695212627359; Wed, 20 Sep 2023 05:23:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695212627; cv=none; d=google.com; s=arc-20160816; b=IVx0RCg8KuVR4tJ7BCX9dKG+39Y+2XhnPoZgy+7FcgoyZuh6RyM5n/Z7VxIGqMOVPy mUzpKmFdU8rK6d4Jf0PeRNWXkl7ILvyPE0izl1SLP8N/xyMtEnJO6Wt0AkgBTazKIIRG mkG2Km30HhaQWIi1+/jx8OVijuXcApH5DdL0wXI4mNcEdfrtzIeoVESfkNXhG2FHGp+o YCXEYzzVtAB34KWclIrV2iqCXr/llvuXdlT6K6NDvnT/JBW+ZRcJG9qpvJkjAo4OVG// II0WVKMAnlTQQ4wOxDFUPzwhYHMP1KWYTzxz93VkJYzRvkFx1m+RtnVcmT8v41urH1gG bCjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :content-language:references:cc:to:subject:from:user-agent :mime-version:date:message-id:dkim-signature:dkim-filter; bh=3bC6p4sdHzytTO0QKfyFybQqp0lACEhiSf/B5PUqc00=; fh=uzkE465y519TLWakC+xI92d1y7VqeHtXyAQkPZvYsiw=; b=eT9x2ahdwxxv+hAIqAvELHTax7/+wsvYRQUDCWAIAQ+QIxXYmXpOxJvSkevWIt+cUh YpEQzSgaZ3rxIT3La6q7GCH66IOwVWLOndmNFjIBPmgJARwMq8x//GxcsGyGDVeWL0yz INUsGXlPVJLcPLhHtbywRumixoaDevU9QpzRkqS62BiGYnMhXkXUSycxEv55RwCxOJD0 7SbPLWb+9MLTvDYCBSQ8EkV2xZyQmAt/goHpZg5wHimn2/I4ZnH6A/Bi2z17j+HG68Gx xzulJfKW3T7FuSYjKa24BQr5GUpq1+znq+v1h06TlCprhGNbKsAyV/7ds1kXhTNbIUMM uuDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="h/YyjqOE"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id a14-20020a170902ecce00b001c4155c310csi9016175plh.94.2023.09.20.05.23.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 05:23:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b="h/YyjqOE"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.microsoft.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 3BDFE80D7E4E; Wed, 20 Sep 2023 03:05:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234268AbjITKE7 (ORCPT + 99 others); Wed, 20 Sep 2023 06:04:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234242AbjITKE7 (ORCPT ); Wed, 20 Sep 2023 06:04:59 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D8A4BAB; Wed, 20 Sep 2023 03:04:52 -0700 (PDT) Received: from [192.168.2.41] (77-166-152-30.fixed.kpn.net [77.166.152.30]) by linux.microsoft.com (Postfix) with ESMTPSA id 112CB212C4B2; Wed, 20 Sep 2023 03:04:49 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 112CB212C4B2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1695204292; bh=3bC6p4sdHzytTO0QKfyFybQqp0lACEhiSf/B5PUqc00=; h=Date:From:Subject:To:Cc:References:In-Reply-To:From; b=h/YyjqOEiWd8pu5Aeb671sFZKoQY0fwShQJicaEbCnEbeLBtsh7LHpAw5WRPPLqc2 BSkSqH5iAh9vTpQhEDIKk607F+IZLp27UXDd9uW9rs+uHhndP4n4ewpTFGgF5w1ycY KQ5DrwpI4tOdPwgzvZQ1f6U3SuOuZipLoAyhOBG4= Message-ID: <101987a1-b1ab-429d-af03-b6bdf6216474@linux.microsoft.com> Date: Wed, 20 Sep 2023 12:04:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Jeremi Piotrowski Subject: Re: [REGRESSION] Re: [PATCH 6.1 033/219] memcg: drop kmem.limit_in_bytes To: Michal Hocko Cc: Greg Kroah-Hartman , stable@vger.kernel.org, patches@lists.linux.dev, Shakeel Butt , Johannes Weiner , Roman Gushchin , Muchun Song , Tejun Heo , Andrew Morton , linux-kernel@vger.kernel.org, regressions@lists.linux.dev, mathieu.tortuyaux@gmail.com References: <20230917191040.964416434@linuxfoundation.org> <20230917191042.204185566@linuxfoundation.org> <20230920081101.GA12096@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-17.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 20 Sep 2023 03:05:10 -0700 (PDT) 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.