Re: [NEW]: Introducing shrink_all_memory from user space

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

 



On Sun, Apr 15, 2012 at 1:47 PM, PINTU KUMAR <pintu_agarwal@xxxxxxxxx> wrote:
> Moreover, this is mainly meant for mobile phones where there is only *one* user.

I see. Jet another awful hack.
Mobile phones are nothing special. They are computers.

>>
>> If we expose it to user space *every* program/user will try too free
>> memory such that it
>> can use more.
>> Can you see the problem?
>>
> As indicated above, every program/user cannot use it, as it requires root privileges.
> Ok, you mean to say, every driver can call "shrink_all_memory" simultaneously??
> Well, we can implement locking for that.
> Anyways, I wrote a simple script to do this (echo 512 > /dev/shrinkmem) in a loop for 20 times from 2 different terminal (as root) and it works.
> I cannot see any problem.

Every program which is allowed to use this interface will (ab)use it.
Anyway, by exposing this interface to user space (or kernel modules)
you'll confuse the VM system.

-- 
Thanks,
//richard

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
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]