From: Eric Wong <normalperson@yhbt.net>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue
Date: Sun, 16 Dec 2012 05:17:57 +0000 [thread overview]
Message-ID: <20121216051757.GA6746@dcvr.yhbt.net> (raw)
In-Reply-To: <20121216042636.GL9806@dastard>
Dave Chinner <david@fromorbit.com> wrote:
> On Sun, Dec 16, 2012 at 03:59:53AM +0000, Eric Wong wrote:
> > I want the first read() to happen sooner than it would under current
> > fadvise.
>
> You're not listening. You do not need the kernel to be modified to
> avoid the latency of issuing 1GB of readahead on a file.
>
> You don't need to do readahead before the first read. Nor do you do
> need to wait for 1GB of readhead to be issued before you do the
> first read.
>
> You could do readahead *concurrently* with the first read, so the
> first read only blocks until the readahead of the first part of the
> file completes. i.e. just do readahead() in a background thread and
> don't wait for it to complete before doing the first read.
What you describe with concurrent readahead() is _exactly_ what my test
program (in other email) does with the RA environment variable set.
I know I do not _need_ fadvise + background WILLNEED support in the
kernel.
But I think the kernel can make life easier and allow us to avoid doing
background threads or writing our own (inferior) caching in userspace.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Eric Wong <normalperson@yhbt.net>
To: Dave Chinner <david@fromorbit.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue
Date: Sun, 16 Dec 2012 05:17:57 +0000 [thread overview]
Message-ID: <20121216051757.GA6746@dcvr.yhbt.net> (raw)
In-Reply-To: <20121216042636.GL9806@dastard>
Dave Chinner <david@fromorbit.com> wrote:
> On Sun, Dec 16, 2012 at 03:59:53AM +0000, Eric Wong wrote:
> > I want the first read() to happen sooner than it would under current
> > fadvise.
>
> You're not listening. You do not need the kernel to be modified to
> avoid the latency of issuing 1GB of readahead on a file.
>
> You don't need to do readahead before the first read. Nor do you do
> need to wait for 1GB of readhead to be issued before you do the
> first read.
>
> You could do readahead *concurrently* with the first read, so the
> first read only blocks until the readahead of the first part of the
> file completes. i.e. just do readahead() in a background thread and
> don't wait for it to complete before doing the first read.
What you describe with concurrent readahead() is _exactly_ what my test
program (in other email) does with the RA environment variable set.
I know I do not _need_ fadvise + background WILLNEED support in the
kernel.
But I think the kernel can make life easier and allow us to avoid doing
background threads or writing our own (inferior) caching in userspace.
next prev parent reply other threads:[~2012-12-16 5:17 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-15 0:54 [PATCH] fadvise: perform WILLNEED readahead in a workqueue Eric Wong
2012-12-15 0:54 ` Eric Wong
2012-12-15 22:34 ` Alan Cox
2012-12-15 22:34 ` Alan Cox
2012-12-16 0:25 ` Eric Wong
2012-12-16 0:25 ` Eric Wong
2012-12-16 3:03 ` Dave Chinner
2012-12-16 3:03 ` Dave Chinner
2012-12-16 3:35 ` Eric Wong
2012-12-16 3:35 ` Eric Wong
2012-12-16 4:15 ` Dave Chinner
2012-12-16 4:15 ` Dave Chinner
2012-12-16 5:23 ` Eric Wong
2012-12-16 5:23 ` Eric Wong
2012-12-16 21:31 ` Dave Chinner
2012-12-16 21:31 ` Dave Chinner
2012-12-16 8:48 ` Zheng Liu
2012-12-16 8:48 ` Zheng Liu
2012-12-16 2:45 ` Dave Chinner
2012-12-16 2:45 ` Dave Chinner
2012-12-16 3:04 ` Eric Wong
2012-12-16 3:04 ` Eric Wong
2012-12-16 3:09 ` Eric Wong
2012-12-16 3:09 ` Eric Wong
2012-12-16 3:36 ` Dave Chinner
2012-12-16 3:36 ` Dave Chinner
2012-12-16 3:59 ` Eric Wong
2012-12-16 3:59 ` Eric Wong
2012-12-16 4:26 ` Dave Chinner
2012-12-16 4:26 ` Dave Chinner
2012-12-16 5:17 ` Eric Wong [this message]
2012-12-16 5:17 ` Eric Wong
2013-02-22 16:45 ` Phillip Susi
2013-02-22 16:45 ` Phillip Susi
2013-02-22 21:13 ` Eric Wong
2013-02-22 21:13 ` Eric Wong
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=20121216051757.GA6746@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=david@fromorbit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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.