netfs.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [LSF/MM/BPF TOPIC] Large folios, swap and fscache
@ 2024-02-02  9:09 David Howells
  2024-02-02 14:29 ` Matthew Wilcox
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: David Howells @ 2024-02-02  9:09 UTC (permalink / raw)
  To: lsf-pc; +Cc: dhowells, Matthew Wilcox, netfs, linux-fsdevel, linux-mm

Hi,

The topic came up in a recent discussion about how to deal with large folios
when it comes to swap as a swap device is normally considered a simple array
of PAGE_SIZE-sized elements that can be indexed by a single integer.

With the advent of large folios, however, we might need to change this in
order to be better able to swap out a compound page efficiently.  Swap
fragmentation raises its head, as does the need to potentially save multiple
indices per folio.  Does swap need to grow more filesystem features?

Further to this, we have at least two ways to cache data on disk/flash/etc. -
swap and fscache - and both want to set aside disk space for their operation.
Might it be possible to combine the two?

One thing I want to look at for fscache is the possibility of switching from a
file-per-object-based approach to a tagged cache more akin to the way OpenAFS
does things.  In OpenAFS, you have a whole bunch of small files, each
containing a single block (e.g. 256K) of data, and an index that maps a
particular {volume,file,version,block} to one of these files in the cache.

Now, I could also consider holding all the data blocks in a single file (or
blockdev) - and this might work for swap.  For fscache, I do, however, need to
have some sort of integrity across reboots that swap does not require.

David


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-02-29 19:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-02  9:09 [LSF/MM/BPF TOPIC] Large folios, swap and fscache David Howells
2024-02-02 14:29 ` Matthew Wilcox
2024-02-22 19:02   ` Luis Chamberlain
2024-02-22 19:16     ` Yosry Ahmed
2024-02-22 22:26     ` Chris Li
2024-02-29 19:31   ` Chris Li
2024-02-02 15:57 ` David Howells
2024-02-02 19:22   ` Matthew Wilcox
2024-02-03  5:13 ` Gao Xiang
2024-02-04 23:45 ` Dave Chinner
2024-02-22 22:45 ` Chris Li
2024-02-23  3:00   ` Andreas Dilger
2024-02-23  3:46     ` Chris Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).