On Mon, 25 May 2020, Maciej W. Rozycki wrote: > On Mon, 25 May 2020, Mikulas Patocka wrote: > > > > > The functions __raw_read* are already extern inline, so the compiler will > > > > inline/noinline them depending on the macros trivial_io_bw and > > > > trivial_io_lq - so we can just call them from read*_relaxed without > > > > repeating the extern inline pattern. > > > > > > The whole point of this peculiar arrangement for cooked accessors is to > > > avoid having barriers inserted inline around out-of-line calls to raw > > > accessors, > > > > I see, but why do we want to avoid that? Linux kernel has no binary > > compatibility, so it doesn't matter if the barriers are inlined in the > > drivers or not. > > It does matter as it expands code unnecessarily (at all call sites), as I > noted in the original review. This has nothing to do with compatibility. > > > Anyway, I've sent a next version of the patch that makes read*_relaxed > > extern inline. > > Thanks, I'll have a look. And now that you have this update, please run > `size' on ALPHA_GENERIC `vmlinux', preferably monolithic, to see what the > difference is between `read*_relaxed' handlers `static inline' and keyed > with `*trivial_rw_*'. > > Maciej The patch with static inline: text data bss dec hex filename 124207762 75953010 5426432 205587204 c410304 vmlinux The patch with extern inline: text data bss dec hex filename 124184422 75953474 5426432 205564328 c40a9a8 vmlinux (I've sent version 7 of the patch because I misnamed the "write_relaxed" function in version 6). Mikulas