From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Safonov via iommu Subject: Re: [PATCHv3] iommu/intel: Ratelimit each dmar fault printing Date: Thu, 15 Mar 2018 15:54:22 +0000 Message-ID: <1521129262.2686.23.camel@arista.com> References: <20180215191729.15777-1-dima@arista.com> <20180315134649.skh2aukcmg5ud74y@8bytes.org> <1521123183.2686.7.camel@arista.com> <20180315142253.GC5259@8bytes.org> <1521124490.2686.16.camel@arista.com> <1521124920.2686.20.camel@arista.com> <20180315152828.GA11365@8bytes.org> Reply-To: Dmitry Safonov Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20180315152828.GA11365-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Joerg Roedel Cc: 0x7f454c46-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, David Woodhouse , Ingo Molnar List-Id: iommu@lists.linux-foundation.org On Thu, 2018-03-15 at 16:28 +0100, Joerg Roedel wrote: > On Thu, Mar 15, 2018 at 02:42:00PM +0000, Dmitry Safonov wrote: > > But even with loop-limit we will need ratelimit each printk() > > *also*. > > Otherwise loop-limit will be based on time spent printing, not on > > anything else.. > > The patch makes sense even with loop-limit in my opinion. > > Looks like I mis-read your patch, somehow it looked to me as if you > replace all 'ratelimited' usages with a call to __ratelimit(), but > you > just move 'ratelimited' into the loop, which actually makes sense. Oh, ok > But still, this alone is no proper fix for the soft-lockups you are > seeing. Well, I can also limit number of loops with say cap_num_fault_regs(). I didn't do that as on my measures the time spent on clearing a fault is so small, that I'm not sure if it's possible to stuck in this loop. -- Thanks, Dmitry