Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp939417ybj; Tue, 5 May 2020 10:02:11 -0700 (PDT) X-Google-Smtp-Source: APiQypIWKt2PYQq+CnkxT3aAgxBpdk4g7mKUmFdBdZY6eicRLtyS8IIRqf+537Qxmv9r8XuhNXH3 X-Received: by 2002:a17:906:29c4:: with SMTP id y4mr3699960eje.95.1588698131432; Tue, 05 May 2020 10:02:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588698131; cv=none; d=google.com; s=arc-20160816; b=t0+Sne5pHK92Myf+rrj9JeG6q4LoH4V5qAx4Df1jA8tVp4yER7f4+zPJx1iIxkHwUY GFHhe8zFgzYJeXdmsIgl2E55pfkcx2Ps3EbeD6bGJDEi2P6CoChDvskxpJQjvOfCNjwT KALjPO/KLQTKewx3Ylbsf3kN8pAjlCB3b1dOOAYR1JDJ5D1BKlQhIiRakTUKgrETiCKz pPX03RJA5wALb6l9aTUMJT5Am02bH1u+EhzB05QjjhkG8cSEi8YajPPejyfA9qwD1ocH pRNXgYAgy7flNUS943aiULqCLQ3ZxxQYEiRfoU7zjMHBVWOEIxpYT8BroSofjsFxYcr0 mNOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=fEeh741pti+zQtUqiU+d//divWdQ0COuz+a61BTeqwc=; b=HQxNEgQEOEAiak8LuPFdzrXQlcbarmYrBR6Dean8dwZ9XkiFUC4nABMLvm8vDvvtgu EJulDqFEaw7UXOLgQNNLY2JDdpN8T9UUVVeYaLLQgCIDKn5cbJQpk1GWqOcpCQH+Hi22 CQusUjb91MeqUli5W2BwfXpxXFt0+AGxShChz+ex/4fnFvjRHTDHLQMW+kXKZTKEAcrM vDM8x5cnyfB/v0t+ncsq7uIMfHIS+joyXqoWFonxqPcSCX4zLKr1RZqnYTtgUM6ciqYj ZRgkpHqQ6/wmlE0tELYQXnSYC6XGfWAXgqkRV54vDBXLw/UUhe9MGliwn2Gyglw3+keh mmiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=YSNRusfE; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si1347228ejc.0.2020.05.05.10.01.47; Tue, 05 May 2020 10:02:11 -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=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=YSNRusfE; 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=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730542AbgEEQ5v (ORCPT + 99 others); Tue, 5 May 2020 12:57:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729593AbgEEQ5u (ORCPT ); Tue, 5 May 2020 12:57:50 -0400 Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3450C061A10 for ; Tue, 5 May 2020 09:57:50 -0700 (PDT) Received: by mail-qt1-x844.google.com with SMTP id h26so2536486qtu.8 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=rDSm7ni2/drLrbptTq87e/OM7psSBILcTxvNOP+vyAb6n50NcGSxh9jicSo2OzH7rA 2qWhSnmelNiQK/spA7ZoLjt2ZuxpgOB0Fnk7ALPQIveoX7L4CseLhu7Hmj2NHXr8lJQF KSbqcCVugMfiVhF6llksBugrvRjcdncTggQO6AwLq19RqAmSycPAxTjaKWY/MDXUKvTd 3yViF4/2b0VsctmRonQWfQYz3bJXckU8mtxJz+bqpA04ReI57llSe6acAWbwWkIFmGEF xY850ZBeElf9IxLTiM292DhYrkdCuox99EAo+NunGkI9sl18PIM9hqr7dQP/JD4NUjC2 Hj7Q== X-Gm-Message-State: AGi0PuajhYD7MynjV5rHIxehwsXCM72RjuMcXYTQ1fWUNdgmyNl3Uo6K EolZNk9nfQxkYg36k28pp0Tlsg== 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: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.