Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1208629 > unrolled thread
| Started by | Akinobu Mita <akinobu.mita@gmail.com> |
|---|---|
| First post | 2015-08-17 16:50 +0200 |
| Last post | 2015-08-17 22:00 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] writeback: account BDI's min_ratio for unregistered device Akinobu Mita <akinobu.mita@gmail.com> - 2015-08-17 16:50 +0200
Re: [PATCH] writeback: account BDI's min_ratio for unregistered device Tejun Heo <tj@kernel.org> - 2015-08-17 22:00 +0200
| From | Akinobu Mita <akinobu.mita@gmail.com> |
|---|---|
| Date | 2015-08-17 16:50 +0200 |
| Subject | [PATCH] writeback: account BDI's min_ratio for unregistered device |
| Message-ID | <pYtTA-1QB-17@gated-at.bofh.it> |
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 <akinobu.mita@gmail.com> Cc: Tejun Heo <tj@kernel.org> Cc: Jens Axboe <axboe@kernel.dk> --- mm/backing-dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 42e0a63..92eefe3 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -849,6 +849,7 @@ void bdi_destroy(struct backing_dev_info *bdi) } wb_exit(&bdi->wb); + bdi_set_min_ratio(bdi, 0); } EXPORT_SYMBOL(bdi_destroy); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Date | 2015-08-17 22:00 +0200 |
| Subject | Re: [PATCH] writeback: account BDI's min_ratio for unregistered device |
| Message-ID | <pYyJz-lu-5@gated-at.bofh.it> |
| In reply to | #1208629 |
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 <akinobu.mita@gmail.com> > Cc: Tejun Heo <tj@kernel.org> > Cc: Jens Axboe <axboe@kernel.dk> Acked-by: Tejun Heo <tj@kernel.org> We probably want to cc stable too. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web