Page MenuHomeFreeBSD

Extend m_copyback() to support unmapped mbufs.
ClosedPublic

Authored by jhb on May 5 2021, 9:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 11:07 PM
Unknown Object (File)
Fri, Nov 8, 4:12 AM
Unknown Object (File)
Fri, Nov 8, 1:32 AM
Unknown Object (File)
Oct 4 2024, 7:05 AM
Unknown Object (File)
Oct 3 2024, 9:33 AM
Unknown Object (File)
Oct 1 2024, 2:10 PM
Unknown Object (File)
Oct 1 2024, 12:52 PM
Unknown Object (File)
Sep 28 2024, 12:34 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj added inline comments.
sys/kern/uipc_mbuf.c
1899

m_unmappeduiomove() or so might be a better name then. Not sure if it's worth the churn.

This revision is now accepted and ready to land.May 6 2021, 1:48 PM
gallatin added inline comments.
sys/kern/uipc_mbuf.c
1899

We also have m_copyfromunmapped(). We could add a m_unmappeduiomove(.. int direction) and make the existing functions wrappers..

sys/kern/uipc_mbuf.c
1899

m_copy{to,from}unmapped() are kind of wrappers already, they just construct different uio's to pass to this routine. In that regard they are similar to the physcopy{in,out} wrappers around uiomove_fromphys(). uiomove_fromphys() suffers similar naming issues (it copies to/from physical pages, not only from physical pages). This routine is also used by m_mbuftouio() which is where it gets is original name from. I don't mind renaming this. It isn't a lot of churn. The one use case outside of this file is in soreceive() where it is paired with uiomove(), so something in the uiomove_* namespace ala uiomove_fromphys() might not be a bad name for it.

sys/kern/uipc_mbuf.c
1899

I don't have strong feelings about it. The m_* namespace makes more sense to me for this routine, so I'm inclined to prefer m_unmapped_uiomove(), but uiomove_mbuf_unmapped() or so would be ok. The name uiomove_fromphys() has always bugged me for exactly the reason you point out.

sys/kern/uipc_mbuf.c
1899

I'll add a followup commit after this one that renames it to m_unmapped_uiomove().

This revision was automatically updated to reflect the committed changes.