2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

dedup: convert noisy warning to debug and improve messages

We want to grep warnings from zdtm tests to travis final logs.
And I see a lot of these:

(00.250989) Warn  (criu/pagemap.c:90): Missing 7f84103e3000 in parent pagemap
(00.250999) 	p 0x7f84103f5000 [1]

We do a lookup of an intersecting pagemap entry with a memory region we
want to dedup, it is expected that sometimes we don't have some subrange
in pagemap entries. So these should not be a warning, make it debug
message.

While on it change the message to save us from been confused with other
"Missing..." error messages, and change abstract "parent image" message
to the IDs of pages image in all messages in dedup_one_iovec().

v2: print image ids
This commit is contained in:
Pavel Tikhomirov
2019-07-02 12:51:50 +03:00
committed by Andrei Vagin
parent 04f8fac210
commit 72da499a27

View File

@@ -86,11 +86,15 @@ int dedup_one_iovec(struct page_read *pr, unsigned long off, unsigned long len)
ret = pr->seek_pagemap(pr, off);
if (ret == 0) {
pr_warn("Missing %lx in parent pagemap\n", off);
if (off < pr->cvaddr && pr->cvaddr < iov_end)
if (off < pr->cvaddr && pr->cvaddr < iov_end) {
pr_debug("pr%lu-%u:No range %lx-%lx in pagemap\n",
pr->img_id, pr->id, off, pr->cvaddr);
off = pr->cvaddr;
else
} else {
pr_debug("pr%lu-%u:No range %lx-%lx in pagemap\n",
pr->img_id, pr->id, off, iov_end);
return 0;
}
}
if (!pr->pe)
@@ -105,7 +109,8 @@ int dedup_one_iovec(struct page_read *pr, unsigned long off, unsigned long len)
prp = pr->parent;
if (prp) {
/* recursively */
pr_debug("Go to next parent level\n");
pr_debug("pr%lu-%u:Go to next parent level\n",
pr->img_id, pr->id);
len = min(piov_end, iov_end) - off;
ret = dedup_one_iovec(prp, off, len);
if (ret != 0)