From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751543AbbHQT6N (ORCPT ); Mon, 17 Aug 2015 15:58:13 -0400 Received: from mail-ig0-f169.google.com ([209.85.213.169]:33774 "EHLO mail-ig0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751011AbbHQT6L (ORCPT ); Mon, 17 Aug 2015 15:58:11 -0400 Date: Mon, 17 Aug 2015 15:58:05 -0400 From: Tejun Heo To: Akinobu Mita Cc: linux-kernel@vger.kernel.org, Jens Axboe Subject: Re: [PATCH] writeback: account BDI's min_ratio for unregistered device Message-ID: <20150817195805.GE21075@mtj.duckdns.org> References: <1439822753-10575-1-git-send-email-akinobu.mita@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1439822753-10575-1-git-send-email-akinobu.mita@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 17, 2015 at 11:45:53PM +0900, Akinobu Mita wrote: > From mm/page-writeback.c: > > /* > * bdi_min_ratio keeps the sum of the minimum dirty shares of all > * registered backing devices, which, for obvious reasons, can not > * exceed 100%. > */ > static unsigned int bdi_min_ratio; > > But when a backing device is unregistered, the BDI's min_ratio is not > subtracted from bdi_min_ratio. So the second attempt to set min_ratio > in the following commands will fail. > > # modprobe null_blk > # echo 50 > /sys/block/nullb0/bdi/min_ratio > # modprobe -r null_blk > # modprobe null_blk > # echo 50 > /sys/block/nullb0/bdi/min_ratio > > Signed-off-by: Akinobu Mita > Cc: Tejun Heo > Cc: Jens Axboe Acked-by: Tejun Heo We probably want to cc stable too. Thanks. -- tejun