Subject: Re: uvm_advice struct
To: None <wojtek@wojtek.3miasto.net>
From: Chuck Cranor <chuck@xxx.research.att.com>
List: tech-kern
Date: 10/10/2001 21:13:56
In article <Pine.NEB.4.33.0109290945400.336-100000@wojtek.3miasto.net>,
Wojciech Puchar <wojtek@wojtek.3miasto.net> wrote:
>i've changed values in that struct (in uvm_fault.c) to larger values like
>this. looks like some programs loads faster but difference is smaller
>than i expected.
>but what exactly means nback value??
>static struct uvm_advice uvmadvice[] = {
> { MADV_NORMAL, 32, 31 },
> { MADV_RANDOM, 0, 0 },
> { MADV_SEQUENTIAL, 32, 31},
>};
>#define UVM_MAXRANGE 64 /* must be max() of nback+nforw+1 */
when you page-fault on a page, uvm can look for resident pages adjoining
the one being faulted on and map them in at the same time, maybe saving
you a couple of page faults.
the numbers you quote control how far from the faulting page uvm_fault
is willing to look. nback is the number of pages previous to the
faulting page to look.
e.g. if you fault ("x") on page #2 and nforw = 4 and nback = 2 then
it will look for 2 "back" pages (0, 1) and 4 "forward" pages
(3 to 6).
b b x f f f f
0 1 2 3 4 5 6
for sequential access, it doesn't make sense to search for nback pages.
chuck