Re: 4MB pages and framebuffer access, x11perf results, 2.1.125

Linus Torvalds (torvalds@transmeta.com)
Wed, 28 Oct 1998 17:40:34 -0800 (PST)


On Thu, 29 Oct 1998, Andrea Arcangeli wrote:
>
> This should be clean doable adding a pmd_only() to tell if the pmd does
> not need a pte to get the info about phys space. Other arch (and <P5) can
> #define pmd_only() 0.

There is no way this can be cleanly done.

The problem occurs whenever you then try to map or unmap parts of the area
to something else:

p = mmap(fd, 4M)
munmap(p,4k)

which anything with this approach will just completely die off, even once
you removed the ugly special casing.

Basically, anything that wants to do "large page" mappings of a frame
buffer needs to use something that isn't standard mmap(). Whether that's a
special flag to mmap() or something else is immaterial, but it needs to be
done on a VMA basis, not on a page table basis. Because we need to
disallow partial unmaps etc.

Trying to do this with a standard mmap() and doing page table only tricks
is doomed. Don't even try.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/