Skip to contentSkip to conversation

btrfs: lower the dirty balance poll interval

PATCH In review Wu Fengguang 2 participants 3 messages Nov 17, 2011 – Nov 22, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: lower the dirty balance poll interval

Tests show that the original large intervals can easily make the dirty limit exceeded on 100 concurrent dd's. So adapt to as large as the next check point selected by the dirty throttling algorithm.

---
 fs/btrfs/file.c |    2 ++
 1 file changed, 2 insertions(+)
fs/btrfs/file.c +2 -0
@@ -1168,6 +1168,8 @@ static noinline ssize_t __btrfs_buffered
 	nrptrs = min((iov_iter_count(i) + PAGE_CACHE_SIZE - 1) /
 		     PAGE_CACHE_SIZE, PAGE_CACHE_SIZE /
 		     (sizeof(struct page *)));
+	nrptrs = min(nrptrs, current->nr_dirtied_pause - current->nr_dirtied);
+	nrptrs = max(nrptrs, 8);
 	pages = kmalloc(nrptrs * sizeof(struct page *), GFP_KERNEL);
 	if (!pages)
 		return -ENOMEM;
#1 lore raw
Quoted 3 lines · Wu Fengguang

Tests show that the original large intervals can easily make the dirty limit exceeded on 100 concurrent dd's. So adapt to as large as the next check point selected by the dirty throttling algorithm.

Thanks Wu, were you planning on pushing this through your tree or should I take it?

-chris

#2 lore raw
Quoted 7 lines · Chris Mason
Quoted 3 lines · Wu Fengguang

Tests show that the original large intervals can easily make the dirty limit exceeded on 100 concurrent dd's. So adapt to as large as the next check point selected by the dirty throttling algorithm.

Thanks Wu, were you planning on pushing this through your tree or should I take it?

Will you take it please?

Thanks,
Fengguang