开发者

Linux: page faults and network filesystems

开发者 https://www.devze.com 2023-01-03 13:41 出处:网络
If a Linux system runs out of physical memory, does it drop inactive executable code pages? I assume the answer is yes, since there is no reason to keep them in swap, so they are simply discarded and

If a Linux system runs out of physical memory, does it drop inactive executable code pages? I assume the answer is yes, since there is no reason to keep them in swap, so they are simply discarded and re-loaded if necessary (as far 开发者_运维技巧as I know, that's what FreeBSD does).

If the above is true for Linux, my question is, how does it handle executables run from network filesystems (e.g. NFS)? Does it go and fetch executable pages over the network if there is a page fault?


If a Linux system runs out of physical memory, does it drop inactive executable code pages? I assume the answer is yes, since there is no reason to keep them in swap, so they are simply discarded and re-loaded if necessary (as far as I know, that's what FreeBSD does).

Yes it does.

If the above is true for Linux, my question is, how does it handle executables run from network filesystems (e.g. NFS)? Does it go and fetch executable pages over the network if there is a page fault?

The NFS client caches stuff locally (if you're worried about speed), but possibly not the whole file (if you're worried about consistency). Here is a relevant NFS FAQ entry.

0

精彩评论

暂无评论...
验证码 换一张
取 消