Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1549114rdb; Wed, 20 Sep 2023 12:15:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IErfaWO36V7iFhuidjLE0vy596V51RiJvG8IqAzAFeg0xwcpDHkfE1wWKuoZZvesXtTN6/+ X-Received: by 2002:a17:903:187:b0:1c1:eb8b:79a6 with SMTP id z7-20020a170903018700b001c1eb8b79a6mr3451651plg.24.1695237323666; Wed, 20 Sep 2023 12:15:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695237323; cv=none; d=google.com; s=arc-20160816; b=WUnOqAbu+PHkWyOXXA1ar0JNI3vv01bZRDlLntDUGNnpFw4rjd9W60dow1DcYyrq7q ppeTs0C/J4LcEA4YxL21hOTs963Nvea0Mj9IJzWLFyM6567jkaZihBfdYTCIZEgK2gPE KNwm3PWwpQGp4KxnTiHyP+lEXa2Bv52p0Z1ktdaf5uzzZjf9+tyKHduv5wFGDqE3dqna KhawmXe12RpgceW66lBxl1ObEr3dP3EuP1SnK5XAlsr864PTuJpjm6Wgy8rRU+YKh7V3 k+n6aQiSAci4+FnKYCDmy734kBPl0bPhYbDaZzkRM0+1CKmn3hQ8Ww9LvlKkVBSjf5J0 x6DA== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature:dkim-filter; bh=2MniQsug91jwOSu/YyVgz9F4Hyl7CDet0WnAmSOuWhY=; fh=aXC8S1/HNGLapyLiPSl5kPBk9roZx+J3xVXt3cxXixU=; b=INXYNeK0AeTSY6ulpRb2iV8hIjsD7uNxGNMu0YpunR2SMvg+bLMd9IpX41cEYXZ7P/ 4wjOhR7G56dehRK4JwYURLDdBdI4whJGdz60MbVCTEmttTsIPmoeRQn+dZ5lFPLIMNY/ rrAB7/1Zq/hfT5H2fxy5hMhJ74MbrJXqCrqvhXUKgulz+mR71z2yWVnN/0f4AW4riuyz U3Ir8PLVkIwCisE8EZ++wDglFz5JJpmTnDwJ5I8XVABceC4i4ZG9GXzXMOH++0SrGnY1 1f5RCysrkaYOo3QdR+4xfUFU+6J2XCvgkwVw3HpjqQPLvXiseuPtyPTyOR6xcBUUzUg1 x9YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=DZF28Ylh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id u4-20020a170902e80400b001bda57935fasi12661724plg.64.2023.09.20.12.15.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 12:15:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=DZF28Ylh; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id B445A81C526A; Wed, 20 Sep 2023 03:21:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234287AbjITKVt (ORCPT + 99 others); Wed, 20 Sep 2023 06:21:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233999AbjITKVs (ORCPT ); Wed, 20 Sep 2023 06:21:48 -0400 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C390EAD; Wed, 20 Sep 2023 03:21:41 -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 2BF7C212C4B3; Wed, 20 Sep 2023 03:21:39 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2BF7C212C4B3 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1695205301; bh=2MniQsug91jwOSu/YyVgz9F4Hyl7CDet0WnAmSOuWhY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=DZF28Ylh13QXobO3U0L2pHvZLnHVj+gNmED89RYf4K5gqiLYlvfCnMYMTZ2tTuQ40 GBvDVBnt2dAlSXtVEiuhkRJK0lzkvBIRyNhbA3bMmPuhzyX2WpSLnDJlmsXAaIRUpU wsPR2CjegMpKHQw1xjum7hKE9MR75K6HRoSouIvU= Message-ID: <76525b1a-6857-434d-86ee-3c2ff4db0e4c@linux.microsoft.com> Date: Wed, 20 Sep 2023 12:21:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [REGRESSION] Re: [PATCH 6.1 033/219] memcg: drop kmem.limit_in_bytes Content-Language: en-US To: Greg Kroah-Hartman , Michal Hocko Cc: 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> <2023092032-applied-gave-0bff@gregkh> From: Jeremi Piotrowski In-Reply-To: <2023092032-applied-gave-0bff@gregkh> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Wed, 20 Sep 2023 03:21:49 -0700 (PDT) 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. > thanks, > > greg k-h