From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABE2CC433DF for ; Fri, 31 Jul 2020 08:18:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 95C2522CAF for ; Fri, 31 Jul 2020 08:18:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731933AbgGaISH (ORCPT ); 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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Hocko Subject: Re: [PATCH] mm: memcontrol: restore proper dirty throttling when memory.high changes Date: Fri, 31 Jul 2020 10:18:04 +0200 Message-ID: <20200731081804.GK18727@dhcp22.suse.cz> References: <20200728135210.379885-1-hannes@cmpxchg.org> Mime-Version: 1.0 Return-path: Content-Disposition: inline In-Reply-To: <20200728135210.379885-1-hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Johannes Weiner Cc: Andrew Morton , Roman Gushchin , linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, kernel-team-b10kYP2dOMg@public.gmane.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