Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

From
Masahiro Yamada <masahiroy@kernel.org>
Date
2022-02-17 17:28:24
Also in
lkml, netdev
Reply to
David Laight, 2022-02-17
On Fri, Feb 18, 2022 at 1:49 AM David Laight [off-list ref] wrote:
From: Masahiro Yamada
quoted
Sent: 17 February 2022 16:17
...
quoted
No.  Not that one.

The commit you presumably want to revert is:

a771f2b82aa2 ("[PATCH] Add a section about inlining to
Documentation/CodingStyle")

This is now referred to as "__always_inline disease", though.
That description is largely fine.

Inappropriate 'inline' ought to be removed.
Then 'inline' means - 'really do inline this'.

You cannot change "static inline" to "static"
in header files.

If  "static inline" meant __always_inline,
there would be no way to negate it.
That's why we need both inline and __always_inline.



Anyone remember massive 100+ line #defines being
used to get code inlined 'to make it faster'.
Sometimes being expanded several times in succession.
May have helped a 68020, but likely to be a loss on
modern cpu with large I-cache and slow memory.

        David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

--
Best Regards
Masahiro Yamada
Thread (15 messages) 15 messages, 6 authors, last reply 2022-02-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help