All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	xen-devel@lists.xensource.com, wei.liu2@citrix.com,
	jbeulich@suse.com
Subject: Re: 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>’
Date: Tue, 25 Aug 2015 17:48:58 +0100	[thread overview]
Message-ID: <55DC9C7A.1000404@citrix.com> (raw)
In-Reply-To: <20150825164338.GC13402@l.oracle.com>

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@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2015-08-25 16:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25 16:43 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>’ Konrad Rzeszutek Wilk
2015-08-25 16:48 ` Andrew Cooper [this message]
2015-08-25 17:09   ` Konrad Rzeszutek Wilk
2015-08-25 17:41     ` Andrew Cooper
2015-08-25 19:52       ` Konrad Rzeszutek Wilk
2015-08-25 19:54         ` Konrad Rzeszutek Wilk
2015-08-26  7:32           ` Jan Beulich
2015-08-26 17:37             ` Konrad Rzeszutek Wilk
2015-08-26 18:54               ` Wei Liu
2015-08-26  7:28       ` Jan Beulich
2015-08-26  7:35       ` Jan Beulich
2015-08-25 16:51 ` Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55DC9C7A.1000404@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=konrad.wilk@oracle.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.