Re: large page patch (fwd) (fwd)
Hubertus Franke (frankeh@watson.ibm.com)
Sat, 3 Aug 2002 17:54:30 -0400
On Saturday 03 August 2002 05:18 pm, David Mosberger wrote:
> >>>>> On Sat, 3 Aug 2002 12:43:47 -0700 (PDT), Linus Torvalds
> >>>>> <torvalds@transmeta.com> said:
> >>
> >> You don't need separate system calls for that: with a transparent
> >> superpage framework and a privileged & reserved giant-page pool,
> >> it's trivial to set up things such that your favorite data base
> >> will always be able to get the giant pages (and hence the giant
> >> TLB mappings) it wants. The only thing you lose in the
> >> transparent case is control over _which_ pages need to use the
> >> pinned giant pages. I can certainly imagine cases where this
> >> would be an issue, but I kind of doubt it would be an issue for
> >> databases.
>
> Linus> That's _probably_ true. There aren't that many allocations
> Linus> that ask for megabytes of consecutive memory that wouldn't
> Linus> want to do it. However, there might certainly be non-critical
> Linus> maintenance programs (with the same privileges as the
> Linus> database program proper) that _do_ do large allocations, and
> Linus> that we don't want to give large pages to.
>
> Linus> Guessing is always bad, especially since the application
> Linus> certainly does know what it wants.
>
> Yes, but that applies even to a transparent superpage scheme: in those
> instances where an application knows what page size is optimal, it's
> better if the application can express that (saves time
> promoting/demoting pages needlessly). It's not unlike madvise() or
> the readahead() syscall: use reasonable policies for the ordinary
> apps, and provide the means to let the smart apps tell the kernel
> exactly what they need.
>
> --david
So that's what is/can-be done through the madvice call or a flag on MMAP().
Force a specific size and policy. Why do you need a new system call.
The Rice paper solved this reasonably elegant. Reservation and check
after a while. If you didn't use reserved memory, you loose it, this is the
auto promotion/demotion.
For special apps one provides the interface using madvice().
--
-- Hubertus Franke (frankeh@watson.ibm.com)
-
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/