lkml.org 
[lkml]   [2015]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)
On Fri, Mar 27, 2015 at 09:02:51AM +0100, Volker Lendecke wrote:
> No, this is not the case. Maybe my whole understanding of
> pread is wrong: I always thought that it won't return short
> if the file spans the pread range. EINTR nonwithstanding.

Per Posix it could, however if we do it for regular file reads
hell will break lose because no one expects it. So in practice
it can't.

>
> > if (it's all in cache)
>
> I know I'm repeating myself: We have a race condition here.
> A small one, but it is racy. I've seen loaded systems where
> we spend seconds between becoming re-scheduled. In these
> systems, it will be the norm to block in later reads. And we
> don't have a good way to detect this situation afterwards
> and turn to threads as a precaution next time.

Exactly. One that matters in real life, too. Nevermind that
preadv2 is a way cleaner interface than fincore.


\
 
 \ /
  Last update: 2015-03-27 09:21    [W:0.094 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site