Page MenuHomeFreeBSD

mbuf: make m_pullup() an inline over most expected case
ClosedPublic

Authored by glebius on Mon, Oct 12, 11:26 PM.
Tags
None
Referenced Files
F176568693: D60688.id190301.diff
Mon, Oct 19, 10:12 PM
F176496973: D60688.diff
Mon, Oct 19, 8:09 AM
Unknown Object (File)
Sun, Oct 18, 6:15 PM
Unknown Object (File)
Sat, Oct 17, 11:41 PM
Unknown Object (File)
Sat, Oct 17, 3:29 PM
Unknown Object (File)
Sat, Oct 17, 11:39 AM
Unknown Object (File)
Fri, Oct 16, 2:33 PM
Unknown Object (File)
Fri, Oct 16, 1:32 PM
Subscribers

Details

Summary

Implement a most typical use of m_pullup() as an inline and leave only the
heavy part as a function. A sweeping change to make benefit of the new
version follows.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 78110
Build 74993: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mon, Oct 12, 11:43 PM
zlei added a subscriber: zlei.

I like this idea !

sys/sys/mbuf.h
865

3rd party drivers should be re-compiled, otherwise they may fail to load, as they may still reference to the old symbol m_pullup. Any plan to MFC this to stable branches ?

880

This inline function is too small. Does it deserves a __always_inline ?

sys/sys/mbuf.h
865

I don't have a strong desire to MFC it, but I will not object if anybody wants to handle it.

880

I prefer to trust the compiler and don't give it such explicit instruction. I bet our version of clang does the right thing and we don't care about others. It is just a very tiny performance optimization.