Actions
Feature #13951
closed[PATCH] File#rename releases GVL
Status:
Closed
Assignee:
-
Target version:
-
Description
rename(2) requires two pathname resolution operations which can
take considerable time on slow filesystems, release the GVL so
operations on other threads may proceed.
On fast, local filesystems, this change results in some slowdown
as shown by the new benchmark. I consider the performance trade
off acceptable as cases are avoided.
benchmark results:
minimum results in each 3 measurements.
Execution time (sec)
name trunk built
file_rename 2.648 2.804
Speedup ratio: compare with the result of `trunk' (greater is better)
name built
file_rename 0.944
- file.c (no_gvl_rename): new function
(rb_file_s_rename): release GVL for renames - benchmark/bm_file_rename.rb: new benchmark
I will commit this next week as well as work on releasing GVL for
other operations where slow FS can have pathological slowdown
(unlink, link, symlink, readlink, readdir, mkdir, chmod, ...)
Files
Actions
Like0
Like0Like0Like0