bus/pci: set boot-up log prints to absolute minimum
diff mbox series

Message ID 20200121080021.2835490-1-jerinj@marvell.com
State Superseded, archived
Delegated to: Thomas Monjalon
Headers show
Series
  • bus/pci: set boot-up log prints to absolute minimum
Related show

Checks

Context Check Description
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-nxp-Performance success Performance Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-testing success Testing PASS
ci/iol-intel-Performance fail Performance Testing issues
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Jerin Jacob Kollanukkaran Jan. 21, 2020, 8 a.m. UTC
From: Jerin Jacob <jerinj@marvell.com>

Some machines may have a lot of PCI devices, logs from PCI probe
creates a lot of clutter on boot-up, typically one needs
to scroll the screen to find other issues in boot-up.

This patch changes the loglevel of PCI probes to `debug`
to reduce the clutter on default boot-up logs

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/bus/pci/pci_common.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Thomas Monjalon Feb. 6, 2020, 2:14 p.m. UTC | #1
21/01/2020 09:00, jerinj@marvell.com:
> From: Jerin Jacob <jerinj@marvell.com>
> 
> Some machines may have a lot of PCI devices, logs from PCI probe
> creates a lot of clutter on boot-up, typically one needs
> to scroll the screen to find other issues in boot-up.
> 
> This patch changes the loglevel of PCI probes to `debug`
> to reduce the clutter on default boot-up logs

I think the PCI probe informations are... informational.
Maybe you are just not interested in info logs.
If this is the case, I suggest to change the log level at runtime.
Jerin Jacob Feb. 6, 2020, 2:36 p.m. UTC | #2
On Thu, Feb 6, 2020 at 7:44 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 21/01/2020 09:00, jerinj@marvell.com:
> > From: Jerin Jacob <jerinj@marvell.com>
> >
> > Some machines may have a lot of PCI devices, logs from PCI probe
> > creates a lot of clutter on boot-up, typically one needs
> > to scroll the screen to find other issues in boot-up.
> >
> > This patch changes the loglevel of PCI probes to `debug`
> > to reduce the clutter on default boot-up logs
>
> I think the PCI probe informations are... informational.
> Maybe you are just not interested in info logs.
> If this is the case, I suggest to change the log level at runtime.

I am wondering, what would be the right balance, Following is DPDK
startup output from octeontx2[1]
It creates a lot of clutter in the "default" boot up. Why not enable
below prints using log level at runtime?
I believe it comes as a debug category, i.e information required to
debug if something is not working,
dpdk bind script already lists what is bound to DPDK.

Suggestion to remove clutter?

[1]
EAL: Detected 24 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: No available hugepages reported in hugepages-2048kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0002:01:00.1 on NUMA socket 0
EAL:   probe driver: 177d:a0f8 net_octeontx2
EAL: PCI device 0002:01:00.2 on NUMA socket 0
EAL:   probe driver: 177d:a0f8 net_octeontx2
EAL: PCI device 0002:01:00.3 on NUMA socket 0
EAL:   probe driver: 177d:a0f8 net_octeontx2
EAL: PCI device 0002:01:00.4 on NUMA socket 0
EAL:   probe driver: 177d:a0f8 net_octeontx2
EAL: PCI device 0002:01:00.5 on NUMA socket 0
EAL:   probe driver: 177d:a0f8 net_octeontx2
EAL: PCI device 0002:01:00.6 on NUMA socket 0
EAL:   probe driver: 177d:a0f8 net_octeontx2
EAL: PCI device 0002:01:00.7 on NUMA socket 0
EAL:   probe driver: 177d:a0f8 net_octeontx2
EAL: PCI device 0002:01:01.0 on NUMA socket 0
EAL:   probe driver: 177d:a0f8 net_octeontx2
EAL: PCI device 0002:01:01.1 on NUMA socket 0
EAL:   probe driver: 177d:a0f8 net_octeontx2
EAL: PCI device 0002:01:01.2 on NUMA socket 0
EAL:   probe driver: 177d:a0f8 net_octeontx2
EAL: PCI device 0002:01:01.3 on NUMA socket 0
EAL:   probe driver: 177d:a0f8 net_octeontx2
EAL: PCI device 0002:01:01.4 on NUMA socket 0
EAL:   probe driver: 177d:a0f8 net_octeontx2
EAL: PCI device 0002:01:01.5 on NUMA socket 0
EAL:   probe driver: 177d:a0f8 net_octeontx2
EAL: PCI device 0002:01:01.6 on NUMA socket 0
EAL:   probe driver: 177d:a0f8 net_octeontx2
EAL: PCI device 0002:01:01.7 on NUMA socket 0
EAL:   probe driver: 177d:a0f8 net_octeontx2
EAL: PCI device 0002:01:02.0 on NUMA socket 0
EAL:   probe driver: 177d:a0f8 net_octeontx2
EAL: PCI device 0002:02:00.0 on NUMA socket 0
EAL:   probe driver: 177d:a063 net_octeontx2
EAL:   using IOMMU type 1 (Type 1)
EAL: PCI device 0002:03:00.0 on NUMA socket 0
EAL:   probe driver: 177d:a063 net_octeontx2
EAL: PCI device 0002:04:00.0 on NUMA socket 0
EAL:   probe driver: 177d:a063 net_octeontx2
EAL: PCI device 0002:05:00.0 on NUMA socket 0
EAL:   probe driver: 177d:a063 net_octeontx2
EAL: PCI device 0002:06:00.0 on NUMA socket 0
EAL:   probe driver: 177d:a063 net_octeontx2
EAL: PCI device 0002:07:00.0 on NUMA socket 0
EAL:   probe driver: 177d:a063 net_octeontx2
EAL: PCI device 0002:08:00.0 on NUMA socket 0
EAL:   probe driver: 177d:a0f9 event_octeontx2
EAL: PCI device 0002:09:00.0 on NUMA socket 0
EAL:   probe driver: 177d:a0f9 event_octeontx2
EAL: PCI device 0002:0a:00.0 on NUMA socket 0
EAL:   probe driver: 177d:a0f9 event_octeontx2
EAL: PCI device 0002:0b:00.0 on NUMA socket 0
EAL:   probe driver: 177d:a0f9 event_octeontx2
EAL: PCI device 0002:0c:00.0 on NUMA socket 0
EAL:   probe driver: 177d:a0fb mempool_octeontx2
EAL: PCI device 0002:0d:00.0 on NUMA socket 0
EAL:   probe driver: 177d:a0fb mempool_octeontx2
EAL: PCI device 0002:0e:00.0 on NUMA socket 0
EAL:   probe driver: 177d:a0f9 event_octeontx2
EAL: PCI device 0002:0f:00.0 on NUMA socket 0
EAL:   probe driver: 177d:a0fb mempool_octeontx2
APP: HPET is not enabled, using TSC as default timer


>
>
>
Thomas Monjalon April 25, 2020, 8:12 p.m. UTC | #3
06/02/2020 15:36, Jerin Jacob:
> On Thu, Feb 6, 2020 at 7:44 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> > 21/01/2020 09:00, jerinj@marvell.com:
> > > From: Jerin Jacob <jerinj@marvell.com>
> > >
> > > Some machines may have a lot of PCI devices, logs from PCI probe
> > > creates a lot of clutter on boot-up, typically one needs
> > > to scroll the screen to find other issues in boot-up.
> > >
> > > This patch changes the loglevel of PCI probes to `debug`
> > > to reduce the clutter on default boot-up logs
> >
> > I think the PCI probe informations are... informational.
> > Maybe you are just not interested in info logs.
> > If this is the case, I suggest to change the log level at runtime.
> 
> I am wondering, what would be the right balance, Following is DPDK
> startup output from octeontx2[1]
> It creates a lot of clutter in the "default" boot up. Why not enable
> below prints using log level at runtime?
> I believe it comes as a debug category, i.e information required to
> debug if something is not working,
> dpdk bind script already lists what is bound to DPDK.
> 
> Suggestion to remove clutter?

I suggest using dynamic log level in the PCI driver.
Unfortunately a lot of old DPDK code is still using the old log macros.
Some cleanup work is needed here.
Jerin Jacob April 26, 2020, 5:42 p.m. UTC | #4
On Sun, Apr 26, 2020 at 1:42 AM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 06/02/2020 15:36, Jerin Jacob:
> > On Thu, Feb 6, 2020 at 7:44 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> > > 21/01/2020 09:00, jerinj@marvell.com:
> > > > From: Jerin Jacob <jerinj@marvell.com>
> > > >
> > > > Some machines may have a lot of PCI devices, logs from PCI probe
> > > > creates a lot of clutter on boot-up, typically one needs
> > > > to scroll the screen to find other issues in boot-up.
> > > >
> > > > This patch changes the loglevel of PCI probes to `debug`
> > > > to reduce the clutter on default boot-up logs
> > >
> > > I think the PCI probe informations are... informational.
> > > Maybe you are just not interested in info logs.
> > > If this is the case, I suggest to change the log level at runtime.
> >
> > I am wondering, what would be the right balance, Following is DPDK
> > startup output from octeontx2[1]
> > It creates a lot of clutter in the "default" boot up. Why not enable
> > below prints using log level at runtime?
> > I believe it comes as a debug category, i.e information required to
> > debug if something is not working,
> > dpdk bind script already lists what is bound to DPDK.
> >
> > Suggestion to remove clutter?
>
> I suggest using dynamic log level in the PCI driver.
> Unfortunately a lot of old DPDK code is still using the old log macros.
> Some cleanup work is needed here.

Sent an alternative fix to skip probing the devices with RTE_KDRV_NONE.
I think that is the source of the problem.
http://patches.dpdk.org/patch/69351/


>
>
Thomas Monjalon April 26, 2020, 6:06 p.m. UTC | #5
26/04/2020 19:42, Jerin Jacob:
> On Sun, Apr 26, 2020 at 1:42 AM Thomas Monjalon <thomas@monjalon.net> wrote:
> > 06/02/2020 15:36, Jerin Jacob:
> > > On Thu, Feb 6, 2020 at 7:44 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> > > > 21/01/2020 09:00, jerinj@marvell.com:
> > > > > From: Jerin Jacob <jerinj@marvell.com>
> > > > >
> > > > > Some machines may have a lot of PCI devices, logs from PCI probe
> > > > > creates a lot of clutter on boot-up, typically one needs
> > > > > to scroll the screen to find other issues in boot-up.
> > > > >
> > > > > This patch changes the loglevel of PCI probes to `debug`
> > > > > to reduce the clutter on default boot-up logs
> > > >
> > > > I think the PCI probe informations are... informational.
> > > > Maybe you are just not interested in info logs.
> > > > If this is the case, I suggest to change the log level at runtime.
> > >
> > > I am wondering, what would be the right balance, Following is DPDK
> > > startup output from octeontx2[1]
> > > It creates a lot of clutter in the "default" boot up. Why not enable
> > > below prints using log level at runtime?
> > > I believe it comes as a debug category, i.e information required to
> > > debug if something is not working,
> > > dpdk bind script already lists what is bound to DPDK.
> > >
> > > Suggestion to remove clutter?
> >
> > I suggest using dynamic log level in the PCI driver.
> > Unfortunately a lot of old DPDK code is still using the old log macros.
> > Some cleanup work is needed here.
> 
> Sent an alternative fix to skip probing the devices with RTE_KDRV_NONE.

No, a PCI PMD can work without a known kernel driver.
This is the case of mlx4/mlx5.

> I think that is the source of the problem.
> http://patches.dpdk.org/patch/69351/

The source of the problem is just changing log levels dynamically
is not possible currently with PCI driver logs.
Jerin Jacob April 26, 2020, 6:48 p.m. UTC | #6
On Sun, Apr 26, 2020 at 11:37 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 26/04/2020 19:42, Jerin Jacob:
> > On Sun, Apr 26, 2020 at 1:42 AM Thomas Monjalon <thomas@monjalon.net> wrote:
> > > 06/02/2020 15:36, Jerin Jacob:
> > > > On Thu, Feb 6, 2020 at 7:44 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> > > > > 21/01/2020 09:00, jerinj@marvell.com:
> > > > > > From: Jerin Jacob <jerinj@marvell.com>
> > > > > >
> > > > > > Some machines may have a lot of PCI devices, logs from PCI probe
> > > > > > creates a lot of clutter on boot-up, typically one needs
> > > > > > to scroll the screen to find other issues in boot-up.
> > > > > >
> > > > > > This patch changes the loglevel of PCI probes to `debug`
> > > > > > to reduce the clutter on default boot-up logs
> > > > >
> > > > > I think the PCI probe informations are... informational.
> > > > > Maybe you are just not interested in info logs.
> > > > > If this is the case, I suggest to change the log level at runtime.
> > > >
> > > > I am wondering, what would be the right balance, Following is DPDK
> > > > startup output from octeontx2[1]
> > > > It creates a lot of clutter in the "default" boot up. Why not enable
> > > > below prints using log level at runtime?
> > > > I believe it comes as a debug category, i.e information required to
> > > > debug if something is not working,
> > > > dpdk bind script already lists what is bound to DPDK.
> > > >
> > > > Suggestion to remove clutter?
> > >
> > > I suggest using dynamic log level in the PCI driver.
> > > Unfortunately a lot of old DPDK code is still using the old log macros.
> > > Some cleanup work is needed here.
> >
> > Sent an alternative fix to skip probing the devices with RTE_KDRV_NONE.
>
> No, a PCI PMD can work without a known kernel driver.
> This is the case of mlx4/mlx5.

