Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2770268ybh; Mon, 16 Mar 2020 09:22:19 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsgWxLmzvwcQsZLDteMOofxHfpO8siCpUCXZoY90/HEqnWNAhLoZx3zbmHGvSnKt/dJD4Uw X-Received: by 2002:a9d:3b09:: with SMTP id z9mr49096otb.195.1584375739811; Mon, 16 Mar 2020 09:22:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584375739; cv=none; d=google.com; s=arc-20160816; b=cZv7ABNmikZQJXibAmAbJEx4dDiv8o2oWKBm9DHT7yueMI3NfrWA/rpSsyCkFDtOO7 CEiRdvP6dWfdGbfuqOgzmNPuZDaHoI3MK8+hKEyWHF3TfO0TT4B+vsyCNb9HE1ekmWsu V9RwVB9FNkG3aM8kDuthzblmg2Oc2iYNCFbG3McNFiYVDuxyH3zXuut7LyObhuEbJMIV aQEotox4zdxcAsTwfCSvYbxa6XrXLoC1Ux8u3kq2DJZVp7r30ai+Oefk/rXjWlWRUxL2 oCn/i3saxsNBlTvJ3OHepBA6Qagnqg5d+KIkFjKsXWE44uivQp4irVEnUCl3E0vbSYfe BTeg== 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=9klmvsCDbXb5UYRZlQllkDdUD0lGfzdSvUkSWWRacQo=; b=FeUTsJg5H0jRtyxq00rAxZEdg/np1y2EgzSfBB2xuyyPX2OZ3kRikB6L78tnpn2s1F I2DnXRmFycx6xU2kOGRN9Omp4p3n9okBXEcuWEOZlFZ0UES1iYisSpnvr1I5WCELvA0Y 4Ad831rdUnrOjZTZYAu7Rs2FbnkvZG6e8VzLH5DCnp13kTTmtxmNVqtqXe26Y6ARgLWN jyxJ66UqZvqkkTcBDzmVvWiRVcB0nSbUas2UTpMKaAWnMaatRpuQwKOx/LRfyZDChGL3 Pq4AA7sMYozpReYM3JGIVvurJjWr2QRqM2mUU0dYi4x3au5NYxVSG1fSUswwRlOXO7Mh rUJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=BIdRz1p8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id p131si219683oib.179.2020.03.16.09.22.06; Mon, 16 Mar 2020 09:22:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=BIdRz1p8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1732125AbgCPQVb (ORCPT + 99 others); Mon, 16 Mar 2020 12:21:31 -0400 Received: from mail-qv1-f65.google.com ([209.85.219.65]:39321 "EHLO mail-qv1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731545AbgCPQVa (ORCPT ); Mon, 16 Mar 2020 12:21:30 -0400 Received: by mail-qv1-f65.google.com with SMTP id v38so5125262qvf.6 for ; Mon, 16 Mar 2020 09:21:30 -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=9klmvsCDbXb5UYRZlQllkDdUD0lGfzdSvUkSWWRacQo=; b=BIdRz1p8gE7zQuk9C9oV2HUNArw5x43uMFazoWlkrlXCvsSeUsivCaSdXGEbbFTYjy nVHA9sJZ7eETinHItrBU4wkyITu/QJh0Hk7+Zg4PL5xep7s0jQVsZRD4ZWsnd5ipJD9v sapWytPkQe7cpFo/rwKJ+7zg+T6UXo8doO5npkHb/HZMK7ZCgLKDLWa4AJ94FFjM+cx2 RbztSybf9OHQoAu+GbPdpNc0d7bgoYECl7ZfwdX1uisQIF3JKgd5exWrQzIH8FwYxLvK 7LoFUX9bkY1j/teBAy37KVGtZTsTa3q/X6cjYnD7zY79l6KnHy70ahkT8I/rVjcAcc1z pwiw== 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=9klmvsCDbXb5UYRZlQllkDdUD0lGfzdSvUkSWWRacQo=; b=gHEjUGRhH87+V0Fru79SeXXXBn9E+Fv0z0q1XkQ6YX/CHVhFNUPM54tEdLcaBMMv5O OJO2c+RUOuoFjQM/pQX10X/nXhLz0pBlKUt/XIMTtvVtn0rcLS97Vyn/Oc2iJG9Ocvgb TYWiIIJxeT0IEistXpmx7QJfZuLcxnXGbqMlOMCTqcbxr0EkWfj4dFENajvD+eyQhy47 6CRO6NpbliBRSMO/PV9IdeswPlIt6/ZJvy998ml/wTpUd6BLuZa24kwr/pTQazd/2wsm WHPZnOWzXH82IlfXNYV1KM4MT7otaotM7+9YU0zjFIWkm49yc3tOF3hSWrL/GbyW0gzY RMEA== X-Gm-Message-State: ANhLgQ13UrfmCE/0NqJKkwCtH90PjGdsmZW62TaV9qgq32CBxlXSFkhu CSBdzKMttkvc1j47PoUoT92b/A== X-Received: by 2002:ad4:57a8:: with SMTP id g8mr584591qvx.78.1584375689499; Mon, 16 Mar 2020 09:21:29 -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 z19sm85599qts.86.2020.03.16.09.21.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Mar 2020 09:21:28 -0700 (PDT) Date: Mon, 16 Mar 2020 12:21:28 -0400 From: Johannes Weiner To: Chris Down Cc: Andrew Morton , Tejun Heo , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH 2/2] mm, memcg: Throttle allocators based on ancestral memory.high Message-ID: <20200316162128.GF67986@cmpxchg.org> References: <80780887060514967d414b3cd91f9a316a16ab98.1584036142.git.chris@chrisdown.name> <8cd132f84bd7e16cdb8fde3378cdbf05ba00d387.1584036142.git.chris@chrisdown.name> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8cd132f84bd7e16cdb8fde3378cdbf05ba00d387.1584036142.git.chris@chrisdown.name> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 12, 2020 at 06:03:04PM +0000, Chris Down wrote: > Prior to this commit, we only directly check the affected cgroup's > memory.high against its usage. However, it's possible that we are being > reclaimed as a result of hitting an ancestor memory.high and should be > penalised based on that, instead. > > This patch changes memory.high overage throttling to use the largest > overage in its ancestors when considering how many penalty jiffies to > charge. This makes sure that we penalise poorly behaving cgroups in the > same way regardless of at what level of the hierarchy memory.high was > breached. > > Fixes: 0e4b01df8659 ("mm, memcg: throttle allocators when failing reclaim over memory.high") > Reported-by: Johannes Weiner > Signed-off-by: Chris Down > Cc: Andrew Morton > Cc: Tejun Heo > Cc: linux-mm@kvack.org > Cc: cgroups@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: kernel-team@fb.com > Cc: stable@vger.kernel.org # 5.4.x Acked-by: Johannes Weiner