linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mel Gorman <mel@csn.ul.ie>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: Linux Memory Management List <linux-mm@kvack.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	lhms-devel@lists.sourceforge.net
Subject: Re: [PATCH 4/7] ppc64 - Specify amount of kernel memory at boot time
Date: Fri, 17 Feb 2006 19:36:33 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0602171923180.7675@skynet> (raw)
In-Reply-To: <1140203856.21383.124.camel@localhost.localdomain>

On Fri, 17 Feb 2006, Dave Hansen wrote:

> On Fri, 2006-02-17 at 19:03 +0000, Mel Gorman wrote:
> > On Fri, 17 Feb 2006, Dave Hansen wrote:
> > > One thing I think we really need to see before these go into mainline is
> > > the ability to shrink the ZONE_EASYRCLM at runtime, and give the memory
> > > back to NORMAL/DMA.
> >
> > I consider this to be highly desirable, but I am not convinced it is a
> > prerequisite for zone-based-anti-frag because it is a problem that will
> > only affect admins specifying kernelcore= - i.e. a limited number of
> > people that care about getting more HugeTLB pages at runtime or removing
> > memory.
>
> Fair enough.  I guess it certainly shrinks the set.  But, I _really_
> think we need it before it gets into the hands of too many customers.  I
> hate to tell people to reboot boxes, and I hate adding boot options.
>

Ok, hard to argue with that logic but we knew we were going to be dealing
with some sort of tunable when zone-based-anti-frag was first discussed.

> If people start using kernelcore=, we're stuck with it for a long time.
> Why not just make the system flexible from the beginning?  I hate
> introducing hacky boot options only to have them removed 2 kernel
> revisions later when we fix it properly.
>
> Maybe the kernelcore= patch is a good candidate to stay in -mm during
> the transition time, but not ever follow along into mainline.  Dunno.
>

I would like to see this in -mm getting a trial while I work on the moving
pages from EasyRclm to DMA/HighMem problem. I feel that there is a logical
progression from kernelcore= boot option to a sysctl (or something
similar) that is adjustable at runtime. When the code exists to size the
zone at runtime, it can be built on top of the majority of this patchset.
They are not mutually exclusive.

Before even trying to get into -mm though, I should fix the
dealing-with-memory-holes-on-ppc first (more below).

> > If I think that zone-based anti-frag has a chance of getting into
> > mainline, I can start tackling the lowmem starvation issue as two separate
> > problems
> >
> > 1. There needs to be an ability to measure presure on lowmem at runtime to
> > help an admin decide if memory needs to be moved around or not. This would
> > have a secondary benefit for existing 32 bit x86 machines that need to
> > know that it is lowmem starvation and not lack of memory that is affecting
> > their loads and maybe an upgrade to a 64 bit machine is a good plan.
> >
> > 2. The ability to hot-add to a specified zone. When pressure is detected,
> > an admin would have the option to hot-remove from the EasyRclm area and
> > add the same memory back to the DMA/Normal zone. This will only work at a
> > pretty coarse granularity but it would be enough
>
> But, if you get the EasyRclm to DMA transition working properly, this
> problem goes away.  So, if you solve a problem in the kernel, the user
> gets fewer ways to screw up, _and_ you have less code to deal with that
> part of the user interface.
>

Well, they'll have different ways to screw up. Once the EasyRclm zone can
be resized, they might decide to migrate it all to DMA and then cannot
hotplug anything putting them back in square one. I need to think about
this a bit more to see how it'll work in practice.

> > > Users will _not_ care about memory holes.  They'll just want to specify
> > > a number of pages.  I think this:
> > >
> > > > +                       zones_size[ZONE_DMA] = core_mem_pfn;
> > > > +                       zones_size[ZONE_EASYRCLM] = end_pfn - core_mem_pfn;
> > >
> > > is probably bogus because it doesn't deal with holes at all.
> > >
> >
> > In this patch, if a region has holes in it, kernelcore is ignored because
> > holes would not be dealt with correctly. The check is made above with
> > end_pfn - start_pfn != pages_present
>
> I missed that.  Is that my fault for not looking closely enough, or the
> patch's fault for being a bit obtuse? ;)
>

c) all of the above. This section of the patch is not winning any prizes
for clarity.

> I think it is pretty bogus to just punt when it sees a memory hole.
> They really need to me dealt with properly.

Your previous mail about having a function similar to get_region() that
returns the number of present pages in a pfn range feels like the right
approach. I'll work on this before touching zone resizing and post another
version.

> Otherwise, you'll never
> hear about it until a customer complains that kernelcore= isn't working
> and they can't remove memory or use hugetlb pages on two "identical"
> systems.
>

Bah, you're right, I just am not too keen on admitting it on a Friday
evening :).

-- 
Mel Gorman
Part-time Phd Student                          Linux Technology Center
University of Limerick                         IBM Dublin Software Lab

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2006-02-17 19:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-17 14:15 [PATCH 0/7] Reducing fragmentation using zones v5 Mel Gorman
2006-02-17 14:16 ` [PATCH 1/7] Add __GFP_EASYRCLM flag and update callers Mel Gorman
2006-02-17 14:16 ` [PATCH 2/7] Create the ZONE_EASYRCLM zone Mel Gorman
2006-02-17 14:16 ` [PATCH 3/7] x86 - Specify amount of kernel memory at boot time Mel Gorman
2006-02-17 14:17 ` [PATCH 4/7] ppc64 " Mel Gorman
2006-02-17 17:16   ` Dave Hansen
2006-02-17 19:03     ` Mel Gorman
2006-02-17 19:17       ` Dave Hansen
2006-02-17 19:36         ` Mel Gorman [this message]
2006-02-17 21:31     ` Joel Schopp
2006-02-21 14:51     ` Mel Gorman
2006-02-21 17:35       ` Dave Hansen
2006-02-22 16:43         ` Mel Gorman
2006-02-23 16:42           ` Dave Hansen
2006-02-23 17:19             ` Mel Gorman
2006-02-23 17:38               ` Dave Hansen
2006-02-23 18:01                 ` Mel Gorman
2006-02-23 18:15                   ` Dave Hansen
2006-02-24  0:15                     ` KAMEZAWA Hiroyuki
2006-02-24  9:04                     ` Mel Gorman
2006-02-23 17:40               ` Mike Kravetz
2006-02-17 14:17 ` [PATCH 5/7] At boot, determine what zone memory will hot-add to Mel Gorman
2006-02-17 14:17 ` [PATCH 6/7] Allow HugeTLB allocations to use ZONE_EASYRCLM Mel Gorman
2006-02-17 14:18 ` [PATCH 7/7] Add documentation for extra boot parameters Mel Gorman

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=Pine.LNX.4.58.0602171923180.7675@skynet \
    --to=mel@csn.ul.ie \
    --cc=haveblue@us.ibm.com \
    --cc=lhms-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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