[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1384765870.26319.16.camel@kjgkr>
Date: Mon, 18 Nov 2013 18:11:10 +0900
From: Jaegeuk Kim <jaegeuk.kim@...sung.com>
To: Chao Yu <chao2.yu@...sung.com>
Cc: linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net,
'谭姝' <shu.tan@...sung.com>
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@...sung.com]
> > Sent: Monday, November 18, 2013 8:29 AM
> > To: Chao Yu
> > Cc: linux-fsdevel@...r.kernel.org; linux-kernel@...r.kernel.org; linux-f2fs-devel@...ts.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@...sung.com>
> > > Acked-by: Gu Zheng <guz.fnst@...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.
>
> > 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?
Thanks,
--
Jaegeuk Kim
Samsung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists