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

Re: [Xen-devel] [PATCH] Fix cpumap setting before passing to XEN



On Wed, Apr 20, 2016 at 03:33:13PM +0100, Wei Liu wrote:
> Sorry I was at the Xen hackathon in the last two days.
> 
> On Tue, Apr 12, 2016 at 11:35:20AM +0800, Zhenzhong Duan wrote:
> > 在 2016/4/11 19:27, Wei Liu 写道:
> > >On Mon, Apr 11, 2016 at 09:42:57AM +0800, Zhenzhong Duan wrote:
> > >>It's tool's duty to pass a correct cpumap to XEN. On a host with less than
> > >>64
> > >>CPUS, it just shows below error.
> > >>
> > >>[root@localhost /]# xm vcpu-pin 3 all all
> > >>Error: Cannot pin vcpu: 0 to cpu: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
> > >>12,
> > >>13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 
> > >>31,
> > >>32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 
> > >>50,
> > >>51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63] - (22, 'Invalid
> > >>argument')
> > >>
> > >This error clearly shows that the upper layer is not passing down the
> > >right cpumap. So this example along won't convince me to that this is a
> > >bug in python binding. It's free to reject input that it deems wrong.
> > >
> > >I guess the question is more or less what should it do in such
> > >situation. So ...
> > >
> > >>The fix make it same as in xl code.
> > >>
> > >Is there reference to this? I guess the commit message  or mail thread
> > >will shed more light on the expected behaviour.
> > Calling path:
> > main_vcpupin->cpurange_parse->update_cpumap_range->libxl_bitmap_set
> > 
> > void libxl_bitmap_set(libxl_bitmap *bitmap, int bit)
> > {
> >     if (bit >= bitmap->size * 8)
> >         return;
> >     bitmap->map[bit / 8] |= 1 << (bit & 7);
> > }
> > 
> > I referenced above code. It just ignore the cpu number beyond the max CPU
> > count rather than raise an error.
> > 
> 
> In principle I think having python binding and xl/libxl behave more or less
> the same is the right direction. I'm a bit nervous about the change of
> behaviour on the other hand.
> 
> Let's wait for a few more days to see if other people have any comment on
> this.

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> ?

> 
> Wei.
> 
> > thanks
> > zduan
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel

_______________________________________________
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®.