RE: [PATCH 1/1] kernel/sysctl.c: Add /proc/sys/vm/shrink_memory feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

> -----Original Message-----
> From: Xishi Qiu [mailto:qiuxishi@xxxxxxxxxx]
> Sent: Monday, July 06, 2015 3:53 PM
> To: Pintu Kumar
> Cc: corbet@xxxxxxx; akpm@xxxxxxxxxxxxxxxxxxxx; vbabka@xxxxxxx;
> gorcunov@xxxxxxxxxx; mhocko@xxxxxxx; emunson@xxxxxxxxxx;
> kirill.shutemov@xxxxxxxxxxxxxxx; standby24x7@xxxxxxxxx;
> hannes@xxxxxxxxxxx; vdavydov@xxxxxxxxxxxxx; hughd@xxxxxxxxxx;
> minchan@xxxxxxxxxx; tj@xxxxxxxxxx; rientjes@xxxxxxxxxx;
> xypron.glpk@xxxxxx; dzickus@xxxxxxxxxx; prarit@xxxxxxxxxx;
> ebiederm@xxxxxxxxxxxx; rostedt@xxxxxxxxxxx; uobergfe@xxxxxxxxxx;
> paulmck@xxxxxxxxxxxxxxxxxx; iamjoonsoo.kim@xxxxxxx; ddstreet@xxxxxxxx;
> sasha.levin@xxxxxxxxxx; koct9i@xxxxxxxxx; mgorman@xxxxxxx; cj@xxxxxxxxx;
> opensource.ganesh@xxxxxxxxx; vinmenon@xxxxxxxxxxxxxx; linux-
> doc@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; linux-mm@xxxxxxxxx; linux-
> pm@xxxxxxxxxxxxxxx; cpgs@xxxxxxxxxxx; pintu_agarwal@xxxxxxxxx;
> vishnu.ps@xxxxxxxxxxx; rohit.kr@xxxxxxxxxxx; iqbal.ams@xxxxxxxxxxx
> Subject: Re: [PATCH 1/1] kernel/sysctl.c: Add /proc/sys/vm/shrink_memory
> feature
> 
> On 2015/7/3 21:20, Pintu Kumar wrote:
> 
> > This patch provides 2 things:
> > 1. Add new control called shrink_memory in /proc/sys/vm/.
> > This control can be used to aggressively reclaim memory system-wide in
> > one shot from the user space. A value of 1 will instruct the kernel to
> > reclaim as much as totalram_pages in the system.
> > Example: echo 1 > /proc/sys/vm/shrink_memory
> >
> > 2. Enable shrink_all_memory API in kernel with new
> CONFIG_SHRINK_MEMORY.
> > Currently, shrink_all_memory function is used only during hibernation.
> > With the new config we can make use of this API for non-hibernation
> > case also without disturbing the hibernation case.
> >
> > The detailed paper was presented in Embedded Linux Conference,
> > Mar-2015 http://events.linuxfoundation.org/sites/events/files/slides/
> > %5BELC-2015%5D-System-wide-Memory-Defragmenter.pdf
> >
> > Scenarios were this can be used and helpful are:
> > 1) Can be invoked just after system boot-up is finished.
> > 2) Can be invoked just before entering entire system suspend.
> > 3) Can be invoked from kernel when order-4 pages starts failing.
> > 4) Can be helpful to completely avoid or delay the kerenl OOM condition.
> > 5) Can be developed as a system-tool to quickly defragment entire system
> >    from user space, without the need to kill any application.
> >
> 
> Hi Pintu,
> 
> How about increase min_free_kbytes and Android lowmemorykiller's level?
> 
Thanks for the review.
Actually in Tizen, we don't use Android LMK and we wanted to delay the LMK with
aggressive direct_reclaim offline.
And increasing min_free value also may not help much.
Currently, in our case free memory never falls below 10MB, with 512MB RAM
configuration.


> Thanks,
> Xishi Qiu

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]