Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp318153ybg; Tue, 28 Jul 2020 06:55:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrof6X0yxj3JgI71Lg46JoiLRJG+/C30LamvNPyerQtJqioyASjdo6qSLQCpmOP9DYAsuT X-Received: by 2002:a17:906:f752:: with SMTP id jp18mr25156391ejb.538.1595944526573; Tue, 28 Jul 2020 06:55:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595944526; cv=none; d=google.com; s=arc-20160816; b=l1rUixwJEe/EPvHETJ3Vq4uaxkEd8ZG0VEOdwyHb7MATe5EVxU2zGrf8uUQEsLke2r qxKV++6CWwYU9QXVua4x5FP4O4/i+sLimwYINuf2Kxwx+5djdumm1E7bP+vZeHy+otHb DCJs0d1KyJAQRTWYjF6qOn5fjgb+hbvaOs9T4GJIv+RgN8HefyLO4bZHMx8PVCVEBV5N Z2qRGwbDZ6XvRiLjlMJx277qMBE5NWqQd/Yf9IabSUHhKvK8tbZbzhOOWeL5PgYdI0Nt Wf49H7wP8rObR643ZJ1m8c5uNZq/KTuYLhkOxthrLmbPNVD/VCiNC7qrRHp1gSoeckJf Kumw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=EtW0ADoRwQtOsaGG7oJlooe3S87y53RN1USDHS3OX1k=; b=dz3oKhEgx4gaXwQx+qIo6erO1EXFD+b3TLzATlSBkOy7IKzNSOQ12a7vywuXQ0fqcd jf/IUrGXVSvQu72Mid8FCDOqCcK6JwEoPzORQYDrlMKpDUopj9S818LYHrEqtwYO15MT 6dbqqpbUxWkWnGs7XrgnwKOuCPtWg+uJOh3LNfyuhe3Tmpmxj6tT7Xr6Y+AIvFPGxYq9 am/LdymnW+oV/z/2fV3JJMXbPH+39yggLXKoed6IY1mWXiwR68RS5ceAejoPB9KQh1z4 5UHKbTPZHpuqFztgNKJLCzGXNqVvW7p3xBi0RzpXNvzZ4C+tIUiCCP/gjoMqysMf/Z7b sqGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20150623.gappssmtp.com header.s=20150623 header.b=n1QWWvhg; 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 k11si5687182eja.261.2020.07.28.06.55.04; Tue, 28 Jul 2020 06:55:26 -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=n1QWWvhg; 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 S1730197AbgG1NxN (ORCPT + 99 others); Tue, 28 Jul 2020 09:53:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730141AbgG1NxM (ORCPT ); Tue, 28 Jul 2020 09:53:12 -0400 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 122F9C0619D2 for ; Tue, 28 Jul 2020 06:53:12 -0700 (PDT) Received: by mail-qk1-x744.google.com with SMTP id l23so18700871qkk.0 for ; Tue, 28 Jul 2020 06:53:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EtW0ADoRwQtOsaGG7oJlooe3S87y53RN1USDHS3OX1k=; b=n1QWWvhgXYfYFQhyOqcZpff1NCZlRpZRU+M57YX8VkjXTtd3GqfnDkYU0Ml146ZUTZ EMUF3jGXqq0ZC+jlxfvAVMjoHJNWyaygZPYp4hXRevNGlGHVvpyCD8PlVbquWCb5nH4w UzI+8KI2BOpWhsINM70UMwN4agULCxVCtHtZj8ZAUgZk2Mz6MbJ3wids2nV60eUD5OT2 G5sgsBxiIAMoMM42EOEJipYA/duIJUeWlfrsrEeW+/D40GXy1ycVavy2AIRGeLsLtIh6 AUs2Y7iVWX1FTqBsZUxSi2UE2j1cv4OU9emJT+b4CA49q6ooCVZ3b/20TcvF6D0xPnw0 Q+mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EtW0ADoRwQtOsaGG7oJlooe3S87y53RN1USDHS3OX1k=; b=n+wdYD+Q5X8jnKTA4ZL/rlFDg99GThSWkF1Dq+oUagrnG9gFbEPQT5tzWiKnMh1lH1 A+s+9JVhqYYJKdC9sg8mlUmPMBwJ9IsrZLcVEgAshxUHFZCMOAK/Yyy2FVepgRnKF6fD IVkh7muAx/eJY97M3XUFW8JLe52FsUfi8TJRSqDezF09knSutA0YMPbukNDcNa0YlEk6 4AO/KWU+wnPOkokj/ktcOF+y+sDJzuHGwSAAFIpGxVVp8h3nO9UGFRPAEOHZbMwjHe+M Cb51qjeNI0tmI/J9+ZUQRQGYdczboz4rbyWTWUnFuA4nB0vvM584CRStPUM5aZlrWbNs XsZw== X-Gm-Message-State: AOAM530BcK1IRZCqukHamNRk5cD8mqlq8OY5V3OKcPoj2JclJCVk9pGU 7eX3Q/tD9Hddh2FqDoyjGpC5VQ== X-Received: by 2002:a05:620a:132d:: with SMTP id p13mr8925316qkj.161.1595944391174; Tue, 28 Jul 2020 06:53:11 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::1:53c1]) by smtp.gmail.com with ESMTPSA id g24sm19970608qta.27.2020.07.28.06.53.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2020 06:53:10 -0700 (PDT) From: Johannes Weiner To: Andrew Morton Cc: Michal Hocko , Roman Gushchin , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: [PATCH] mm: memcontrol: restore proper dirty throttling when memory.high changes Date: Tue, 28 Jul 2020 09:52:09 -0400 Message-Id: <20200728135210.379885-1-hannes@cmpxchg.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 8c8c383c04f6 ("mm: memcontrol: try harder to set a new memory.high") inadvertently removed a callback to recalculate the writeback cache size in light of a newly configured memory.high limit. Without letting the writeback cache know about a potentially heavily reduced limit, it may permit too many dirty pages, which can cause unnecessary reclaim latencies or even avoidable OOM situations. This was spotted while reading the code, it hasn't knowingly caused any problems in practice so far. Fixes: 8c8c383c04f6 ("mm: memcontrol: try harder to set a new memory.high") Signed-off-by: Johannes Weiner --- mm/memcontrol.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 13f559af1ab6..805a44bf948c 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -6071,6 +6071,7 @@ static ssize_t memory_high_write(struct kernfs_open_file *of, break; } + memcg_wb_domain_size_changed(memcg); return nbytes; } -- 2.27.0