mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
2d1dbb9edd
While cleaning up the table of already created regions during a failed dm_stats_create_regions_from_fd(), list the handle once, and call _stats_delete_region() directly. This avoids sending a @stats_list message for each region deleted, reducing runtime from 6s to 0.7s when cleaning up ~250 out of ~10000 regions: # time dmstats create --filemap b.img device-mapper: message ioctl on (253:0) failed: Cannot allocate memory Failed to create region 246 of 309 at 9388032. Could not create regions from file /root/b.img << pauses here >> Command failed real 0m6.267s user 0m3.770s sys 0m2.487s # time dmstats create --filemap b.img device-mapper: message ioctl on (253:0) failed: Cannot allocate memory Failed to create region 246 of 309 at 9388032. Could not create regions from file /root/b.img Command failed real 0m0.716s user 0m0.034s sys 0m0.581s Testing the error path requires region creation to start to fail part way through the operation (in order to have regions to clean up): the simplest way is to ensure the system is close to the kernel limit of 1/4 RAM or 1/2 vmalloc space consumed by dmstats data. |
||
---|---|---|
.. | ||
datastruct | ||
ioctl | ||
misc | ||
mm | ||
regex | ||
.exported_symbols | ||
.exported_symbols.Base | ||
.exported_symbols.DM_1_02_97 | ||
.exported_symbols.DM_1_02_98 | ||
.exported_symbols.DM_1_02_99 | ||
.exported_symbols.DM_1_02_100 | ||
.exported_symbols.DM_1_02_101 | ||
.exported_symbols.DM_1_02_103 | ||
.exported_symbols.DM_1_02_104 | ||
.exported_symbols.DM_1_02_105 | ||
.exported_symbols.DM_1_02_106 | ||
.exported_symbols.DM_1_02_107 | ||
.exported_symbols.DM_1_02_110 | ||
.exported_symbols.DM_1_02_113 | ||
.exported_symbols.DM_1_02_124 | ||
.exported_symbols.DM_1_02_128 | ||
.exported_symbols.DM_1_02_129 | ||
.exported_symbols.DM_1_02_131 | ||
.exported_symbols.DM_1_02_133 | ||
.exported_symbols.DM_1_02_135 | ||
libdevmapper.h | ||
libdevmapper.pc.in | ||
libdm-common.c | ||
libdm-common.h | ||
libdm-config.c | ||
libdm-deptree.c | ||
libdm-file.c | ||
libdm-report.c | ||
libdm-stats.c | ||
libdm-string.c | ||
libdm-targets.c | ||
libdm-timestamp.c | ||
Makefile.in |