Closed GoogleCodeExporter closed 9 years ago
Notify callback frees pages that are useless -- these pages will never be used
again.
From your description, it seems you have understanding that these pages are
_unlikely_ to be used in future so it might make sense to not to free them very
frequently. However, as mentioned above, these pages are stale and will never
be used
again. So, freeing then ASAP is best we can do.
Original comment by nitingupta910@gmail.com
on 14 Sep 2009 at 4:34
How are stale pages determined?
With the same linux swap settings, I don't see the application being freed as
often
compared to compcache.
Original comment by dwa...@gmail.com
on 14 Sep 2009 at 4:44
> How are stale pages determined?
Application pages become stale when:
- It frees some memory (apps typically do alloc/free very regularly).
- It exits.
In both these cases, freeing these stale pages ASAP is the best option.
Another case when page becomes stale:
- App page 3 swapped out to swap slot 7.
- It tries to read page 3, so we go to swap to fetch the page.
- If the swap is currently > 50% full, we disassociate slot 7 with this page 3
- So, the slot 7 becomes stale <-----
- Should we keep this stale page any longer in compcache expecting it will be used
again? No. Since in future, if we again swap-out this page 3, it will go to some
other swap slot and its contents can also change (and hence out of sync with
compcache) during this time.
Original comment by nitingupta910@gmail.com
on 14 Sep 2009 at 6:27
I think I figured out the issue. Cyanogen ROMs have the vm.page-cluster value
set to
0 by default, which means only 1 page is written to swap in a single attempt.
Moving
it to a higher value and seems to have solved my problems.
Original comment by dwa...@gmail.com
on 15 Sep 2009 at 2:31
Ok, then closing the bug.
Original comment by nitingupta910@gmail.com
on 16 Sep 2009 at 3:11
Original issue reported on code.google.com by
dwa...@gmail.com
on 14 Sep 2009 at 4:20