2010-02-27 20:40:57

by Rafael J. Wysocki

[permalink] [raw]
Subject: [PATCH] Driver core: Reduce the level of request_firmware() messages

From: Rafael J. Wysocki <[email protected]>

The messages from _request_firmware() informing that firmware is
being requested or built-in firmware is going to be used are printed
at KERN_INFO, which produces lots of noise on systems with huge
numbers of AMD CPUs. Reduce the level of these messages to
KERN_DEBUG to get rid of that noise.

Signed-off-by: Rafael J. Wysocki <[email protected]>
---
drivers/base/firmware_class.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

Index: linux-2.6.32-SLE11-SP1/drivers/base/firmware_class.c
===================================================================
--- linux-2.6.32-SLE11-SP1.orig/drivers/base/firmware_class.c
+++ linux-2.6.32-SLE11-SP1/drivers/base/firmware_class.c
@@ -487,15 +487,14 @@ _request_firmware(const struct firmware
builtin++) {
if (strcmp(name, builtin->name))
continue;
- dev_info(device, "firmware: using built-in firmware %s\n",
- name);
+ dev_dbg(device, "firmware: using built-in firmware %s\n", name);
firmware->size = builtin->size;
firmware->data = builtin->data;
return 0;
}

if (uevent)
- dev_info(device, "firmware: requesting %s\n", name);
+ dev_dbg(device, "firmware: requesting %s\n", name);

retval = fw_setup_device(firmware, &f_dev, name, device, uevent);
if (retval)


2010-02-28 03:20:22

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] Driver core: Reduce the level of request_firmware() messages

On Sat, Feb 27, 2010 at 09:43:22PM +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <[email protected]>
>
> The messages from _request_firmware() informing that firmware is
> being requested or built-in firmware is going to be used are printed
> at KERN_INFO, which produces lots of noise on systems with huge
> numbers of AMD CPUs. Reduce the level of these messages to
> KERN_DEBUG to get rid of that noise.
>
> Signed-off-by: Rafael J. Wysocki <[email protected]>

Looks good, I'll queue it up on Tuesday.

thanks,

greg k-h

2010-02-28 04:43:31

by Jaswinder Singh

[permalink] [raw]
Subject: Re: [PATCH] Driver core: Reduce the level of request_firmware() messages

Hello Rafael,

On Sun, Feb 28, 2010 at 2:13 AM, Rafael J. Wysocki <[email protected]> wrote:
> From: Rafael J. Wysocki <[email protected]>
>
> The messages from _request_firmware() informing that firmware is
> being requested or built-in firmware is going to be used are printed
> at KERN_INFO, which produces lots of noise on systems with huge
> numbers of AMD CPUs. ?Reduce the level of these messages to
> KERN_DEBUG to get rid of that noise.
>

Which firmware we are using is very useful information. Because of
huge numbers of CPUs it seems noise then better provide the
information for first cpu and for the rest of the CPUs you can show by
KERN_DEBUG.

Thanks,
--
Jaswinder Singh.

> Signed-off-by: Rafael J. Wysocki <[email protected]>
> ---
> ?drivers/base/firmware_class.c | ? ?5 ++---
> ?1 file changed, 2 insertions(+), 3 deletions(-)
>
> Index: linux-2.6.32-SLE11-SP1/drivers/base/firmware_class.c
> ===================================================================
> --- linux-2.6.32-SLE11-SP1.orig/drivers/base/firmware_class.c
> +++ linux-2.6.32-SLE11-SP1/drivers/base/firmware_class.c
> @@ -487,15 +487,14 @@ _request_firmware(const struct firmware
> ? ? ? ? ? ? builtin++) {
> ? ? ? ? ? ? ? ?if (strcmp(name, builtin->name))
> ? ? ? ? ? ? ? ? ? ? ? ?continue;
> - ? ? ? ? ? ? ? dev_info(device, "firmware: using built-in firmware %s\n",
> - ? ? ? ? ? ? ? ? ? ? ? ?name);
> + ? ? ? ? ? ? ? dev_dbg(device, "firmware: using built-in firmware %s\n", name);
> ? ? ? ? ? ? ? ?firmware->size = builtin->size;
> ? ? ? ? ? ? ? ?firmware->data = builtin->data;
> ? ? ? ? ? ? ? ?return 0;
> ? ? ? ?}
>
> ? ? ? ?if (uevent)
> - ? ? ? ? ? ? ? dev_info(device, "firmware: requesting %s\n", name);
> + ? ? ? ? ? ? ? dev_dbg(device, "firmware: requesting %s\n", name);
>
> ? ? ? ?retval = fw_setup_device(firmware, &f_dev, name, device, uevent);
> ? ? ? ?if (retval)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at ?http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at ?http://www.tux.org/lkml/
>

2010-02-28 12:11:13

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH] Driver core: Reduce the level of request_firmware() messages

On Sunday 28 February 2010, Jaswinder Singh Rajput wrote:
> Hello Rafael,
>
> On Sun, Feb 28, 2010 at 2:13 AM, Rafael J. Wysocki <[email protected]> wrote:
> > From: Rafael J. Wysocki <[email protected]>
> >
> > The messages from _request_firmware() informing that firmware is
> > being requested or built-in firmware is going to be used are printed
> > at KERN_INFO, which produces lots of noise on systems with huge
> > numbers of AMD CPUs. Reduce the level of these messages to
> > KERN_DEBUG to get rid of that noise.
> >
>
> Which firmware we are using is very useful information. Because of
> huge numbers of CPUs it seems noise then better provide the
> information for first cpu and for the rest of the CPUs you can show by
> KERN_DEBUG.

