[android-porting] Re: Memory overcommit

2009-09-15 Thread fadden
On Sep 14, 4:57 pm, David Given wrote: > If I was going to have overcommit enabled, I'd much rather have the > allocation failures exposed to the application in the form of the > appropriate signal when the application fails to access the page. [...] > Incidentally, does Android use rlimits to im

[android-porting] Re: Memory overcommit

2009-09-14 Thread Dianne Hackborn
On Mon, Sep 14, 2009 at 4:57 PM, David Given wrote: > In fact, I find the OOM killer behaviour deeply suspect. I do not > believe that randomly killing processes is *ever* the right thing to do > on a reliable system, as it completely denies the application the > ability to properly clean up afte

[android-porting] Re: Memory overcommit

2009-09-14 Thread David Given
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David Turner wrote: [...] > That can only be said for files that are mapped read-only. It doesn't apply > for > anything that is shared copy-on-write (e.g. the Zygote process pages, as > well > as initial heap) and non-file mappings. Ah, I'd forgotte

[android-porting] Re: Memory overcommit

2009-09-14 Thread David Turner
On Mon, Sep 14, 2009 at 3:53 PM, David Given wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Dianne Hackborn wrote: > [...] > > If you turn off over-commit, I believe Android won't even boot on a G1, > > because Linux would need to assume that RAM is needed for every mmapped() > >

[android-porting] Re: Memory overcommit

2009-09-14 Thread David Given
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dianne Hackborn wrote: [...] > If you turn off over-commit, I believe Android won't even boot on a G1, > because Linux would need to assume that RAM is needed for every mmapped() > thing, and we run out of it well before the system is fully up. Not n

[android-porting] Re: Memory overcommit

2009-09-13 Thread Dianne Hackborn
On Sun, Sep 13, 2009 at 10:12 AM, David Given wrote: > Yes, but that doesn't really answer my question --- *why* is memory > overcommit used on Android? It's normally used on systems with huge > amounts of swap to make more efficient use of physical memory, but > Android devices don't have any sw

[android-porting] Re: Memory overcommit

2009-09-13 Thread David Given
David Turner wrote: [...] > memory overcommit is used by design, there is no plan to remove it. The fact > that the OOM killer will nuke processes to make room for others is part > of the > platform's design. As far as I know, the OOM changes were to make the killer > a bit smarter about what kin

[android-porting] Re: Memory overcommit

2009-09-13 Thread David Turner
On Sun, Sep 13, 2009 at 4:34 AM, David Given wrote: > > Hello, > > I was rather startled recently to notice that the standard Android > kernel appears to have the memory overcommit setting set to 1. This is > --- as far as I can tell, the numbering got changed not long ago and not > all the docum

[android-porting] Re: Memory overcommit

2009-09-13 Thread David Turner
On Sun, Sep 13, 2009 at 4:34 AM, David Given wrote: > > Hello, > > I was rather startled recently to notice that the standard Android > kernel appears to have the memory overcommit setting set to 1. This is > --- as far as I can tell, the numbering got changed not long ago and not > all the docum