From: Qing He Subject: Re: [RFC] irq rate limit Date: Wed, 9 Sep 2009 17:07:00 +0800 Message-ID: <20090909090700.GB25462@ub-qhe2> References: <20090909084825.GA25462@ub-qhe2> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Wed, 2009-09-09 at 16:48 +0800, Keir Fraser wrote: > On 09/09/2009 09:48, "Qing He" wrote: > > > This is a poc patch of guest irq ratelimit. The main motivation is > > to ensure Xen's responsiveness during an irq storm, that caused by > > improper hardware or drivers. If one interrupt is fired at a high > > rate (>10k/10ms in the poc), it is disabled until the next periodic > > timer_fn. A global generation counter is used to minimize overhead. > > What's the generation counter for? Why not just zero desc->rl_cnt in the > timer handler? If zeroing desc->rl_cnt in the timer handler, we have to zero that of all irqs. If the numbers of possible irqs is big or sparse, it's a bit painful. Also, possibly it needs to be moved out of irq_desc and use atomic_t to avoid spinlocking every irq_desc in the timer handler. Thanks, Qing > > -- Keir > >