Re: [PATCH,RFC] Transparent SuperPage Support for 2.5.44

Naohiko Shimizu (nshimizu@keyaki.cc.u-tokai.ac.jp)
Mon, 4 Nov 2002 14:34:01 +0900


Hi,

On Sun, 3 Nov 2002 08:40:10 +0100
Pavel Machek <pavel@ucw.cz> wrote:

> Hi!
>
> > This is a transparent superpage support patch for 2.5.44.
> > Big difference between this patch and 2.4.19 patch is
> > eliminating of automatic dynamic downgrade for superpages.
> > Instead, I place pagesize adjust routine where required.
> > I hope this change minimize the overhead for conventional
> > programs which does not use superpages.
> >
> > Linux SuperPage patch is transparent for user applications.
> > It will automatically allocate appropriate size of superpages
> > if possible.
> > It does not allocate real strage unless the application
> > really access that area. And it does not allocate memory
> > larger than the application requests.
> >
> > This patch includes i386, alpha, sparc64 ports.
> > But I could not compile for alpha even with plain 2.5.44, and
> > I don't have sparc64 to test, then only i386 was tested now.
>

> How do you swap these 4mb beasts?

With this feature, when kernel needs to swap superpages,
it will first downgrade the page down to a basic page
before swapping.
Then we don't need to handle 4MB page for swapping.
I think that if we need to swap some pages, we should not
keep the superpage.

> And you need 4mb, physically continuous
> area for this to work, right? How do you
> get that?

I use buddy allocator of Linux. What I modifed on the
conventional buddy system is only the max order for x86.
Because normal buddy system of Linux only handle upto 2^9 size
of a page, and I need 2^10 for 4MB page on x86.
If buddy system does not have enough 4MB block when required,
we will downgrade the request to use 4KB page on x86 and
512KB page on Alpha or sparc64. We recuresively downgrade
the requesting page size down to the basic page size or
the size that buddy can allocate it.

-- 
Naohiko Shimizu
Dept. Communications Engineering/Tokai University
1117 Kitakaname Hiratsuka 259-1292 Japan
TEL.+81-463-58-1211(ext. 4084) FAX.+81-463-58-8320
http://shimizu-lab.dt.u-tokai.ac.jp/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/