summaryrefslogtreecommitdiffstats
path: root/fs/proc/internal.h
diff options
context:
space:
mode:
authorAlexey Dobriyan2018-02-07 00:37:28 +0100
committerLinus Torvalds2018-02-07 03:32:43 +0100
commit15b158b4e6274351fc3cf652cbabc57104efb547 (patch)
treeb39beb6e526de60b5a89bd27c5419f7fbd7ead3d /fs/proc/internal.h
parentfs/proc: use __ro_after_init (diff)
downloadkernel-qcow2-linux-15b158b4e6274351fc3cf652cbabc57104efb547.tar.gz
kernel-qcow2-linux-15b158b4e6274351fc3cf652cbabc57104efb547.tar.xz
kernel-qcow2-linux-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 <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc/internal.h')
0 files changed, 0 insertions, 0 deletions