Re: [PATCH] iommu/vt-d: Ratelimit fault handler

2016-03-19 Thread Alex Williamson
On Tue, 15 Mar 2016 19:47:56 + David Woodhouse wrote: > On Tue, 2016-03-15 at 10:35 -0600, Alex Williamson wrote: > > Fault rates can easily overwhelm the console and make the system > > unresponsive.  Ratelimit to allow an opportunity for maintenance. > > > > Signed-off-by: Alex Williamson

Re: [PATCH] iommu/vt-d: Ratelimit fault handler

2016-03-15 Thread Joe Perches
On Tue, 2016-03-15 at 10:35 -0600, Alex Williamson wrote: > Fault rates can easily overwhelm the console and make the system > unresponsive.  Ratelimit to allow an opportunity for maintenance. A few suggestions: o Use a single ratelimit state. o The multiple lines output are unnecessary and hard

Re: [PATCH] iommu/vt-d: Ratelimit fault handler

2016-03-15 Thread David Woodhouse
On Tue, 2016-03-15 at 10:35 -0600, Alex Williamson wrote: > Fault rates can easily overwhelm the console and make the system > unresponsive.  Ratelimit to allow an opportunity for maintenance. > > Signed-off-by: Alex Williamson Rather than just rate-limiting the printk, I'd prefer to handle this

Re: [PATCH] iommu/vt-d: Ratelimit fault handler

2016-03-15 Thread Joe Perches
On Tue, 2016-03-15 at 10:10 -0700, Joe Perches wrote: > o Use a single ratelimit state. [] > diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c [] > + if (__ratelimit(&rs)) > + return 0; That of course should be: if (!__ratelimit(&rs)) return 0; _

[PATCH] iommu/vt-d: Ratelimit fault handler

2016-03-15 Thread Alex Williamson
Fault rates can easily overwhelm the console and make the system unresponsive. Ratelimit to allow an opportunity for maintenance. Signed-off-by: Alex Williamson --- drivers/iommu/dmar.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/drivers/