Skip to content

Commit 1d72867

Browse files
anssihliuw
authored andcommitted
hv_balloon: rate-limit "Unhandled message" warning
For a couple of times I have encountered a situation where hv_balloon: Unhandled message: type: 12447 is being flooded over 1 million times per second with various values, filling the log and consuming cycles, making debugging difficult. Add rate limiting to the message. Most other Hyper-V drivers already have similar rate limiting in their message callbacks. The cause of the floods in my case was probably fixed by 96d9d1f ("Drivers: hv: balloon: account for vmbus packet header in max_pkt_size"). Fixes: 9aa8b50 ("Drivers: hv: Add Hyper-V balloon driver") Signed-off-by: Anssi Hannula <anssi.hannula@bitwise.fi> Reviewed-by: Michael Kelley <mikelley@microsoft.com> Link: https://lore.kernel.org/r/20220222141400.98160-1-anssi.hannula@bitwise.fi Signed-off-by: Wei Liu <wei.liu@kernel.org>
1 parent d57d6fe commit 1d72867

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hv/hv_balloon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1563,7 +1563,7 @@ static void balloon_onchannelcallback(void *context)
15631563
break;
15641564

15651565
default:
1566-
pr_warn("Unhandled message: type: %d\n", dm_hdr->type);
1566+
pr_warn_ratelimited("Unhandled message: type: %d\n", dm_hdr->type);
15671567

15681568
}
15691569
}

0 commit comments

Comments
 (0)