[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 6/8] oxenstored: enable domain connection indexing based on eventchn port



On 16/09/2014 10:16, Dave Scott wrote:
On 15 Sep 2014, at 23:39, Zheng Li <dev@xxxxxxxx> wrote:
For memory efficiency, the implementation reuse the the existing domain
connections hash table, but use the negative of a port number as the index (to
distinguish from domid which always >= 0).

I think on a 32-bit architecture where the OCaml int is 31 bits wide, the 
evtchn port fits inside an OCaml int. From xenctrl.h:

   /* A port identifier is guaranteed to fit in 31 bits. */
   typedef int evtchn_port_or_error_t;

If we use the sign bit as a further tag then weâre 1 bit short. Iâd rather use 
2 separate hash tables to be safe.

I was a bit hesitant on using the tick too. I'll add an extra table in v2 as 
per your suggestion.

Cheers,
Zheng

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.