Skip to contentSkip to conversation

platform/x86: intel-vbtn: reduce unnecessary messages for normal users

PATCH In review Alex Hung 4 participants 10 messages Jul 21, 2017 – Aug 18, 2017 x86 platform drivers

lore
Share & tools
lore

Alex Hung

author
#0 lore raw

PATCH 1/1 platform/x86: intel-vbtn: reduce unnecessary messages for normal users

Unsupported events is only useful for developers and does not meaningful for users. Using dev_dbg makes more sense and reduces noise in kernel messages.

---
 drivers/platform/x86/intel-vbtn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel-vbtn.c +1 -1
index 61f1063..10f92ac 100644
@@ -83,7 +83,7 @@ static void notify_handler(acpi_handle handle, u32 event, void *context)
 	} else if (sparse_keymap_report_event(priv->input_dev, event, 1, true)) {
 		return;
 	}
-	dev_info(&device->dev, "unknown event index 0x%x\n", event);
+	dev_dbg(&device->dev, "unknown event index 0x%x\n", event);
 }
 
 static int intel_vbtn_probe(struct platform_device *device)
Signature · 1 line
2.7.4
#1 lore raw
Quoted 14 lines · Alex Hung

Unsupported events is only useful for developers and does not meaningful for users. Using dev_dbg makes more sense and reduces noise in kernel messages.

---
 drivers/platform/x86/intel-vbtn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel-vbtn.c +0 -0
index 61f1063..10f92ac 100644

drivers/platform/x86/intel-vbtn.c static void notify_handler(acpi_handle handle, u32 event, void *context) · line 86

Quoted 5 lines
drivers/platform/x86/intel-vbtn.c +1 -1
@@ -83,7 +83,7 @@ static void notify_handler(acpi_handle handle, u32 event, void *context)
 	} else if (sparse_keymap_report_event(priv->input_dev, event, 1, true)) {
 		return;
 	}
-	dev_info(&device->dev, "unknown event index 0x%x\n", event);
+	dev_dbg(&device->dev, "unknown event index 0x%x\n", event);

info is the most common log level for these events in the platform driver x86 subsystem per 'git grep -i "unknown event"'.

My take on this is that we want these to be reported by users, rather than rely on developers to find them all - especially as the developers only see a fraction of the affected hardware.

Are you finding these to be causing a problem / or producing really excessive log messages?

Andy, what are your thoughts?

Quoted 7 lines
drivers/platform/x86/intel-vbtn.c +0 -0
 }
 
 static int intel_vbtn_probe(struct platform_device *device)
Signature · 1 line
2.7.4
Signature · 2 lines
Darren Hart
VMware Open Source Technology Center
#2 lore raw
Quoted 24 lines · Darren Hart
Quoted 14 lines · Alex Hung

Unsupported events is only useful for developers and does not meaningful for users. Using dev_dbg makes more sense and reduces noise in kernel messages.

---
 drivers/platform/x86/intel-vbtn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel-vbtn.c +0 -0
index 61f1063..10f92ac 100644

drivers/platform/x86/intel-vbtn.c static void notify_handler(acpi_handle handle, u32 event, void *context) · line 86

Quoted 5 lines
drivers/platform/x86/intel-vbtn.c +1 -1
@@ -83,7 +83,7 @@ static void notify_handler(acpi_handle handle, u32 event, void *context)
 	} else if (sparse_keymap_report_event(priv->input_dev, event, 1, true)) {
 		return;
 	}
-	dev_info(&device->dev, "unknown event index 0x%x\n", event);
+	dev_dbg(&device->dev, "unknown event index 0x%x\n", event);

info is the most common log level for these events in the platform driver x86 subsystem per 'git grep -i "unknown event"'.

Quoted 1 line

My take on this is that we want these to be reported by users,

Well, for what purpose?

Quoted 5 lines

rather than rely on developers to find them all - especially as the developers only see a fraction of the affected hardware.

Are you finding these to be causing a problem / or producing really excessive log messages?

These messages suggest that there's something wrong while it may just be events that we really don't care about.

I'd rather want users to report missing functionality or things not working as expected than silly messages in the log that may just be meaningless in practice.

