mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
LVM2 mirror repository
https://sourceware.org/lvm2/
6dd0bd0255
Fix a silly bug in dm_stats_delete_region() that hugely inflates runtimes when deleting a large number of regions. For ~50,000 regions this change reduces the runtime from 98s to 6s on my test systems (a ~93% reduction). The bug exists because dm_stats_delete_region() applies a truth test to the return value of dm_stats_get_nr_areas(); this is never correct usage - it will walk the entire region table and calculate area counts for each region (which is roughly O(n^2) in the number of regions, as dm_stats_delete_region() is being called inside a region walk). Although the individual area calculation is not that costly, uselessly running anything 2,500,000,000 times over gets a bit slow. A much cheaper test (which is always true if the areas check is true) is to just test dm_stats_get_nr_regions() or dms->regions; if either is true it implies at least one area exists. Old: Performance counter stats for 'dmstats delete --allregions --alldevices': 98117.791458 task-clock (msec) # 1.000 CPUs utilized 127 context-switches # 0.001 K/sec 3 cpu-migrations # 0.000 K/sec 6,631 page-faults # 0.068 K/sec 307,711,724,562 cycles # 3.136 GHz 544,762,959,577 instructions # 1.77 insn per cycle 84,287,824,115 branches # 859.047 M/sec 2,538,875 branch-misses # 0.00% of all branches 98.119578733 seconds time elapsed New: Performance counter stats for 'dmstats delete --allregions --alldevices': 6427.251074 task-clock (msec) # 1.000 CPUs utilized 6 context-switches # 0.001 K/sec 0 cpu-migrations # 0.000 K/sec 6,634 page-faults # 0.001 M/sec 21,613,018,724 cycles # 3.363 GHz 3,794,755,445 instructions # 0.18 insn per cycle 852,974,026 branches # 132.712 M/sec 808,625 branch-misses # 0.09% of all branches 6.428953647 seconds time elapsed |
||
---|---|---|
autoconf | ||
conf | ||
coverity | ||
daemons | ||
doc | ||
include | ||
lib | ||
libdaemon | ||
libdm | ||
liblvm | ||
man | ||
nix | ||
old-tests | ||
po | ||
python | ||
report-generators | ||
reports | ||
scripts | ||
spec | ||
test | ||
tools | ||
udev | ||
unit-tests | ||
.gitignore | ||
acinclude.m4 | ||
aclocal.m4 | ||
configure | ||
configure.in | ||
COPYING | ||
COPYING.LIB | ||
INSTALL | ||
make.tmpl.in | ||
Makefile.in | ||
README | ||
VERSION | ||
VERSION_DM | ||
WHATS_NEW | ||
WHATS_NEW_DM |
This tree contains the LVM2 and device-mapper tools and libraries. For more information about LVM2 read the changelog in the WHATS_NEW file. Installation instructions are in INSTALL. There is no warranty - see COPYING and COPYING.LIB. Tarballs are available from: ftp://sources.redhat.com/pub/lvm2/ The source code is stored in git: http://git.fedorahosted.org/git/lvm2.git git clone git://git.fedorahosted.org/git/lvm2.git Mailing list for general discussion related to LVM2: linux-lvm@redhat.com Subscribe from https://www.redhat.com/mailman/listinfo/linux-lvm Mailing lists for LVM2 development, patches and commits: lvm-devel@redhat.com Subscribe from https://www.redhat.com/mailman/listinfo/lvm-devel lvm2-commits@lists.fedorahosted.org (Read-only archive of commits) Subscribe from https://fedorahosted.org/mailman/listinfo/lvm2-commits Mailing list for device-mapper development, including kernel patches and multipath-tools: dm-devel@redhat.com Subscribe from https://www.redhat.com/mailman/listinfo/dm-devel The source code repository used until 7th June 2012 is accessible here: http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/?cvsroot=lvm2.