Skip to content

Reduce system calls

Zdenek Kabelac lvm-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7Add common initialization code for struct devicelib/device/dev-cache.c+17 -170 replies
2/7Add caching of BLKGETSIZE64 ioctllib/device/dev-cache.c lib/device/dev-io.c lib/device/device.h+18 -110 replies
3/7Do not drop cache block_size for cached device.lib/device/dev-io.c+0 -10 replies
4/7Do not lstat common path prefixlib/device/dev-cache.c+2 -00 replies
5/7Minor cleanup of strchr analyzer warninglib/device/dev-cache.c+8 -100 replies
6/7Drop extra stat before open of devicelib/device/dev-io.c+0 -110 replies
7/7Skip double stat() call with each _insertlib/device/dev-cache.c+30 -180 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/7] Reduce system calls

Seems like over the time we have added lots of system calls which are not fully using the device cache or the code is just distrustful too much.

This patch set tries to reduce the number of system calls and should have some positive impact on RHZB 744926.

In my measurements it seems like it's giving extra 10%-30% speedup of processing commands like lvcreate with larger set of devices in system. (depends on the lvm.conf configuration as well.)

!!! NOTICE !!!

It's worth to note that our current code for obtaining device list from udev is upto 80% slower that our normal scan (yep, udev is quite slow and does about ~8 syscalls per device) so unless we try to extend this udev scan with just check only for real PV devices (which has been reject) we have quite noticable speed regression when larger set of devices is present in the system.

Patch set should be back-portable.

Careful review for '*' please.

Zdenek Kabelac (7):
Add common initialization code for struct device
* Add caching of BLKGETSIZE64 ioctl
* Do not drop cache block_size for cached device.
* Do not lstat common path prefix
Minor cleanup of strchr analyzer warning
* Drop extra stat before open of device Skip double stat() call with each _insert

 lib/device/dev-cache.c |  103 +++++++++++++++++++++++++++---------------------
 lib/device/dev-io.c    |   39 +++++++-----------
 lib/device/device.h    |    1 +
 3 files changed, 75 insertions(+), 68 deletions(-)

--
1.7.7.3