Re: [PATCH] mm: disallow direct reclaim page writeback

From: Minchan Kim
Date: Wed Apr 14 2010 - 02:13:47 EST


On Wed, Apr 14, 2010 at 2:54 PM, KOSAKI Motohiro
<kosaki.motohiro@xxxxxxxxxxxxxx> wrote:
>> On Wed, Apr 14, 2010 at 01:59:45PM +0900, KAMEZAWA Hiroyuki wrote:
>> > On Wed, 14 Apr 2010 11:40:41 +1000
>> > Dave Chinner <david@xxxxxxxxxxxxx> wrote:
>> >
>> > > Â50) Â Â 3168 Â Â Â64 Â xfs_vm_writepage+0xab/0x160 [xfs]
>> > > Â51) Â Â 3104 Â Â 384 Â shrink_page_list+0x65e/0x840
>> > > Â52) Â Â 2720 Â Â 528 Â shrink_zone+0x63f/0xe10
>> >
>> > A bit OFF TOPIC.
>> >
>> > Could you share disassemble of shrink_zone() ?
>> >
>> > In my environ.
>> > 00000000000115a0 <shrink_zone>:
>> >  Â115a0:    55           Âpush  %rbp
>> >  Â115a1:    48 89 e5        Âmov  Â%rsp,%rbp
>> >  Â115a4:    41 57          push  %r15
>> >  Â115a6:    41 56          push  %r14
>> >  Â115a8:    41 55          push  %r13
>> >  Â115aa:    41 54          push  %r12
>> >  Â115ac:    53           Âpush  %rbx
>> >  Â115ad:    48 83 ec 78       sub  Â$0x78,%rsp
>> > Â Â115b1: Â Â Â e8 00 00 00 00 Â Â Â Â Âcallq Â115b6 <shrink_zone+0x16>
>> >  Â115b6:    48 89 75 80       mov  Â%rsi,-0x80(%rbp)
>> >
>> > disassemble seems to show 0x78 bytes for stack. And no changes to %rsp
>> > until retrun.
>>
>> I see the same. I didn't compile those kernels, though. IIUC,
>> they were built through the Ubuntu build infrastructure, so there is
>> something different in terms of compiler, compiler options or config
>> to what we are both using. Most likely it is the compiler inlining,
>> though Chris's patches to prevent that didn't seem to change the
>> stack usage.
>>
>> I'm trying to get a stack trace from the kernel that has shrink_zone
>> in it, but I haven't succeeded yet....
>
> I also got 0x78 byte stack usage. Umm.. Do we discussed real issue now?
>

In my case, 0x110 byte in 32 bit machine.
I think it's possible in 64 bit machine.

00001830 <shrink_zone>:
1830: 55 push %ebp
1831: 89 e5 mov %esp,%ebp
1833: 57 push %edi
1834: 56 push %esi
1835: 53 push %ebx
1836: 81 ec 10 01 00 00 sub $0x110,%esp
183c: 89 85 24 ff ff ff mov %eax,-0xdc(%ebp)
1842: 89 95 20 ff ff ff mov %edx,-0xe0(%ebp)
1848: 89 8d 1c ff ff ff mov %ecx,-0xe4(%ebp)
184e: 8b 41 04 mov 0x4(%ecx)

my gcc is following as.

barrios@barriostarget:~/mmotm$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.3.3-5ubuntu4'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--enable-mpfr --enable-targets=all --with-tune=generic
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)


Is it depends on config?
I attach my config.

> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@xxxxxxxxxx ÂFor more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>
>



--
Kind regards,
Minchan Kim

Attachment: barrios_config
Description: Binary data