linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ankita Garg <ankita@in.ibm.com>
To: Dave Hansen <dave@linux.vnet.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,
	linux-pm@lists.linux-foundation.org, svaidy@linux.vnet.ibm.com,
	thomas.abraham@linaro.org
Subject: Re: [PATCH 00/10] mm: Linux VM Infrastructure to support Memory Power Management
Date: Fri, 17 Jun 2011 15:33:00 +0530	[thread overview]
Message-ID: <20110617100300.GA24954@in.ibm.com> (raw)
In-Reply-To: <1308240240.11430.115.camel@nimitz>

Hi,

On Thu, Jun 16, 2011 at 09:04:00AM -0700, Dave Hansen wrote:
> On Thu, 2011-06-16 at 09:50 +0530, Ankita Garg wrote:
> > - Correctly predicting memory pressure is difficult and thereby being
> >   able to online the required pages at the right time could be a
> >   challenge
> 
> For the sake of this discussion, let's forget about this.  There are
> certainly a lot of scenarios where turning memory on/off is necessary
> and useful _without_ knowing what kind of load the system is under.  "We
> just shut down our huge database, and now have 99% of RAM free" is a
> fine, dumb, metric.  We don't have to have magical pony memory pressure
> detection as a prerequisite.
>

I agree, but when using memory hotplug for managing memory power, it
would be important to correctly predict pressure so that performance is
not affected too much. Also, especially since memory would be offlined
only when memory is mostly idle. While in the case of CPU, a user space
daemon can automatically online/offline cpus based on load, but in the
case of memory, I guess a kernel thread that maintains global statistics
might have to be used.

> > - Memory hotplug is a heavy operation, so the overhead involved may be
> >   high
> 
> I'm curious.  Why do you say this?  Could you elaborate a bit on _how_
> memory hotplug is different from what you're doing here?  On powerpc, at
> least, we can do memory hotplug in areas as small as 16MB.  That's _way_
> smaller than what you're talking about here, and I would assume that
> smaller here means less overhead.
> 

To save any power, the entire memory unit (like a bank for PASR) will
have to be turned off (and hence offlined). The overhead in memory
hotplug is to migrate/free pages belonging to the sections and
creating/deleting the various memory management structures. Instead, if
we could have a framework like you mentiond below that could target
allocations away from certain areas of memory, the migration step will
not be needed. Further, the hardware would just turn off the memory and
the OS would retain all the memory management structures.

We intend to use memory regions to group the memory together into units
that can be independently power managed. We propose to achieve this by
re-ordering zones within the zonelist, such that zones from regions that
are the target for evacuation would be at the tail of the zonelist and
thus will not be prefered for allocations.

> > - Powering off memory is just one of the ways in which memory power could
> >   be saved. The platform can also dynamically transition areas of memory
> >   into a  content-preserving lower power state if it is not referenced
> >   for a pre-defined threshold of time. In such a case, we would need a
> >   mechanism to soft offline the pages - i.e, no new allocations to be
> >   directed to that memory
> 
> OK...  That's fine, but I think you're avoiding the question a bit.  You
> need to demonstrate that this 'regions' thing is necessary to do this,
> and that we can not get by just modifying what we have now.  For
> instance:
> 
> 1. Have something like khugepaged try to find region-sized chunks of
>    memory to free.
> 2. Modify the buddy allocator to be "picky" about when it lets you get 
>    access to these regions.

Managing pages belonging to multiple regions on the same buddy list
might make the buddy allocator more complex. But thanks for suggesting
the different approaches, will looking into these and get back to you.

> 3. Try to bunch up 'like allocations' like ZONE_MOVABLE does.
> 
> (2) could easily mean that we take the MAX_ORDER-1 buddy pages and treat
> them differently.  If the page being freed is going (or trying to go) in
> to a low power state, insert freed pages on to the tail, or on a special
> list.  When satisfying allocations, we'd make some bit of effort to
> return pages which are powered on.
> 

