linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [LSF/MM BPF Topic] Warming up to frozen pages
@ 2025-03-18 14:47 Hannes Reinecke
  2025-03-18 15:10 ` Matthew Wilcox
  2025-03-19 15:11 ` Vlastimil Babka
  0 siblings, 2 replies; 4+ messages in thread
From: Hannes Reinecke @ 2025-03-18 14:47 UTC (permalink / raw)
  To: Matthew Wilcox, lsf-pc, linux-mm, linux-block

Hey all,

(Thanks, Jon, for the title :-)
the recent discussion around frozen pages and when to do a 
get_page()/put_page() and when not resulted in quite some unresolved issues.
So I would like to propose a session at LSF/MM:

'Warming up to frozen pages'
With the frozen pages patchset from Willy slab pages don't need
(and, in fact, can have) a page reference anymore. While this easy
to state, and to implement when using iov iterators, problems
arise when these iov iterators get mangled eg when being passed
via the various layers in the kernel.
Case in point: 'recvmsg()', when called from userspace, is being
passed an iov, and the iterator type defines if a page reference
need to be taken. However, when called from other kernel subsystems
(eg from nvme-tcp or iscsi), the iov is filled from a bvec which
in itself is filled from an iov iter from userspace, so the iov
iterator will assume it's a 'normal' bvec, and get a reference for
all entries as it wouldn't know which entry is a 'normal' and which
is a 'slab' page.
As Christoph indicated this is _not_ how things should be, so
a discussion on how to disentangle this would be good.
Maybe we even manage to lay down some rules when a page reference
should be taken and when not.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich



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

end of thread, other threads:[~2025-03-20  6:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-18 14:47 [LSF/MM BPF Topic] Warming up to frozen pages Hannes Reinecke
2025-03-18 15:10 ` Matthew Wilcox
2025-03-20  6:02   ` Christoph Hellwig
2025-03-19 15:11 ` Vlastimil Babka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox