All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurentiu Tudor <laurentiu.tudor@nxp.com>
To: Robin Murphy <robin.murphy@arm.com>,
	Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Diana Madalina Craciun <diana.craciun@nxp.com>,
	"iommu@lists.linux-foundation.org"
	<iommu@lists.linux-foundation.org>,
	Ioana Ciornei <ioana.ciornei@nxp.com>
Subject: RE: [PATCH] iommu: silence iommu group prints
Date: Mon, 2 Mar 2020 11:48:15 +0000	[thread overview]
Message-ID: <AM0PR04MB689792D6791F115E535BC585ECE70@AM0PR04MB6897.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <95af8fc3-d7b1-3b58-afc1-d203d7538b95@arm.com>

Hi Robin,

> -----Original Message-----
> From: Robin Murphy <robin.murphy@arm.com>
> Sent: Friday, February 28, 2020 8:32 PM
> 
> [ +Laurentiu ]
> 
> Hi Russell,
> 
> Thanks for sharing a log, now I properly understand what's up... further
> comments at the end (for context).
> 
> On 28/02/2020 10:06 am, Russell King - ARM Linux admin wrote:
> > On Fri, Feb 28, 2020 at 09:33:40AM +0000, John Garry wrote:
> >> On 28/02/2020 02:16, Lu Baolu wrote:
> >>> Hi,
> >>>
> >>> On 2020/2/27 19:57, Russell King wrote:
> >>>> On the LX2160A, there are lots (about 160) of IOMMU messages produced
> >>>> during boot; this is excessive.  Reduce the severity of these
> messages
> >>>> to debug level.
> >>>>
> >>>> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> >>>> ---
> >>>>    drivers/iommu/iommu.c | 4 ++--
> >>>>    1 file changed, 2 insertions(+), 2 deletions(-)
> >>>>
> >>>> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> >>>> index 3ead597e1c57..304281ec623b 100644
> >>>> --- a/drivers/iommu/iommu.c
> >>>> +++ b/drivers/iommu/iommu.c
> >>>> @@ -741,7 +741,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);
> >>>
> >>> I'm not strongly against this. But to me this message seems to be a
> good
> >>> indicator that a device was probed successfully by the iommu subsystem.
> >>> Keeping it in the default kernel message always helps to the kernel
> >>> debugging.
> >>>
> >>
> >> I would tend to agree.
> >

[snip]

> >
> > # dmesg |grep 'Adding to iommu' | wc -l
> > 164
> > # dmesg |grep -v 'Adding to iommu' | wc -l
> > 551
> >
> > So, 23% of the kernel messages on this platform are "Adding to iommu",
> > which is excessive.
> 
> Indeed, however I would note that on most platforms bringing up a
> network interface involves hot-adding 0 devices, so hot-adding 19
> devices as full-blown DMA masters is arguably the root of "excessive"
> already. Per the concern I initially raised, each of those messages
> represents a whole bunch of internal allocation and bookkeeping going
> on, which if it isn't necessary would be far better avoided altogether,
> than simply done more quietly.
> 
> Laurentiu, I guess at the moment the nature of the of_dma_configure()
> integration means we end up treating all DPAA2 objects identically, but
> do you think we have scope to be a bit cleverer in that regard?
> Presumably not every type of object that shows up on the fsl_mc bus is
> really an independent DMA master, so if we could skip doing the full
> DMA/IOMMU/MSI setup for the ones that don't need it, it would work out
> nicer all round. In fact your .dma_configure proposal (which I'll try to
> take a proper look at next week) couldn't have come at a better time for
> that argument :)
 
Thanks! That's a very good point - I'll check on which devices we actually use 
dma apis and filter the rest out. Will keep in mind for the next spin of the patches.

---
Best Regards, Laurentiu

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

  reply	other threads:[~2020-03-02 15:22 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 11:57 [PATCH] iommu: silence iommu group prints Russell King
2020-02-27 13:44 ` Robin Murphy
2020-02-27 13:48   ` Russell King - ARM Linux admin
2020-02-27 18:19     ` Robin Murphy
2020-02-27 19:00       ` Russell King - ARM Linux admin
2020-02-28  2:16 ` Lu Baolu
2020-02-28  9:33   ` John Garry
2020-02-28 10:06     ` Russell King - ARM Linux admin
2020-02-28 18:32       ` Robin Murphy
2020-03-02 11:48         ` Laurentiu Tudor [this message]
2020-03-03 14:18         ` Laurentiu Tudor
2020-03-03 15:49           ` Russell King - ARM Linux admin
2020-03-03 15:55             ` Laurentiu Tudor
2020-03-03 22:17               ` Russell King - ARM Linux admin
2020-03-04  8:56                 ` Laurentiu Tudor
2020-03-04  9:33                   ` Russell King - ARM Linux admin
2020-03-04  9:42                     ` Laurentiu Tudor
2020-03-04  9:51                       ` Russell King - ARM Linux admin
2020-03-04  9:56                         ` Laurentiu Tudor
2020-03-04 10:07                           ` Russell King - ARM Linux admin
2020-03-04 10:33                             ` Laurentiu Tudor
2020-03-04 10:52                               ` Russell King - ARM Linux admin
2020-03-04 11:26                                 ` Laurentiu Tudor
2020-03-02 15:44 ` Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM0PR04MB689792D6791F115E535BC585ECE70@AM0PR04MB6897.eurprd04.prod.outlook.com \
    --to=laurentiu.tudor@nxp.com \
    --cc=diana.craciun@nxp.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux@armlinux.org.uk \
    --cc=robin.murphy@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.