Re: question related page frame reclaim on embedded system

From: KOSAKI Motohiro
Date: Tue Dec 02 2008 - 20:48:31 EST

> Hi,Kosaki
> Thank you very much .
> I have another question about share memory . Assume a process create a share memory ,
> seems the page that the process used can not be discard or swap out

No. Linux can swap out COW shared memory too. see swap cache related code.
Also, Linux can discard non-dirty and file mapped shared page.

but, yes.
Linux can't discart dirty or anonymous mapped page.

> when they are no longer used by any process or no swap space .
> 1.whether the maped page of the share memory is persistent in system until
> system restart ? if not how page frame reclaiming process it ?

Linux manage page reference count.
forrk increment it. exit decrement it.
So, when process exiting, Linux can discard non used page immediately.

IOW, reclaim provide "page discard/swap although page is still used" mechanism.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at