All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chao Yu <chao2.yu@samsung.com>
To: jaegeuk.kim@samsung.com
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH V2 1/2] f2fs: add a new function to support for merging contiguous read
Date: Tue, 19 Nov 2013 09:41:54 +0800	[thread overview]
Message-ID: <001101cee4c8$a51286d0$ef379470$@samsung.com> (raw)
In-Reply-To: <1384765870.26319.16.camel@kjgkr>

Hi

> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk.kim@samsung.com]
> Sent: Monday, November 18, 2013 5:11 PM
> To: Chao Yu
> Cc: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-f2fs-devel@lists.sourceforge.net; '谭姝'
> Subject: RE: [f2fs-dev] [PATCH V2 1/2] f2fs: add a new function to support for
> merging contiguous read
> 
> Hi,
> 
> 2013-11-18 (월), 09:37 +0800, Chao Yu:
> > Hi Kim,
> >
> > > -----Original Message-----
> > > From: Jaegeuk Kim [mailto:jaegeuk.kim@samsung.com]
> > > Sent: Monday, November 18, 2013 8:29 AM
> > > To: Chao Yu
> > > Cc: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-f2fs-devel@lists.sourceforge.net; 谭姝
> > > Subject: Re: [f2fs-dev] [PATCH V2 1/2] f2fs: add a new function to support for
> merging contiguous read
> > >
> > > Hi Chao,
> > >
> > > 2013-11-16 (토), 14:14 +0800, Chao Yu:
> > > > For better read performance, we add a new function to support for merging
> contiguous read as the one for write.
> > >
> > > Please consider 80 columns for the description.
> > > I cannot fix this at every time though. :(
> >
> > Got it, sorry about my carelessness in previous patch.
> >
> > >
> > > >
> > > > v1-->v2:
> > > >  o add declarations here as Gu Zheng suggested.
> > > >
> > > > Signed-off-by: Chao Yu <chao2.yu@samsung.com>
> > > > Acked-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
> > > > ---
> > > >  fs/f2fs/data.c |   45
> +++++++++++++++++++++++++++++++++++++++++++++
> > > >  fs/f2fs/f2fs.h |    4 ++++
> > > >  2 files changed, 49 insertions(+)
> > > >
> > > > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> > > > index aa3438c..18107cb 100644
> > > > --- a/fs/f2fs/data.c
> > > > +++ b/fs/f2fs/data.c
> > > > @@ -404,6 +404,51 @@ int f2fs_readpage(struct f2fs_sb_info *sbi, struct
> page *page,
> > > >  	return 0;
> > > >  }
> > > >
> > > > +void f2fs_submit_read_bio(struct f2fs_sb_info *sbi, int rw)
> > > > +{
> > > > +	down_read(&sbi->bio_sem);
> > >
> > > Is there any reason to use down_read()?
> >
> > Isn't that we use bio_sem to let w/r or w/w submitting be mutex?
> 
> As I examined the bio_sem, I think we don't need to use a semaphore for
> read and write IOs.
> Just it is enough to use a mutex for writes only.

Agreed, it could also improve efficiency of read/write request concurrent.

> 
> >
> > > It seems that we need to declare sbi->bio_read and sbi->bio_write
> > > instead of sbi->bio_sem.
> > > In addition to that, we need to use down_write(&sbi->bio_read) here.
> >
> > If so, it looks similar between (struct rw_semaphore) sbi->bio_read
> > and (struct bio *) sbi->read_bio.
> > How about using read_bio_sem/rbio_sem to differentiate
> > from sbi->read_bio?
> 
> I think sbi->write_mutex and sbi->read_mutex are much better.
> 
> Could you refer the following patches?

It's better, I will refer your patch.
And how about this following patch to reduce race of write_mutex 
between DATA/NODE/META writer?

> Thanks,
> 
> --
> Jaegeuk Kim
> Samsung


------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

WARNING: multiple messages have this Message-ID (diff)
From: Chao Yu <chao2.yu@samsung.com>
To: jaegeuk.kim@samsung.com
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	'谭姝' <shu.tan@samsung.com>
Subject: RE: [f2fs-dev] [PATCH V2 1/2] f2fs: add a new function to support for merging contiguous read
Date: Tue, 19 Nov 2013 09:41:54 +0800	[thread overview]
Message-ID: <001101cee4c8$a51286d0$ef379470$@samsung.com> (raw)
In-Reply-To: <1384765870.26319.16.camel@kjgkr>

Hi

> -----Original Message-----
> From: Jaegeuk Kim [mailto:jaegeuk.kim@samsung.com]
> Sent: Monday, November 18, 2013 5:11 PM
> To: Chao Yu
> Cc: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-f2fs-devel@lists.sourceforge.net; '谭姝'
> Subject: RE: [f2fs-dev] [PATCH V2 1/2] f2fs: add a new function to support for
> merging contiguous read
> 
> Hi,
> 
> 2013-11-18 (월), 09:37 +0800, Chao Yu:
> > Hi Kim,
> >
> > > -----Original Message-----
> > > From: Jaegeuk Kim [mailto:jaegeuk.kim@samsung.com]
> > > Sent: Monday, November 18, 2013 8:29 AM
> > > To: Chao Yu
> > > Cc: linux-fsdevel@vger.kernel.org; linux-kernel@vger.kernel.org;
> linux-f2fs-devel@lists.sourceforge.net; 谭姝
> > > Subject: Re: [f2fs-dev] [PATCH V2 1/2] f2fs: add a new function to support for
> merging contiguous read
> > >
> > > Hi Chao,
> > >
> > > 2013-11-16 (토), 14:14 +0800, Chao Yu:
> > > > For better read performance, we add a new function to support for merging
> contiguous read as the one for write.
> > >
> > > Please consider 80 columns for the description.
> > > I cannot fix this at every time though. :(
> >
> > Got it, sorry about my carelessness in previous patch.
> >
> > >
> > > >
> > > > v1-->v2:
> > > >  o add declarations here as Gu Zheng suggested.
> > > >
> > > > Signed-off-by: Chao Yu <chao2.yu@samsung.com>
> > > > Acked-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
> > > > ---
> > > >  fs/f2fs/data.c |   45
> +++++++++++++++++++++++++++++++++++++++++++++
> > > >  fs/f2fs/f2fs.h |    4 ++++
> > > >  2 files changed, 49 insertions(+)
> > > >
> > > > diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
> > > > index aa3438c..18107cb 100644
> > > > --- a/fs/f2fs/data.c
> > > > +++ b/fs/f2fs/data.c
> > > > @@ -404,6 +404,51 @@ int f2fs_readpage(struct f2fs_sb_info *sbi, struct
> page *page,
> > > >  	return 0;
> > > >  }
> > > >
> > > > +void f2fs_submit_read_bio(struct f2fs_sb_info *sbi, int rw)
> > > > +{
> > > > +	down_read(&sbi->bio_sem);
> > >
> > > Is there any reason to use down_read()?
> >
> > Isn't that we use bio_sem to let w/r or w/w submitting be mutex?
> 
> As I examined the bio_sem, I think we don't need to use a semaphore for
> read and write IOs.
> Just it is enough to use a mutex for writes only.

Agreed, it could also improve efficiency of read/write request concurrent.

> 
> >
> > > It seems that we need to declare sbi->bio_read and sbi->bio_write
> > > instead of sbi->bio_sem.
> > > In addition to that, we need to use down_write(&sbi->bio_read) here.
> >
> > If so, it looks similar between (struct rw_semaphore) sbi->bio_read
> > and (struct bio *) sbi->read_bio.
> > How about using read_bio_sem/rbio_sem to differentiate
> > from sbi->read_bio?
> 
> I think sbi->write_mutex and sbi->read_mutex are much better.
> 
> Could you refer the following patches?

It's better, I will refer your patch.
And how about this following patch to reduce race of write_mutex 
between DATA/NODE/META writer?

> Thanks,
> 
> --
> Jaegeuk Kim
> Samsung


  parent reply	other threads:[~2013-11-19  1:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-16  6:14 [PATCH V2 1/2] f2fs: add a new function to support for merging contiguous read Chao Yu
2013-11-16  6:14 ` [f2fs-dev] " Chao Yu
2013-11-18  0:29 ` Jaegeuk Kim
2013-11-18  0:29   ` Jaegeuk Kim
2013-11-18  1:37   ` Chao Yu
2013-11-18  1:37     ` [f2fs-dev] " Chao Yu
2013-11-18  9:11     ` Jaegeuk Kim
2013-11-18  9:11       ` [f2fs-dev] " Jaegeuk Kim
2013-11-18 10:10       ` Gu Zheng
2013-11-18 10:10         ` [f2fs-dev] " Gu Zheng
2013-11-19  1:41       ` Chao Yu [this message]
2013-11-19  1:41         ` Chao Yu

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='001101cee4c8$a51286d0$ef379470$@samsung.com' \
    --to=chao2.yu@samsung.com \
    --cc=jaegeuk.kim@samsung.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.