Thanks,
Rafael

#3 lore raw
In reply to Darren Hart
Quoted 11 lines · Darren Hart

drivers/platform/x86/intel-vbtn.c static void notify_handler(acpi_handle handle, u32 event, void *context) · line 86

Quoted 6 lines · Alex Hung

Unsupported events is only useful for developers and does not meaningful for users. Using dev_dbg makes more sense and reduces noise in kernel messages.

drivers/platform/x86/intel-vbtn.c +1 -1
-     dev_info(&device->dev, "unknown event index 0x%x\n", event);
+     dev_dbg(&device->dev, "unknown event index 0x%x\n", event);

info is the most common log level for these events in the platform driver x86 subsystem per 'git grep -i "unknown event"'.

Quoted 8 lines

My take on this is that we want these to be reported by users, rather than rely on developers to find them all - especially as the developers only see a fraction of the affected hardware.

Are you finding these to be causing a problem / or producing really excessive log messages?

Andy, what are your thoughts?

My opinion is slightly closer to Rafael's one.

I think this is a debugging context.

If we really care about reporting them we might go HID way, i.e. using dev_printk(KERN_DEBUG ) with module parameter debug.

As developer I'm against that.
As a regular user I do not need to recompile a kernel, in case there is no dynamic debug support, and it allows me to enable debug messages.

P.S. To see how important message above is, do we have any statistics how many bug reports / email we got wrt the issue and how many had been addressed?

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#4 lore raw
Quoted 28 lines · Andy Shevchenko
Quoted 11 lines · Darren Hart

drivers/platform/x86/intel-vbtn.c static void notify_handler(acpi_handle handle, u32 event, void *context) · line 86

Quoted 6 lines · Alex Hung

Unsupported events is only useful for developers and does not meaningful for users. Using dev_dbg makes more sense and reduces noise in kernel messages.

drivers/platform/x86/intel-vbtn.c +1 -1
-     dev_info(&device->dev, "unknown event index 0x%x\n", event);
+     dev_dbg(&device->dev, "unknown event index 0x%x\n", event);

info is the most common log level for these events in the platform driver x86 subsystem per 'git grep -i "unknown event"'.

Quoted 8 lines

My take on this is that we want these to be reported by users, rather than rely on developers to find them all - especially as the developers only see a fraction of the affected hardware.

Are you finding these to be causing a problem / or producing really excessive log messages?

Andy, what are your thoughts?

My opinion is slightly closer to Rafael's one.

I think this is a debugging context.

If we really care about reporting them we might go HID way, i.e. using dev_printk(KERN_DEBUG ) with module parameter debug.

Quoted 8 lines

As developer I'm against that.
As a regular user I do not need to recompile a kernel, in case there is no dynamic debug support, and it allows me to enable debug messages.

P.S. To see how important message above is, do we have any statistics how many bug reports / email we got wrt the issue and how many had been addressed?

Well, there is one I'm aware of, but this particular one we aren't going to address at all, because apparently we handle the event in question anyway in a different way.

In any case, the only situation in which this information is useful at all is when some functionality is missing and you want to find out why.

Otherwise you get messages telling you that something *may* *be* missing, but as a user you have no idea what to do about that, because you don't even know how to report it and to whom (in case you want to report it).

Thanks,
Rafael

#5 lore raw
Quoted 42 lines · Rafael Wysocki
Quoted 28 lines · Andy Shevchenko
Quoted 11 lines · Darren Hart

drivers/platform/x86/intel-vbtn.c static void notify_handler(acpi_handle handle, u32 event, void *context) · line 86

Quoted 6 lines · Alex Hung

Unsupported events is only useful for developers and does not meaningful for users. Using dev_dbg makes more sense and reduces noise in kernel messages.

drivers/platform/x86/intel-vbtn.c +1 -1
-     dev_info(&device->dev, "unknown event index 0x%x\n", event);
+     dev_dbg(&device->dev, "unknown event index 0x%x\n", event);

info is the most common log level for these events in the platform driver x86 subsystem per 'git grep -i "unknown event"'.

Quoted 8 lines

My take on this is that we want these to be reported by users, rather than rely on developers to find them all - especially as the developers only see a fraction of the affected hardware.

