Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1360187

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

From Alex Williamson <alex.williamson@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 1/2] iommu/vt-d: Ratelimit fault handler
Date 2016-03-17 21:50 +0100
Message-ID <rdN1N-3RB-17@gated-at.bofh.it> (permalink)
References <rdMyJ-3Bu-9@gated-at.bofh.it> <rdMyK-3Bu-19@gated-at.bofh.it> <rdMS6-3KT-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 17 Mar 2016 13:33:30 -0700
Joe Perches <joe@perches.com> wrote:

> On Thu, 2016-03-17 at 14:12 -0600, Alex Williamson wrote:
> > Fault rates can easily overwhelm the console and make the system
> > unresponsive.  Ratelimit to allow an opportunity for maintenance.  
> []
> > diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c  
> []
> > @@ -1602,10 +1602,17 @@ irqreturn_t dmar_fault(int irq, void *dev_id)
> >  	int reg, fault_index;
> >  	u32 fault_status;
> >  	unsigned long flag;
> > +	bool ratelimited;
> > +	static DEFINE_RATELIMIT_STATE(rs,
> > +				      DEFAULT_RATELIMIT_INTERVAL,
> > +				      DEFAULT_RATELIMIT_BURST);  
> 
> Are these the appropriate limits for dmar?
> 
> include/linux/ratelimit.h:#define DEFAULT_RATELIMIT_INTERVAL    (5 * HZ)
> include/linux/ratelimit.h:#define DEFAULT_RATELIMIT_BURST       10

They seem OK to me, I've got a test running that continuously generates
DMA read faults and I get 20 lines of log every 5 seconds.  That seems
like enough to know there's an issue, it's ongoing, and maybe see some
patterns in the fault addresses.  I expect we could turn up the burst
value but generally when I'm looking at the logs I'm only looking for
things like is it a single target address, is it a sequential address,
or what's the general address space to know if it should or should not
be a valid fault address.  Thanks,

Alex

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/2] iommu/vt-d: Fault logging improvements Alex Williamson <alex.williamson@redhat.com> - 2016-03-17 21:20 +0100
  [PATCH v2 1/2] iommu/vt-d: Ratelimit fault handler Alex Williamson <alex.williamson@redhat.com> - 2016-03-17 21:20 +0100
    Re: [PATCH v2 1/2] iommu/vt-d: Ratelimit fault handler Joe Perches <joe@perches.com> - 2016-03-17 21:40 +0100
      Re: [PATCH v2 1/2] iommu/vt-d: Ratelimit fault handler Alex Williamson <alex.williamson@redhat.com> - 2016-03-17 21:50 +0100
  Re: [PATCH v2 0/2] iommu/vt-d: Fault logging improvements Joe Perches <joe@perches.com> - 2016-03-17 21:30 +0100

csiph-web