Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2013-02-22 Thread Eric Wong
Phillip Susi wrote: > > On Sat, Dec 15, 2012 at 12:54:48AM +, Eric Wong wrote: > >> "strace -T" timing on an uncached, one gigabyte file: > >> > >> Before: fadvise64(3, 0, 0, POSIX_FADV_WILLNEED) = 0 <2.484832> > >> After: fadvise64(3, 0, 0, POSIX_FADV_WILLNEED) = 0 <0.61> > > It should

Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2013-02-22 Thread Phillip Susi
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/15/2012 9:45 PM, Dave Chinner wrote: > On Sat, Dec 15, 2012 at 12:54:48AM +, Eric Wong wrote: >> Applications streaming large files may want to reduce disk >> spinups and I/O latency by performing large amounts of readahead >> up front. Appli

Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2012-12-16 Thread Dave Chinner
On Sun, Dec 16, 2012 at 05:23:02AM +, Eric Wong wrote: > Dave Chinner wrote: > > On Sun, Dec 16, 2012 at 03:35:49AM +, Eric Wong wrote: > > > Dave Chinner wrote: > > > > On Sun, Dec 16, 2012 at 12:25:49AM +, Eric Wong wrote: > > > > > Alan Cox wrote: > > > > > > On Sat, 15 Dec 2012 0

Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2012-12-16 Thread Zheng Liu
On Sun, Dec 16, 2012 at 03:15:49PM +1100, Dave Chinner wrote: > On Sun, Dec 16, 2012 at 03:35:49AM +, Eric Wong wrote: > > Dave Chinner wrote: > > > On Sun, Dec 16, 2012 at 12:25:49AM +, Eric Wong wrote: > > > > Alan Cox wrote: > > > > > On Sat, 15 Dec 2012 00:54:48 + > > > > > Eric W

Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2012-12-15 Thread Eric Wong
Dave Chinner wrote: > On Sun, Dec 16, 2012 at 03:35:49AM +, Eric Wong wrote: > > Dave Chinner wrote: > > > On Sun, Dec 16, 2012 at 12:25:49AM +, Eric Wong wrote: > > > > Alan Cox wrote: > > > > > On Sat, 15 Dec 2012 00:54:48 + > > > > > Eric Wong wrote: > > > > > > > > > > > Applic

Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2012-12-15 Thread Eric Wong
Dave Chinner wrote: > On Sun, Dec 16, 2012 at 03:59:53AM +, 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

Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2012-12-15 Thread Dave Chinner
On Sun, Dec 16, 2012 at 03:59:53AM +, Eric Wong wrote: > Dave Chinner wrote: > > On Sun, Dec 16, 2012 at 03:04:42AM +, Eric Wong wrote: > > > Dave Chinner wrote: > > > > On Sat, Dec 15, 2012 at 12:54:48AM +, Eric Wong wrote: > > > > > > > > > > Before: fadvise64(3, 0, 0, POSIX_FADV_

Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2012-12-15 Thread Dave Chinner
On Sun, Dec 16, 2012 at 03:35:49AM +, Eric Wong wrote: > Dave Chinner wrote: > > On Sun, Dec 16, 2012 at 12:25:49AM +, Eric Wong wrote: > > > Alan Cox wrote: > > > > On Sat, 15 Dec 2012 00:54:48 + > > > > Eric Wong wrote: > > > > > > > > > Applications streaming large files may want

Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2012-12-15 Thread Eric Wong
Dave Chinner wrote: > On Sun, Dec 16, 2012 at 03:04:42AM +, Eric Wong wrote: > > Dave Chinner wrote: > > > On Sat, Dec 15, 2012 at 12:54:48AM +, Eric Wong wrote: > > > > > > > > Before: fadvise64(3, 0, 0, POSIX_FADV_WILLNEED) = 0 <2.484832> > > > > After: fadvise64(3, 0, 0, POSIX_FADV

Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2012-12-15 Thread Dave Chinner
On Sun, Dec 16, 2012 at 03:04:42AM +, Eric Wong wrote: > Dave Chinner wrote: > > On Sat, Dec 15, 2012 at 12:54:48AM +, Eric Wong wrote: > > > Applications streaming large files may want to reduce disk spinups and > > > I/O latency by performing large amounts of readahead up front. > > > Ap

Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2012-12-15 Thread Eric Wong
Dave Chinner wrote: > On Sun, Dec 16, 2012 at 12:25:49AM +, Eric Wong wrote: > > Alan Cox wrote: > > > On Sat, 15 Dec 2012 00:54:48 + > > > Eric Wong wrote: > > > > > > > Applications streaming large files may want to reduce disk spinups and > > > > I/O latency by performing large amoun

Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2012-12-15 Thread Eric Wong
Eric Wong wrote: > Perhaps squashing something like the following will work? Last hunk should've had a return before skip_ra: --- a/mm/readahead.c +++ b/mm/readahead.c @@ -264,6 +266,10 @@ void wq_page_cache_readahead(struct address_space *mapping, struct file *filp, req->nr_to_read = n

Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2012-12-15 Thread Eric Wong
Dave Chinner wrote: > On Sat, Dec 15, 2012 at 12:54:48AM +, Eric Wong wrote: > > Applications streaming large files may want to reduce disk spinups and > > I/O latency by performing large amounts of readahead up front. > > Applications also tend to read files soon after opening them, so waitin

Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2012-12-15 Thread Dave Chinner
On Sun, Dec 16, 2012 at 12:25:49AM +, Eric Wong wrote: > Alan Cox wrote: > > On Sat, 15 Dec 2012 00:54:48 + > > Eric Wong wrote: > > > > > Applications streaming large files may want to reduce disk spinups and > > > I/O latency by performing large amounts of readahead up front > > > > H

Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2012-12-15 Thread Dave Chinner
On Sat, Dec 15, 2012 at 12:54:48AM +, Eric Wong wrote: > Applications streaming large files may want to reduce disk spinups and > I/O latency by performing large amounts of readahead up front. > Applications also tend to read files soon after opening them, so waiting > on a slow fadvise may cau

Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2012-12-15 Thread Eric Wong
Alan Cox wrote: > On Sat, 15 Dec 2012 00:54:48 + > Eric Wong wrote: > > > Applications streaming large files may want to reduce disk spinups and > > I/O latency by performing large amounts of readahead up front > > How does it compare benchmark wise with a user thread or using the > readahe

Re: [PATCH] fadvise: perform WILLNEED readahead in a workqueue

2012-12-15 Thread Alan Cox
On Sat, 15 Dec 2012 00:54:48 + Eric Wong wrote: > Applications streaming large files may want to reduce disk spinups and > I/O latency by performing large amounts of readahead up front How does it compare benchmark wise with a user thread or using the readahead() call ? -- To unsubscribe fr

[PATCH] fadvise: perform WILLNEED readahead in a workqueue

2012-12-14 Thread Eric Wong
Applications streaming large files may want to reduce disk spinups and I/O latency by performing large amounts of readahead up front. Applications also tend to read files soon after opening them, so waiting on a slow fadvise may cause unpleasant latency when the application starts reading the file.