Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp328800ybg; Tue, 28 Jul 2020 07:08:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwbqaK5ZevU2drq/Go69kSA11Y9YAEhog4OPjvzDH27KDHm6vatwR2ToBTHojyqO1oWYovP X-Received: by 2002:a17:906:5346:: with SMTP id j6mr16917454ejo.311.1595945326666; Tue, 28 Jul 2020 07:08:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595945326; cv=none; d=google.com; s=arc-20160816; b=r0Frd8zkCtXJuDqTmr3NXzmzeNCmRBfbxwbrKPbnQCuaAelMgHXrmugR6xKoWuSSfv RKSZAQvsfwX3dbL95ejsB7nmrkb1Re0zu8QdsZuze0TzxjD/aIEObaxmtagfxvZZoBGw C+fZBLXw78dwcGQyotvpHV7p8EaQVdVKEcG1Ox8nTn8DRypMMA8W0zKDQT8PLpBnuqCG HYl/3EYcf60rW3L0AfmMIccly2A11exHNteJnGKGMvU6Pb8G2QShE3qHYorwP1N+6VYc 3monTWFzxaiXmmdpmtsDHafPxVfMcUdKBBK970roQS/rUlSTgfDNOJcOV/OUfRwa+YeM 1iGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QDO5xtNZ22C72a1tBmEqwRX/00TFY7M8B1T43bXeDoo=; b=AMcTaGrO9hYHGgbaSD7cgWsYt2qHvYv7k/f7UQGSgT4mcI8BXm6RpBg9uxsqqPLS0K 9ZdYXwsk/WQiRUu97e8BxbdzMN2XZInCkABJ5yENw8WDZMqZ1HXk7Tuy8vuxdsJz1jmG bC+k2nlJDGQmfwicrTF7pjUKjeJ9SxvSZtDQcILlGxopspICg2IB096OejkmXUKYq6Bx hli3L73/8rUIBvBXJ/zKtOwemPHEPlQbXcppAJTXLnTP2BQ3M1IpZ0jBAEpmbIl/Rf/W Mn7cADt7c5yQrC6PEIiUyyUlJIkUaTqDhBBbQR5RZ5UO91ZJPPhWWTkfzZWZ37GuyKFU ugFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=SLaBgESU; 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=NONE sp=NONE dis=NONE) header.from=chrisdown.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l3si7712304ejd.17.2020.07.28.07.08.24; Tue, 28 Jul 2020 07:08:46 -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=@chrisdown.name header.s=google header.b=SLaBgESU; 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=NONE sp=NONE dis=NONE) header.from=chrisdown.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730328AbgG1OHP (ORCPT + 99 others); Tue, 28 Jul 2020 10:07:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60430 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730211AbgG1OHN (ORCPT ); Tue, 28 Jul 2020 10:07:13 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 683A1C061794 for ; Tue, 28 Jul 2020 07:07:13 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id c16so393854ejx.12 for ; Tue, 28 Jul 2020 07:07:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QDO5xtNZ22C72a1tBmEqwRX/00TFY7M8B1T43bXeDoo=; b=SLaBgESU+1xIJqSNqhieu03SNXKyKL+9MH8hgBEP20Gv4XC0tv7Aigf51SuYFDsJ0+ 09GIRi4cOnfUbvnWrtl2Bj6Hz1USuSfKPbNvwk6y0GavN4M4MAnesqzHkieumXy0qARA QDirQJmvwSNdLa088Smv1pEnZ7tVhoCsP9bwM= 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:user-agent; bh=QDO5xtNZ22C72a1tBmEqwRX/00TFY7M8B1T43bXeDoo=; b=I6hxvbEpi2q0dCDxaJYVQ5OIezGzsEuKjNpbOxbVhTqCFAR3NvY1dkxCrft2dWEphS hNo2VL3Eq1Bxg7KR2Y21tqNUE90CCTw1OkCJxKuW+bZAko6y5W7NAkY7eaJk81m3hV0B MXLuGHxf/TQe4HPJjekeLTaI/26SnCtD7X//DKLNbs38o83A/473YOjpK7YdUwU/ebBr HADcZQxeSbq/jMRVXHMnb9+OxP+Tgmf/D7C0WniyiaOXFfCJfUKdPdWWJutP64GMdUWn K9ka7galF8nQEKF5RhT5b0znnlZ6a9Ud1A83/nFcC4moNh+IovATzlYJnQHIXsB89uZZ /IHg== X-Gm-Message-State: AOAM530P/LL0KBqTLRJUG12iqMbLvWXhbk8hSaaYhJtS5XskXY1foqLe glPP9JGTzjZyQU1/pLlXfXgBsA== X-Received: by 2002:a17:906:854d:: with SMTP id h13mr13570039ejy.446.1595945231802; Tue, 28 Jul 2020 07:07:11 -0700 (PDT) Received: from localhost ([2620:10d:c092:180::1:f8d8]) by smtp.gmail.com with ESMTPSA id p21sm6722487eds.11.2020.07.28.07.07.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jul 2020 07:07:11 -0700 (PDT) Date: Tue, 28 Jul 2020 15:07:11 +0100 From: Chris Down To: Johannes Weiner Cc: Andrew Morton , Michal Hocko , 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: <20200728140711.GA196042@chrisdown.name> References: <20200728135210.379885-1-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200728135210.379885-1-hannes@cmpxchg.org> User-Agent: Mutt/1.14.6 (2020-07-11) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Johannes Weiner writes: >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: Chris Down