question related page frame reclaim on embedded system
Hi
1, I have a question related page frame reclaim .
As i understood , under low memory pressure page frame reclaiming will swap Least Recently Used cache to disk .
So my question is assume no swap space ,how to works ? Whether the Least Recently Used slab cache , inode cache etc will be discard since no swap space .
2. BTW ,I have already used my gmail account subscribe the linux kernel mail list .but can not post the question to mail list , i used plain text format . why ? I have seen many people use account of gmail to post question .
Thanks advanced .
Best Regards .
Peter Meng
Quoted 6 lines
1, I have a question related page frame reclaim .
As i understood , under low memory pressure page frame reclaiming will swap Least Recently Used cache to disk .
So my question is assume no swap space ,how to works ? Whether the Least Recently Used slab cache , inode cache etc will be discard since no swap space .
Yes, page cache and slab cache (include inode cache and dentry cache) can be dropped although no swap.
Quoted 2 lines
2. BTW ,I have already used my gmail account subscribe the linux kernel mail list .but can not post the question to mail list , i used plain text format . why ? I have seen many people use account of gmail to post question .
I don't know.
I can post by gmail.
But, One caution.
gmail web interface is a bit silly. it can't post patch because it trim tab and space.
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 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 ?
Thanks advanced
Best Regards.
Peter Meng
Quoted 32 lines · KOSAKI Motohiro
From: KOSAKI Motohiro <[email protected]>
Subject: Re: question related page frame reclaim on embedded system
To: [email protected]
Cc: [email protected], [email protected]
Date: Tuesday, December 2, 2008, 7:40 PMQuoted 2 lines
1, I have a question related page frame reclaim . As i understood , under low memory pressure page frame
reclaiming will
Quoted 3 lines
swap Least Recently Used cache to disk .
So my question is assume no swap space ,how to works ? Whether the Least Recently Used slab cache , inodecache etc will
Quoted 1 line
be discard since no swap space .
Yes, page cache and slab cache (include inode cache and dentry cache) can be dropped
although no swap.Quoted 1 line
2. BTW ,I have already used my gmail account subscribe
the linux kernel mail list .but can not post the question to mail list , i used plain text format .
Quoted 1 line
why ? I have seen many people use account of gmail to
post question .
I don't know.
I can post by gmail.But, One caution.
gmail web interface is a bit silly. it can't post patch because
it trim tab and space.
Quoted 6 lines
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.
Quoted 4 lines
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 ?
No.
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.
Hi,Kosaki
1. what happens if used IPC share memory ?
As i knew IPC share memory use anonymous mapping ,but not sure my understand is correctly .
Thanks advanced .
Best Regards.
Peter
Quoted 39 lines · KOSAKI Motohiro
From: KOSAKI Motohiro <[email protected]>
Subject: Re: question related page frame reclaim on embedded system
To: [email protected]
Cc: [email protected], [email protected]
Date: Wednesday, December 3, 2008, 9:48 AMQuoted 5 lines
Hi,Kosaki
Thank you very much .
I have another question about share memory . Assume aprocess create a share memory ,
Quoted 1 line
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.Quoted 1 line
when they are no longer used by any process or no swap
space .
Quoted 2 lines
1.whether the maped page of the share memory is
persistent in system until
Quoted 1 line
system restart ? if not how page frame reclaiming
process it ?
No.
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.
Quoted 4 lines
Hi,Kosaki
1. what happens if used IPC share memory ?
As i knew IPC share memory use anonymous mapping ,but not sure my understand is correctly .
Yes.
if you don't free IPC share memory, it remain on the system until reboot.
Quoted 55 lines
Thanks advanced .
Best Regards.
PeterQuoted 31 lines · KOSAKI Motohiro
From: KOSAKI Motohiro <[email protected]>
Subject: Re: question related page frame reclaim on embedded system
To: [email protected]
Cc: [email protected], [email protected]
Date: Wednesday, December 3, 2008, 9:48 AMQuoted 5 lines
Hi,Kosaki
Thank you very much .
I have another question about share memory . Assume aprocess create a share memory ,
Quoted 1 line
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.Quoted 1 line
when they are no longer used by any process or no swap
space .
Quoted 2 lines
1.whether the maped page of the share memory is
persistent in system until
Quoted 1 line
system restart ? if not how page frame reclaiming
process it ?
Quoted 8 lines
No.
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/