Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1429821ybk; Thu, 21 May 2020 06:45:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMeDItMHSfCV4HJaXVC6G4lqrfy8tBiSwhKqTFpika4vnmC1PuaUb+cKkO6yJLrOzw7QNH X-Received: by 2002:a17:906:ae88:: with SMTP id md8mr3483155ejb.119.1590068748570; Thu, 21 May 2020 06:45:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590068748; cv=none; d=google.com; s=arc-20160816; b=UcD6bKsv5h+tvW5U/SlK9oYX6JxCKbjCZat6nQDG9mI4/YxvQ8OssugYJ+zeAje0p4 GMRxyt0ZFyOb8+kM4VENjD9DUdQylST5Sb3siPMjNi2v3liciGaTX3fnXrXQGSesAnBs TSRtIBJo+ERASFoQ+rIsblhfqsDd+pyRSUfBYEG+tsgqHNkxwrWsvA298sQPQGAndlx+ CXkqmIwFbv98hTCpryKGHj0Iaf9+NroQVah0h+SgYWhqUhm81kToxtDknxT+cyMDyO/I /enBTo+Wy7EBuDoOXBIRM2ZVR2u9uQ/qrdTQXjWS8UQZlRw77lMGUtDtkK4RclIGiwn+ trGg== 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=xV51Tcrf9NcqZbm5wUPmCudngXiKCmzHzaVIGwxSLX0=; b=nuc/HQXU3EYrmZompf340sBBoDsfSu29LTBF+I8TomHyvC653oAh2rJ+hyJDZDKwPm LBOpOoC7EL7U0QR+/f8B3riJKMaZb+L7FYyUnVexLi5s0kS2K6rEO0yVuWTTS0O77Arr gkbCCTTIwM+vIIcLUs5Z5KJsFicBn06pdnkvVjPU3iL7W6jSeKk2Z+0vT4NAP9q5FtbZ WLwSl4HaZg3yG0lUnpvdo7Ju8rXWeAbQ5odSz8b/mi6yEfMenzBubZOaLmNSK5gKqh7u KU7A5grm3d9fppd0yRxb+SAOjasslBHcj1imP5VXXFSzcJwgIImotnasXWDG+2jk90F2 X8AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=mVLBa0Yk; 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=NONE sp=NONE dis=NONE) header.from=chrisdown.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u1si3293267ejz.492.2020.05.21.06.45.23; Thu, 21 May 2020 06:45:48 -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=@chrisdown.name header.s=google header.b=mVLBa0Yk; 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=NONE sp=NONE dis=NONE) header.from=chrisdown.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729388AbgEUNlw (ORCPT + 99 others); Thu, 21 May 2020 09:41:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726856AbgEUNlv (ORCPT ); Thu, 21 May 2020 09:41:51 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E2FCC061A0E for ; Thu, 21 May 2020 06:41:50 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id l21so8873670eji.4 for ; Thu, 21 May 2020 06:41:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=xV51Tcrf9NcqZbm5wUPmCudngXiKCmzHzaVIGwxSLX0=; b=mVLBa0YkwB4qr/nGUx3mTqt/IBNkDYMevgIGIDvGXl6mMe9hC/iNBgUGd5KNQhW1C2 9VRaEeFAhHWBGnn62P2YYa9mMqk5yFn72KsrQrJt2qlo1uogjLnYcd8FWbScxgkMXJYD LjLNQZqXCO3CrKOtpR884DuapuK4oJipI1hO8= 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=xV51Tcrf9NcqZbm5wUPmCudngXiKCmzHzaVIGwxSLX0=; b=bWt6JZn2Zfa0OSpOe4XoaP2g7NuQQg+scARIYYew1xOulX5sW9UPfe/msbnpgds1pP bXxBEhRaJSRRoinZwWXOzx2Abp+uUzd50Lxo3imksqoajcbAQALrD+gE6ym70nyDsahm Or/gaoDMVQSlm6Kgr3VEt4Pi17bYpZ/Mlj2JCvZzEpOE6/ZBfZNfAfFycZfgrQiUbm9o dPkkhJj5BMxAeaN2PuYFusUhf6Ql4WJ4YcQl+wM9JXbSugFe4m3TrQ22LQCh1ZK87eXc XwmQcNvgK42ROzbFutLMR/S37vQycKm6dnHF9TeC9Yrv4RNJKoyJS2n6mCcdMDSoSUZu PbuQ== X-Gm-Message-State: AOAM533noQxnXWrAHLxgBrc9ECn5Ltz2WghgmaPb7xA+bdv5cMLMFhhp jhh0c75AJIk9uVYlZYEHw74EoA== X-Received: by 2002:a17:906:edd3:: with SMTP id sb19mr3469182ejb.39.1590068508871; Thu, 21 May 2020 06:41:48 -0700 (PDT) Received: from localhost ([2620:10d:c093:400::5:4262]) by smtp.gmail.com with ESMTPSA id f24sm4741685edq.21.2020.05.21.06.41.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 06:41:48 -0700 (PDT) Date: Thu, 21 May 2020 14:41:47 +0100 From: Chris Down To: Michal Hocko Cc: Andrew Morton , Johannes Weiner , Tejun Heo , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH] mm, memcg: reclaim more aggressively before high allocator throttling Message-ID: <20200521133324.GF990580@chrisdown.name> References: <20200520143712.GA749486@chrisdown.name> <20200520160756.GE6462@dhcp22.suse.cz> <20200520202650.GB558281@chrisdown.name> <20200521071929.GH6462@dhcp22.suse.cz> <20200521112711.GA990580@chrisdown.name> <20200521120455.GM6462@dhcp22.suse.cz> <20200521122327.GB990580@chrisdown.name> <20200521123742.GO6462@dhcp22.suse.cz> <20200521125759.GD990580@chrisdown.name> <20200521132120.GR6462@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200521132120.GR6462@dhcp22.suse.cz> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michal Hocko writes: >On Thu 21-05-20 13:57:59, Chris Down wrote: >> Michal Hocko writes: >> > > A cgroup is a unit and breaking it down into "reclaim fairness" for >> > > individual tasks like this seems suspect to me. For example, if one task in >> > > a cgroup is leaking unreclaimable memory like crazy, everyone in that cgroup >> > > is going to be penalised by allocator throttling as a result, even if they >> > > aren't "responsible" for that reclaim. >> > >> > You are right, but that doesn't mean that it is desirable that some >> > tasks would be throttled unexpectedly too long because of the other's activity. >> >> Are you really talking about throttling, or reclaim? If throttling, tasks >> are already throttled proportionally to how much this allocation is >> contributing to the overage in calculate_high_delay. > >Reclaim is a part of the throttling mechanism. It is a productive side >of it actually. I guess let's avoid using the term "throttling", since in this context it sounds like we're talking about allocator throttling :-) >> If you're talking about reclaim, trying to reason about whether the overage >> is the result of some other task in this cgroup or the task that's >> allocating right now is something that we already know doesn't work well >> (eg. global OOM). > >I am not sure I follow you here. Let me rephrase: your statement is that it's not desirable "that some task would be throttled unexpectedly too long because of [the activity of another task also within that cgroup]" (let me know if that's not what you meant). But trying to avoid that requires knowing which activity abstractly instigates this entire mess in the first place, which we have nowhere near enough context to determine.