From: Sean Fu <fxinrong@gmail.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs/buffer.c: Optimize grow_buffer function.
Date: Tue, 24 Jul 2018 17:42:51 +0800 [thread overview]
Message-ID: <20180724094251.GA32366@linux-zmni.apac.novell.com> (raw)
In-Reply-To: <20180721182116.GC30522@ZenIV.linux.org.uk>
On Sat, Jul 21, 2018 at 07:21:16PM +0100, Al Viro wrote:
> On Sun, Jul 22, 2018 at 01:30:17AM +0800, Sean Fu wrote:
> > Use PAGE_SHIFT and i_blkbits of bd_inode directly to avoid ugly sizebits
> > calculation.
> > Remove ugly sizebits calculation.
> > Remove unnecessary sizebits parameter of grow_dev_page.
> >
> > Reduces code size:
> >
> > Before:
> >
> > sean@linux-zmni:~/sda5/source/linus_repo/linux> size fs/buffer.o
> > text data bss dec hex filename
> > 34037 1510 16 35563 8aeb fs/buffer.o
> >
> > After:
> >
> > sean@linux-zmni:~/sda5/source/linus_repo/linux> size fs/buffer.o
> > text data bss dec hex filename
> > 34021 1510 16 35547 8adb fs/buffer.o
>
> First of all, 16 bytes is pretty much noise. What's more, the "remove ugly
> sizebits calculation" part really needs an explanation of the reasons why
> it's safe. You assume that size == 1<<bdev->bd_inode->i_blkbits; where's
> the proof that it always holds?
Thank your for taking a look and apologize for the noise.
I will take a deep look at it and especially history commits regarding with this.
BestRegards
Sean
next prev parent reply other threads:[~2018-07-24 9:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-21 17:30 Sean Fu
2018-07-21 18:21 ` Al Viro
2018-07-24 9:42 ` Sean Fu [this message]
2018-08-08 6:52 ` Sean Fu
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=20180724094251.GA32366@linux-zmni.apac.novell.com \
--to=fxinrong@gmail.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®