[10/16] mem/pmc: Use pr_warn_once if cache is disabled

Submitted by Cyrill Gorcunov on July 5, 2019, 3:38 p.m.

Details

Message ID 20190705153811.22652-11-gorcunov@gmail.com
State Accepted
Series "mem: Cleanup and fixups"
Commit 9723c18bcd84cbafe896b7c52219b59994b672ab
Headers show

Commit Message

Cyrill Gorcunov July 5, 2019, 3:38 p.m.
No need to spam on every pmc_init call.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 criu/pagemap-cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/criu/pagemap-cache.c b/criu/pagemap-cache.c
index a1c2d42f4dfd..c8077612330a 100644
--- a/criu/pagemap-cache.c
+++ b/criu/pagemap-cache.c
@@ -56,7 +56,7 @@  int pmc_init(pmc_t *pmc, pid_t pid, const struct list_head *vma_head, size_t siz
 		goto err;
 
 	if (pagemap_cache_disabled)
-		pr_debug("The pagemap cache is disabled\n");
+		pr_warn_once("The pagemap cache is disabled\n");
 
 	if (kdat.pmap == PM_DISABLED) {
 		/*

Comments

Mike Rapoport July 8, 2019, 5:04 p.m.
On Fri, Jul 05, 2019 at 06:38:05PM +0300, Cyrill Gorcunov wrote:
> No need to spam on every pmc_init call.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>

Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>

> ---
>  criu/pagemap-cache.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/criu/pagemap-cache.c b/criu/pagemap-cache.c
> index a1c2d42f4dfd..c8077612330a 100644
> --- a/criu/pagemap-cache.c
> +++ b/criu/pagemap-cache.c
> @@ -56,7 +56,7 @@ int pmc_init(pmc_t *pmc, pid_t pid, const struct list_head *vma_head, size_t siz
>  		goto err;
>  
>  	if (pagemap_cache_disabled)
> -		pr_debug("The pagemap cache is disabled\n");
> +		pr_warn_once("The pagemap cache is disabled\n");
>  
>  	if (kdat.pmap == PM_DISABLED) {
>  		/*
> -- 
> 2.20.1
> 
> _______________________________________________
> CRIU mailing list
> CRIU@openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
>