Skip to contentSkip to conversation

iommu: Lower severity of add/remove device messages

PATCH In review Ezequiel Garcia 3 participants 5 messages Mar 23, 2020 – Mar 27, 2020 IOMMU

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iommu: Lower severity of add/remove device messages

These user messages are not really informational,
but mostly of debug nature. Lower their severity.

---
 drivers/iommu/iommu.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/iommu/iommu.c +4 -4
index 3e3528436e0b..1ebd17033714 100644
@@ -758,7 +758,7 @@ int iommu_group_add_device(struct iommu_group *group, struct device *dev)
 
 	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 0;
 
@@ -792,7 +792,7 @@ void iommu_group_remove_device(struct device *dev)
 	struct iommu_group *group = dev->iommu_group;
 	struct group_device *tmp_device, *device = NULL;
 
-	dev_info(dev, "Removing from iommu group %d\n", group->id);
+	dev_dbg(dev, "Removing from iommu group %d\n", group->id);
 
 	/* Pre-notify listeners that a device is being removed. */
 	blocking_notifier_call_chain(&group->notifier,
@@ -2337,8 +2337,8 @@ request_default_domain_for_dev(struct device *dev, unsigned long type)
 
 	iommu_group_create_direct_mappings(group, dev);
 
-	dev_info(dev, "Using iommu %s mapping\n",
-		 type == IOMMU_DOMAIN_DMA ? "dma" : "direct");
+	dev_dbg(dev, "Using iommu %s mapping\n",
+		type == IOMMU_DOMAIN_DMA ? "dma" : "direct");
 
 	ret = 0;
 out:
Signature · 1 line
2.26.0.rc2
maintainer
#1 lore raw
Quoted 2 lines · Ezequiel Garcia

These user messages are not really informational,
but mostly of debug nature. Lower their severity.

Like most other messages in the kernel log, that is not a reason to lower the severity. These messages are the first thing to look at when looking into IOMMU related issues.

Regards,

Joerg

#2 lore raw

Hello Joerg,

Thanks for reviewing.

I understand this change bears some controversy for IOMMU, as developers are probably used to see these messages.

Quoted 10 lines · Joerg Roedel
Quoted 2 lines · Ezequiel Garcia

These user messages are not really informational,
but mostly of debug nature. Lower their severity.

Like most other messages in the kernel log, that is not a reason to lower the severity.

These messages are the first thing to look at when looking into IOMMU related issues.

Sure, but the messages are still here, you can always enable them when you are looking at IOMMU issues :-)

The idea is to reduce the amount of verbosity in the kernel.

If all subsystems would print messages that are useful when looking at issues, things would be quite nasty verbose.

Thanks!
Ezequiel

reviewer
#3 lore raw
Quoted 16 lines · Ezequiel Garcia

Hello Joerg,

Thanks for reviewing.

I understand this change bears some controversy for IOMMU, as developers are probably used to see these messages.

Quoted 7 lines · Joerg Roedel
Quoted 2 lines · Ezequiel Garcia

These user messages are not really informational,
but mostly of debug nature. Lower their severity.

Like most other messages in the kernel log, that is not a reason to lower the severity.

Quoted 6 lines
Quoted 3 lines

These messages are the first thing to look at when looking into IOMMU related issues.

Sure, but the messages are still here, you can always enable them when you are looking at IOMMU issues :-)

That still begs the question of who "you" is and how they know they're debugging an IOMMU issue in the first place. When all the developer has to go on is a third-hand bugzilla attachment from a distro user's vague report of graphics corruption/poor I/O performance/boot failure/whatever, being able to tell straight away from a standard dmesg dump whether an IOMMU is even in the picture or not saves a lot of protracted back-and-forth for everyone involved.

Quoted 1 line

The idea is to reduce the amount of verbosity in the kernel.

Under what justification? Users with slow consoles or who just want a quiet boot are already free to turn down the loglevel; a handful of messages at boot-time and device hotplug seem hardly at risk of drowning out all the systemd audit spam anyway. Note that the IOMMU subsystem is by nature a little atypical as a lot of what it does is only visible as secondary effects on other drivers and subsystems, without their explicit involvement or knowledge. In that respect, hiding its activity can arguably lead to more non-obvious situations than many other subsystems.

Quoted 2 lines

If all subsystems would print messages that are useful when looking at issues, things would be quite nasty verbose.

From a personal standpoint, can we at least eradicate all the "Hi! I'm a driver/subsystem you don't even have the hardware for!" messages first, then maybe come back and reconsider the ones that convey actual information later?

Robin.

#4 lore raw
Quoted 42 lines · Robin Murphy
Quoted 16 lines · Ezequiel Garcia

Hello Joerg,

Thanks for reviewing.

I understand this change bears some controversy for IOMMU, as developers are probably used to see these messages.

Quoted 7 lines · Joerg Roedel
Quoted 2 lines · Ezequiel Garcia

These user messages are not really informational,
but mostly of debug nature. Lower their severity.

Like most other messages in the kernel log, that is not a reason to lower the severity.

Quoted 6 lines
Quoted 3 lines

These messages are the first thing to look at when looking into IOMMU related issues.

Sure, but the messages are still here, you can always enable them when you are looking at IOMMU issues :-)

That still begs the question of who "you" is and how they know they're debugging an IOMMU issue in the first place. When all the developer has to go on is a third-hand bugzilla attachment from a distro user's vague report of graphics corruption/poor I/O performance/boot failure/whatever, being able to tell straight away from a standard dmesg dump whether an IOMMU is even in the picture or not saves a lot of protracted back-and-forth for everyone involved.

Quoted 1 line

The idea is to reduce the amount of verbosity in the kernel.

Under what justification? Users with slow consoles or who just want a quiet boot are already free to turn down the loglevel; a handful of messages at boot-time and device hotplug seem hardly at risk of drowning out all the systemd audit spam anyway. Note that the IOMMU subsystem is by nature a little atypical as a lot of what it does is only visible as secondary effects on other drivers and subsystems, without their explicit involvement or knowledge. In that respect, hiding its activity can arguably lead to more non-obvious situations than many other subsystems.

Quoted 8 lines
Quoted 2 lines

If all subsystems would print messages that are useful when looking at issues, things would be quite nasty verbose.

From a personal standpoint, can we at least eradicate all the "Hi! I'm
a driver/subsystem you don't even have the hardware for!" messages first, then maybe come back and reconsider the ones that convey actual information later?

Do we really still have those???

Thanks,
Ezequiel