2022-02-28 20:27:42

by Chris Chilvers

[permalink] [raw]
Subject: [BUG] FS-Cache write but no read when using sync

While trying the new FS-Cache implementation using the 5.17-rc5 kernel on
Ubuntu 21.10 I ran into an issue where it appears that FS-Cache was not being
used when the sync mount option is enabled.

While monitoring /proc/fs/fscache/stats it was observed there were high writes
to the cache volume, but no reads:

IO : rd=0 wr=344713665

Further tracing of /sys/kernel/debug/tracing/events/fscache/fscache_access shows
a large number of io_write operations, but no io_read operations.

The volume did fill up and perform culling as expected.

When the mount option was changed from sync to async the cache performed as
expected and a mixture of io_write and io_read was observed.

-- Chris


2022-03-01 16:25:09

by Chris Chilvers

[permalink] [raw]
Subject: Re: [BUG] FS-Cache write but no read when using sync

You can disregard this message. I didn't realise there was a separate
mailing list for cachefs. I've re-posted the message to the correct
mailing list.

-- Chris

On Mon, 28 Feb 2022 at 19:24, Chris Chilvers <[email protected]> wrote:
>
> While trying the new FS-Cache implementation using the 5.17-rc5 kernel on
> Ubuntu 21.10 I ran into an issue where it appears that FS-Cache was not being
> used when the sync mount option is enabled.
>
> While monitoring /proc/fs/fscache/stats it was observed there were high writes
> to the cache volume, but no reads:
>
> IO : rd=0 wr=344713665
>
> Further tracing of /sys/kernel/debug/tracing/events/fscache/fscache_access shows
> a large number of io_write operations, but no io_read operations.
>
> The volume did fill up and perform culling as expected.
>
> When the mount option was changed from sync to async the cache performed as
> expected and a mixture of io_write and io_read was observed.
>
> -- Chris