[Bugs] [Bug 1084508] read-ahead not working if open-behind is turned on
bugzilla at redhat.com
bugzilla at redhat.com
Tue Apr 26 18:27:44 UTC 2016
https://bugzilla.redhat.com/show_bug.cgi?id=1084508
Raghavendra G <rgowdapp at redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Flags|needinfo?(pgurusid at redhat.c |
|om) |
--- Comment #5 from Raghavendra G <rgowdapp at redhat.com> ---
(In reply to Raghavendra G from comment #4)
> (In reply to Raghavendra G from comment #3)
> > I think the issue is because of open-behind using anonymous-fd. See the
> > following option in open-behind:
> >
> > { .key = {"read-after-open"},
> > .type = GF_OPTION_TYPE_BOOL,
> > .default_value = "no",
> > .description = "read is sent only after actual open happens and real "
> > "fd is obtained, instead of doing on anonymous fd (similar to
> > write)",
> > },
> >
> > The read-ahead cache is per-fd and stored in the context of fd. If
> > open-behind is using anonymous fds for doing reads, read is never sent on
> > the fd which read-ahead has seen (during open from application). So, there
> > is no read-ahead cache.
>
> This RCA is not valid. The reason is during read-request, fd is stored in
> local and in response cache is stored on the fd stored in local. So, even
> though open-behind sends read on anonymous fd, read-ahead stores the cache
> in the fd passed to application/kernel.
Well, the core of the RCA - read-ahead is disabled because of open-behind using
anonymous fds - is still valid :). What was wrong was the mechanism through
which read-ahead is turned off. In our current configuration read-ahead is
loaded below open-behind. So, with "read-after-open" turned off, read-ahead
never receives an open. Without an open, read-ahead doesn't create a context in
fd, which is where all the cache is stored.
There are two solutions to this problem:
1. Load read-ahead as one of the ancestors of open-behind. This way read-ahead
witnesses the open sent by application before open-behind stopping it.
2. Turn "read-after-open" option on, so that open behind does an open.
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=0mlktjHfIH&a=cc_unsubscribe
More information about the Bugs
mailing list