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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69E9CC47257 for ; Tue, 5 May 2020 16:57:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2DFA92078C for ; Tue, 5 May 2020 16:57:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20150623.gappssmtp.com header.i=@cmpxchg-org.20150623.gappssmtp.com header.b="YSNRusfE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2DFA92078C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cmpxchg.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A7A298E0005; Tue, 5 May 2020 12:57:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A2AC28E0003; Tue, 5 May 2020 12:57:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 93F638E0005; Tue, 5 May 2020 12:57:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0056.hostedemail.com [216.40.44.56]) by kanga.kvack.org (Postfix) with ESMTP id 7BCA08E0003 for ; Tue, 5 May 2020 12:57:51 -0400 (EDT) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3C4F2180AD806 for ; Tue, 5 May 2020 16:57:51 +0000 (UTC) X-FDA: 76783272342.27.spade92_7eb43d9191059 X-HE-Tag: spade92_7eb43d9191059 X-Filterd-Recvd-Size: 5265 Received: from mail-qt1-f196.google.com (mail-qt1-f196.google.com [209.85.160.196]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Tue, 5 May 2020 16:57:50 +0000 (UTC) Received: by mail-qt1-f196.google.com with SMTP id j2so2249397qtr.12 for ; Tue, 05 May 2020 09:57:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=fEeh741pti+zQtUqiU+d//divWdQ0COuz+a61BTeqwc=; b=YSNRusfE9U5u8q3v9LefCY1rU6K93jnDg4I/Se7sXa6/yvJwAIFJruFuN/+VjtbSYG WLGgbW8jcLo909cVZHzUEp9Vl+j+1knpGhiLLF/8yO7xI4PhQHn2jKn/XZ+7gIEL8BH/ PhBIW0QTlorsqAK3ECYQ7eylm0EjiRTeEix3nV7MDzfl4adlAlpi/WyRmqf5Ia/KQN4O w1BXffany2R/o7burzJHOvzi7xx7uGRaTy/SVArfU9go+3KLVzW3kV2yZOZWk8hdENnp gMwRI/VptGu32D36XJgI8z1S2S8eSXN0uchSFh2cN9VI3jrNmhOGTKXONkufx5pguBgZ O5Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=fEeh741pti+zQtUqiU+d//divWdQ0COuz+a61BTeqwc=; b=p8yF8lGxqzI3TKQmy7bqeAfGue8xfXzTqB5Hk3KFcw+dqzvo6rfjrSfujhcV6WiPJD aJQd6gHjk+iY3FbWIXImr61JJPEm1YaBXml8cGkczL/vE7ZH2X3JBE41UcJTeNG5CMk/ zeyorepn9Bfa3d7r7ahJ7ZgTy1gOhSNRD9mf8s1NZPUgRGBzGbRBekQATPDWibGKAPSf Pi0dmVCL3gR/VYKzFYei1/mLMn+eLGVSQWe1TMO4Yv+dYCsM/WCgUnkLT6t9PW9bqRT7 GbeBQZIUcshV8+gE5mR/lD5F9lM/H85T6YtjbpwPyY9319gmveOQxsLCaM2KbMnMKn13 RVDQ== X-Gm-Message-State: AGi0Pua3YpUkhsvXkz0oFUvYbO4h87jbSNsVFqjX3XldrcDvwPRKKEgT wc8+RhzDvVk//euWkCWmpJ8qJw== X-Google-Smtp-Source: APiQypKo4D/DEYlsK/2z0fDu/HkNmZbZN2I+uP29hg08y0CiHEZZLic4UCq7t4Eov0dhnnf7ClF+Ug== X-Received: by 2002:ac8:2f15:: with SMTP id j21mr3745654qta.259.1588697869788; Tue, 05 May 2020 09:57:49 -0700 (PDT) Received: from localhost (70.44.39.90.res-cmts.bus.ptd.net. [70.44.39.90]) by smtp.gmail.com with ESMTPSA id z40sm2371728qtj.45.2020.05.05.09.57.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 May 2020 09:57:48 -0700 (PDT) Date: Tue, 5 May 2020 12:57:34 -0400 From: Johannes Weiner To: Shakeel Butt Cc: Michal Hocko , Roman Gushchin , Greg Thelen , Andrew Morton , Linux MM , Cgroups , LKML Subject: Re: [PATCH] memcg: oom: ignore oom warnings from memory.max Message-ID: <20200505165734.GD58018@cmpxchg.org> References: <20200504065600.GA22838@dhcp22.suse.cz> <20200504141136.GR22838@dhcp22.suse.cz> <20200504150052.GT22838@dhcp22.suse.cz> <20200504160613.GU22838@dhcp22.suse.cz> <20200505071324.GB16322@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Tue, May 05, 2020 at 08:03:17AM -0700, Shakeel Butt wrote: > On Tue, May 5, 2020 at 12:13 AM Michal Hocko wrote: > > So instead of potentially removing a useful information can we focus on > > the remote charging side of the problem and deal with it in a sensible > > way? That would make memory.high usable for your usecase and I still > > believe that this is what you should be using in the first place. > > We talked about this at LSFMM'19 and I think the decision was to not > fix high reclaim for remote memcg until it will be an actual issue. I > suppose now we can treat it as an actual issue. > > There are a couple of open questions: > 1) Should the remote chargers be throttled and do the high reclaim? I would say it depends on the caller. We may need both: a centralized charger like a kthread that does work on behalf of many cgroups should not be throttled, or we risk priority inversions - maybe not even held up for reclaim, although that would need some thinking about memory.max as well - whether remote charges should be allowed to overrun memory.max temporarily, and we punt all reclaim from such contexts to a worker. (Preferrably, in the future, with all the cpu cycles of that worker accounted to the cgroup. We want that for kswapd-style background reclaim as well). We do similar things with IO for example, when offloading IO to a central kthread. The kthread is allowed to proceed past a cgroup's allowance in order to make forward progress, and the cgroup will be forced to pay up retroactively when it comes back for more of the resource.