Skip to content

Share vg metadata for read only

Zdenek Kabelac lvm-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Refactor vg allocation codelib/format_text/import_vsn1.c lib/metadata/metadata.c lib/metadata/vg.c +1 more+42 -531 reply
1/3Refactor vg allocation code+0 -00 replies
2/3Add VG refcount and cache created VG structurelib/cache/lvmcache.c lib/cache/lvmcache.h lib/metadata/metadata.c +2 more+44 -200 replies
3/3Destroy 'fic' memory in error pathlib/cache/lvmcache.c+2 -01 reply

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/3] Share vg metadata for read only

Another nice speedup:

1st. patch refactors allocation of VG to one place - so refcounting is simplier to implement (I'm planning few more cleanup patches for this)

2nd. patch adds reference counting and caching of VG struct
As Milan suggested - I'll try to add extra code which will try to check checksum of memory pool used for VG (with DEBUG_MEM option probably)

Some numbers with ~1700 volumes and current default rawhide kernel:
2.6.38-0.rc5.git1.1.fc15.x86_64 lvm2-2.02.84-1.fc15.x86_64
(killed gvfs... and removed udisk udev rules
- as these are currently major performance killers)

vgchange -ay
real 0m50.097s
user 0m10.765s
sys 0m35.481s

vgchange -ay (here are LVs already actived)
real 0m10.425s
user 0m8.240s
sys 0m2.133s

vgchange -an
real 0m51.339s
user 0m10.375s
sys 0m31.457s

vgchange -an (here are LVs already deactived)
real 0m10.288s
user 0m8.328s
sys 0m1.901s

and now the same with new lvm2 sharing code (and critical section)

vgchange -ay
real 0m13.792s (udev is slowing it down by 3 seconds)
user 0m0.629s
sys 0m4.535s

vgchange -ay
real 0m0.745s
user 0m0.170s
sys 0m0.520s

vgchange -an
real 0m9.886s
user 0m0.425s
sys 0m2.418s

vgchange -an
real 0m0.468s
user 0m0.158s
sys 0m0.239s

Zdenek Kabelac (3):
Refactor vg allocation code
Add VG refcount and cache created VG structure
Destroy 'fic' memory in error path

 lib/cache/lvmcache.c          |   55 +++++++++++++++++++++++++++-------------
 lib/cache/lvmcache.h          |    4 ++-
 lib/format_text/import_vsn1.c |   33 +++++++-----------------
 lib/metadata/metadata.c       |   40 ++++++-----------------------
 lib/metadata/vg.c             |   26 +++++++++++++++++++
 lib/metadata/vg.h             |    3 ++
 6 files changed, 88 insertions(+), 73 deletions(-)

--
1.7.4.1