2010-11-05 05:55:43

by Dave Young

[permalink] [raw]
Subject: Re: mmotm 2010-11-03-12-17: memcg build fail

Forgot cc lkml

On Fri, Nov 5, 2010 at 1:54 PM, Dave Young <[email protected]> wrote:
> Hi,
>
> Build failed without __divdi3 on i386, known issue?
>
> mm/built-in.o: In function `mem_cgroup_dirty_info':
> /home/dave/vdb/build/mm/linux-2.6.36/mm/memcontrol.c:1251: undefined
> reference to `__divdi3'
> /home/dave/vdb/build/mm/linux-2.6.36/mm/memcontrol.c:1259: undefined
> reference to `__divdi3'
> make: *** [.tmp_vmlinux1] Error 1
>
> --
> Regards
> dave
>



--
Regards
dave


2010-11-05 06:39:08

by Minchan Kim

[permalink] [raw]
Subject: Re: mmotm 2010-11-03-12-17: memcg build fail

On Fri, Nov 5, 2010 at 2:55 PM, Dave Young <[email protected]> wrote:
> Forgot cc lkml
>
> On Fri, Nov 5, 2010 at 1:54 PM, Dave Young <[email protected]> wrote:
>> Hi,
>>
>> Build failed without __divdi3 on i386, known issue?
>>
>> mm/built-in.o: In function `mem_cgroup_dirty_info':
>> /home/dave/vdb/build/mm/linux-2.6.36/mm/memcontrol.c:1251: undefined
>> reference to `__divdi3'
>> /home/dave/vdb/build/mm/linux-2.6.36/mm/memcontrol.c:1259: undefined
>> reference to `__divdi3'
>> make: *** [.tmp_vmlinux1] Error 1
>>

We should have used do_div.
Below patch solve the problem?

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 76386f4..8e6bb59 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1247,18 +1247,19 @@ bool mem_cgroup_dirty_info(unsigned long
sys_available_mem,
if (dirty_param.dirty_bytes)
info->dirty_thresh =
DIV_ROUND_UP(dirty_param.dirty_bytes, PAGE_SIZE);
- else
- info->dirty_thresh =
- (dirty_param.dirty_ratio * available_mem) / 100;
+ else {
+ info->dirty_thresh = dirty_param.dirty_ratio * available_mem;
+ do_div(info->dirty_thresh, 100);
+ }

if (dirty_param.dirty_background_bytes)
info->background_thresh =
DIV_ROUND_UP(dirty_param.dirty_background_bytes,
PAGE_SIZE);
- else
- info->background_thresh =
- (dirty_param.dirty_background_ratio *
- available_mem) / 100;
+ else {
+ info->background_thresh =
dirty_param.dirty_background_ratio * available_mem;
+ do_div(info->background_thresh, 100);
+ }

info->nr_reclaimable =
mem_cgroup_page_stat(MEMCG_NR_RECLAIM_PAGES);

>> --
>> Regards
>> dave
>>
>
>
>
> --
> Regards
> dave
>



--
Kind regards,
Minchan Kim

2010-11-05 07:07:19

by Dave Young

[permalink] [raw]
Subject: Re: mmotm 2010-11-03-12-17: memcg build fail

On Fri, Nov 5, 2010 at 2:39 PM, Minchan Kim <[email protected]> wrote:
> On Fri, Nov 5, 2010 at 2:55 PM, Dave Young <[email protected]> wrote:
>> Forgot cc lkml
>>
>> On Fri, Nov 5, 2010 at 1:54 PM, Dave Young <[email protected]> wrote:
>>> Hi,
>>>
>>> Build failed without __divdi3 on i386, known issue?
>>>
>>> mm/built-in.o: In function `mem_cgroup_dirty_info':
>>> /home/dave/vdb/build/mm/linux-2.6.36/mm/memcontrol.c:1251: undefined
>>> reference to `__divdi3'
>>> /home/dave/vdb/build/mm/linux-2.6.36/mm/memcontrol.c:1259: undefined
>>> reference to `__divdi3'
>>> make: *** [.tmp_vmlinux1] Error 1
>>>
>
> We should have used do_div.
> Below patch solve the problem?

Hi,

quilt report it as malformed, I create a patch mannualy, and It works.
Feel free to add my tested-by line
--
Regards
dave

2010-11-05 07:21:26

by Minchan Kim

[permalink] [raw]
Subject: Re: mmotm 2010-11-03-12-17: memcg build fail

On Fri, Nov 5, 2010 at 4:07 PM, Dave Young <[email protected]> wrote:
> On Fri, Nov 5, 2010 at 2:39 PM, Minchan Kim <[email protected]> wrote:
>> On Fri, Nov 5, 2010 at 2:55 PM, Dave Young <[email protected]> wrote:
>>> Forgot cc lkml
>>>
>>> On Fri, Nov 5, 2010 at 1:54 PM, Dave Young <[email protected]> wrote:
>>>> Hi,
>>>>
>>>> Build failed without __divdi3 on i386, known issue?
>>>>
>>>> mm/built-in.o: In function `mem_cgroup_dirty_info':
>>>> /home/dave/vdb/build/mm/linux-2.6.36/mm/memcontrol.c:1251: undefined
>>>> reference to `__divdi3'
>>>> /home/dave/vdb/build/mm/linux-2.6.36/mm/memcontrol.c:1259: undefined
>>>> reference to `__divdi3'
>>>> make: *** [.tmp_vmlinux1] Error 1
>>>>
>>
>> We should have used do_div.
>> Below patch solve the problem?
>
> Hi,
>
> quilt report it as malformed, I create a patch mannualy, and It works.
> Feel free to add my tested-by line


In my office, I couldn't use any port except 80.
Gmail's web interface always mangles the content. (I hope gmail
supports plain mode)
I will send the formal patch after out of office.

Thanks for the testing.


> --
> Regards
> dave
>



--
Kind regards,
Minchan Kim