Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp169536pxb; Mon, 18 Oct 2021 23:46:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+9qc62am3mWrmC0J+ZD48M2vXhQnIEMgCFgovqtSmF6zNjFaCeFbyVBU+i93UGoDE9AnE X-Received: by 2002:a05:6402:27d3:: with SMTP id c19mr50303738ede.70.1634625977724; Mon, 18 Oct 2021 23:46:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634625977; cv=none; d=google.com; s=arc-20160816; b=pLO+of7R2xDDGeny+t07XVgMfCkZtDza3iGGZyVRq4YlFzB5iCd8QtYIIVi/3DjibW wao2lkUBEqNJ18jDszlrzUjnR1WvMofzxO775vwcnM351D4VcI35Do6JDYyfaeuUHmfH 7IyPs4SPQv4p2q7cJYKZ2EeBqfeGBjFLnMMtTO3relsGHaxDjlHnEFbA66HGFZsH4RB0 xMlMnEI6+9Vu3XSlp8GzMtRn7EYywAfj6fxbK1wCW6PsOBcg0CYhaStWCsBddUYHCYzQ leAPRX0vsK8RYVRO2SxpPOFRHcyJ+DOv7p5T2X3a0KKdGC7T5D1SnEfTKO6IvS84LrSj 2kzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=7OMO0M/WVTVgdjf54DbVIyAnXJtSdE0/PzhJZH94xwI=; b=tQhpiseTEM7eiwF/7SELjiR4a5slxF0WX1anORNECAwDuUlNPFCBMZMtYo2jB7ed2T WtbjZO65iiwX92gztBdyt0XKWB5QO9zsyh0XtCVXbvIau/vzPOgDSlddxPjVNokB7g/+ lKJfH3rNHsfpsBZSn5XaIQfM4Gz6QebS/FctTid8Zk1rPgeFkE3dVE8cXlfE+voSnKbf GQ7MqISG/Jp1W/0j7VIlFes70HSOLylhj3XNU4J3Syt7auiXP6nBeP1DnxWzCoZdSK9j +T6COOxMA8QQrd++IQaq8sWUMna4n6B4QJaYBLDWBAb4B8cDZMLTD9hnnuG6Gxxx82Qb HBvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=fPQL2wCo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u17si20934385edq.151.2021.10.18.23.45.29; Mon, 18 Oct 2021 23:46:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=fPQL2wCo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234281AbhJSGpQ (ORCPT + 99 others); Tue, 19 Oct 2021 02:45:16 -0400 Received: from relay.sw.ru ([185.231.240.75]:43164 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233888AbhJSGpP (ORCPT ); Tue, 19 Oct 2021 02:45:15 -0400 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=7OMO0M/WVTVgdjf54DbVIyAnXJtSdE0/PzhJZH94xwI=; b=fPQL2wCo4GhLrjLrD anIW7ziZKa2yTrj1Yv+V3pi/G++isnPb2GTrpeZlWODv2dfS13Hse6Ohml5LOq9tSMfcC4BhU3xWz Lq1x991hoRqY/xa4bB6VwdX8WbAEeq4qDFq5WNm6fbE3KcEZblf99MLXtfUce9BjcqcZuVKQ6hETI =; Received: from [172.29.1.17] by relay.sw.ru with esmtp (Exim 4.94.2) (envelope-from ) id 1mcipv-006Qte-Ql; Tue, 19 Oct 2021 09:42:59 +0300 Subject: Re: [PATCH memcg 0/1] false global OOM triggered by memcg-limited task To: Shakeel Butt Cc: Michal Hocko , 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> From: Vasily Averin Message-ID: <25120323-d222-cc5e-fe08-6471bce13bd6@virtuozzo.com> Date: Tue, 19 Oct 2021 09:42:38 +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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 19.10.2021 08:33, Shakeel Butt wrote: > On Mon, Oct 18, 2021 at 11:52 AM 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? > > Not really. Is there a reason I should? More exposure to catch breakage? There is a problem: kmem limit can trigger fake global OOM. To fix it in upstream you can remove kmem controller. However how to handle this problem in stable and LTS kernels? My current patch resolves the problem too, and it can be backported. However I afraid nobody will do it if teh patch will not be approved in upsteam. Thank you, Vasily Averin