Are you finding these to be causing a problem / or producing really excessive log messages?

Andy, what are your thoughts?

My opinion is slightly closer to Rafael's one.

I think this is a debugging context.

If we really care about reporting them we might go HID way, i.e. using dev_printk(KERN_DEBUG ) with module parameter debug.

Quoted 8 lines

As developer I'm against that.
As a regular user I do not need to recompile a kernel, in case there is no dynamic debug support, and it allows me to enable debug messages.

P.S. To see how important message above is, do we have any statistics how many bug reports / email we got wrt the issue and how many had been addressed?

Well, there is one I'm aware of, but this particular one we aren't going to address at all, because apparently we handle the event in question anyway in a different way.

Quoted 6 lines

In any case, the only situation in which this information is useful at all is when some functionality is missing and you want to find out why.

Otherwise you get messages telling you that something *may* *be* missing, but as a user you have no idea what to do about that, because you don't even know how to report it and to whom (in case you want to report it).

My thinking was along the lines of the keymaps where we explicitly add KE_IGNORE when it is a key we don't care about. In that case, it is useful to have the messages because if that occurs we want to know so we can update the driver.

This driver also has KE_IGNORE entries in the intel_vbtn_keymap.

Are we talking about unknown keys - or are we talking about something else?

If unknown keys, the additional messages will be minimal, and missing keys are most likely to be reported if the message is obvious. Given the sparse access to hardware by the developers, I prefer to have the message.

If there is more to what is going on here - can someone provide an example of where this is causing a problem? Or where the event causing the message is not something we will add code to catch / ignore?

Signature · 2 lines
Darren Hart
VMware Open Source Technology Center
#6 lore raw

+Steven Rostedt

Steve is looking into current issues with printk and expressed an interest in this example.

Quoted 72 lines · Darren Hart
Quoted 42 lines · Rafael Wysocki
Quoted 28 lines · Andy Shevchenko
Quoted 11 lines · Darren Hart

drivers/platform/x86/intel-vbtn.c static void notify_handler(acpi_handle handle, u32 event, void *context) · line 86

Quoted 6 lines · Alex Hung

Unsupported events is only useful for developers and does not meaningful for users. Using dev_dbg makes more sense and reduces noise in kernel messages.

drivers/platform/x86/intel-vbtn.c +1 -1
-     dev_info(&device->dev, "unknown event index 0x%x\n", event);
+     dev_dbg(&device->dev, "unknown event index 0x%x\n", event);

info is the most common log level for these events in the platform driver x86 subsystem per 'git grep -i "unknown event"'.

Quoted 8 lines

My take on this is that we want these to be reported by users, rather than rely on developers to find them all - especially as the developers only see a fraction of the affected hardware.

Are you finding these to be causing a problem / or producing really excessive log messages?

Andy, what are your thoughts?

My opinion is slightly closer to Rafael's one.

I think this is a debugging context.

If we really care about reporting them we might go HID way, i.e. using dev_printk(KERN_DEBUG ) with module parameter debug.

Quoted 8 lines

As developer I'm against that.
As a regular user I do not need to recompile a kernel, in case there is no dynamic debug support, and it allows me to enable debug messages.

P.S. To see how important message above is, do we have any statistics how many bug reports / email we got wrt the issue and how many had been addressed?

Well, there is one I'm aware of, but this particular one we aren't going to address at all, because apparently we handle the event in question anyway in a different way.

Quoted 6 lines

In any case, the only situation in which this information is useful at all is when some functionality is missing and you want to find out why.

Otherwise you get messages telling you that something *may* *be* missing, but as a user you have no idea what to do about that, because you don't even know how to report it and to whom (in case you want to report it).

My thinking was along the lines of the keymaps where we explicitly add KE_IGNORE when it is a key we don't care about. In that case, it is useful to have the messages because if that occurs we want to know so we can update the driver.

This driver also has KE_IGNORE entries in the intel_vbtn_keymap.

Are we talking about unknown keys - or are we talking about something else?

If unknown keys, the additional messages will be minimal, and missing keys are most likely to be reported if the message is obvious. Given the sparse access to hardware by the developers, I prefer to have the message.

