From: Wei Liu Subject: Re: [RFC PATCH V4 11/18] Bump EVTCHNS_PER_BUCKET to 512 Date: Fri, 15 Mar 2013 18:37:00 +0000 Message-ID: <1363372620.29093.185.camel@zion.uk.xensource.com> References: <1362486640-14707-1-git-send-email-wei.liu2@citrix.com> <1362486640-14707-12-git-send-email-wei.liu2@citrix.com> <5143653A.7080406@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5143653A.7080406@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: "Keir (Xen.org)" , wei.liu2@citrix.com, Ian Campbell , "jbeulich@suse.com" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Fri, 2013-03-15 at 18:15 +0000, David Vrabel wrote: > On 05/03/13 12:30, Wei Liu wrote: > > For 64 bit build and 3-level event channel and the original value of > > EVTCHNS_PER_BUCKET (128), the space needed to accommodate d->evtchn would be 4 > > pages (PAGE_SIZE = 4096). Given that not every domain needs 3-level event > > channel, this leads to waste of memory. Having EVTCHN_PER_BUCKETS to be 512 > > can occupy exact one page. > > This makes the list of buckets a page in size but each bucket is now 4 > pages. > I'm confused. On 64 bit w/ FLASK enabled, sizeof(struct evtchn) = 18B, bucket size = 9216B = 2.25 pages; w/o FLASK enabled, sizeof(struct evtchn) = 10B, bucket size = 5120B = 1.25 pages. Yesterday I did start rewriting this bit to optimize space usage though. :-) Wei.