linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: linux-mm@kvack.org
Subject: Re: [RFC][PATCH 1/7] generic PAGE_SIZE infrastructure (v2)
Date: Mon, 28 Aug 2006 10:11:59 -0700	[thread overview]
Message-ID: <1156785119.5913.25.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.64.0608280954100.27677@schroedinger.engr.sgi.com>

On Mon, 2006-08-28 at 10:01 -0700, Christoph Lameter wrote:
> On Mon, 28 Aug 2006, Dave Hansen wrote:
> > +/* align addr on a size boundary - adjust address up/down if needed */
> > +#define _ALIGN_UP(addr,size)    (((addr)+((size)-1))&(~((size)-1)))
> > +#define _ALIGN_DOWN(addr,size)  ((addr)&(~((size)-1)))
> > +
> > +/* align addr on a size boundary - adjust address up if needed */
> > +#define _ALIGN(addr,size)     _ALIGN_UP(addr,size)
> 
> Note that there is a generic ALIGN macro in include/linux/kernel.h plus
> __ALIGNs in linux/linkage.h. Could you use that and get to some sane 
> conventin for all these ALIGN functions?

Sure.  I'll take a look.

> > +#
> > +# On PPC32 page size is 4K. For PPC64 we support either 4K or 64K software
> > +# page size. When using 64K pages however, whether we are really supporting
> > +# 64K pages in HW or not is irrelevant to those definitions.
> > +#
> 
> I guess this is an oversight. This has nothing to do with generic and does 
> not belong into mm/Kconfig

Yeah, this is gunk.  I'll put it back where it belongs.

> > +choice
> > +	prompt "Kernel Page Size"
> > +	depends on ARCH_GENERIC_PAGE_SIZE
> > +config PAGE_SIZE_4KB
> > +	bool "4KB"
> > +	help
> > +	  This lets you select the page size of the kernel.  For best 64-bit
> > +	  performance, a page size of larger than 4k is recommended.  For best
> > +	  32-bit compatibility on 64-bit architectures, a page size of 4KB
> > +	  should be selected (although most binaries work perfectly fine with
> > +	  a larger page size).
> > +
> > +	  4KB                For best 32-bit compatibility
> > +	  8KB and up         For best performance
> > +	  above 64k	     For kernel hackers only
> > +
> > +	  If you don't know what to do, choose 8KB (if available).
> > +	  Otherwise, choose 4KB.
> 
> The above also would need to be genericized.

That is genericized. ;)  Are there some bits that don't fit ia64 well?

> > +config PAGE_SIZE_8KB
> > +	bool "8KB"
> > +config PAGE_SIZE_16KB
> > +	bool "16KB"
> > +config PAGE_SIZE_64KB
> > +	bool "64KB"
> > +config PAGE_SIZE_512KB
> > +	bool "512KB"
> > +config PAGE_SIZE_4MB
> > +	bool "4MB"
> > +endchoice
> 
> But not all arches support this. Choices need to be restricted to what the 
> arch supports. What about support for other pagesizes in the future. IA64 
> could f.e.  support 128k and 256K pages sizes.

Take a look a few patches further down in the series.  Let me know if
this isn't resolved.  

-- Dave

--
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-08-28 17:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-28 15:44 Dave Hansen
2006-08-28 15:44 ` [RFC][PATCH 3/7] sparc64 generic PAGE_SIZE Dave Hansen
2006-08-28 15:44 ` [RFC][PATCH 2/7] ia64 " Dave Hansen
2006-08-28 17:04   ` Christoph Lameter
2006-08-28 17:22     ` Dave Hansen
2006-08-28 17:32       ` Christoph Lameter
2006-08-28 17:45         ` Dave Hansen
2006-08-29  2:46   ` [RFC][PATCH 1/7] generic PAGE_SIZE infrastructure (v2) Paul Mundt
2006-08-29  3:51     ` Randy.Dunlap
2006-08-29  3:55       ` Paul Mundt
2006-08-29  4:02         ` Randy.Dunlap
2006-08-29 15:29     ` Dave Hansen
2006-08-30  0:37       ` Randy.Dunlap
2006-08-28 15:44 ` [RFC][PATCH 4/7] mips generic PAGE_SIZE Dave Hansen
2006-08-28 15:44 ` [RFC][PATCH 5/7] parisc " Dave Hansen
2006-08-28 15:44 ` [RFC][PATCH 6/7] powerpc " Dave Hansen
2006-08-28 15:44 ` [RFC][PATCH 7/7] convert the "easy" architectures to " Dave Hansen
2006-08-28 17:01 ` [RFC][PATCH 1/7] generic PAGE_SIZE infrastructure (v2) Christoph Lameter
2006-08-28 17:11   ` Dave Hansen [this message]
2006-08-28 23:32     ` Peter Chubb
2006-08-29 18:59       ` Dave Hansen
2006-08-28 20:53   ` Dave Hansen
2006-08-28 21:44     ` Christoph Lameter

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=1156785119.5913.25.camel@localhost.localdomain \
    --to=haveblue@us.ibm.com \
    --cc=clameter@sgi.com \
    --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