Skip to contentSkip to conversation

master - activation: split priority from memory locking

PATCH Zdenek Kabelac 1 participant 1 message Dec 1, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=c086dfadc389551b9a2d7b4c26931e5e74ada8d6
Commit:        c086dfadc389551b9a2d7b4c26931e5e74ada8d6
Parent:        c489dd2e1764216de07be80d36b1025fb4f6fc85
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Fri Dec 1 11:50:14 2017 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Fri Dec 1 12:19:09 2017 +0100

activation: split priority from memory locking

When entering any critical section, lvm2 used to lock process memory and raised task priority to avoid problem with page swapping and minimize time of having non-resumed devices in table.

With this patch, memory locking which which is expensive is only used when entering 'suspending' section as only in this section there is risk lvm could be suspending a device which later can be needed for paging.

Raised priority is still kept for all section entrances as this is low-cost operation and may accelerate table resumes - although the real impact can be still considered later.

---
 WHATS_NEW        |    1 +
 lib/mm/memlock.c |   99 ++++++++++++++++++++++++++++++++++++------------------
 2 files changed, 67 insertions(+), 33 deletions(-)
WHATS_NEW +1 -0
index 093fc95..8bbe4ee 100644
@@ -1,5 +1,6 @@
 Version 2.02.177 -
 ====================================
+  Command will lock memory only when suspending volumes.
   Merge segments when pvmove is finished.
   Remove label_verify that has never been used.
   Ensure very large numbers used as arguments are not casted to lower values. 
lib/mm/memlock.c +66 -33

168 lines not on this page · raw message