Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp371820ybg; Tue, 28 Jul 2020 08:08:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzr2RDnmCmNxA9Jx+9TwKnBlj3mmIDn7i8BjXFHJb6Z6ri/QFtgOXmWaRE6dWQxiN60z0Gw X-Received: by 2002:a17:906:528d:: with SMTP id c13mr26276894ejm.61.1595948915265; Tue, 28 Jul 2020 08:08:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595948915; cv=none; d=google.com; s=arc-20160816; b=dXva51RKAjUy07V5nQ45Ocjh2dGAbnJPdBubGMX6BWswoE9nu+ou1wReGXVW1kUAP3 2B6tx48AWrz2cMWXI83Qh66Toiey9zeVTGPhXSTyW49lGNmNfQzEVyrXG6BRu8Upa+pp 2HGU6sEd7qgmiGUklf+dPFC9tqWJYMnmqPL+JNP/v952wmbqTOeYX57fhoMTwhlMQnit OkgTQ/zbkyZZ4wX+45dTCnB0jt40Qsgo/2qOXqTanq4Ej2Gvhb+tROGYNqhVdvHLowxs v9txGj3FoNquOABANe59gRb2qwToUf7+H0RG9H4a0BEdpCzWlBKQnyFCkC7V5ShPxJhB Guwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=MqKK7cF3q5e7l52iOkJoCa4f73ZLky3ZxfyYCXCSh3Y=; b=atGZxOQzwtZhkBOcq2/1K1jc2Qnil/uul39/D4v8vNcPueU817ZnZ+VPdyEMkUpVey OASs3oM1KAA+CGPtcnC79gAWDT/RX2Un8D9IJv7UlsNENHbSjJmomvao890TrDdHFTmm h4zTogby1BcIofm8K4u0JVsMKXLnYrMWiMgM0Z7oA2B5tNHqS7UqAP0GevyB7HUA509q ySGeVQdCOeIpDoNf4FyqRRDDrj/qVOsiZm+9Ec1CscQ2CucnWMAk9hPkMetrDqUC1Lhv MT07wBYYOIVFldMp1iNneEle33AxXw2IfHtzE1nvRDf7sZRuWPoGpstHyy8bpbTvRN0U 1TDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=fOFXTXHH; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f4si8277016edj.263.2020.07.28.08.08.12; Tue, 28 Jul 2020 08:08:35 -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=@google.com header.s=20161025 header.b=fOFXTXHH; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730691AbgG1PHY (ORCPT + 99 others); Tue, 28 Jul 2020 11:07:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730574AbgG1PHX (ORCPT ); Tue, 28 Jul 2020 11:07:23 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD506C061794 for ; Tue, 28 Jul 2020 08:07:22 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id i80so11176660lfi.13 for ; Tue, 28 Jul 2020 08:07:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MqKK7cF3q5e7l52iOkJoCa4f73ZLky3ZxfyYCXCSh3Y=; b=fOFXTXHHi/1EGMPH8IGLT8Q44caG1seCiZf4b2tdKys5AN6daPLz58LLMJX2ebJ/cc AQWC5c4ocJTpnfJFPSoc9f2APOdbHKeBKRbmx26YbLYcFgcQ4x8dhAWpuF+7u2iPFY1y hcTYR5Ha1vBv1AOWloZ+DogIi8d6LX27zvjrDSpvIvCtx8hdJDz/dP15WzCSY/sO3Cnr +E4ZT8HUyUEWOz8342hH7kQ4UBQzZQ8DX3y2lVOe3wKTNsIC83j0ioCKaKTmjKmgg2ZL /voZUK3EQaTO8pYbpQ6KZXZttUyFTwVzu9WJ7YQxGnR/PgyJd7V01NwF5FUNLNdykiPk 41Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MqKK7cF3q5e7l52iOkJoCa4f73ZLky3ZxfyYCXCSh3Y=; b=ksQPc7Q0Jnwbc7EGrMENsGPlFWp69zacJ44z2RLI1SfptqyX0DuJrYOgjShqqqAb3T D6Vjcf9XIvQtl37uvOc5Qjuz4XCb0YZHoZ+ZfSvAi/UMXCbgW6vz/XwFYAs03nNtoJ8W sV6mP+3ZbjgIaTxB+9jcSqMUWCojSq63EPyregD8l9MNUY75W0cAzpgX3/OuDgUcjqFo o3p/lcU3TLElMKAGuOzsLMLujpozs4ZmXwYcmvQ2Jma9TnfJIkNHqh02w+i4MVzE0FKf EUHvzq3ijgGHrX5kdRorJWgbkD4ENGY8QNhlG0fRvouQoEiriX8uDAqncZWbuQxWVRVd 9W9A== X-Gm-Message-State: AOAM531pV97KE+2ygB0kfD4mgIa9ZKeqrolBDNkVDjZHvPiwHdQ7aBEN 9sp2+9oBzDtlJOMcN3rsshv1FEQCqULX63KO5VprPg== X-Received: by 2002:a19:c68b:: with SMTP id w133mr14432710lff.189.1595948841057; Tue, 28 Jul 2020 08:07:21 -0700 (PDT) MIME-Version: 1.0 References: <20200728135210.379885-1-hannes@cmpxchg.org> In-Reply-To: <20200728135210.379885-1-hannes@cmpxchg.org> From: Shakeel Butt Date: Tue, 28 Jul 2020 08:07:09 -0700 Message-ID: Subject: Re: [PATCH] mm: memcontrol: restore proper dirty throttling when memory.high changes To: Johannes Weiner Cc: Andrew Morton , Michal Hocko , Roman Gushchin , Linux MM , Cgroups , LKML , Kernel Team Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 28, 2020 at 6:53 AM Johannes Weiner wrote: > > 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 Reviewed-by: Shakeel Butt