render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
38f2fd
From ea2c6dc03a003bdfe3004fe91eb76ea1f958c898 Mon Sep 17 00:00:00 2001
38f2fd
Message-Id: <ea2c6dc03a003bdfe3004fe91eb76ea1f958c898@dist-git>
38f2fd
From: Andrea Bolognani <abologna@redhat.com>
38f2fd
Date: Fri, 20 Nov 2015 13:29:11 +0100
38f2fd
Subject: [PATCH] process: Log when limiting the amount of locked memory
38f2fd
38f2fd
This can be useful for debugging.
38f2fd
38f2fd
(cherry picked from commit a6a5ac965056d3949e8fa2b6cb70dc554196d56f)
38f2fd
38f2fd
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1283924
38f2fd
38f2fd
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
38f2fd
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
38f2fd
---
38f2fd
 src/util/virprocess.c | 4 ++++
38f2fd
 1 file changed, 4 insertions(+)
38f2fd
38f2fd
diff --git a/src/util/virprocess.c b/src/util/virprocess.c
38f2fd
index 8fa7a9b..c86b7e9 100644
38f2fd
--- a/src/util/virprocess.c
38f2fd
+++ b/src/util/virprocess.c
38f2fd
@@ -761,6 +761,10 @@ virProcessSetMaxMemLock(pid_t pid, unsigned long long bytes)
38f2fd
             return -1;
38f2fd
         }
38f2fd
     }
38f2fd
+
38f2fd
+    VIR_DEBUG("Locked memory for process %lld limited to %llu bytes",
38f2fd
+              (long long int) pid, bytes);
38f2fd
+
38f2fd
     return 0;
38f2fd
 }
38f2fd
 #else /* ! (HAVE_SETRLIMIT && defined(RLIMIT_MEMLOCK)) */
38f2fd
-- 
38f2fd
2.6.3
38f2fd