From: Jan Kara <jack@suse.cz>
To: Gu Zheng <guz.fnst@cn.fujitsu.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
fsdevel <linux-fsdevel@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [RESEND PATCH] fs/buffer.c: exit if already confirmed page has dirty and writeback buffers
Date: Thu, 7 Nov 2013 12:44:59 +0100 [thread overview]
Message-ID: <20131107114459.GB31798@quack.suse.cz> (raw)
In-Reply-To: <5278C21B.7010204@cn.fujitsu.com>
On Tue 05-11-13 18:02:03, Gu Zheng wrote:
> Stop the loop of iterating bh if we have confirmed page
> has dirty and writeback buffers.
Thanks for the patch. What I'm somewhat missing here is a motivation of
the patch. For the common case where blocksize == pagesize this is a noop
(only adds some code). For the case where blocksize < pagesize we can
possibly save checking some buffers but how common is that going be? Does
that minimal speed up outweight the cost of additional check / code
complication?
Honza
>
> Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
> ---
> fs/buffer.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/buffer.c b/fs/buffer.c
> index 6024877..519cc5c 100644
> --- a/fs/buffer.c
> +++ b/fs/buffer.c
> @@ -112,7 +112,7 @@ void buffer_check_dirty_writeback(struct page *page,
> *dirty = true;
>
> bh = bh->b_this_page;
> - } while (bh != head);
> + } while ((bh != head) && !(*writeback && *dirty));
> }
> EXPORT_SYMBOL(buffer_check_dirty_writeback);
>
> --
> 1.7.7
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2013-11-07 11:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-05 10:02 Gu Zheng
2013-11-07 11:44 ` Jan Kara [this message]
2013-11-08 9:56 ` Gu Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131107114459.GB31798@quack.suse.cz \
--to=jack@suse.cz \
--cc=guz.fnst@cn.fujitsu.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®