Thread (21 messages) flat view 21 messages, 6 authors, 2015-04-04

Re: [PATCH v7 0/5] vfs: Non-blockling buffered fs read (page cache only)

From: Jeremy Allison <hidden>
Date: 2015-03-30 20:49:40
Also in: linux-arch, linux-fsdevel, lkml

Possibly related (same subject, not in this thread)

On Mon, Mar 30, 2015 at 01:37:58PM -0700, Andrew Morton wrote:
On Mon, 30 Mar 2015 13:32:27 -0700 Jeremy Allison [off-list ref] wrote:
quoted
On Mon, Mar 30, 2015 at 01:26:25PM -0700, Andrew Morton wrote:
quoted
cons:

d) fincore() is more expensive

e) fincore() will very occasionally block
The above is the killer for Samba. If fincore
returns true but when we schedule the pread
we block, we're hosed.

Once we block, we're done serving clients on the main
thread until this returns. That can cause unpredictable
response times which can cause client timeouts.

A fincore+pread solution that blocks is simply unsafe
to use for us. We'll have to stay with the threadpool :-(.
Finally.  Thanks ;)

This implies that the samba main thread also has to avoid any memory
allocations both direct and within syscall and pagefault - those will
occasionally exhibit similar worse-case latency. Is this done now?
We don't do anything special around allocations in syscall.
For aio read we do talloc (internal memory allocator) the
return chunk before going into the pthread pread, so I
suppose this could block. Haven't seen this as a reported
problem though. I suppose you can say "well exactly the
same thing is true of fincore()" :-).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help