public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Anton Blanchard <anton@samba.org>
Cc: gregkh@suse.de, nfont@austin.ibm.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] memory hotplug: Speed up add/remove when blocks are larger than PAGES_PER_SECTION
Date: Wed, 11 May 2011 15:21:57 -0700	[thread overview]
Message-ID: <20110511222157.GA11840@kroah.com> (raw)
In-Reply-To: <20110511172514.7e30970d@kryten>

On Wed, May 11, 2011 at 05:25:14PM +1000, Anton Blanchard wrote:
> 
> On ppc64 the minimum memory section for hotplug is 16MB but most
> recent machines have a memory block size of 256MB. This means
> memory_block_change_state does 16 separate calls to
> memory_section_action.
> 
> This also means we call the notifiers 16 times and the hook
> in the ehea network driver is quite costly. To offline one 256MB
> region takes:
> 
> # time echo offline > /sys/devices/system/memory/memory32/state
> 7.9s
> 
> This patch removes the loop and calls online_pages or
> remove_memory once for the entire region and in doing so makes
> the logic simpler since we don't have to back out if things fail
> part way through.
> 
> The same test to offline one region now takes:
> 
> # time echo online > /sys/devices/system/memory/memory32/state
> 0.67s
> 
> Over 11 times faster.
> 
> Signed-off-by: Anton Blanchard <anton@samba.org>

Your patch introduced a compiler warning, care to send a follow-on patch
fixing this up:
	drivers/base/memory.c: In function ‘memory_block_change_state’:
	drivers/base/memory.c:281:6: warning: unused variable ‘i’

thanks,

greg k-h

      parent reply	other threads:[~2011-05-11 22:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-11  7:25 [PATCH] memory hotplug: Speed up add/remove when blocks are larger than PAGES_PER_SECTION Anton Blanchard
2011-05-11 15:19 ` Greg KH
2011-05-11 22:21 ` Greg KH [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=20110511222157.GA11840@kroah.com \
    --to=greg@kroah.com \
    --cc=anton@samba.org \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nfont@austin.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