linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	Oscar Salvador <osalvador@suse.de>,
	Mel Gorman <mgorman@techsingularity.net>,
	Mike Rapoport <rppt@linux.ibm.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Wei Yang <richard.weiyang@gmail.com>,
	Alexander Duyck <alexander.h.duyck@linux.intel.com>,
	Anshuman Khandual <anshuman.khandual@arm.com>,
	Pavel Tatashin <pavel.tatashin@microsoft.com>
Subject: Re: [PATCH v1 1/2] mm/page_alloc.c: Don't set pages PageReserved() when offlining
Date: Tue, 22 Oct 2019 11:03:37 +0200	[thread overview]
Message-ID: <147fa325-16e3-d2e6-af5c-4cef258c120f@redhat.com> (raw)
In-Reply-To: <20191022085851.GF9379@dhcp22.suse.cz>

>> - and I remember that PG_reserved on memory holes is relevant to
>> detect MMIO pages. (e.g., looking at KVM code ...)
> 
> I can see kvm_is_reserved_pfn() which checks both pfn_valid and
> PageReserved. How does this help to detect memory holes though?
> Any driver might be setting the page reserved.

See my other mail. This is mostly to not touch MMIO pages and 
ZONE_DEVICE pages ... well and /dev/mem mapped pages.

>   
>>>>> Also is the hole inside a hotplugable memory something we really have to
>>>>> care about. Has anybody actually seen a platform to require that?
>>>>
>>>> That's what I was asking. I can see "support" for this was added basically
>>>> right from the beginning. I'd say we rip that out and cleanup/simplify. I am
>>>> not aware of a platform that requires this. Especially, memory holes on
>>>> DIMMs (detected during boot) seem like an unlikely thing.
>>>
>>> The thing is that the hotplug development shows ad-hoc decisions
>>> throughout the code. It is even worse that it is hard to guess whether
>>> some hludges are a result of a careful design or ad-hoc trial and
>>> failure approach on setups that never were production. Building on top
>>> of that be preserving hacks is not going to improve the situation. So I
>>> am perfectly fine to focus on making the most straightforward setups
>>> work reliably. Even when there is a risk of breaking some odd setups. We
>>> can fix them up later but we would have at least a specific example and
>>> document it.
>>>
>>
>> Alright, I'll prepare a simple patch that rejects offlining memory with
> 
> Is offlining an interesting path? I would expect onlining to be much
> more interesting one.

If you can't offline memory with holes, you can also not online memory 
with holes AFAIKS :)

Bootmem is online, and memory you can hotplug (initially offline) cannot 
have any holes.

-- 

Thanks,

David / dhildenb



  reply	other threads:[~2019-10-22  9:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21 14:19 [PATCH v1 0/2] mm: Memory offlining + page isolation cleanups David Hildenbrand
2019-10-21 14:19 ` [PATCH v1 1/2] mm/page_alloc.c: Don't set pages PageReserved() when offlining David Hildenbrand
2019-10-21 14:43   ` Michal Hocko
2019-10-21 15:39     ` David Hildenbrand
2019-10-21 15:47       ` Michal Hocko
2019-10-21 15:54         ` David Hildenbrand
2019-10-22  8:20           ` Michal Hocko
2019-10-22  8:23             ` David Hildenbrand
2019-10-22  8:58               ` Michal Hocko
2019-10-22  9:03                 ` David Hildenbrand [this message]
2019-10-21 14:19 ` [PATCH v1 2/2] mm/page_isolation.c: Convert SKIP_HWPOISON to MEMORY_OFFLINE David Hildenbrand
2019-10-21 15:02   ` Michal Hocko
2019-10-21 15:04     ` 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=147fa325-16e3-d2e6-af5c-4cef258c120f@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.h.duyck@linux.intel.com \
    --cc=anshuman.khandual@arm.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --cc=osalvador@suse.de \
    --cc=pavel.tatashin@microsoft.com \
    --cc=richard.weiyang@gmail.com \
    --cc=rppt@linux.ibm.com \
    --cc=vbabka@suse.cz \
    /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