linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
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:51:12 +0200	[thread overview]
Message-ID: <0ee3f0d3-470b-a42f-6b4b-805dfc891b7a@redhat.com> (raw)
In-Reply-To: <20191018113437.GJ5017@dhcp22.suse.cz>

On 18.10.19 13:34, Michal Hocko wrote:
> On Fri 18-10-19 13:00:45, 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 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)));
> 
> OK, I see what you mean now. In other words similar to eeb0efd071d82.
> 

Exactly.

-- 

Thanks,

David / dhildenb


      reply	other threads:[~2019-10-18 11:51 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
2019-10-18 11:56                 ` Qian Cai
2019-10-21  3:16                   ` Naoya Horiguchi
2020-05-15  2:46                     ` Qian Cai
2020-05-15  3:48                       ` HORIGUCHI NAOYA(堀口 直也)
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
2019-10-18 11:34                       ` Michal Hocko
2019-10-18 11:51                         ` David Hildenbrand [this message]

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=0ee3f0d3-470b-a42f-6b4b-805dfc891b7a@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).