[lkml]   [2012]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: [PATCH 3.2.0-rc1 0/3] Used Memory Meter pseudo-device and related changes in MM
> -----Original Message-----
> From: ext KOSAKI Motohiro []
> Sent: 06 January, 2012 02:27
> To: Moiseichuk Leonid (Nokia-MP/Helsinki)

> > Android OOM (AOOM) is a different thing. Briefly Android OOM is a safety
> belt,
> >but I try to introduce look-ahead radar to stop before hitting wall.
> You explained why we shouldn't merge neither you nor android notification
> patches.
> Many embedded developers tried to merge their own patch and claimed
> "Hey! my patch
> is completely different from another one". That said, their patches can't be
> used
> each other use case, just for them.

Pardon me but these patches doing really different thing. Having notification doesn't mean all you software will handle them correct. In open platform you might have "bad entity" which will be killed by OOM.
In we used default OOM killer but Android OOM probably works better in some other conditions even from my point of view it may trigger false OOMs due to base on NR_FREE_PAGES which are more interesting for kernel for than for user-space.

> Systemwide global notification itself is not bad idea. But we definitely choose
> just one implementation. thus, you need to get agree with other embedded
> people.

Agree. That is point for discussion. One is already available through memcg but problem is in memcg and how we use it.

> > UsedMemory = (MemTotal - MemFree - Buffers - Cached - SwapCached) +
> > (SwapTotal - SwapFree)
> If you spent a few time to read past discuttion, you should have understand
> your fomula
> is broken and unacceptable. Think, mlocked (or pinning by other way) cache
> can't be discarded.

In theory you are right about mlocked pages. So I will add deduction for NR_MLOCK
In practice typical desktop system has mlocked = 0. Also code pages are shared, so mlocking has 0 effect.
For data pages the some library like could be used.
Anyhow, on n9 we have only 5.3 MB mlocked memory from 1024MB.

> And, When system is under swap thrashing, userland notification is useless.

Well, cgroups CPU shares and ionice seems to me better but as a quick solution extension with LRU_ACTIVE_ANON + LRU_ACTIVE_FILE could be done easily.

> I don't think you tested w/ swap environment heavily.

n770, n800, n810 have optional in-file swapping.
n900 has permanent 768 MB swap partition.
n9 uses in-RAM lzo compressed 256 MB swap.

All of them tested, tuned and works fine for majority use-cases.

> While you are getting stuck to make nokia specific feature, I'm
> recommending you
> maintain your local patch yourself.

Thanks for advices, but I have better idea which is less destructive for MM.
Maybe it will more successful, at least for maintenance as a local patch.

 \ /
  Last update: 2012-01-09 09:53    [W:0.082 / U:3.716 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site