mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com,
	linux-kernel@vger.kernel.org
Subject: Re: [Xen-devel] [PATCH] xen/balloon: don't online new memory initially
Date: Mon, 3 Jul 2017 18:16:55 +0200	[thread overview]
Message-ID: <e9145935-5497-614f-7504-41d1ad430066@suse.com> (raw)
In-Reply-To: <595A88C202000078001680C2@suse.com>

On 03/07/17 18:11, Jan Beulich wrote:
>>>> On 03.07.17 at 17:40, <jgross@suse.com> wrote:
>> --- a/drivers/xen/xen-balloon.c
>> +++ b/drivers/xen/xen-balloon.c
>> @@ -59,6 +59,8 @@ static void watch_target(struct xenbus_watch *watch,
>>  {
>>  	unsigned long long new_target;
>>  	int err;
>> +	static bool watch_fired;
>> +	static unsigned long target_diff;
> 
> It would seem to me that the types of target_diff and new_target
> should match in width, but differ in signedness.

The different width is on purpose: new_target is in kB, so it could
exceed the max page count on 32 bit systems (not that it would matter
as a guest of that size isn't possible). target_diff is a page count
so it will always fit into a long int.

Regarding signedness you are right. I probably should switch to long
for target_diff.


Juergen

  parent reply	other threads:[~2017-07-03 16:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-03 15:40 Juergen Gross
2017-07-03 16:11 ` [Xen-devel] " Jan Beulich
     [not found] ` <595A88C202000078001680C2@suse.com>
2017-07-03 16:16   ` Juergen Gross [this message]
2017-07-03 18:44 ` Igor Druzhinin
2017-07-04  5:42   ` Juergen Gross

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=e9145935-5497-614f-7504-41d1ad430066@suse.com \
    --to=jgross@suse.com \
    --cc=JBeulich@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®