[Devel] [PATCH rh7] fuse: never skip writeback if there are too many background requests
Maxim Patlasov
mpatlasov at virtuozzo.com
Mon Apr 25 09:33:12 PDT 2016
Acked-by: Maxim Patlasov <mpatlasov at virtuozzo.com>
On 04/25/2016 04:20 AM, Vladimir Davydov wrote:
> This patch removes two hunks introduced while porting
> diff-fuse-some-fairness-in-handling-writeback from PCS6, see commit
> 9525f63ba3151 ("fuse: some fairness in handling writeback").
>
> In the original patch, these two hunks skip page writeback only if
> writeback_control->nonblocking flag is set, while in the ported version
> writeback may be skipped if writeback_control->sync_mode = WB_SYNC_NONE.
> This is not equivalent, because in RH6 based kernels wbc->nonblocking is
> set only from the reclaim and compaction paths, while WB_SYNC_NONE is
> used in all paths except fsync. As a result, in Vz7 the possibility of
> reordering writeback sequence is higher than in PCS6.
>
> Since in RH7 based kernels wbc->nonblocking is absent, let's simply zap
> these two hunks in order to be closer to conventional PCS6 behavior.
>
> Note, the possibility of reordering writeback sequence still exists (as
> it does in PCS6), because writeback can be performed by kswapd on memory
> shortage - see shrink_page_list -> pageout.
>
> https://jira.sw.ru/browse/PSBM-45497
>
> Signed-off-by: Vladimir Davydov <vdavydov at virtuozzo.com>
> ---
> fs/fuse/file.c | 11 -----------
> 1 file changed, 11 deletions(-)
>
> diff --git a/fs/fuse/file.c b/fs/fuse/file.c
> index 11c5959de2cf..9889e26494f4 100644
> --- a/fs/fuse/file.c
> +++ b/fs/fuse/file.c
> @@ -2109,12 +2109,6 @@ static int fuse_writepages_fill(struct page *page,
> req->pages[req->num_pages - 1]->index + 1 != page->index)) {
> int err;
>
> - if (wbc->sync_mode == WB_SYNC_NONE && fc->blocked) {
> - redirty_page_for_writepage(wbc, page);
> - unlock_page(page);
> - return 0;
> - }
> -
> err = fuse_send_writepages(data);
> if (err) {
> unlock_page(page);
> @@ -2168,11 +2162,6 @@ static int fuse_writepages(struct address_space *mapping,
> if (is_bad_inode(inode))
> goto out;
>
> - if (wbc->sync_mode == WB_SYNC_NONE) {
> - if (fc->blocked)
> - return 0;
> - }
> -
> /*
> * We use fuse_blocked_for_wb() instead of just fc->blocked to avoid
> * deadlock when we are called from fuse_invalidate_files() in case
More information about the Devel
mailing list