On 05.04.2012 19:54, Alan Cox wrote:
> On 04/04/2012 02:17, Konstantin Belousov wrote:
>> On Tue, Apr 03, 2012 at 11:02:53PM +0400, Andrey Zonov wrote:
>>> This is what I expect. But why this doesn't work without reading file
>> Issue seems to be in some change of the behaviour of the reserv or
>> phys allocator. I Cc:ed Alan.
> I'm pretty sure that the behavior here hasn't significantly changed in
> about twelve years. Otherwise, I agree with your analysis.
> On more than one occasion, I've been tempted to change:
> if (mt->dirty != 0)
Thanks Alan! Now it works as I expect!
But I have more questions to you and kib@. They are in my test below.
So, prepare file as earlier, and take information about memory usage
from top(1). After preparation, but before test:
Mem: 80M Active, 55M Inact, 721M Wired, 215M Buf, 46G Free
Now the file is in wired memory. I do not understand why so.
Could you please give me explanation about active/inactive/wired memory?
> because I suspect that the current code does more harm than good. In
> theory, it saves activations of the page daemon. However, more often
> than not, I suspect that we are spending more on page reactivations than
> we are saving on page daemon activations. The sequential access
> detection heuristic is just too easily triggered. For example, I've seen
> it triggered by demand paging of the gcc text segment. Also, I think
> that pmap_remove_all() and especially vm_page_cache() are too severe for
> a detection heuristic that is so easily triggered.