public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: "Michal Suchánek" <msuchanek@suse•de>
To: Scott Cheloha <cheloha@linux•ibm.com>
Cc: Nathan Lynch <nathanl@linux•ibm.com>,
	Nathan Fontenont <ndfont@gmail•com>,
	David Hildenbrand <david@redhat•com>,
	Aneesh Kumar <aneesh.kumar@linux•ibm.com>,
	Paul Mackerras <paulus@samba•org>,
	linuxppc-dev@lists•ozlabs.org,
	Rick Lindsley <ricklind@linux•vnet.ibm.com>
Subject: Re: [RFC PATCH v1] pseries/drmem: don't cache node id in drmem_lmb struct
Date: Thu, 12 Mar 2020 06:02:37 +0100	[thread overview]
Message-ID: <20200312050237.GP1776@kitsune.suse.cz> (raw)
In-Reply-To: <20200311230815.1432367-1-cheloha@linux.ibm.com>

On Wed, Mar 11, 2020 at 06:08:15PM -0500, Scott Cheloha wrote:
> At memory hot-remove time we can retrieve an LMB's nid from its
> corresponding memory_block.  There is no need to store the nid
> in multiple locations.
> 
> Signed-off-by: Scott Cheloha <cheloha@linux•ibm.com>
> ---
> The linear search in powerpc's memory_add_physaddr_to_nid() has become a
> bottleneck at boot on systems with many LMBs.
> 
> As described in this patch here:
> 
> https://lore.kernel.org/linuxppc-dev/20200221172901.1596249-2-cheloha@linux.ibm.com/
> 
> the linear search seriously cripples drmem_init().
> 
> The obvious solution (shown in that patch) is to just make the search
> in memory_add_physaddr_to_nid() faster.  An XArray seems well-suited
> to the task of mapping an address range to an LMB object.
> 
> The less obvious approach is to just call memory_add_physaddr_to_nid()
> in fewer places.
> 
> I'm not sure which approach is correct, hence the RFC.

You basically revert the below which will likely cause the very error
that was fixed there:

commit b2d3b5ee66f2a04a918cc043cec0c9ed3de58f40
Author: Nathan Fontenot <nfont@linux•vnet.ibm.com>
Date:   Tue Oct 2 10:35:59 2018 -0500

    powerpc/pseries: Track LMB nid instead of using device tree
    
    When removing memory we need to remove the memory from the node
    it was added to instead of looking up the node it should be in
    in the device tree.
    
    During testing we have seen scenarios where the affinity for a
    LMB changes due to a partition migration or PRRN event. In these
    cases the node the LMB exists in may not match the node the device
    tree indicates it belongs in. This can lead to a system crash
    when trying to DLPAR remove the LMB after a migration or PRRN
    event. The current code looks up the node in the device tree to
    remove the LMB from, the crash occurs when we try to offline this
    node and it does not have any data, i.e. node_data[nid] == NULL.

Thanks

Michal

  reply	other threads:[~2020-03-12  5:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11 23:08 [RFC PATCH v1] pseries/drmem: don't cache node id in drmem_lmb struct Scott Cheloha
2020-03-12  5:02 ` Michal Suchánek [this message]
2020-03-12 16:07   ` Scott Cheloha
2020-03-30 17:07     ` Nathan Lynch

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=20200312050237.GP1776@kitsune.suse.cz \
    --to=msuchanek@suse$(echo .)de \
    --cc=aneesh.kumar@linux$(echo .)ibm.com \
    --cc=cheloha@linux$(echo .)ibm.com \
    --cc=david@redhat$(echo .)com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=nathanl@linux$(echo .)ibm.com \
    --cc=ndfont@gmail$(echo .)com \
    --cc=paulus@samba$(echo .)org \
    --cc=ricklind@linux$(echo .)vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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