iommu: Use dev_dbg for group handling code
PATCH 1/1 iommu: Use dev_dbg for group handling code
When devices are frequently registered/unregistered, there will be a large number of iommu group adding/remove messages, which will flood the dmesg buffer and flush out other logs. For iommu group handling messages, we can use dev_dbg to output logs only when needed.
--- drivers/iommu/iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iommu/iommu.c +2 -2
@@ -1283,7 +1283,7 @@ static struct group_device *iommu_group_alloc_device(struct iommu_group *group,trace_add_device_to_group (group->id, dev); -dev_info (dev,"Adding to iommu group %d\n" , group->id); +dev_dbg (dev,"Adding to iommu group %d\n" , group->id);return device;
@@ -1337,7 +1337,7 @@ void iommu_group_remove_device(struct device *dev)if (!group)return ; -dev_info (dev,"Removing from iommu group %d\n" , group->id); +dev_dbg (dev,"Removing from iommu group %d\n" , group->id);__iommu_group_remove_device (dev); }
Signature · 1 line
2.43.0
Quoted 24 lines · Lin Ruifeng
When devices are frequently registered/unregistered, there will be a large number of iommu group adding/remove messages, which will flood the dmesg buffer and flush out other logs. For iommu group handling messages, we can use
dev_dbgto output logs only when needed.Signed-off-by Lin Ruifeng <[email protected]>--- drivers/iommu/iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/iommu/iommu.c +1
-1@@ -1283,7 +1283,7 @@ static struct group_device *iommu_group_alloc_device(struct iommu_group *group,trace_add_device_to_group (group->id, dev); -dev_info (dev,"Adding to iommu group %d\n" , group->id); +dev_dbg (dev,"Adding to iommu group %d\n" , group->id);return device;
drivers/iommu/iommu.c void iommu_group_remove_device(struct device *dev) · line 1343
Quoted 8 lines
drivers/iommu/iommu.c +1
-1@@ -1337,7 +1337,7 @@ void iommu_group_remove_device(struct device *dev)if (!group)return ; -dev_info (dev,"Removing from iommu group %d\n" , group->id); +dev_dbg (dev,"Removing from iommu group %d\n" , group->id);__iommu_group_remove_device (dev); }
I believe this was discussed roughly an year ago as well:
https://lore.kernel.org/linux-iommu/[email protected]/
And 5 years ago as well:
https://lore.kernel.org/linux-iommu/[email protected]/
The general consensus is that the maintainers and the community would like to keep this log in place as it helps us debug issues just based on dmesg logs shared over an email.
I understand that losing dmesg logs in such situations could be frustrating but I guess you could try increasing the log buffer size..
Thanks,
Praan