Yes. it can work with UNKNOWN, But It not with NONE.

>
> > I think that is the source of the problem.
> > http://patches.dpdk.org/patch/69351/
>
> The source of the problem is just changing log levels dynamically
> is not possible currently with PCI driver logs.

Assuming if we add, dynamic stuff what would the default log level for
RTE_LOG(INFO, EAL, "PCI device "PCI_PRI_FMT" on NUMA socket %i\n",

If it is INFO, Still the problem persist in the default bootup. Right?




>
>
Thomas Monjalon April 26, 2020, 7:56 p.m. UTC | #7
26/04/2020 20:48, Jerin Jacob:
> On Sun, Apr 26, 2020 at 11:37 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> > 26/04/2020 19:42, Jerin Jacob:
> > > On Sun, Apr 26, 2020 at 1:42 AM Thomas Monjalon <thomas@monjalon.net> wrote:
> > > > 06/02/2020 15:36, Jerin Jacob:
> > > > > On Thu, Feb 6, 2020 at 7:44 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> > > > > > 21/01/2020 09:00, jerinj@marvell.com:
> > > > > > > From: Jerin Jacob <jerinj@marvell.com>
> > > > > > >
> > > > > > > Some machines may have a lot of PCI devices, logs from PCI probe
> > > > > > > creates a lot of clutter on boot-up, typically one needs
> > > > > > > to scroll the screen to find other issues in boot-up.
> > > > > > >
> > > > > > > This patch changes the loglevel of PCI probes to `debug`
> > > > > > > to reduce the clutter on default boot-up logs
> > > > > >
> > > > > > I think the PCI probe informations are... informational.
> > > > > > Maybe you are just not interested in info logs.
> > > > > > If this is the case, I suggest to change the log level at runtime.
> > > > >
> > > > > I am wondering, what would be the right balance, Following is DPDK
> > > > > startup output from octeontx2[1]
> > > > > It creates a lot of clutter in the "default" boot up. Why not enable
> > > > > below prints using log level at runtime?
> > > > > I believe it comes as a debug category, i.e information required to
> > > > > debug if something is not working,
> > > > > dpdk bind script already lists what is bound to DPDK.
> > > > >
> > > > > Suggestion to remove clutter?
> > > >
> > > > I suggest using dynamic log level in the PCI driver.
> > > > Unfortunately a lot of old DPDK code is still using the old log macros.
> > > > Some cleanup work is needed here.
> > >
> > > Sent an alternative fix to skip probing the devices with RTE_KDRV_NONE.
> >
> > No, a PCI PMD can work without a known kernel driver.
> > This is the case of mlx4/mlx5.
> 
> Yes. it can work with UNKNOWN, But It not with NONE.
> 
> > > I think that is the source of the problem.
> > > http://patches.dpdk.org/patch/69351/
> >
> > The source of the problem is just changing log levels dynamically
> > is not possible currently with PCI driver logs.
> 
> Assuming if we add, dynamic stuff what would the default log level for
> RTE_LOG(INFO, EAL, "PCI device "PCI_PRI_FMT" on NUMA socket %i\n",
> 
> If it is INFO, Still the problem persist in the default bootup. Right?

Yes

We need to know in INFO level which devices are successfully probed.
You want to decrease to DEBUG the level of logs announcing a probe.
I think it would be OK if adding an INFO log after probe success.
Jerin Jacob April 27, 2020, 6:02 p.m. UTC | #8
On Mon, Apr 27, 2020 at 1:26 AM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 26/04/2020 20:48, Jerin Jacob:
> > On Sun, Apr 26, 2020 at 11:37 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> > > 26/04/2020 19:42, Jerin Jacob:
> > > > On Sun, Apr 26, 2020 at 1:42 AM Thomas Monjalon <thomas@monjalon.net> wrote:
> > > > > 06/02/2020 15:36, Jerin Jacob:
> > > > > > On Thu, Feb 6, 2020 at 7:44 PM Thomas Monjalon <thomas@monjalon.net> wrote:
> > > > > > > 21/01/2020 09:00, jerinj@marvell.com:
> > > > > > > > From: Jerin Jacob <jerinj@marvell.com>
> > > > > > > >
> > > > > > > > Some machines may have a lot of PCI devices, logs from PCI probe
> > > > > > > > creates a lot of clutter on boot-up, typically one needs
> > > > > > > > to scroll the screen to find other issues in boot-up.
> > > > > > > >
> > > > > > > > This patch changes the loglevel of PCI probes to `debug`
> > > > > > > > to reduce the clutter on default boot-up logs
> > > > > > >
> > > > > > > I think the PCI probe informations are... informational.
> > > > > > > Maybe you are just not interested in info logs.
> > > > > > > If this is the case, I suggest to change the log level at runtime.
> > > > > >
> > > > > > I am wondering, what would be the right balance, Following is DPDK
> > > > > > startup output from octeontx2[1]
> > > > > > It creates a lot of clutter in the "default" boot up. Why not enable
> > > > > > below prints using log level at runtime?
> > > > > > I believe it comes as a debug category, i.e information required to
> > > > > > debug if something is not working,
> > > > > > dpdk bind script already lists what is bound to DPDK.
> > > > > >
> > > > > > Suggestion to remove clutter?
> > > > >
> > > > > I suggest using dynamic log level in the PCI driver.
> > > > > Unfortunately a lot of old DPDK code is still using the old log macros.
> > > > > Some cleanup work is needed here.
> > > >
> > > > Sent an alternative fix to skip probing the devices with RTE_KDRV_NONE.
> > >
> > > No, a PCI PMD can work without a known kernel driver.
> > > This is the case of mlx4/mlx5.
> >
> > Yes. it can work with UNKNOWN, But It not with NONE.
> >
> > > > I think that is the source of the problem.
> > > > http://patches.dpdk.org/patch/69351/
> > >
> > > The source of the problem is just changing log levels dynamically
> > > is not possible currently with PCI driver logs.
> >
> > Assuming if we add, dynamic stuff what would the default log level for
> > RTE_LOG(INFO, EAL, "PCI device "PCI_PRI_FMT" on NUMA socket %i\n",
> >
> > If it is INFO, Still the problem persist in the default bootup. Right?
>
> Yes
>
> We need to know in INFO level which devices are successfully probed.
> You want to decrease to DEBUG the level of logs announcing a probe.
> I think it would be OK if adding an INFO log after probe success.

OK. I will send the v2 by changing the existing one as DEBUG and a
successful probe as INFO.



>
>
>

Patch
diff mbox series

diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index 3f5542076..665a8b3df 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -136,7 +136,7 @@  rte_pci_probe_one_driver(struct rte_pci_driver *dr,
 		/* Match of device and driver failed */
 		return 1;
 
-	RTE_LOG(INFO, EAL, "PCI device "PCI_PRI_FMT" on NUMA socket %i\n",
+	RTE_LOG(DEBUG, EAL, "PCI device "PCI_PRI_FMT" on NUMA socket %i\n",
 			loc->domain, loc->bus, loc->devid, loc->function,
 			dev->device.numa_node);
 
@@ -161,7 +161,7 @@  rte_pci_probe_one_driver(struct rte_pci_driver *dr,
 		return -EEXIST;
 	}
 
-	RTE_LOG(INFO, EAL, "  probe driver: %x:%x %s\n", dev->id.vendor_id,
+	RTE_LOG(DEBUG, EAL, "  probe driver: %x:%x %s\n", dev->id.vendor_id,
 		dev->id.device_id, dr->driver.name);
 
 	/*