Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1415450ybk; Thu, 21 May 2020 06:26:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypJ21LRR2xVX44GLdjL5qSbqY6ZCPAOw4wlkegCWGqT1/92Yk/rTWVpTUpk9IAf03wy8SM X-Received: by 2002:a50:d54f:: with SMTP id f15mr8013752edj.37.1590067580192; Thu, 21 May 2020 06:26:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590067580; cv=none; d=google.com; s=arc-20160816; b=bi8GB5ydB6UYfPLJcK/PcFvNizsHFmGxhSTCpRatfrvYG4wgP8EBPm9sB+R+oHaLAS 4Q40uIYaOcE/GgNToi8hJKrrKEP9Zp2X+w5R41PCS6gwZKyZG25LWJgDOU4pHYy4U77P YgaKY3ZaFg6Pbe7zOKcjemPGimlwKHJBUaldbMmHgTJu3zS0qXWqTOeks0qU++k/smgU O+Oe7yfNd8WIYeSyETsposnIFCPBi/OmDayDvqjvmS0oJFgoGnE4cr+uvLMLR9w5QdTU /WPGZgAldGogpWzP+TH3yG7c/OMCe9QgUDcKiqcTYlSwlZp1CO7efd9wIZ2D5VrG1bAZ 1Vgg== 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; bh=t4ZgBaxu8psJTH+wQpzS+5wxRN/OxLHl3Tsx7xVOSrI=; b=0GSzskNJqQ9BH0n7U6QVcHM1LNqXBjfC94w59DVJGl5LUP6eo8C4cOYKKS1Lgu9wp6 PJCvScoiKBcblQzSHOLeVwKr1Tmr1dovXuACDflTMQoIrtEG2OKg+dsj02Sj5Ffcl1dX ROQf9b8KhZC5WY3yWNW9UKtyJ4yoBxpAHkVbzXI5fFffLTJp2/RPVj1MJ49ua8T3f+60 MckpW0QaHE97pAShip/xh2/I20pCUNVYf7ZQeEX3Bgw2dmNRriZxZgHbvGAl5NjQOVyy TCsnAdJkSkxZiiXeEW9AyjACzCOGLlfrVmvkFDdS8PtEKASMYHFB1MASx8scASzHp2Yw lhvg== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c17si3128010ejr.75.2020.05.21.06.25.55; Thu, 21 May 2020 06:26:20 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729381AbgEUNVZ (ORCPT + 99 others); Thu, 21 May 2020 09:21:25 -0400 Received: from mail-ej1-f65.google.com ([209.85.218.65]:43450 "EHLO mail-ej1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728159AbgEUNVZ (ORCPT ); Thu, 21 May 2020 09:21:25 -0400 Received: by mail-ej1-f65.google.com with SMTP id a2so8744214ejb.10; Thu, 21 May 2020 06:21:24 -0700 (PDT) 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=t4ZgBaxu8psJTH+wQpzS+5wxRN/OxLHl3Tsx7xVOSrI=; b=JSKS0ikHNPRj8HCxcfMI9mbARZWEEgM0IoG8KLupWs/CoTTn6TRpzJVPK7spKk1DUZ OQxXSv0solrkDGgNjJUBUmtTOLAr+UE86ewPg3bUoBKcP1TH+Hr3nw5Ry7p3tKHyOK+/ EqiCXN1MY7tapHdid0qhza2U6qkLn6yY/sQabRJ6lBbhG9/mX2y9dKtSCmo/XyTv5Qmq iNOBhwC27PmoGFDmXW2Kx57FiB+HkeYJt31z23apeSyAJKHUGyf4ZlShAonJcgJYf9+g 8cPH3SsdEbtZbY9cU4TrKUHLa/lin6oiFQtE/Y7Vp+AxUw4CFL3uKoNSMGNcBNz70iUt PsOA== X-Gm-Message-State: AOAM532lo9gfD/z+j6F9q8l4hUVVjw7mEXK+ys+9lcQPDyqlGooily8Y BdpWGeFxHpv+mr0aN96OiyQ= X-Received: by 2002:a17:906:63c9:: with SMTP id u9mr3606605ejk.439.1590067283528; Thu, 21 May 2020 06:21:23 -0700 (PDT) Received: from localhost (ip-37-188-180-112.eurotel.cz. [37.188.180.112]) by smtp.gmail.com with ESMTPSA id k9sm5065750edl.83.2020.05.21.06.21.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 06:21:22 -0700 (PDT) Date: Thu, 21 May 2020 15:21:20 +0200 From: Michal Hocko To: Chris Down 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: <20200521132120.GR6462@dhcp22.suse.cz> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200521125759.GD990580@chrisdown.name> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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. -- Michal Hocko SUSE Labs