If there is more to what is going on here - can someone provide an example of where this is causing a problem? Or where the event causing the message is not something we will add code to catch / ignore?

Signature · 2 lines
Darren Hart
VMware Open Source Technology Center
Signature · 2 lines
Darren Hart
VMware Open Source Technology Center
#7 lore raw
In reply to Darren Hart
Quoted 46 lines · Darren Hart
Quoted 45 lines · Rafael Wysocki
Quoted 28 lines · Andy Shevchenko
Quoted 11 lines · Darren Hart

drivers/platform/x86/intel-vbtn.c static void notify_handler(acpi_handle handle, u32 event, void *context) · line 86

Quoted 6 lines · Alex Hung

Unsupported events is only useful for developers and does not meaningful for users. Using dev_dbg makes more sense and reduces noise in kernel messages.

drivers/platform/x86/intel-vbtn.c +1 -1
-     dev_info(&device->dev, "unknown event index 0x%x\n", event);
+     dev_dbg(&device->dev, "unknown event index 0x%x\n", event);

info is the most common log level for these events in the platform driver x86 subsystem per 'git grep -i "unknown event"'.

Quoted 8 lines

My take on this is that we want these to be reported by users, rather than rely on developers to find them all - especially as the developers only see a fraction of the affected hardware.

Are you finding these to be causing a problem / or producing really excessive log messages?

Andy, what are your thoughts?

My opinion is slightly closer to Rafael's one.

I think this is a debugging context.

If we really care about reporting them we might go HID way, i.e. using dev_printk(KERN_DEBUG ) with module parameter debug.

Quoted 8 lines

As developer I'm against that.
As a regular user I do not need to recompile a kernel, in case there is no dynamic debug support, and it allows me to enable debug messages.

P.S. To see how important message above is, do we have any statistics how many bug reports / email we got wrt the issue and how many had been addressed?

Well, there is one I'm aware of, but this particular one we aren't going to address at all, because apparently we handle the event in question anyway in a different way.

In any case, the only situation in which this information is useful at all is when some functionality is missing and you want to find out why.

Quoted 8 lines
Quoted 3 lines

Otherwise you get messages telling you that something *may* *be* missing, but as a user you have no idea what to do about that, because you don't even know how to report it and to whom (in case you want to report it).

My thinking was along the lines of the keymaps where we explicitly add KE_IGNORE when it is a key we don't care about. In that case, it is useful to have the messages because if that occurs we want to know so we can update the driver.

Well, I'm not sure if adding every reported event to keymaps as KE_IGNORE is a good idea, because that would require somebody to figure out what the event is about every time and that's work which quite frankly is not very useful (the key is still ignored if it is "unknown").

This kind of is blacklisting which is always painful from the maintenance standpoint.

Quoted 4 lines

This driver also has KE_IGNORE entries in the intel_vbtn_keymap.

Are we talking about unknown keys - or are we talking about something else?

Unknown keys.

Quoted 4 lines

If unknown keys, the additional messages will be minimal, and missing keys are most likely to be reported if the message is obvious. Given the sparse access to hardware by the developers, I prefer to have the message.

Having it does not guarantee that it will be reported and even so, it is not particularly clear where to send those reports and who is going to act on them.

Quoted 3 lines

If there is more to what is going on here - can someone provide an example of where this is causing a problem? Or where the event causing the message is not something we will add code to catch / ignore?

The particular one that tirggered this is related to the switching between the "laptop" and "tablet" modes on Dell 9365 which according to Mario is handled already through the ISH driver.

We could potentially propagate this event to user space, but we have no idea how user space decides to handle it and we are not sure if this is going to be used consistently for this purpose on all platforms.

Anyway, my opinion is that dev_dbg() messages are sufficient for such things as they allow people to selectively turn the messages on and see what happens if something seems to be missing, but otherwise they don't generate log noise.

#8 lore raw
Quoted 56 lines · Rafael Wysocki
Quoted 46 lines · Darren Hart
Quoted 45 lines · Rafael Wysocki
Quoted 28 lines · Andy Shevchenko
Quoted 11 lines · Darren Hart

drivers/platform/x86/intel-vbtn.c static void notify_handler(acpi_handle handle, u32 event, void *context) · line 86

Quoted 6 lines · Alex Hung

Unsupported events is only useful for developers and does not meaningful for users. Using dev_dbg makes more sense and reduces noise in kernel messages.

drivers/platform/x86/intel-vbtn.c +1 -1
-     dev_info(&device->dev, "unknown event index 0x%x\n", event);
+     dev_dbg(&device->dev, "unknown event index 0x%x\n", event);

info is the most common log level for these events in the platform driver x86 subsystem per 'git grep -i "unknown event"'.

Quoted 8 lines

My take on this is that we want these to be reported by users, rather than rely on developers to find them all - especially as the developers only see a fraction of the affected hardware.

Are you finding these to be causing a problem / or producing really excessive log messages?

Andy, what are your thoughts?

My opinion is slightly closer to Rafael's one.

I think this is a debugging context.

If we really care about reporting them we might go HID way, i.e. using dev_printk(KERN_DEBUG ) with module parameter debug.

Quoted 8 lines

As developer I'm against that.
As a regular user I do not need to recompile a kernel, in case there is no dynamic debug support, and it allows me to enable debug messages.

P.S. To see how important message above is, do we have any statistics how many bug reports / email we got wrt the issue and how many had been addressed?

Well, there is one I'm aware of, but this particular one we aren't going to address at all, because apparently we handle the event in question anyway in a different way.

In any case, the only situation in which this information is useful at all is when some functionality is missing and you want to find out why.

Quoted 8 lines
Quoted 3 lines

Otherwise you get messages telling you that something *may* *be* missing, but as a user you have no idea what to do about that, because you don't even know how to report it and to whom (in case you want to report it).

My thinking was along the lines of the keymaps where we explicitly add KE_IGNORE when it is a key we don't care about. In that case, it is useful to have the messages because if that occurs we want to know so we can update the driver.

Quoted 7 lines

Well, I'm not sure if adding every reported event to keymaps as KE_IGNORE is a good idea, because that would require somebody to figure out what the event is about every time and that's work which quite frankly is not very useful (the key is still ignored if it is "unknown").

This kind of is blacklisting which is always painful from the maintenance standpoint.

OK, yes, I've made similar arguments in other areas.

Quoted 8 lines
Quoted 5 lines

This driver also has KE_IGNORE entries in the intel_vbtn_keymap.

Are we talking about unknown keys - or are we talking about something else?

Unknown keys.

Quoted 8 lines
Quoted 4 lines

If unknown keys, the additional messages will be minimal, and missing keys are most likely to be reported if the message is obvious. Given the sparse access to hardware by the developers, I prefer to have the message.

Having it does not guarantee that it will be reported and even so, it is not particularly clear where to send those reports and who is going to act on them.

We get quite a few to bugzilla.kernel.org for this subsystem, certainly more than we can handle. But, your point is taken.

Quoted 5 lines
Quoted 4 lines

If there is more to what is going on here - can someone provide an example of where this is causing a problem? Or where the event causing the message is not something we will add code to catch / ignore?

Quoted 7 lines

The particular one that tirggered this is related to the switching between the "laptop" and "tablet" modes on Dell 9365 which according to Mario is handled already through the ISH driver.

We could potentially propagate this event to user space, but we have no idea how user space decides to handle it and we are not sure if this is going to be used consistently for this purpose on all platforms.

Yeah, this is an ongoing issue, and I don't see vendors converging on how they handle this.

Quoted 3 lines

Anyway, my opinion is that dev_dbg() messages are sufficient for such things as they allow people to selectively turn the messages on and see what happens if something seems to be missing, but otherwise they don't generate log noise.

I'm convinced. Thanks.

Signature · 2 lines
Darren Hart
VMware Open Source Technology Center
#9 lore raw
In reply to Alex Hung
Quoted 5 lines · Alex Hung

Unsupported events is only useful for developers and does not meaningful for users. Using dev_dbg makes more sense and reduces noise in kernel messages.

Apologies for the delay Alex, both now queued to testing.

Signature · 2 lines
Darren Hart
VMware Open Source Technology Center