Skip to content

two nits for path lookup

Mateusz Guzik linux-fsdevel lkml 1 version Applied

Status from this message: Applied to the vfs-6.16.misc branch of the vfs/vfs.git tree.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2fs: touch up predicts in inode_permission()fs/namei.c+5 -50 replies
2/2device_cgroup: avoid access to ->i_rdev in the common case in devcgroup_inode_permission()include/linux/device_cgroup.h+4 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] two nits for path lookup

since path looku is being looked at, two extra nits from me:

1. some trivial jump avoidance in inode_permission()

2. but more importantly avoiding a memory access which is most likely a cache miss when descending into devcgroup_inode_permission()

the file seems to have no maintainer fwiw

anyhow I'm confident the way forward is to add IOP_FAST_MAY_EXEC (or similar) to elide inode_permission() in the common case to begin with. There are quite a few branches which straight up don't need execute. On top of that btrfs has a permission hook only to check for MAY_WRITE, which in case of path lookup is not set. With the above flag the call will be avoided.

Mateusz Guzik (2):
fs: touch up predicts in inode_permission()
device_cgroup: avoid access to ->i_rdev in the common case in
devcgroup_inode_permission()

 fs/namei.c                    | 10 +++++-----
 include/linux/device_cgroup.h |  7 ++++---
 2 files changed, 9 insertions(+), 8 deletions(-)
Signature · 1 line
2.48.1