That would have been better indeed, but the problem is _request_firmware()
doesn't allow us to change the level of its messages on demand.

Rafael

2010-02-28 16:35:19

by Jaswinder Singh Rajput

[permalink] [raw]
Subject: Re: [PATCH] Driver core: Reduce the level of request_firmware() messages

Hello Rafael,

On Sun, 2010-02-28 at 13:13 +0100, Rafael J. Wysocki wrote:
> On Sunday 28 February 2010, Jaswinder Singh Rajput wrote:
> > On Sun, Feb 28, 2010 at 2:13 AM, Rafael J. Wysocki <[email protected]> wrote:
> > > From: Rafael J. Wysocki <[email protected]>
> > >
> > > The messages from _request_firmware() informing that firmware is
> > > being requested or built-in firmware is going to be used are printed
> > > at KERN_INFO, which produces lots of noise on systems with huge
> > > numbers of AMD CPUs. Reduce the level of these messages to
> > > KERN_DEBUG to get rid of that noise.
> > >
> >
> > Which firmware we are using is very useful information. Because of
> > huge numbers of CPUs it seems noise then better provide the
> > information for first cpu and for the rest of the CPUs you can show by
> > KERN_DEBUG.
>
> That would have been better indeed, but the problem is _request_firmware()
> doesn't allow us to change the level of its messages on demand.

Can we try this :

if (smp_processor_id())
dev_dbg(..);
else
dev_info(..);

Thanks,
--
Jaswinder Singh.

2010-02-28 19:52:10

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH] Driver core: Reduce the level of request_firmware() messages

On Sunday 28 February 2010, Jaswinder Singh Rajput wrote:
> Hello Rafael,
>
> On Sun, 2010-02-28 at 13:13 +0100, Rafael J. Wysocki wrote:
> > On Sunday 28 February 2010, Jaswinder Singh Rajput wrote:
> > > On Sun, Feb 28, 2010 at 2:13 AM, Rafael J. Wysocki <[email protected]> wrote:
> > > > From: Rafael J. Wysocki <[email protected]>
> > > >
> > > > The messages from _request_firmware() informing that firmware is
> > > > being requested or built-in firmware is going to be used are printed
> > > > at KERN_INFO, which produces lots of noise on systems with huge
> > > > numbers of AMD CPUs. Reduce the level of these messages to
> > > > KERN_DEBUG to get rid of that noise.
> > > >
> > >
> > > Which firmware we are using is very useful information. Because of
> > > huge numbers of CPUs it seems noise then better provide the
> > > information for first cpu and for the rest of the CPUs you can show by
> > > KERN_DEBUG.
> >
> > That would have been better indeed, but the problem is _request_firmware()
> > doesn't allow us to change the level of its messages on demand.
>
> Can we try this :
>
> if (smp_processor_id())
> dev_dbg(..);
> else
> dev_info(..);

Well, it doesn't look particularly nice, does it?

Besides, say we're requesting firmware for a non-CPU device which happens
to run on CPU1. Then, dev_dbg() will be used, which most likely is not what we
want.

Rafael

2010-02-28 20:13:57

by Jaswinder Singh

[permalink] [raw]
Subject: Re: [PATCH] Driver core: Reduce the level of request_firmware() messages

Hello Rafael,

On Mon, Mar 1, 2010 at 1:24 AM, Rafael J. Wysocki <[email protected]> wrote:
> On Sunday 28 February 2010, Jaswinder Singh Rajput wrote:
>>
>> On Sun, 2010-02-28 at 13:13 +0100, Rafael J. Wysocki wrote:
>> > On Sunday 28 February 2010, Jaswinder Singh Rajput wrote:
>> > > On Sun, Feb 28, 2010 at 2:13 AM, Rafael J. Wysocki <[email protected]> wrote:
>> > > > From: Rafael J. Wysocki <[email protected]>
>> > > >
>> > > > The messages from _request_firmware() informing that firmware is
>> > > > being requested or built-in firmware is going to be used are printed
>> > > > at KERN_INFO, which produces lots of noise on systems with huge
>> > > > numbers of AMD CPUs. ?Reduce the level of these messages to
>> > > > KERN_DEBUG to get rid of that noise.
>> > > >
>> > >
>> > > Which firmware we are using is very useful information. Because of
>> > > huge numbers of CPUs it seems noise then better provide the
>> > > information for first cpu and for the rest of the CPUs you can show by
>> > > KERN_DEBUG.
>> >
>> > That would have been better indeed, but the problem is _request_firmware()
>> > doesn't allow us to change the level of its messages on demand.
>>
>> Can we try this :
>>
>> ? ? ? if (smp_processor_id())
>> ? ? ? ? ? ? ? dev_dbg(..);
>> ? ? ? else
>> ? ? ? ? ? ? ? dev_info(..);
>
> Well, it doesn't look particularly nice, does it?
>
> Besides, say we're requesting firmware for a non-CPU device which happens
> to run on CPU1. ?Then, dev_dbg() will be used, which most likely is not what we
> want.
>

Yes, you are right. But atleast can you try it once and show the
output with and without this.

Thanks,
--
Jaswinder.