linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Tobias Diedrich <ranma+kernel@tdiedrich.de>
To: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
Subject: posix_fadvise/WILLNEED synchronous on fuse/sshfs instead of async?
Date: Wed, 11 Nov 2009 16:19:37 +0100	[thread overview]
Message-ID: <20091111151937.GC20655@yumi.tdiedrich.de> (raw)

While trying to use posix_fadvise(...POSIX_FADVISE_WILLNEED) to
implement userspace read-ahead (with a bigger read-ahead window than
the kernel default) I found that if the underlying filesystem is
fuse/sshfs posix_fadvise is no longer doing asynchronous reads:

strace -tt with mnt/testfile on sshfs and server with very slow
upstream (ADSL):
5345  00:00:17.334209 open("mnt/testfile", O_RDONLY|O_LARGEFILE) = 3
5345  00:00:18.011383 _llseek(3, 0, [3544379], SEEK_END) = 0
5345  00:00:18.011626 _llseek(3, 0, [0], SEEK_SET) = 0
5345  00:00:18.012393 fadvise64_64(3, 0, 1048576, POSIX_FADV_WILLNEED) = 0
5345  00:01:02.438097 write(1, "[file] File size is 3544379 byte"..., 34) = 34

Note that fadvise takes 40 seconds...
Is this expected behaviour?
I would have expected that fadvise is always asynchronous and I
could rely on the call to return almost immediately.

-- 
Tobias						PGP: http://8ef7ddba.uguu.de

--
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>

             reply	other threads:[~2009-11-11 15:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-11 15:19 Tobias Diedrich [this message]
2009-11-11 15:43 ` Miklos Szeredi

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=20091111151937.GC20655@yumi.tdiedrich.de \
    --to=ranma+kernel@tdiedrich.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox