None of those oom_adj levels are going to do you any good, since those are
all considered critical or nearly critical processes.  Please look at the
oom_adj levels that are defined in init.rc right around where the memory
thresholds are which provides the binning for the different memory levels.

On Thu, Nov 18, 2010 at 8:50 PM, raja pavan <rajain...@gmail.com> wrote:

> (1) We are three launching processes which seek large chunks of memory from
> the system.
>
> - Our application from init.rc (oom_adj = -16), later changed to 13, cpu
> consumtion 7%
> - Test application  (memoryeater) from shell (oom_adj = 0) , later changed
> to 12
> - Android Calculator application (oom_adj = -16)
>
> We are tracking the free memory available in the system using 'free'
> command from shell.
> We are setting minfree to 1054720 , anticipating the LOWMEMORYKILLER to
> trigger very early.
>
> But the lowmemory killer is triggerred almost at the end of the memoryeater
> loop.
>
> Thanks
> Raja
>
> On Fri, Nov 19, 2010 at 1:51 AM, Dianne Hackborn <hack...@android.com>wrote:
>
>> What oom_adj is your test app running under?
>>
>>   On Wed, Nov 17, 2010 at 9:39 PM, Raja Pavan <rajain...@gmail.com>wrote:
>>
>>>  We are testing the lowmemorykiller.c driver of android, using a sample
>>> test application that malloc() and memset() memory. [code pasted
>>> below]
>>>
>>> void loopmalloc()
>>> {
>>>    int size,i=0;
>>>    float **ptr = NULL;
>>>
>>>    printf("\n\nLoopMalloc starts....\n\n");
>>>    ptr = (float **)malloc(2000000*sizeof(float *));
>>>    while(i++ < 2000000)
>>>    {
>>>       printf("LoopMalloc Starts i=%d\n",i);
>>>       size = 1024*1024*1024*sizeof(float);
>>>       ptr[i] = (float *)malloc(size);
>>>       memset(ptr[i],0,size);
>>>    }
>>> }
>>>
>>> We configured lowmemorykiller.c to be triggrred for 6 different levels
>>> of freememory
>>>
>>> init.rc
>>> write /sys/module/lowmemorykiller/parameters/minfree
>>> 1536,2048,4096,5120,5632,6144
>>>
>>> Low Memory Killer was not tiggerred for any level of the freememory
>>> mentioned above.
>>>
>>> Then we increased the Free Memory Levels, so the sample application is
>>> expected to be triggered at the very beginning as we have configured
>>> the LMK to be triggered even for a very high free memory.
>>>
>>> write /sys/module/lowmemorykiller/parameters/minfree
>>> 1054720,1054720,1054720,1054720,1054720,1054720
>>>
>>> Now the low memory killer is getting called and also the sample test
>>> application is killed by the lowmemorykiller.
>>>
>>> But only after the sample application is almost at the end of the
>>> memory allocation.
>>>
>>> Is there any patch to lowmemorykiller.c or the kswapd (mm/vmscan.c)
>>> that will make the lowmemorykiller to get triggerred for all levels of
>>> the free memory levels specified inside the init.rc.
>>>
>>> --
>>> unsubscribe: 
>>> android-kernel+unsubscr...@googlegroups.com<android-kernel%2bunsubscr...@googlegroups.com>
>>> website: http://groups.google.com/group/android-kernel
>>>
>>
>>
>>
>> --
>> Dianne Hackborn
>> Android framework engineer
>> hack...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time to
>> provide private support, and so won't reply to such e-mails.  All such
>> questions should be posted on public forums, where I and others can see and
>> answer them.
>>
>> --
>> unsubscribe: 
>> android-kernel+unsubscr...@googlegroups.com<android-kernel%2bunsubscr...@googlegroups.com>
>> website: http://groups.google.com/group/android-kernel
>>
>
>  --
> unsubscribe: 
> android-kernel+unsubscr...@googlegroups.com<android-kernel%2bunsubscr...@googlegroups.com>
> website: http://groups.google.com/group/android-kernel
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-kernel

Reply via email to