Linus Torvalds wrote: > On Fri, 9 May 2003, Jamie Lokier wrote: > >>Why don't you change TASK_SIZE to 0xc0001000 (or so) and place the >>user-visible fixmaps at 0xc0000000? > > I think I almost agree.. > >>That would have no cost at all. > > It actually does have some cost in that form, namely the fact that the > kernel 1:1 mapping needs to be 4MB-aligned in order to take advantage of > large-pte support. So we'd have to move the kernel to something like > 0xc0400000 (and preferably higher, to make sure there is a nice hole in > between - say 0xc1000000), which in turn has a cost of verifying that > nothing assumes the current lay-out (we've had the 1/2/3GB TASK_SIZE > patches floating around, but they've never had "odd sizes"). We've been playing with patches in the -mjb tree which make PAGE_OFFSET and TASK_SIZE move to some weird values. I have it to the point where I could do a 3.875:0.125 user:kernel split. It was created to let some crazy database nuts get 3.5:0.5 with PAE on. But, it should be mostly applicable here. The attached banana_split batch does this, and depends on the separate_pmd patch. > There's another cost, which is that right now we share the pgd with the > kernel fixmaps, and this would mean that we'd have a new one. That's just > a single page, though. Do you mean we share the pmd, not the pgd, right? The attached separate_pmd patch unshares the kernel pmd page. It keeps a separate slab of kernel pmds, but suffers from the same problem which Bill Irwin just fixed with PGDs, where the pages in the slab might need to get updated mappings. They will need the same treatment as the non-PAE pgds. http://marc.theaimsgroup.com/?l=linux-kernel&m=105213208522985&w=2 Don't anyone go applying these yet, though. I think there has been a bugfix or two since Martin released 2.5.68-mjb1, where these came from. So, consider them just an example for now. -- Dave Hansen haveblue@us.ibm.com