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@xxxxxxx +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