LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Mel Gorman <mel@csn.ul.ie>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Christoph Lameter <clameter@engr.sgi.com>
Subject: Re: [PATCH 0/8] Create ZONE_MOVABLE to partition memory between movable and non-movable pages
Date: Fri, 26 Jan 2007 14:29:44 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0701261334240.19245@skynet.skynet.ie> (raw)
In-Reply-To: <20070126030753.03529e7a.akpm@osdl.org>

On Fri, 26 Jan 2007, Andrew Morton wrote:

> On Thu, 25 Jan 2007 23:44:58 +0000 (GMT)
> Mel Gorman <mel@csn.ul.ie> wrote:
>
>> The following 8 patches against 2.6.20-rc4-mm1 create a zone called
>> ZONE_MOVABLE
>
> Argh.  These surely get all tangled up with the
> make-zones-optional-by-adding-zillions-of-ifdef patches:
>

There may be some entertainment there all right. I didn't see any obvious 
way of avoiding collisions with those patches but for what it's worth, 
ZONE_MOVABLE could also be made optional.

In this patchset, I made no assumptions about the number of zones other 
than the value of MAX_NR_ZONES. There should be no critical collisions but 
I'll look through this patch list and see what I can spot.

> deal-with-cases-of-zone_dma-meaning-the-first-zone.patch

This patch looks ok and looks like it stands on it's own.

> introduce-config_zone_dma.patch

ok, no collisions here but obviously this patch does not stand on it's 
own.

> optional-zone_dma-in-the-vm.patch

There are collisions here with the __ZONE_COUNT stuff but it's not 
difficult to work around.

> optional-zone_dma-in-the-vm-no-gfp_dma-check-in-the-slab-if-no-config_zone_dma-is-set.patch
> optional-zone_dma-in-the-vm-no-gfp_dma-check-in-the-slab-if-no-config_zone_dma-is-set-reduce-config_zone_dma-ifdefs.patch

There is no cross-over here with the ZONE_MOVABLE patches. They are 
messing around with slab

> optional-zone_dma-for-ia64.patch

No collision here

> remove-zone_dma-remains-from-parisc.patch
> remove-zone_dma-remains-from-sh-sh64.patch

No collisions here either. I see that there were discussions about Power 
potentially doing something similar.

> set-config_zone_dma-for-arches-with-generic_isa_dma.patch

No collisions

> zoneid-fix-up-calculations-for-zoneid_pgshift.patch
>

Fun, but no collisions.

To my suprise, I only spotted one major conflict point with 
optional-zone_dma-in-the-vm.patch and that should be easy enough to 
resolve. What I could do is break up one of my patches into 
most-of-the-patch and the-part-that-may-conflict-with-optional-dma-zone . 
The smaller part would then change depending on whether the optional DMA 
zone work is present. Would that be any help?

> My objections to those patches:
>
> - They add zillions of ifdefs
>
> - They make the VM's behaviour diverge between different platforms and
>  between differen configs on the same platforms, and hence degrade
>  maintainability and increase complexity.
>

I haven't thought about it much so I probably am missing something. The 
major difference I see is when only one zone is present. In that case, a 
number of loops presumably get optimised away and the behavior is very 
different (presumably better although you point out no figures exist to 
prove it). Where there are two or more zones, the code paths should be 
similar whether there are 2, 3 or 4 zones present.

As the common platforms will always have more than one zone, it'll be 
heavily tested and I'm guessing that distros are always going to have to 
ship kernels with ZONE_DMA for the devices that require it. The only 
platform I see that may have problems at the moment is IA64 which looks 
like the only platform that can have one and only one zone. I am guessing 
that Christoph will catch problems here fairly quickly although a 
non-optional ZONE_MOVABLE would throw a spanner into the works somewhat.

> - We kicked around some quite different ways of implementing the same
>  things, but nothing came of it.  iirc, one was to remove the hard-coded
>  zones altogether and rework all the MM to operate in terms of
>
> 	for (idx = 0; idx < NUMBER_OF_ZONES; idx++)
> 		...
>

