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

Re: [Xen-devel] Xen 4.6.0-rc1 build with lock_profile=y crash_debug=y, frame_pointer=y and domain.c:241: error: negative width in bit-field â<anonymous>â



On 25/08/15 17:43, Konrad Rzeszutek Wilk wrote:
> I am troubleshooting an locking issue and figured I would enable extra 
> options.
>
> But now I am hitting this build issue:
>
> domain.c:241: error: negative width in bit-field â<anonymous>â
>
> Which is:
>
>  229 struct domain *alloc_domain_struct(void)
>  230 {
>  231     struct domain *d;
> ...
>  241     BUILD_BUG_ON(sizeof(*d) > PAGE_SIZE);
>
> Thoughts?

That is to catch the case where sizeof struct domain exceeds PAGE_SIZE.

The logic behind this was to prevent needing order 1 allocations for
domains or vcpus, and therefore allocation failures in heavily memory
fragmented situations.

It means we will probably need to find some other areas of struct domain
to shrink, or move out into a separate xmalloc().

For straight debugging, it is acceptable to drop the BUILD_BUG_ON().  If
we can't drop the size of struct domain, we might want to move to using
vmalloc() instead.

~Andrew

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