lkml.org 
[lkml]   [2003]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: My own 3.5G patch - there was a bug in the patch I started with
Date

I almost forgot. The patch I started with had a bug in it. (This is in case
anybody is using that patch)

+#define USER_PTRS_PER_PMD(x) ((PARTIAL_PGD && ((x)==USER_PTRS_PER_PGD-1)) ? \
+ (PTRS_PER_PMD-PARTIAL_PMD) : \
+ PTRS_PER_PMD)

I had to change this to:

#define USER_PTRS_PER_PMD(x) ((PARTIAL_PGD && ((x)==USER_PTRS_PER_PGD-1)) ? \
PARTIAL_PMD : \
PTRS_PER_PMD)

before my change, it worked at 1Gig boundarys (ok, i really only tested at 0xc0000000) and
at 1gig + .5Gig boundarys (e.g. 0xe0000000), 0xd0000000 would blow up, and I think 0xe8000000
was leaking some memory somewhere.

Anyway, the math was backwards.


> -----Original Message-----
> From: Dave Hansen [mailto:haveblue@us.ibm.com]
> Sent: Thursday, July 10, 2003 5:02 PM
> To: Chuck Luciano
> Cc: Linux-Kernel
> Subject: Re: My own 3.5G patch plus question on Ingo's 4G/$G patch
>
>
> On Thu, 2003-07-10 at 12:09, Chuck Luciano wrote:
> > I've been working on a patch for 2.4.18 that allows PAGE_OFFSET
> > to be set on boundarys other then 1GB multiples. I started with
> > a patch that I got from Martin Bligh and back ported it to 2.4.18.
>
> I stole the configurable PAGE_OFFSET code from Andrea, made it work with
> partial kernel pmds, and stuck it in Martin's tree. There are several
> parts to it, and I'm not sure which ones you got.
>
> > http://www.mrluciano.com/chuck/linux-2.4.18-unaligned.patch
> >
> > I'll apologize in advance for not having figured out how the configure
> > system works, so, when you apply this patch it's on. Also, you have to
> > edit vmlinux.lds AND page.h to move the boundary.
>
> Here's the 2.5 patch to do the configuration:
> http://ftp.kernel.org/pub/linux/kernel/people/mbligh/patches/2.5.73/2.5.73-mjb1/102-config_page_offset
> You'll have to adapt the arch/i386/Kconfig stuff to 2.4, but there's a
> good example of it here:
> http://ftp.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.21rc8aa1/00_3.5G-address-space-5
> (which is where I stole the code from to begin with)

Thank you. The first time through, I was mainly concerned with getting it all to work. This time I'll
make it configurable.

>
> Instead of changing _all_ of the loops which touch PMDs, I suggest you
> clean it up inside of the pmd function themselves. All of these are
> confusing:
> + if (start + PGDIR_SIZE < start)
> + break;
>

Duely noted.


>
> --
> Dave Hansen
> haveblue@us.ibm.com
>

Thank you,
Chuck L.[unhandled content-type:application/octet-stream]
\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.045 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site