1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-04-01 18:50:41 +03:00

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.
This commit is contained in:
Zdenek Kabelac 2011-02-18 14:51:04 +00:00
parent e50d9e2c57
commit 16aa248a35

View File

@ -343,9 +343,15 @@ static void _unlock_mem(struct cmd_context *cmd)
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))