Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp2502794ybg; Fri, 31 Jul 2020 01:19:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuffvmB2ounwdgvV02mnl+zvLFbnJhG0jPig24dp+0ZTnGwIKJf4jzCSpiKxKJ/+eq39EU X-Received: by 2002:a17:906:7d90:: with SMTP id v16mr2827021ejo.27.1596183598781; Fri, 31 Jul 2020 01:19:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596183598; cv=none; d=google.com; s=arc-20160816; b=01xHtHGuBMgGYV9NUyDafMpLvilZYWOZPPjF1BMBiwZ0m0RgGjoADM+0VImhKp2sbo B1BnvBTs8FSqjIO/VWU7neyBDD++9VzixsJhMX1zDwoSkYBdnlDRne1OXZJiGjUrdcme cZaRp4r5/VGlkTUWbMSz9zhDTw04aK9Vofz+nFkEwp2Lfo6H1/MxCIA1xM40B8Hwjw7w JEXDa1V1GUHDfANzgxlvmZec+gZhgQCphPC6yxgKerf0MpaajfrO1rtDM10HV5OBPJkz 9QHCMxR9BYG5ll/njbTXea2foloT55BybUlfzvRYpg5VonBmtIkTIBBkfa9JTDdqjQ1i T3ww== 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=h3sTTkLMqG6wa+/9qvDXKXOuiuMf/eNzOZWZbb83dNA=; b=mfPUJAW8j9PBmF7V/8F2UHucLj3pNHEvh6+oRmnQS/l3Ji6+bS0QuCuUlz+2oVA4CZ KWxsysvs0vac53yuG9eZKB2uF7WGrUIqVcy1vo35ucUB29vlRryUCbRICGDFp5TIkFGS fbVoWqBPk+nytitmhs9aaPE+dlLIrWFNaQxRp3xTTnt8H5gNKf5Rm6254d8hktfCRAgj PlSlRN4iFklaQNCxZzhDnikotAS3NYo07GLDvS3TmMqunJdF0ey+rse/a2X7XnWs8wfa cnnAneI6h/TH9D+a5CpMefR/JM8dqjHGeYU6LZjIX3sTHqCLnvIvaaqEyyW6N6rLC65h 9nYg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i7si4922782edn.552.2020.07.31.01.19.36; Fri, 31 Jul 2020 01:19:58 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731905AbgGaISH (ORCPT + 99 others); Fri, 31 Jul 2020 04:18:07 -0400 Received: from mx2.suse.de ([195.135.220.15]:59090 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731823AbgGaISH (ORCPT ); Fri, 31 Jul 2020 04:18:07 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 0DC49AEC4; Fri, 31 Jul 2020 08:18:18 +0000 (UTC) Date: Fri, 31 Jul 2020 10:18:04 +0200 From: Michal Hocko To: Johannes Weiner Cc: Andrew Morton , Roman Gushchin , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH] mm: memcontrol: restore proper dirty throttling when memory.high changes Message-ID: <20200731081804.GK18727@dhcp22.suse.cz> References: <20200728135210.379885-1-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200728135210.379885-1-hannes@cmpxchg.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 28-07-20 09:52:09, 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 Acked-by: Michal Hocko > --- > 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 -- Michal Hocko SUSE Labs