Re: 9p caching with cache=loose and cache=fscache

From: Eric Van Hensbergen
Date: Sun Mar 12 2023 - 14:29:43 EST


I was looking at kdevops the other day - cool stuff. Was trying to
figure out how we could do v9fs CI with it.

Both cache=loose and cache=fscache currently don't validate via host.
I have a patch series which adds some new cache modes (readahead and
writeback) that give closer to the loose performance but with tighter
consistency (open-to-close) - these patches are in my ericvh/for-next
tree. I've also started on some patches to add cache=tight which will
do dir caching like loose but with validation, and potentially also
will add a new flag that will indicate how often loose should
revalidate. There is also some discussion of decoupling fscache from
the revalidation policy.

So the stuff in for-next will make it into the next kernel, there is a
writeback fix patch that still has some bugs when cache=fscache that
I'm working through, but the base patches add the new cache modes.
The new dir cache along with tight policy will hopefully get done in
the next month and so should be ready for next merge window as well.

-eric

On Sat, Mar 11, 2023 at 4:47 PM Luis Chamberlain <mcgrof@xxxxxxxxxx> wrote:
>
> We've embraced 9p on kdevops [0] for support to let a guest use a host's
> path to install Linux. This works well except I notice that if the host
> makes new changes the guest does not see it. This just means the guest
> has to reboot every time before running 'make modules_install install -j 8'
> and it is unexpected and not user friendly.
>
> I wanted to see if someone was working on fixing this yet. I've tested
> with both cache=loose and cache=fscache. We use msize 131072, no
> security and virtio-9p-pci.
>
> [0] https://github.com/linux-kdevops/kdevops
>
> Luis