On Sat, Feb 19, 2011 at 2:15 AM, Raffaele Recalcati
<[email protected]> wrote:
> Hi Steve,
>
>> In general, the Linux kernel tries to cache as much data in memory as
>> possible in order to improve performance.  Therefore, it is quite
>> normal to see decreasing free memory over time.  As long as the kernel
>> is able to free memory cache when needed, there are no issues.
>
> I saw many times free memory reducing in many arm systems.
> Normally, for example when 3MB remain and I tried a malloc of 4MB
> (writing also data in it .. because I don't trust 'disabling over
> commit') the kernel frees tha pages needed and goes on.
> If the ram is really finishing, the kernel kills, launching a function
> called oom_killer (http://linux-mm.org/OOM_Killer), at least one
> process, and then goes on.

Yes, you are right that OOM killer helps to keep the kernel going by
killing off some tasks and free up memory.  The problem is that OOM
killer does not always make the best choice on the task to terminate.
OOM killer may (and often does) affect system stability and cause
unexpected behavior.

>
> I have create a small and easy memory mapper tool using a list of pointer.
> When you press '+' on the cmdline 1MB are malloc'ed and filled of data.
> The opposite when you press '-'.
> So you are sure that the memory can be used.
>
> I'm still searching instead a way to know how much memory can be used
> without using it.

I suspect some combination of  parameters in /proc/meminfo and
/proc/buddyinfo will give you that information.

> I'd like to work on a system with not enough ram to make every process
> working simultaneously.

This is certainly a very interesting engineering challenge to make the
system as small and as efficient as possible.  This is the type of
stuff we technical people live for.  However, we also need to be
sensitive to business side of things.  Due to rapidly declining price
of memory, the savings in memory may not justify the engineering cost.

>
> Hoping it helps,

Yes, thank you for sharing your insights.

Regards,

Steve
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to