mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Petr Chmelar <petr.chmelar@innovatrics.com>
Cc: dhowells@redhat.com, Christian Brauner <christian@brauner.io>,
	Paulo Alcantara <pc@manguebit.org>,
	Matthew Wilcox <willy@infradead.org>,
	Namjae Jeon <linkinjeon@kernel.org>,
	Marc Dionne <marc.dionne@auristor.com>,
	Stefan Metzmacher <metze@samba.org>,
	Eric Van Hensbergen <ericvh@kernel.org>,
	Dominique Martinet <asmadeus@codewreck.org>,
	Ilya Dryomov <idryomov@gmail.com>,
	netfs@lists.linux.dev, linux-afs@lists.infradead.org,
	linux-cifs@vger.kernel.org, linux-nfs@vger.kernel.org,
	ceph-devel@vger.kernel.org, v9fs@lists.linux.dev,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v12 0/5] netfs, cachefiles: Changes for next, primarily occupancy tracking-related
Date: Tue, 13 Oct 2026 09:14:08 +0100	[thread overview]
Message-ID: <1655915.1791879248@warthog.procyon.org.uk> (raw)
In-Reply-To: <20261011.cachefiles-seek-hole-walk.pchmelar@innovatrics.com>

Petr Chmelar <petr.chmelar@innovatrics.com> wrote:

> The cover letter leaves non-contiguous objects, which still use
> SEEK_DATA/SEEK_HOLE, for a later series.  We hit that case badly in
> production, so here are numbers in case they help with its priority.

I know.  But it's a tricky problem to solve as I need to store a map of the
content somewhere.  xattrs are painful as I can only read or write them
atomically and as whole blobs - and also I'm not sure if I need to limit the
size of any given xattr to 512 bytes.  Further, the xattr wangling interface
inside the kernel assumes a flat virtual buffer rather than taking an I/O
iterator.

I have patches that store a bitmap in an xattr, with 1 bit per 256K block of
cachefile, for a 512 byte xattr able to map up to 1G of file size.  I need to
revisit this at some point soon.  It may be better to switch to storing an
extent list, but:

> On our NFS clients (Ubuntu, v6.8, cache on XFS), a sequential read of a
> fully cached 184 GB object with 1,080,732 extents ran at 0.4 MB/s.

Trying to store a million+ extent records in a single xattr would kind of
suck.  Now, it might be possible to collapse that somewhat if a lot of the
extents are virtually sequential within the file, since I don't care about
physical sequentiality.

Also, can you tell if you have a preferred cache granularity?  Would a 256K
granularity, say, use too much space?

> I expect the right fix is for cachefiles to track what it has written
> itself, as CONTENT_ALL now does for contiguous files, rather than
> something like the above.

Indeed - as mentioned above.

> I can send the workaround if it's useful as a reference,

If you could, that would be great!

> and I'm happy to test whatever you plan for this case on our workload.

Thanks.  Now I just need to reproduce your bug.  Note that I posted another
cachefiles patch that Christian hasn't picked up yet:

https://lore.kernel.org/linux-fsdevel/1091807.1791483394@warthog.procyon.org.uk/T/#u

David


  parent reply	other threads:[~2026-10-13  8:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10 22:02 David Howells
2026-09-10 22:02 ` [PATCH v12 1/5] cachefiles: Clean up cachefiles_do_prepare_read() David Howells
2026-09-11 20:19   ` Paulo Alcantara
2026-09-10 22:02 ` [PATCH v12 2/5] netfs, cachefiles: Add a couple of traces for write failure David Howells
2026-09-11 20:19   ` Paulo Alcantara
2026-09-10 22:02 ` [PATCH v12 3/5] cachefiles: Add a tracepoint to log insufficient space errors David Howells
2026-09-11 20:19   ` Paulo Alcantara
2026-09-10 22:02 ` [PATCH v12 4/5] cachefiles: Don't rely on backing fs storage map for most use cases David Howells
2026-10-11  5:29   ` Petr Chmelar
2026-10-13  7:54   ` David Howells
2026-10-13  9:56     ` Petr Chmelar
2026-09-10 22:02 ` [PATCH v12 5/5] cachefiles: Preset the state xattr when creating a new file David Howells
2026-09-11 20:21   ` Paulo Alcantara
2026-09-25 14:15 ` [PATCH v12 0/5] netfs, cachefiles: Changes for next, primarily occupancy tracking-related Christian Brauner
2026-10-11  5:29 ` Petr Chmelar
2026-10-13  8:14 ` David Howells [this message]
2026-10-13 10:43   ` Daire Byrne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1655915.1791879248@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=asmadeus@codewreck.org \
    --cc=ceph-devel@vger.kernel.org \
    --cc=christian@brauner.io \
    --cc=ericvh@kernel.org \
    --cc=idryomov@gmail.com \
    --cc=linkinjeon@kernel.org \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=marc.dionne@auristor.com \
    --cc=metze@samba.org \
    --cc=netfs@lists.linux.dev \
    --cc=pc@manguebit.org \
    --cc=petr.chmelar@innovatrics.com \
    --cc=v9fs@lists.linux.dev \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®