Re: [Xen-devel] [PATCHv6 5/5] gnttab: use per-VCPU maptrack free lists

2015-04-24 Thread Jan Beulich
>>> On 24.04.15 at 12:21, wrote: > On 24/04/15 10:50, Jan Beulich wrote: > On 24.04.15 at 11:09, wrote: >>> On 23/04/15 17:11, Jan Beulich wrote: >>> On 22.04.15 at 18:00, wrote: > --- a/xen/include/xen/grant_table.h > +++ b/xen/include/xen/grant_table.h > @@ -60,6 +60,8 @@ s

Re: [Xen-devel] [PATCHv6 5/5] gnttab: use per-VCPU maptrack free lists

2015-04-24 Thread Malcolm Crossley
On 24/04/15 10:50, Jan Beulich wrote: On 24.04.15 at 11:09, wrote: >> On 23/04/15 17:11, Jan Beulich wrote: >> On 22.04.15 at 18:00, wrote: --- a/xen/include/xen/grant_table.h +++ b/xen/include/xen/grant_table.h @@ -60,6 +60,8 @@ struct grant_mapping { u32 r

Re: [Xen-devel] [PATCHv6 5/5] gnttab: use per-VCPU maptrack free lists

2015-04-24 Thread Andrew Cooper
On 24/04/15 10:50, Jan Beulich wrote: On 24.04.15 at 11:09, wrote: >> On 23/04/15 17:11, Jan Beulich wrote: >> On 22.04.15 at 18:00, wrote: --- a/xen/include/xen/grant_table.h +++ b/xen/include/xen/grant_table.h @@ -60,6 +60,8 @@ struct grant_mapping { u32 r

Re: [Xen-devel] [PATCHv6 5/5] gnttab: use per-VCPU maptrack free lists

2015-04-24 Thread Jan Beulich
>>> On 24.04.15 at 11:09, wrote: > On 23/04/15 17:11, Jan Beulich wrote: > On 22.04.15 at 18:00, wrote: >>> --- a/xen/include/xen/grant_table.h >>> +++ b/xen/include/xen/grant_table.h >>> @@ -60,6 +60,8 @@ struct grant_mapping { >>> u32 ref; /* grant ref */ >>> u16

Re: [Xen-devel] [PATCHv6 5/5] gnttab: use per-VCPU maptrack free lists

2015-04-24 Thread Malcolm Crossley
On 23/04/15 17:11, Jan Beulich wrote: On 22.04.15 at 18:00, wrote: >> static inline int >> get_maptrack_handle( >> struct grant_table *lgt) >> { >> +struct vcpu *v = current; >> int i; >> grant_handle_thandle; >> struct grant_mappi

Re: [Xen-devel] [PATCHv6 5/5] gnttab: use per-VCPU maptrack free lists

2015-04-23 Thread Jan Beulich
>>> On 23.04.15 at 18:29, wrote: > On 23/04/15 17:11, Jan Beulich wrote: > On 22.04.15 at 18:00, wrote: >>> -return handle; >>> +v->maptrack_limit = new_mt_limit; >>> + >>> +return __get_maptrack_handle(lgt, v); >> >> With the lock dropped, nothing guarantees this to succeed, whi

Re: [Xen-devel] [PATCHv6 5/5] gnttab: use per-VCPU maptrack free lists

2015-04-23 Thread David Vrabel
On 23/04/15 17:11, Jan Beulich wrote: On 22.04.15 at 18:00, wrote: >> >> +v->maptrack_head = lgt->maptrack_pages * MAPTRACK_PER_PAGE; >> +if (v->maptrack_tail == MAPTRACK_TAIL) >> +{ >> +v->maptrack_tail = (lgt->maptrack_pages * MAPTRACK_PER_PAGE) >> ++ MAPTR

Re: [Xen-devel] [PATCHv6 5/5] gnttab: use per-VCPU maptrack free lists

2015-04-23 Thread Jan Beulich
>>> On 22.04.15 at 18:00, wrote: > static inline int > get_maptrack_handle( > struct grant_table *lgt) > { > +struct vcpu *v = current; > int i; > grant_handle_thandle; > struct grant_mapping *new_mt; > unsigned int new_mt

[Xen-devel] [PATCHv6 5/5] gnttab: use per-VCPU maptrack free lists

2015-04-22 Thread David Vrabel
From: Malcolm Crossley Performance analysis of aggregate network throughput with many VMs shows that performance is signficantly limited by contention on the maptrack lock when obtaining/releasing maptrack handles from the free list. Instead of a single free list use a per-VCPU list. This avoids