hmm. Assuming the aim is to have a situation where all zone-related loops 
are optimised away at compile-time, it's hard to see an alternative that 
works. Any dynamic way of creating zone at boot time will not have the 
compile-time optimizations and any API that is page-range aware will 
eventually hit the problems zones were made to solve (i.e. unmovable pages 
locked in the lower address ranges).

> - I haven't seen any hard numbers to justify the change.
>
> So I want to drop them all.
>

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

  reply	other threads:[~2007-01-26 14:29 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-25 23:44 Mel Gorman
2007-01-25 23:45 ` [PATCH 1/8] Add __GFP_MOVABLE for callers to flag allocations that may be migrated Mel Gorman
2007-01-26 12:27   ` Nick Piggin
2007-01-26 13:25     ` Mel Gorman
2007-01-25 23:45 ` [PATCH 2/8] Create the ZONE_MOVABLE zone Mel Gorman
2007-01-26 16:28   ` Christoph Lameter
2007-01-26 16:49     ` Mel Gorman
2007-01-29 17:28     ` Mel Gorman
2007-01-26 17:16   ` Christoph Lameter
2007-01-26 17:24     ` Mel Gorman
2007-01-26 17:25       ` Christoph Lameter
2007-01-26 17:38         ` Mel Gorman
2007-01-29 17:31     ` Mel Gorman
2007-01-25 23:45 ` [PATCH 3/8] Allow huge page allocations to use GFP_HIGH_MOVABLE Mel Gorman
2007-01-26 16:33   ` Christoph Lameter
2007-01-26 16:58     ` Mel Gorman
2007-01-26 17:04       ` Christoph Lameter
2007-01-26 17:20         ` Mel Gorman
2007-01-26 17:22           ` Christoph Lameter
2007-01-26 17:37             ` Mel Gorman
2007-01-26 17:45               ` Christoph Lameter
2007-01-26 17:53                 ` Mel Gorman
2007-01-26 18:20                   ` Christoph Lameter
2007-01-26 20:37                     ` Mel Gorman
2007-01-26 18:35                   ` Chris Friesen
2007-01-26 20:44                     ` Mel Gorman
2007-01-26 21:37                       ` Chris Friesen
2007-01-25 23:46 ` [PATCH 4/8] x86 - Specify amount of kernel memory at boot time Mel Gorman
2007-01-25 23:46 ` [PATCH 5/8] ppc and powerpc " Mel Gorman
2007-01-25 23:46 ` [PATCH 6/8] x86_64 " Mel Gorman
2007-01-25 23:47 ` [PATCH 7/8] ia64 " Mel Gorman
2007-01-25 23:47 ` [PATCH 8/8] Add documentation for additional boot parameter and sysctl Mel Gorman
2007-01-26 11:07 ` [PATCH 0/8] Create ZONE_MOVABLE to partition memory between movable and non-movable pages Andrew Morton
2007-01-26 14:29   ` Mel Gorman [this message]
2007-01-26 16:01     ` Christoph Lameter
2007-01-26 15:56   ` Christoph Lameter
2007-01-26 19:46     ` Andrew Morton
2007-01-26 19:58       ` Christoph Lameter
2007-01-26 20:27         ` Andrew Morton
2007-01-29 21:54           ` Christoph Lameter
2007-01-29 22:36             ` Andrew Morton
2007-01-29 22:45               ` Christoph Lameter
2007-01-29 22:50                 ` Russell King
2007-01-29 23:37                   ` Christoph Lameter
2007-01-30  0:09                     ` Andrew Morton
2007-01-30  9:53                       ` Peter Zijlstra
2007-02-02  5:27                         ` Christoph Lameter
2007-02-02  5:22                       ` Christoph Lameter
2007-01-26 16:21 ` Christoph Lameter
2007-01-26 16:48   ` Mel Gorman
2007-01-26 17:02     ` Christoph Lameter
2007-01-26 17:20       ` 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.64.0701261334240.19245@skynet.skynet.ie \
    --to=mel@csn.ul.ie \
    --cc=akpm@osdl.org \
    --cc=clameter@engr.sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --subject='Re: [PATCH 0/8] Create ZONE_MOVABLE to partition memory between movable and non-movable pages' \
    /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

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).