linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Does GUP page unpinning have to be done in the pinning context?
@ 2025-04-04 10:20 David Howells
  2025-04-04 10:29 ` David Hildenbrand
  0 siblings, 1 reply; 10+ messages in thread
From: David Howells @ 2025-04-04 10:20 UTC (permalink / raw)
  To: Kirill A. Shutemov, John Hubbard, David Hildenbrand
  Cc: dhowells, hch, willy, linux-mm

Hi Kirill, John, David,

I don't know if you're the experts on GUP, but can you tell me if unpinning,
e.g. unpin_user_page(), needs to be done in the same MM context and/or the
same user context as the initial pinning?  And, if so, is there some way to
break that link?

I'm looking at how I might extend page pinning into the socket layer and
sendmsg(MSG_ZEROCOPY).  The problem is that sendmsg() merely queues the
buffers with no guarantee that it's finished with them by the time it's
returned.  You get a SO_EE_ORIGIN_ZEROCOPY message to tell you that.

I have to deal with the issue that the process that did the sendmsg(), the MM
context and the user context may all have ceased to exist by the time the
transmission completes if I don't pin them.

Thanks,
David



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

end of thread, other threads:[~2025-05-12  6:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-04 10:20 Does GUP page unpinning have to be done in the pinning context? David Howells
2025-04-04 10:29 ` David Hildenbrand
2025-04-04 16:59   ` John Hubbard
2025-04-07  6:39     ` Christoph Hellwig
2025-04-10  2:56       ` John Hubbard
2025-04-10  7:28         ` Christoph Hellwig
2025-04-10 19:11           ` John Hubbard
2025-04-10 19:14             ` Matthew Wilcox
2025-04-10 19:34               ` John Hubbard
2025-05-12  6:21             ` Christoph Hellwig

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).