From: nikita Date: Tue, 20 Jun 2006 13:32:14 +0000 (+0000) Subject: ll_commit_write(): add a comment (due to Andreas) explaining why Lustre wants writeba... X-Git-Tag: v1_8_0_110~486^2~1596 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=91ea7005b5d15575435dad7d3f39a4da0e970fee;p=fs%2Flustre-release.git ll_commit_write(): add a comment (due to Andreas) explaining why Lustre wants writeback to be started earlier than "normal" file systems --- diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index 0bab99e..8c0a8d2 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -731,8 +731,26 @@ int ll_commit_write(struct file *file, struct page *page, unsigned from, llap->llap_ignore_quota = capable(CAP_SYS_RESOURCE); - /* queue a write for some time in the future the first time we - * dirty the page */ + /* + * queue a write for some time in the future the first time we + * dirty the page. + * + * This is different from what other file systems do: they usually + * just mark page (and some of its buffers) dirty and rely on + * balance_dirty_pages() to start a write-back. Lustre wants write-back + * to be started earlier for the following reasons: + * + * (1) with a large number of clients we need to limit the amount + * of cached data on the clients a lot; + * + * (2) large compute jobs generally want compute-only then io-only + * and the IO should complete as quickly as possible; + * + * (3) IO is batched up to the RPC size and is async until the + * client max cache is hit + * (/proc/fs/lustre/osc/OSC.../max_dirty_mb) + * + */ if (!PageDirty(page)) { lprocfs_counter_incr(ll_i2sbi(inode)->ll_stats, LPROC_LL_DIRTY_MISSES);