This is the mail archive of the lvm2-cvs@sourceware.org mailing list for the LVM2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LVM2/lib/mm memlock.c


CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	zkabelac@sourceware.org	2011-02-18 14:51:04

Modified files:
	lib/mm         : memlock.c 

Log message:
	Memory unlock allows 1 page difference
	
	As the kernel seems to be doing weird things during
	mlock -> munlock -  allow 1 page locking difference without
	warning - and log just debug message for a 1 page difference.
	
	Allocation happens outside critical section probably during
	log_warn printing.
	
	Should make tests passing for now.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mm/memlock.c.diff?cvsroot=lvm2&r1=1.34&r2=1.35

--- LVM2/lib/mm/memlock.c	2011/02/18 14:16:12	1.34
+++ LVM2/lib/mm/memlock.c	2011/02/18 14:51:04	1.35
@@ -343,9 +343,15 @@
 			log_sys_error("close", _procselfmaps);
 		dm_free(_maps_buffer);
 		_maps_buffer = NULL;
-		if (_mstats < unlock_mstats)
-			log_error(INTERNAL_ERROR "Maps lock %ld < unlock %ld",
-				  (long)_mstats, (long)unlock_mstats);
+		if (_mstats < unlock_mstats) {
+			if ((_mstats + 4096) < unlock_mstats)
+				log_error(INTERNAL_ERROR
+					  "Maps lock %ld < unlock %ld",
+					  (long)_mstats, (long)unlock_mstats);
+			else
+				log_debug("Maps lock %ld < unlock %ld, 1 page difference!",
+					  (long)_mstats, (long)unlock_mstats);
+		}
 	}
 
 	if (setpriority(PRIO_PROCESS, 0, _priority))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]