All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: David Hildenbrand <david@redhat.com>
Cc: Pavel Tatashin <pasha.tatashin@oracle.com>,
	Linux Memory Management List <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	gregkh@linuxfoundation.org, mingo@kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	dan.j.williams@intel.com, jack@suse.cz, mawilcox@microsoft.com,
	jglisse@redhat.com, Souptick Joarder <jrdr.linux@gmail.com>,
	kirill.shutemov@linux.intel.com, Vlastimil Babka <vbabka@suse.cz>,
	osalvador@techadventures.net, yasu.isimatu@gmail.com,
	malat@debian.org, Mel Gorman <mgorman@suse.de>,
	iamjoonsoo.kim@lge.com
Subject: Re: [PATCH v1] mm: inititalize struct pages when adding a section
Date: Mon, 30 Jul 2018 16:10:58 +0200	[thread overview]
Message-ID: <20180730141058.GV24267@dhcp22.suse.cz> (raw)
In-Reply-To: <56e97799-fbe1-9546-46ab-a9b8ee8794e0@redhat.com>

On Mon 30-07-18 15:51:45, David Hildenbrand wrote:
> On 30.07.2018 15:30, Pavel Tatashin wrote:
[...]
> > Hi David,
> > 
> > Have you figured out why we access struct pages during hot-unplug for
> > offlined memory? Also, a panic trace would be useful in the patch.
> 
> __remove_pages() needs a zone as of now (e.g. to recalculate if the zone
> is contiguous). This zone is taken from the first page of memory to be
> removed. If the struct pages are uninitialized that value is random and
> we might even get an invalid zone.
>
> The zone is also used to locate pgdat.
> 
> No stack trace available so far, I'm just reading the code and try to
> understand how this whole memory hotplug/unplug machinery works.

Yes this is a mess (evolution of the code called otherwise ;) [1].
Functionality has been just added on top of not very well thought
through bases. This is a nice example of it. We are trying to get a zone
to 1) special case zone_device 2) recalculate zone state. The first
shouldn't be really needed because we should simply rely on altmap.
Whether it is used for zone device or not. 2) shouldn't be really needed
if the section is offline and we can check that trivially.

[1] on the other hand I can see why people were reluctant to understand
the mess and rather tweak their tiny thing on top...
-- 
Michal Hocko
SUSE Labs

  reply	other threads:[~2018-07-30 14:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27 16:54 [PATCH v1] mm: inititalize struct pages when adding a section David Hildenbrand
2018-07-27 16:54 ` David Hildenbrand
2018-07-27 17:25 ` Pavel Tatashin
2018-07-27 18:01   ` David Hildenbrand
2018-07-30 11:30 ` Michal Hocko
2018-07-30 11:53   ` David Hildenbrand
2018-07-30 12:05     ` Michal Hocko
2018-07-30 12:11       ` David Hildenbrand
2018-07-30 13:30         ` Pavel Tatashin
2018-07-30 13:51           ` David Hildenbrand
2018-07-30 14:10             ` Michal Hocko [this message]
2018-07-30 14:42               ` David Hildenbrand
2018-07-30 14:50                 ` Michal Hocko
2018-07-30 15:03                   ` David Hildenbrand
2018-07-30 15:45                     ` Pavel Tatashin

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=20180730141058.GV24267@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=dan.j.williams@intel.com \
    --cc=david@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=jack@suse.cz \
    --cc=jglisse@redhat.com \
    --cc=jrdr.linux@gmail.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=malat@debian.org \
    --cc=mawilcox@microsoft.com \
    --cc=mgorman@suse.de \
    --cc=mingo@kernel.org \
    --cc=osalvador@techadventures.net \
    --cc=pasha.tatashin@oracle.com \
    --cc=vbabka@suse.cz \
    --cc=yasu.isimatu@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.