From: Mukesh Rathor Subject: Re: increase evtchn limits Date: Fri, 21 May 2010 11:52:14 -0700 Message-ID: <20100521115214.47b18afe@mantra.us.oracle.com> References: <4BF6151E.7050204@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: 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: Zhigang Wang , xen-devel List-Id: xen-devel@lists.xenproject.org On Fri, 21 May 2010 08:12:13 +0100 Keir Fraser wrote: > On 21/05/2010 06:07, "Zhigang Wang" wrote: > > >> unsigned long evtchn_pending[sizeof(unsigned long) * 8]; > >> > > I'm not sure, but it seems: 1024 for 32bit and 4096 for 64bit. > > > > 32bit: 4 * (4 * 8) * 8 = 1024 > > 64bit: 8 * (8 * 8) * 8 = 4096 > > This is correct. Which is why I wonder how many CPUs you are dealing > with, and how many event channels are being allocated per CPU. 4096 > event channels ought to be plenty for dom0 bringup on even a very big > system. > > K. > My bad, it's ulong[], not sure why I thought it was uchar[]. So sorry for the false alarm. I'm hitting BUG_ON(!test_bit(chn, s->evtchn_mask)); in bind_evtchn_to_cpu() and when I saw it on chn == 520, combined with my thinking it was uchar, i made wrong conclusion. Apologies. Anyways, I'll debug further. But looking forward, I can see hitting limits of 4096 not too far in future, so I think it will be a great idea to 'collapse the four IPIs onto one event channel', perhaps next xen release. Thanks again. Mukesh