From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vasily Averin Subject: Re: [PATCH memcg 0/1] false global OOM triggered by memcg-limited task Date: Mon, 18 Oct 2021 22:18:53 +0300 Message-ID: <4a30aa18-e2a2-693c-8237-b75fffac9838@virtuozzo.com> References: <9d10df01-0127-fb40-81c3-cc53c9733c3e@virtuozzo.com> <6b751abe-aa52-d1d8-2631-ec471975cc3a@virtuozzo.com> <27dc0c49-a0d6-875b-49c6-0ef5c0cc3ac8@virtuozzo.com> <153f7aa6-39ef-f064-8745-a9489e088239@virtuozzo.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Content-Type:MIME-Version:Date:Message-ID:From: Subject; bh=4jQhvYjT9e4GBOeEOpVGTS9SaUVXdZehoAqLumPkuB4=; b=BJk6ixEhC6GggosfS drD0XYECS0NtOWJdkYysnHFAK3NUBY+8RheLTcA44GdguZbNpj3BRm189Gyzn1Px/cF3Y/O/nx2El BkFfXhQpsHXlqPQeOunogHD6a/FRsulQdWnndAg0XUNt5LOBKuKiAefJ3xBLBOy6yqbngYxkO41TM =; In-Reply-To: <153f7aa6-39ef-f064-8745-a9489e088239-5HdwGun5lf+gSpxsJD1C4w@public.gmane.org> Content-Language: en-US List-ID: Content-Type: text/plain; charset="us-ascii" To: Shakeel Butt , Michal Hocko Cc: Johannes Weiner , Vladimir Davydov , Andrew Morton , Roman Gushchin , Uladzislau Rezki , Vlastimil Babka , Mel Gorman , Cgroups , Linux MM , LKML , kernel-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org On 18.10.2021 21:52, Vasily Averin wrote: > On 18.10.2021 18:07, Shakeel Butt wrote: >> On Mon, Oct 18, 2021 at 5:27 AM Michal Hocko wrote: >>> >>> [restore the cc list] >>> >>> On Mon 18-10-21 15:14:26, Vasily Averin wrote: >>>> On 18.10.2021 14:53, Michal Hocko wrote: >>>>> On Mon 18-10-21 13:05:35, Vasily Averin wrote: >>>>>> On 18.10.2021 12:04, Michal Hocko wrote: >>>>>> Here we call try_charge_memcg() that return success and approve the allocation, >>>>>> however then we hit into kmem limit and fail the allocation. >>>>> >>>>> Just to make sure I understand this would be for the v1 kmem explicit >>>>> limit, correct? >>>> >>>> yes, I mean this limit. >>> >>> OK, thanks for the clarification. This is a known problem. Have a look >>> at I think we consider that one to 0158115f702b ("memcg, kmem: deprecate >>> kmem.limit_in_bytes"). We are reporting the deprecated and to-be removed >>> status since 2019 without any actual report sugested by the kernel >>> message. Maybe we should try and remove it and see whether that prompts >>> some pushback. >>> >> >> Yes, I think now should be the right time to take the next step for >> deprecation of kmem limits: >> https://lore.kernel.org/all/20201118175726.2453120-1-shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org/ > > Are you going to push it to stable kernels too? Btw CONFIG_MEMCG_KMEM=y is set both in RHEL8 kernels and in ubuntu 20.04 LTS kernel 5.11.0-37. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 991B8C433EF for ; Mon, 18 Oct 2021 19:19:21 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0D4776103D for ; Mon, 18 Oct 2021 19:19:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0D4776103D Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=virtuozzo.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 9878F900004; Mon, 18 Oct 2021 15:19:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 90FAC900002; Mon, 18 Oct 2021 15:19:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7D871900004; Mon, 18 Oct 2021 15:19:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0147.hostedemail.com [216.40.44.147]) by kanga.kvack.org (Postfix) with ESMTP id 700C2900002 for ; Mon, 18 Oct 2021 15:19:20 -0400 (EDT) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 2D498181AC9C6 for ; Mon, 18 Oct 2021 19:19:20 +0000 (UTC) X-FDA: 78710521680.01.2C099FD Received: from relay.sw.ru (relay.sw.ru [185.231.240.75]) by imf13.hostedemail.com (Postfix) with ESMTP id 29C5E1040EAF for ; Mon, 18 Oct 2021 19:19:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=Content-Type:MIME-Version:Date:Message-ID:From: Subject; bh=4jQhvYjT9e4GBOeEOpVGTS9SaUVXdZehoAqLumPkuB4=; b=BJk6ixEhC6GggosfS drD0XYECS0NtOWJdkYysnHFAK3NUBY+8RheLTcA44GdguZbNpj3BRm189Gyzn1Px/cF3Y/O/nx2El BkFfXhQpsHXlqPQeOunogHD6a/FRsulQdWnndAg0XUNt5LOBKuKiAefJ3xBLBOy6yqbngYxkO41TM =; Received: from [172.29.1.17] by relay.sw.ru with esmtp (Exim 4.94.2) (envelope-from ) id 1mcYAE-006OiF-Uy; Mon, 18 Oct 2021 22:19:15 +0300 Subject: Re: [PATCH memcg 0/1] false global OOM triggered by memcg-limited task From: Vasily Averin To: Shakeel Butt , Michal Hocko Cc: Johannes Weiner , Vladimir Davydov , Andrew Morton , Roman Gushchin , Uladzislau Rezki , Vlastimil Babka , Mel Gorman , Cgroups , Linux MM , LKML , kernel@openvz.org References: <9d10df01-0127-fb40-81c3-cc53c9733c3e@virtuozzo.com> <6b751abe-aa52-d1d8-2631-ec471975cc3a@virtuozzo.com> <27dc0c49-a0d6-875b-49c6-0ef5c0cc3ac8@virtuozzo.com> <153f7aa6-39ef-f064-8745-a9489e088239@virtuozzo.com> Message-ID: <4a30aa18-e2a2-693c-8237-b75fffac9838@virtuozzo.com> Date: Mon, 18 Oct 2021 22:18:53 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <153f7aa6-39ef-f064-8745-a9489e088239@virtuozzo.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 29C5E1040EAF X-Stat-Signature: uy8acsmofrjop5w9h5k5i7knt477gpzu Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=virtuozzo.com header.s=relay header.b=BJk6ixEh; dmarc=pass (policy=quarantine) header.from=virtuozzo.com; spf=pass (imf13.hostedemail.com: domain of vvs@virtuozzo.com designates 185.231.240.75 as permitted sender) smtp.mailfrom=vvs@virtuozzo.com X-Rspamd-Server: rspam02 X-HE-Tag: 1634584757-930112 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 18.10.2021 21:52, Vasily Averin wrote: > On 18.10.2021 18:07, Shakeel Butt wrote: >> On Mon, Oct 18, 2021 at 5:27 AM Michal Hocko wrote: >>> >>> [restore the cc list] >>> >>> On Mon 18-10-21 15:14:26, Vasily Averin wrote: >>>> On 18.10.2021 14:53, Michal Hocko wrote: >>>>> On Mon 18-10-21 13:05:35, Vasily Averin wrote: >>>>>> On 18.10.2021 12:04, Michal Hocko wrote: >>>>>> Here we call try_charge_memcg() that return success and approve the allocation, >>>>>> however then we hit into kmem limit and fail the allocation. >>>>> >>>>> Just to make sure I understand this would be for the v1 kmem explicit >>>>> limit, correct? >>>> >>>> yes, I mean this limit. >>> >>> OK, thanks for the clarification. This is a known problem. Have a look >>> at I think we consider that one to 0158115f702b ("memcg, kmem: deprecate >>> kmem.limit_in_bytes"). We are reporting the deprecated and to-be removed >>> status since 2019 without any actual report sugested by the kernel >>> message. Maybe we should try and remove it and see whether that prompts >>> some pushback. >>> >> >> Yes, I think now should be the right time to take the next step for >> deprecation of kmem limits: >> https://lore.kernel.org/all/20201118175726.2453120-1-shakeelb@google.com/ > > Are you going to push it to stable kernels too? Btw CONFIG_MEMCG_KMEM=y is set both in RHEL8 kernels and in ubuntu 20.04 LTS kernel 5.11.0-37.