linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Scott Cheloha <cheloha@linux.ibm.com>
To: linuxppc-dev@lists.ozlabs.org, Michael Ellerman <mpe@ellerman.id.au>
Cc: Nathan Lynch <nathanl@linux.ibm.com>,
	Nathan Fontenont <ndfont@gmail.com>,
	Michal Hocko <mhocko@suse.com>,
	Michal Suchanek <msuchanek@suse.com>,
	David Hildenbrand <david@redhat.com>,
	linux-kernel@vger.kernel.org,
	Rick Lindley <ricklind@linux.vnet.ibm.com>
Subject: pseries: accelerate drmem and simplify hotplug with xarrays
Date: Fri, 21 Feb 2020 11:29:00 -0600	[thread overview]
Message-ID: <20200221172901.1596249-1-cheloha@linux.ibm.com> (raw)
In-Reply-To: <20200128221113.17158-1-cheloha@linux.ibm.com>

This patch series introduces two xarrays of LMBs in an effort to speed
up the drmem code and simplify the hotplug code on pseries machines.

The first patch introduces an xarray of LMBs indexed by physical
address.  xa_load() is then used to accelerate LMB lookup during
memory_add_physaddr_to_nid().  The interface is used during boot,
in drmem_init(), and memory hot-add, in dlpar_add_lmb(), on pseries
machines.  Its linear LMB search is a serious bottleneck on larger
machines that xa_load() flattens nicely as shown in the before/after
example.

The second patch introduces a second xarray of LMBs, this one
indexed by DRC index.  The xarray API is leveraged to replace
the custom LMB search/iteration/marking code currently used in
the pseries memory hotplug module.  The result is cleaner and,
again thanks to xa_load(), faster.

v1: One big patch.

v2 changes:
- Split up the big patch from v1 into a series.
- Provide a more dramatic example in patch 1/2 to emphasize the
  linear search bottleneck in memory_add_physaddr_to_nid().
- Expand the use of the xarray API in patch 2/2 to replace more
  custom code.


  parent reply	other threads:[~2020-02-21 17:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-28 22:11 [PATCH] powerpc/drmem: cache LMBs in xarray to accelerate lookup Scott Cheloha
2020-01-28 23:56 ` Nathan Lynch
2020-01-29 18:10   ` Scott Cheloha
2020-01-30 16:09     ` Fontenot, Nathan
2020-02-03 20:13       ` Scott Cheloha
2020-02-05 14:33         ` Fontenot, Nathan
2020-02-04 16:19   ` Scott Cheloha
2020-02-21 17:29 ` Scott Cheloha [this message]
2020-02-21 17:29 ` [PATCH v2 1/2] powerpc/drmem: accelerate memory_add_physaddr_to_nid() with LMB xarray Scott Cheloha
2020-02-21 20:02   ` Nathan Lynch
2020-07-22 23:00   ` Anton Blanchard
2020-02-21 17:29 ` [PATCH v2 2/2] pseries/hotplug-memory: leverage xarray API to simplify code Scott Cheloha
2020-02-21 20:03   ` Nathan Lynch
2020-02-21 18:11 ` [PATCH] powerpc/drmem: cache LMBs in xarray to accelerate lookup Nathan Lynch
2020-02-21 18:28   ` 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=20200221172901.1596249-1-cheloha@linux.ibm.com \
    --to=cheloha@linux.ibm.com \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mhocko@suse.com \
    --cc=mpe@ellerman.id.au \
    --cc=msuchanek@suse.com \
    --cc=nathanl@linux.ibm.com \
    --cc=ndfont@gmail.com \
    --cc=ricklind@linux.vnet.ibm.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).