[<prev] [next>] [day] [month] [year] [list]
Message-ID: <e9145935-5497-614f-7504-41d1ad430066@suse.com>
Date: Mon, 3 Jul 2017 18:16:55 +0200
From: Juergen Gross <jgross@...e.com>
To: Jan Beulich <JBeulich@...e.com>
Cc: xen-devel@...ts.xenproject.org, boris.ostrovsky@...cle.com,
linux-kernel@...r.kernel.org
Subject: Re: [Xen-devel] [PATCH] xen/balloon: don't online new memory
initially
On 03/07/17 18:11, Jan Beulich wrote:
>>>> On 03.07.17 at 17:40, <jgross@...e.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
Powered by blists - more mailing lists