1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00
lvm2/lib
Zdenek Kabelac b1bcff7424 Critical section
New strategy for memory locking to decrease the number of call to
to un/lock memory when processing critical lvm functions.

Introducing functions for critical section.

Inside the critical section - memory is always locked.
When leaving the critical section, the memory stays locked
until memlock_unlock() is called - this happens with
sync_local_dev_names() and sync_dev_names() function call.

memlock_reset() is needed to reset locking numbers after fork
(polldaemon).

The patch itself is mostly rename:

memlock_inc  -> critical_section_inc
memlock_dec  -> critical_section_dec
memlock      -> critical_section

Daemons (clmvd, dmevent) are using memlock_daemon_inc&dec
(mlockall()) thus they will never release or relock memory they've
already locked memory.

Macros sync_local_dev_names() and sync_dev_names() are functions.
It's better for debugging - and also we do not need to add memlock.h
to locking.h header (for memlock_unlock() prototyp).
2011-02-18 14:16:11 +00:00
..
activate Critical section 2011-02-18 14:16:11 +00:00
cache Critical section 2011-02-18 14:16:11 +00:00
commands Replace PV_MIN_SIZE with function pv_min_size() 2011-02-18 14:11:22 +00:00
config Support 64bit ints in config 2011-02-18 14:08:22 +00:00
datastruct Some const cleanups 2010-12-20 13:19:13 +00:00
device Critical section 2011-02-18 14:16:11 +00:00
display Refactor the percent (mirror sync, snapshot usage) handling code to use 2010-11-30 11:53:31 +00:00
error Remove const usage from destroy callbacks 2010-12-20 13:32:49 +00:00
filters Replace PV_MIN_SIZE with function pv_min_size() 2011-02-18 14:11:22 +00:00
format1 Remove unused variable label 2010-12-20 14:06:33 +00:00
format_pool Add internal error if pointer is uninitialized 2010-12-20 14:20:52 +00:00
format_text Critical section 2011-02-18 14:16:11 +00:00
freeseg Remove const usage from destroy callbacks 2010-12-20 13:32:49 +00:00
label Add dm_zalloc and use it and dm_pool_zalloc throughout. 2010-09-30 21:06:50 +00:00
locking Critical section 2011-02-18 14:16:11 +00:00
log Critical section 2011-02-18 14:16:11 +00:00
metadata Critical section 2011-02-18 14:16:11 +00:00
mirror Remove unused variable mirr_state and its assignment 2011-01-05 12:27:56 +00:00
misc Replace PV_MIN_SIZE with function pv_min_size() 2011-02-18 14:11:22 +00:00
mm Critical section 2011-02-18 14:16:11 +00:00
replicator Remove const usage from destroy callbacks 2010-12-20 13:32:49 +00:00
report Return PERCENT_INVALID for error case 2011-01-05 12:33:51 +00:00
snapshot Remove const usage from destroy callbacks 2010-12-20 13:32:49 +00:00
striped Remove const usage from destroy callbacks 2010-12-20 13:32:49 +00:00
unknown Remove const usage from destroy callbacks 2010-12-20 13:32:49 +00:00
uuid Avoid rebuilding of uuid validation table 2011-01-28 10:14:08 +00:00
zero Remove const usage from destroy callbacks 2010-12-20 13:32:49 +00:00
Makefile.in Refactor the percent (mirror sync, snapshot usage) handling code to use 2010-11-30 11:53:31 +00:00