aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/proc_net.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <[email protected]>2018-02-06 23:37:28 +0000
committerLinus Torvalds <[email protected]>2018-02-07 02:32:43 +0000
commit15b158b4e6274351fc3cf652cbabc57104efb547 (patch)
treeb39beb6e526de60b5a89bd27c5419f7fbd7ead3d /fs/proc/proc_net.c
parentfs/proc: use __ro_after_init (diff)
downloadkernel-15b158b4e6274351fc3cf652cbabc57104efb547.tar.gz
kernel-15b158b4e6274351fc3cf652cbabc57104efb547.zip
proc: spread likely/unlikely a bit
use_pde() is used at every open/read/write/... of every random /proc file. Negative refcount happens only if PDE is being deleted by module (read: never). So it gets "likely". unuse_pde() gets "unlikely" for the same reason. close_pdeo() gets unlikely as the completion is filled only if there is a race between PDE removal and close() (read: never ever). It even saves code on x86_64 defconfig: add/remove: 0/0 grow/shrink: 1/2 up/down: 2/-20 (-18) Function old new delta close_pdeo 183 185 +2 proc_reg_get_unmapped_area 119 111 -8 proc_reg_poll 85 73 -12 Link: http://lkml.kernel.org/r/20180104175657.GA5204@avx2 Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'fs/proc/proc_net.c')
0 files changed, 0 insertions, 0 deletions