Re: Creating a per-task kernel space for kmap, user pagetables, et al

Andrea Arcangeli
2002-03-20T22:00:46Z

On Wed, Mar 20, 2002 at 09:46:07PM +0000, Christoph Hellwig wrote:
> On Wed, Mar 20, 2002 at 10:34:25PM +0100, Andrea Arcangeli wrote:
> > > The problem is not the 4GB ZONE_NORMAL but the ~1GB KVA space.
> >
> > Then you misunderstood what's the zone-normal, the zone normal is 800M
> > in size not 4GB.
>
> No, it was braino when writing.

never mind.

>
> > The 1GB of KVA is what constraint the size of the zone
> > normal to 800M. We're talking about the same thing, just looking at it
> > from different point of views.
>
> Okay agreed now after the 'reminder'.

:)

>
> > > UnixWare/OpenUnix had huge problems getting all kernel structs for managing
> > > 16GB virtual into that - on the other hand their struct page is more
> > > then twice as big as ours..
> >
> > We do pretty well with pte-highmem, there is some other bit that will be
> > better to optimize, but nothing major.
>
> One major area to optimize are the kernel stacks I think.

Thet's another bit yes, but we'll need 200000 tasks to overflow the
lowmem (ignoring the fact the lowmem is shared also for the other lowmem
data structures) and there's the PID limit of 64k tasks. So I don't see
it as a major thing. Anyways if we really wanted to put the stack [and
task structure of course] in highmem, we could do that in two additional
entries after the user stack together with the two entries for the
pagecache and pagetable persistent kmaps. I think we can officially call
that area the "userfixmap" or "per-process-fixmap" (no matter if it's in
user or kernel space). But it is much faster to keep the kernel stack
always in 4M global tlbs, thus I don't think we need to change that in
2.5. (also USB was used to do dma in the kernel stack, not sure if they
changed it recently)

Andrea