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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13679C433F5 for ; Fri, 22 Oct 2021 02:59:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4499E61462 for ; Fri, 22 Oct 2021 02:59:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4499E61462 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id C2B0F94000B; Thu, 21 Oct 2021 22:59:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BD956900002; Thu, 21 Oct 2021 22:59:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AC84494000B; Thu, 21 Oct 2021 22:59:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0026.hostedemail.com [216.40.44.26]) by kanga.kvack.org (Postfix) with ESMTP id 9D9F4900002 for ; Thu, 21 Oct 2021 22:59:47 -0400 (EDT) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 589C38249980 for ; Fri, 22 Oct 2021 02:59:47 +0000 (UTC) X-FDA: 78722568414.31.F079EAB Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf10.hostedemail.com (Postfix) with ESMTP id BEB50600198A for ; Fri, 22 Oct 2021 02:59:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=VkfP0BQNS3FE9QhrfQNys6FB6k6JJJc7e6jw1eQ9Db8=; b=AOjGpvdQf1WdT1MqcEyvAVsBol 1NoLZbN3rbR3Z9QcllZALHSh1+bSxGBrgt7hDiX9MoK6d5jrO88yvScCDH5LymP2s+DhJ58jt8RDX T8TIP+CRb+u12oVLUeKF1J9X4OpW6oCMYCd+Dz5aOPyGLD/SXrCHQT2F7f5NksYArNath/UJNqqKI baWD9voJy0e+44oCpVGGCd48t+/X0TgQPQ89oMrYhGBzfdzbjAc6hhyygerWGxa5RU7VwngUhbVma F6tHQPjGX46q0cIKotO0mC41XQC3zwmQrGW67kKlRGrlywykk820jgigebf2mdyOD4fSNQ6ZCbIq4 SToetSiw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdkl3-00DfGS-93; Fri, 22 Oct 2021 02:58:26 +0000 Date: Fri, 22 Oct 2021 03:58:13 +0100 From: Matthew Wilcox To: Andrew Morton Cc: Christoph Hellwig , Manjong Lee , linux-mm@kvack.org, linux-kernel@vger.kernel.org, seunghwan.hyun@samsung.com, sookwan7.kim@samsung.com, nanich.lee@samsung.com, yt0928.kim@samsung.com, junho89.kim@samsung.com, jisoo2146.oh@samsung.com Subject: Re: [PATCH 1/1] mm: bdi: Initialize bdi_min_ratio when bdi unregister Message-ID: References: <20211021161942.5983-1-mj0123.lee@samsung.com> <20211021194530.1fabf4fa45cfe3bee6598484@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211021194530.1fabf4fa45cfe3bee6598484@linux-foundation.org> X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: BEB50600198A X-Stat-Signature: 83g5a14qgok6soji4mmpku3xjz5yzoih Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=AOjGpvdQ; spf=none (imf10.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-HE-Tag: 1634871581-96978 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Oct 21, 2021 at 07:45:30PM -0700, Andrew Morton wrote: > On Thu, 21 Oct 2021 13:01:30 +0100 Matthew Wilcox wrote: > > > On Thu, Oct 21, 2021 at 04:16:52AM -0700, Christoph Hellwig wrote: > > > On Fri, Oct 22, 2021 at 01:19:43AM +0900, Manjong Lee wrote: > > > > Because when sdcard is removed, bdi_min_ratio value will remain. > > > > Currently, the only way to reset bdi_ min_ratio is to reboot. > > > > > > But bdis that are unregistered are never re-registered. What is > > > the problem you're trying to solve? > > > > The global bdi_min_ratio needs to be adjusted. See > > bdi_set_min_ratio() in mm/page-writeback.c. > > I added cc:stable to this and tweaked the comment & coding style a bit: Definitely improvements on that front. I don't know the BDI code particularly well, and the implementation of bdi_set_min_ratio() confuses me, so I can't say whether the original patch is clearly correct or not.