OpenVZ Forum


Home » Mailing lists » Devel » [-mm PATCH] Memory controller improve user interface (v3)
Re: [-mm PATCH] Memory controller improve user interface (v3) [message #19917 is a reply to message #19915] Tue, 04 September 2007 07:28 Go to previous messageGo to previous message
Balbir Singh is currently offline  Balbir Singh
Messages: 491
Registered: August 2006
Senior Member
Paul Menage wrote:
> On 9/3/07, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
>> Paul Menage wrote:
>>> On 9/2/07, Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
>>>> -       s += sprintf(s, "%lu\n", *val);
>>>> +       if (read_strategy)
>>>> +               s += read_strategy(*val, s);
>>>> +       else
>>>> +               s += sprintf(s, "%lu\n", *val);
>>> This would be better as %llu
>>>
>> Hi, Paul,
>>
>> This does not need fixing, since the other counters like failcnt are
>> still unsigned long
>>
> 
> But val is an unsigned long long*. So printing *val with %lu will
> break (at least a warning, and maybe corruption if you had other
> parameters) on 32-bit archs.
> 

Yeah... Hmm.. just wonder if all the counters should be unsigned long
long? failcnt is the only remaining unsigned long counter now.

-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: [PATCH] Send quota messages via netlink
Next Topic: Re: [DRAFT] Container mini-summit notes v0.01
Goto Forum:
  


Current Time: Tue Jul 15 21:47:47 GMT 2025

Total time taken to generate the page: 0.05590 seconds