From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH v2] xen/evtchn: rearrange fields Date: Tue, 01 Apr 2014 16:56:53 +0100 Message-ID: <533AE1C5.5030208@gmail.com> References: <1395768226-31703-1-git-send-email-dgdegra@tycho.nsa.gov> <5332CB110200007800002456@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3873126357604678254==" Return-path: In-Reply-To: <5332CB110200007800002456@nat28.tlf.novell.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: Jan Beulich Cc: Daniel De Graaf , David Vrabel , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============3873126357604678254== Content-Type: multipart/alternative; boundary="------------060104030704080002020908" This is a multi-part message in MIME format. --------------060104030704080002020908 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Jan Beulich wrote: >>>> On 25.03.14 at 18:23, wrote: >> > Event channel arrays are allocated in blocks with EVTCHNS_PER_BUCKET >> > elements, which must be a power of 2. When XSM is disabled, struct >> > evtchn is 32 bytes including padding; however, when XSM is enabled, the >> > structure becomes larger and EVTCHNS_PER_BUCKET is halved. Rearranging >> > some of the fields in struct evtchn allows a 4-byte XSM field to fit >> > within the 32-byte structure. >> > >> > This rearrangement turns the xen_consumer field of struct evtchn into a >> > bitfield and adjusts the xen_consumers array to fit the number of >> > addressable elements from this value. Since there are currently only >> > two users of this array, only 3 bits (7 values) are reserved. This >> > field is also used rarely enough that the slight overhead from applying >> > a bitmask should not cause problems. >> > >> > Signed-off-by: Daniel De Graaf >> > Cc: David Vrabel > > Reviewed-by: Jan Beulich Acked-by: Keir Fraser > --------------060104030704080002020908 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Jan Beulich wrote:
On 25.03.14 at 18:23, <dgdegra@tycho.nsa.gov> wrote:
> Event channel arrays are allocated in blocks with EVTCHNS_PER_BUCKET
> elements, which must be a power of 2.  When XSM is disabled, struct
> evtchn is 32 bytes including padding; however, when XSM is enabled, the
> structure becomes larger and EVTCHNS_PER_BUCKET is halved.  Rearranging
> some of the fields in struct evtchn allows a 4-byte XSM field to fit
> within the 32-byte structure.
> 
> This rearrangement turns the xen_consumer field of struct evtchn into a
> bitfield and adjusts the xen_consumers array to fit the number of
> addressable elements from this value.  Since there are currently only
> two users of this array, only 3 bits (7 values) are reserved.  This
> field is also used rarely enough that the slight overhead from applying
> a bitmask should not cause problems.
> 
> Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
> Cc: David Vrabel <david.vrabel@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Keir Fraser <keir@xen.org>

--------------060104030704080002020908-- --===============3873126357604678254== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============3873126357604678254==--