-- 
Regards,
Ankita Garg (ankita@in.ibm.com)
Linux Technology Center
IBM India Systems & Technology Labs,
Bangalore, India

  reply	other threads:[~2011-06-17 10:03 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-27 12:31 [PATCH 00/10] mm: Linux VM Infrastructure to support Memory Power Management Ankita Garg
2011-05-27 12:31 ` [PATCH 01/10] mm: Introduce the memory regions data structure Ankita Garg
2011-05-27 15:30   ` Dave Hansen
2011-05-27 18:20     ` Vaidyanathan Srinivasan
2011-05-27 21:31       ` Dave Hansen
2011-05-29  8:16         ` Ankita Garg
2011-05-31 17:34           ` Dave Hansen
2011-06-02  8:54             ` Ankita Garg
2011-05-27 12:31 ` [PATCH 02/10] mm: Helper routines Ankita Garg
2011-05-27 12:31 ` [PATCH 03/10] mm: Init zones inside memory regions Ankita Garg
2011-05-27 12:31 ` [PATCH 04/10] mm: Refer to zones from " Ankita Garg
2011-05-27 12:31 ` [PATCH 05/10] mm: Create zonelists Ankita Garg
2011-05-27 12:31 ` [PATCH 06/10] mm: Verify zonelists Ankita Garg
2011-05-27 12:31 ` [PATCH 07/10] mm: Modify vmstat Ankita Garg
2011-05-27 12:31 ` [PATCH 08/10] mm: Modify vmscan Ankita Garg
2011-05-27 12:31 ` [PATCH 09/10] mm: Reflect memory region changes in zoneinfo Ankita Garg
2011-05-27 12:31 ` [PATCH 10/10] mm: Create memory regions at boot-up Ankita Garg
2011-05-28 14:39   ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-28  7:56 ` [PATCH 00/10] mm: Linux VM Infrastructure to support Memory Power Management Andrew Morton
2011-05-28 13:16   ` Ankita Garg
2011-06-09 18:52   ` Paul E. McKenney
2011-06-10  0:51     ` Kyungmin Park
2011-06-10 15:11       ` Paul E. McKenney
2011-06-10 15:59         ` Matthew Garrett
2011-06-10 16:55           ` Paul E. McKenney
2011-06-10 17:05             ` Matthew Garrett
2011-06-10 17:19               ` Paul E. McKenney
2011-06-10 17:23                 ` Matthew Garrett
2011-06-10 17:52                   ` Paul E. McKenney
2011-06-10 18:08                     ` Matthew Garrett
2011-06-10 18:47                       ` Paul E. McKenney
2011-06-10 19:23                         ` Matthew Garrett
2011-06-10 19:37                           ` Paul E. McKenney
2011-06-10 20:12                             ` Matthew Garrett
2011-06-11  3:02                             ` Arjan van de Ven
2011-06-11 17:06                               ` Paul E. McKenney
2011-06-11 17:26                                 ` Arjan van de Ven
2011-06-12 23:07                                   ` Paul E. McKenney
2011-06-13 14:28                                     ` Arjan van de Ven
2011-06-13 23:04                                       ` Paul E. McKenney
2011-06-14  8:51                               ` Ankita Garg
2011-06-15 16:53                               ` Ankita Garg
2011-06-18  4:08                                 ` Arjan van de Ven
2011-06-10 17:33                 ` Ankita Garg
2011-06-11 17:08                   ` Paul E. McKenney
2011-07-12  5:31   ` amit kachhap
2011-06-13  4:47 ` KAMEZAWA Hiroyuki
2011-06-16  4:20   ` Ankita Garg
2011-06-16  9:12     ` KAMEZAWA Hiroyuki
2011-06-17 15:28       ` Ankita Garg
2011-06-19 23:53         ` KAMEZAWA Hiroyuki
2011-06-16 16:04     ` Dave Hansen
2011-06-17 10:03       ` Ankita Garg [this message]
2011-06-29 13:00 ` Ankita Garg
2011-06-29 17:06   ` Dave Hansen
2011-06-29 17:42     ` Ankita Garg
2011-06-29 17:59       ` Dave Hansen
2011-06-29 18:17         ` Vaidyanathan Srinivasan
2011-06-30  4:37           ` Ankita Garg
2011-06-29 20:11         ` Andi Kleen
2011-06-30  5:11           ` Ankita Garg
2011-06-29 18:07     ` Vaidyanathan Srinivasan
2011-07-06  8:45   ` Pekka Enberg
2011-07-06  9:01     ` Pekka Enberg
2011-07-06 16:50       ` Vaidyanathan Srinivasan
2011-07-06 16:41     ` Vaidyanathan Srinivasan
2011-07-06 20:20     ` david
2011-07-07  4:54       ` Ankita Garg
2011-07-07 18:00       ` Pekka Enberg
2011-07-08  1:32         ` david

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=20110617100300.GA24954@in.ibm.com \
    --to=ankita@in.ibm.com \
    --cc=dave@linux.vnet.ibm.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=svaidy@linux.vnet.ibm.com \
    --cc=thomas.abraham@linaro.org \
    /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).