From: David Hildenbrand <david@redhat.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>,
Qian Cai <cai@lca.pw>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
Mike Kravetz <mike.kravetz@oracle.com>
Subject: Re: memory offline infinite loop after soft offline
Date: Fri, 18 Oct 2019 13:05:10 +0200 [thread overview]
Message-ID: <85f944c7-62b8-0784-2f1f-e762b974d317@redhat.com> (raw)
In-Reply-To: <3ac0ad7a-7dd2-c851-858d-2986fa8d44b6@redhat.com>
On 18.10.19 13:00, David Hildenbrand wrote:
> On 18.10.19 10:55, Michal Hocko wrote:
>> On Fri 18-10-19 10:38:21, David Hildenbrand wrote:
>>> On 18.10.19 10:24, Michal Hocko wrote:
>>>> On Fri 18-10-19 10:13:36, David Hildenbrand wrote:
>>>> [...]
>>>>> However, if the compound page spans multiple pageblocks
>>>>
>>>> Although hugetlb pages spanning pageblocks are possible this shouldn't
>>>> matter in__test_page_isolated_in_pageblock because this function doesn't
>>>> really operate on pageblocks as the name suggests. It is simply
>>>> traversing all valid RAM ranges (see walk_system_ram_range).
>>>
>>> As long as the hugepages don't span memory blocks/sections, you are right. I
>>> have no experience with gigantic pages in this regard.
>>
>> They can clearly span sections (1GB is larger than 128MB). Why do you
>> think it matters actually? walk_system_ram_range walks RAM ranges and no
>> allocation should span holes in RAM right?
>>
>
> Let's explore what I was thinking. If we can agree that any compound
> page is always aligned to its size , then what I tell here is not
> applicable. I know it is true for gigantic pages.
>
> Some extreme example to clarify
>
> [ memory block 0 (128MB) ][ memory block 1 (128MB) ]
> [ compound page (128MB) ]
>
> If you would offline memory block 1, and you detect PG_offline on the
s/PG_offline/PG_hwpoison/ :)
> first page of that memory block (PageHWPoison(compound_head(page))), you
> would jump over the whole memory block (pfn += 1 <<
> compound_order(page)), leaving 64MB of the memory block unchecked.
>
> Again, if any compound page has the alignment restrictions (PFN of head
> aligned to 1 << compound_order(page)), this is not possible.
>
>
> If it is, however, possible, the "clean" thing would be to only jump
> over the remaining part of the compound page, e.g., something like
>
> pfn += (1 << compound_order(page)) - (page - compound_head(page)));
>
>
>
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2019-10-18 11:05 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-11 21:32 memory offline infinite loop after soft offline Qian Cai
2019-10-12 10:30 ` osalvador
2019-10-14 8:39 ` Michal Hocko
2019-10-17 9:34 ` Naoya Horiguchi
2019-10-17 10:01 ` Michal Hocko
2019-10-17 10:03 ` David Hildenbrand
2019-10-17 18:07 ` Qian Cai
2019-10-17 18:27 ` Michal Hocko
2019-10-18 2:19 ` Naoya Horiguchi
2019-10-18 6:06 ` Michal Hocko
2019-10-18 6:32 ` Naoya Horiguchi
2019-10-18 7:33 ` Michal Hocko
2019-10-18 8:46 ` Naoya Horiguchi
[not found] ` <64DC81FB-C1D2-44F2-981F-C6F766124B91@lca.pw>
2019-10-21 3:16 ` Naoya Horiguchi
2020-05-15 2:46 ` Qian Cai
2020-05-15 3:48 ` HORIGUCHI NAOYA(堀口 直也)
2020-05-19 4:17 ` Qian Cai
2019-10-18 8:13 ` David Hildenbrand
2019-10-18 8:24 ` Michal Hocko
2019-10-18 8:38 ` David Hildenbrand
2019-10-18 8:55 ` Michal Hocko
2019-10-18 11:00 ` David Hildenbrand
2019-10-18 11:05 ` David Hildenbrand [this message]
2019-10-18 11:34 ` Michal Hocko
2019-10-18 11:51 ` David Hildenbrand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=85f944c7-62b8-0784-2f1f-e762b974d317@redhat.com \
--to=david@redhat.com \
--cc=cai@lca.pw \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=n-horiguchi@ah.jp.nec.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).