On 10/11/2017 10:49 AM, Michael Ellerman wrote:
> Michael Ellerman <m...@ellerman.id.au> writes:
>> Michal Hocko <mho...@kernel.org> writes:
>>> On Tue 10-10-17 23:05:08, Michael Ellerman wrote:
>>>> Michal Hocko <mho...@kernel.org> writes:
>>>>> From: Michal Hocko <mho...@suse.com>
>>>>> Memory offlining can fail just too eagerly under a heavy memory pressure.
>>>>>
>>>>> [ 5410.336792] page:ffffea22a646bd00 count:255 mapcount:252 
>>>>> mapping:ffff88ff926c9f38 index:0x3
>>>>> [ 5410.336809] flags: 0x9855fe40010048(uptodate|active|mappedtodisk)
>>>>> [ 5410.336811] page dumped because: isolation failed
>>>>> [ 5410.336813] page->mem_cgroup:ffff8801cd662000
>>>>> [ 5420.655030] memory offlining [mem 0x18b580000000-0x18b5ffffffff] failed
>>>>>
>>>>> Isolation has failed here because the page is not on LRU. Most probably
>>>>> because it was on the pcp LRU cache or it has been removed from the LRU
>>>>> already but it hasn't been freed yet. In both cases the page doesn't look
>>>>> non-migrable so retrying more makes sense.
>>>> This breaks offline for me.
>>>>
>>>> Prior to this commit:
>>>>   /sys/devices/system/memory/memory0# time echo 0 > online
>>>>   -bash: echo: write error: Device or resource busy
>>>>   
>>>>   real     0m0.001s
>>>>   user     0m0.000s
>>>>   sys      0m0.001s
>>>>
>>>> After:
>>>>   /sys/devices/system/memory/memory0# time echo 0 > online
>>>>   -bash: echo: write error: Device or resource busy
>>>>   
>>>>   real     2m0.009s
>>>>   user     0m0.000s
>>>>   sys      1m25.035s
>>>>
>>>> There's no way that block can be removed, it contains the kernel text,
>>>> so it should instantly fail - which it used to.
>>> OK, that means that start_isolate_page_range should have failed but it
>>> hasn't for some reason. I strongly suspect has_unmovable_pages is doing
>>> something wrong. Is the kernel text marked somehow? E.g. PageReserved?
>> I'm not sure how the text is marked, will have to dig into that.
> Yeah it's reserved:
> 
>   $ grep __init_begin /proc/kallsyms
>   c000000000d70000 T __init_begin
>   $ ./page-types -r -a 0x0,0xd7
>                flags  page-count       MB  symbolic-flags                     
> long-symbolic-flags
>   0x0000000100000000         215       13  
> __________________________r_______________ reserved
>                total         215       13

Hey Michael,

What tool is this 'page-types' ?

Reply via email to