Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1418190rdb; Wed, 20 Sep 2023 08:34:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IELLld6C/cJZJL3XGhlyxYVc/y7TWW2LTfjHnH4T20mFj/mRhENBIQVwWqY+XNmETFSXAPC X-Received: by 2002:a17:902:ec82:b0:1bc:7441:d81a with SMTP id x2-20020a170902ec8200b001bc7441d81amr2916595plg.6.1695224094181; Wed, 20 Sep 2023 08:34:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695224094; cv=none; d=google.com; s=arc-20160816; b=LHwh4xFRzYJsefANzOyNGlSbckl2tUdTx0r/Mx3sgiRGjKOL01Ph2IpdFxmrManqsj Zuhm8wcalj6wdN1Xa1Gf3t3kVQkkpJQJeUP3jm89BrLEADOGmhZ78ljaWffD35x3t6H6 Dki2G+qCDxc6qmqI0l9AKVrupXM7b4py5RGoS8jUAeIXvcYWI5oe0i14Bkv/zAwKwTg+ wCafytxyR77mBKA06RsqTu5wFWjx6wsP41htTSas5W1dAp3JCt4trmfWvtY0VdlH+gNz bSFGGdCBLRqPK4xJO9KIMesYAN0vs6Xf7j33aZJLASs5BsJsv4b+ltwATQS7avFzhtV/ uS0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Q3GHSnuFyvnjp6NCUlFQeS9K8mutJob2CSw4hWEiUtk=; fh=vz1ZhP4nD1TMVhmFRCm75/E3umv///RABFs5aLI0eY4=; b=cCzfEvgiB+RXd8B5RAU4TGxX8BHlLxMnLKmu5xmHJwFRGRsVkmFhuOb4SF5Lg91xIr wwFZyg4l+B8j32+qEnmD8IJyVv0jON6wWlqz/mhH9s0krnAU3FfCnnNCbWsiRwYJaNUW VyfVTvuNIZ6oi2OW8BjFQ2eFC58M71X7l1FruMQ5j8kHsHNZtQuIg4xRw/FLZQ+K/rsc UGHyra5bDPTBzrTCMUWYMWryIzUsxFnMQWI46xDvjSS8XtEBXQ6Iuqj+V2fLJpgXTfoR K9X+rCSN/grOLJUPZaC7V+UbEZcFeeb1y6+N/NJSm/6bcpGEN4pfVbzEcZ+Kq6Bnx0Aj 2bVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0S0tEb+V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id n14-20020a170903110e00b001b9736814b6si12361805plh.309.2023.09.20.08.34.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 08:34:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0S0tEb+V; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id E883280608FB; Wed, 20 Sep 2023 03:46:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234519AbjITKqI (ORCPT + 99 others); Wed, 20 Sep 2023 06:46:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234415AbjITKpe (ORCPT ); Wed, 20 Sep 2023 06:45:34 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9ABBF2; Wed, 20 Sep 2023 03:45:15 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0AF22C433C8; Wed, 20 Sep 2023 10:45:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1695206715; bh=JugKkRU1X5rlumprCvTfvliuik27QKBGnmfChQ51VtU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0S0tEb+VLi12h64gO4CuGvecaMFC5e19Gongi+LH/kAPQd6rkoQNPtKmmAORZDr8e Be6rS8Q9MrvPZtQZm48G3aKKzKhvvoN2Zr6YEjQbV5BNCXtv2aQTmq8zxbUzgK84OQ oFkgMCBCH/uxkCGtN6+rNx5I4XEwVNdG7gTRT6HE= Date: Wed, 20 Sep 2023 12:45:08 +0200 From: Greg Kroah-Hartman To: Jeremi Piotrowski Cc: Michal Hocko , 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 Subject: Re: [REGRESSION] Re: [PATCH 6.1 033/219] memcg: drop kmem.limit_in_bytes Message-ID: <2023092044-porthole-impeding-e539@gregkh> References: <20230917191040.964416434@linuxfoundation.org> <20230917191042.204185566@linuxfoundation.org> <20230920081101.GA12096@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> <2023092032-applied-gave-0bff@gregkh> <76525b1a-6857-434d-86ee-3c2ff4db0e4c@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <76525b1a-6857-434d-86ee-3c2ff4db0e4c@linux.microsoft.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 (howler.vger.email [0.0.0.0]); Wed, 20 Sep 2023 03:46:15 -0700 (PDT) On Wed, Sep 20, 2023 at 12:21:37PM +0200, Jeremi Piotrowski wrote: > On 9/20/2023 11:25 AM, Greg Kroah-Hartman wrote: > > On Wed, Sep 20, 2023 at 10:43:56AM +0200, 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. > > > > That will just postpone the breakage, we really shouldn't break > > userspace. > > > > That being said, having userspace "break" because a file is no longer > > present is not good coding style on the userspace side at all. That's > > why we have sysfs and single-value-files now, if the file isn't present, > > then userspace instantly notices and can handle it. Much easier than > > the old-style multi-fields-in-one-file problem. > > > > The memcg files in this case are single-value, but userspace expects to be able > to read memcg limits when it can read the usage (indicating MEMCG is enabled). > If it can't - then something is off, and the node is marked unhealthy. > > >>>> Address this by wiping out the file completely and effectively get back to > >>>> pre 4.5 era and CONFIG_MEMCG_KMEM=n configuration. > > > > The fact that this is a valid option (i.e. no file) with that config > > option disabled makes me want to keep this as well, as how does > > userspace handle this option disabled at all? Or old kernels? > > > > Userspace has had to handle the case of MEMCG_KMEM=n, but that had 2 cases so far: > > limits/usage/max_usage/failcnt files are all available or none of them are available. > > Now it needs to handle 3 of 4 files being available, but only for kmem (and not plain > memory, memsw or kmem.tcp). That's an inconsistency. > > > I can drop this from stable kernels, but again, this feels like the runc > > developers are just postponing the problem... > > > > Since cgroups v1 is deprecated, I think the runc developers haven't touched this part > of the code in years and expected it to keep working while they wait for the long tail > of usage to die out. Ok, then we should revert this, I'll go drop it in the stable trees, it should also be reverted in Linus's tree too. thanks, greg k-h