Re: [RFC PATCH] implement orangefs_readahead

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> This is not the way to do it. You need to actually kick
>> off readahead in this routine so that you get pipelining
>> (ie the app is working on pages 0-15 at the same time
>> the server is getting you pages 16-31).

Orangefs isn't very good at reading or writing a few
pages at a time. Its optimal block size is four megabytes.
I'm trying to do IOs big enough to make Orangefs
start flowing like it needs to and then have pages
on hand to fill with the data. Perhaps I can figure
how to use Dave Howell's code to control the
readahead window and make adjustments to
how many pages Orangefs reads per IO and
end up with something that is closer to how
readahead is intended to be used.

This patch is a big performance improvement over
the code that's upstream even though I'm
not using readahead as intended.

>> I don't see much support in orangefs for doing async
>> operations; everything seems to be modelled on
>> "submit an I/O and wait for it to complete".

Yep... when we were polishing up the kernel module to
attempt to go upstream, the code in there for async was
left behind... I might be able to make sense of it now,
Ida know... You've helped me to see this place where
it is needed.

>> adding async
>> support to orangefs is a little bigger task than I'm willing to put
>> significant effort into right now.

The effort and help that you're providing is much
appreciated and just what I need, thanks!

-Mike

On Mon, Feb 1, 2021 at 8:08 AM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
>
> On Sun, Jan 31, 2021 at 05:25:02PM -0500, Mike Marshall wrote:
> > I wish I knew how to specify _nr_pages in the readahead_control
> > structure so that all the extra pages I need could be obtained
> > in readahead_page instead of part there and the rest in my
> > open-coded stuff in orangefs_readpage. But it looks to me as
> > if values in the readahead_control structure are set heuristically
> > outside of my control over in ondemand_readahead?
>
> That's right (for now).  I pointed you at some code from Dave Howells
> that will allow orangefs to enlarge the readahead window beyond that
> determined by the core code's algorithms.
>
> > [root@vm3 linux]# git diff master..readahead
> > diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
> > index 48f0547d4850..682a968cb82a 100644
> > --- a/fs/orangefs/inode.c
> > +++ b/fs/orangefs/inode.c
> > @@ -244,6 +244,25 @@ static int orangefs_writepages(struct
> > address_space *mapping,
> >
> >  static int orangefs_launder_page(struct page *);
> >
> > +/*
> > + * Prefill the page cache with some pages that we're probably
> > + * about to need...
> > + */
> > +static void orangefs_readahead(struct readahead_control *rac)
> > +{
> > +       pgoff_t index = readahead_index(rac);
> > +       struct page *page;
> > +
> > +       while ((page = readahead_page(rac))) {
> > +               prefetchw(&page->flags);
> > +               put_page(page);
> > +               unlock_page(page);
> > +               index++;
> > +       }
> > +
> > +       return;
> > +}
>
> This is not the way to do it.  You need to actually kick off readahead in
> this routine so that you get pipelining (ie the app is working on pages
> 0-15 at the same time the server is getting you pages 16-31).  I don't
> see much support in orangefs for doing async operations; everything
> seems to be modelled on "submit an I/O and wait for it to complete".
>
> I'm happy to help out with pagecache interactions, but adding async
> support to orangefs is a little bigger task than I'm willing to put
> significant effort into right now.



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux