From: Li Hong <lihong.hi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Ryusuke Konishi <ryusuke-sG5X7nlA6pw@public.gmane.org>
Cc: konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org,
linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/3] nilfs2: remove nilfs_segctor_init() in segment.c
Date: Sun, 11 Apr 2010 16:22:50 +0800 [thread overview]
Message-ID: <20100411082250.GA11189@xhl> (raw)
In-Reply-To: <20100411.165847.77342547.ryusuke-sG5X7nlA6pw@public.gmane.org>
Yes, go ahead :)
Thanks,
Li Hong
On Sun, Apr 11, 2010 at 04:58:47PM +0900, Ryusuke Konishi wrote:
> On Sun, 11 Apr 2010 12:17:26 +0800, Li Hong <lihong.hi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > On Sun, Apr 11, 2010 at 02:57:15AM +0900, Ryusuke Konishi wrote:
> > > Hi,
> > > On Sun, 11 Apr 2010 00:15:43 +0800, Li Hong <lihong.hi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > > > Hi KONISHI Ryusuke,
> > > >
> > > > Three new patches based on nilfs2/for-next branch. New code has been built and
> > > > loaded successfully, and also passed a light-weight reads and writes test.
> > > >
> > > > Thanks,
> > > > Li Hong
> > >
> > > Ok, I'll look into each of them.
> > >
> > > > ---------------------------- cut here --------------------------
> > > >
> > > > From 2c622d0f59782321204bf1fde7eea4a593cc6b65 Mon Sep 17 00:00:00 2001
> > > > From: Li Hong <lihong.hi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > > > Date: Sat, 10 Apr 2010 21:57:11 +0800
> > > > Subject: [PATCH 1/3] nilfs2: remove nilfs_segctor_init() in segment.c
> > > >
> > > > There are only two lines of code in nilfs_segctor_init(). From a logic design
> > > > view, the first line 'sci->sc_seq_done = sci->sc_seq_request;' should be put in
> > > > nilfs_segctor_new(). Even in nilfs_segctor_new(), this initialization is
> > > > needless because sci is kzalloc-ed. So nilfs_segctor_init() is only a wrap call
> > > > to nilfs_segctor_start_thread(). This removes an indirect call overhead.
> > > >
> > > > Signed-off-by: Li Hong <lihong.hi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > >
> > > Looks no problem.
> > >
> > > The reason why nilfs_segctor_init is present in that manner is
> > > historical (just for your information. You don't have to mention this
> > > reason).
> > >
> > > I think you don't have to mention the indirect call overhead because
> > > it's only triggered in the level of mount/unmount/remount and gcc will
> > > inline it in the caller.
> > ^^^^^^^^^^^^^^^^^^^^^^^^^
> > No, there is no inline key word in nilfs_segctor_init().
>
> > Unless you mean gcc will try to inline small procedures if possible.
>
> I mean this ;)
>
> By "objdump -D segment.o", you can actually see the function is
> inlined in the caller. It's a default thing nowadays unless
> "noinline" keyword is specified.
>
> Anyway, the only point I feel odd is the description. Basically, I'd
> like to apply this patch for cleanup. May I remove the comment "this
> removes an indrect call oveahead"?
>
> Thanks,
> Ryusuke Konishi
>
> > Thanks,
> > Li Hong
> >
> > > Thanks,
> > > Ryusuke Konishi
> > >
> > > > ---
> > > > fs/nilfs2/segment.c | 9 +--------
> > > > 1 files changed, 1 insertions(+), 8 deletions(-)
> > > >
> > > > diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
> > > > index f235fc0..514620d 100644
> > > > --- a/fs/nilfs2/segment.c
> > > > +++ b/fs/nilfs2/segment.c
> > > > @@ -2684,13 +2684,6 @@ static void nilfs_segctor_kill_thread(struct nilfs_sc_info *sci)
> > > > }
> > > > }
> > > >
> > > > -static int nilfs_segctor_init(struct nilfs_sc_info *sci)
> > > > -{
> > > > - sci->sc_seq_done = sci->sc_seq_request;
> > > > -
> > > > - return nilfs_segctor_start_thread(sci);
> > > > -}
> > > > -
> > > > /*
> > > > * Setup & clean-up functions
> > > > */
> > > > @@ -2814,7 +2807,7 @@ int nilfs_attach_segment_constructor(struct nilfs_sb_info *sbi)
> > > > return -ENOMEM;
> > > >
> > > > nilfs_attach_writer(nilfs, sbi);
> > > > - err = nilfs_segctor_init(NILFS_SC(sbi));
> > > > + err = nilfs_segctor_start_thread(NILFS_SC(sbi));
> > > > if (err) {
> > > > nilfs_detach_writer(nilfs, sbi);
> > > > kfree(sbi->s_sc_info);
> > > > --
> > > > 1.6.3.3
> > > >
> > > > --
> > > > To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
> > > > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> > > > More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2010-04-11 8:22 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-10 16:15 [PATCH 1/3] nilfs2: remove nilfs_segctor_init() in segment.c Li Hong
2010-04-10 16:17 ` [PATCH 2/3] nilfs2: nilfs_segctor_destroy() should do a full job Li Hong
2010-04-10 16:17 ` [PATCH 3/3] nilfs2: change sc_timer from a pointer to an embedded one in struct nilfs_sc_info Li Hong
2010-04-11 2:40 ` Ryusuke Konishi
[not found] ` <20100411.114022.199103512.ryusuke-sG5X7nlA6pw@public.gmane.org>
2010-04-11 4:29 ` Li Hong
2010-04-11 9:08 ` Li Hong
2010-04-11 9:47 ` Ryusuke Konishi
2010-04-10 18:10 ` [PATCH 2/3] nilfs2: nilfs_segctor_destroy() should do a full job Ryusuke Konishi
[not found] ` <20100411.031005.204131803.ryusuke-sG5X7nlA6pw@public.gmane.org>
2010-04-11 4:27 ` Li Hong
2010-04-11 8:15 ` Ryusuke Konishi
[not found] ` <20100411.171551.04175650.ryusuke-sG5X7nlA6pw@public.gmane.org>
2010-04-11 8:29 ` Li Hong
2010-04-10 17:57 ` [PATCH 1/3] nilfs2: remove nilfs_segctor_init() in segment.c Ryusuke Konishi
[not found] ` <20100411.025715.33555818.ryusuke-sG5X7nlA6pw@public.gmane.org>
2010-04-11 4:17 ` Li Hong
2010-04-11 7:58 ` Ryusuke Konishi
[not found] ` <20100411.165847.77342547.ryusuke-sG5X7nlA6pw@public.gmane.org>
2010-04-11 8:22 ` Li Hong [this message]
2010-04-11 8:40 ` Ryusuke Konishi
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=20100411082250.GA11189@xhl \
--to=lihong.hi-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org \
--cc=linux-nilfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ryusuke-sG5X7nlA6pw@public.gmane.org \
/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