linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: PINTU KUMAR <pintu_agarwal@yahoo.com>
To: richard -rw- weinberger <richard.weinberger@gmail.com>
Cc: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"pintu.k@samsung.com" <pintu.k@samsung.com>
Subject: Re: [NEW]: Introducing shrink_all_memory from user space
Date: Sun, 15 Apr 2012 04:47:09 -0700 (PDT)	[thread overview]
Message-ID: <1334490429.67558.YahooMailNeo@web162006.mail.bf1.yahoo.com> (raw)
In-Reply-To: <CAFLxGvwJCMoiXFn3OgwiX+B50FTzGZmo6eG3xQ1KaPsEVZVA1g@mail.gmail.com>



> 
> This is fundamentally flawed.
> You're assuming that only one program will use this interface.
> Linux is a multi/user-tasking system

Dear Richard, Thank you for your comments.
I am sorry but this is meant only for *root* user.
That is only root user can do this: "echo 512 > /dev/shrinkmem"
If other user try to write in it: it says permission denied as follows:
pintu@pintu-ubuntu:~$ echo 512 > /dev/shrinkmem
-bash: /dev/shrinkmem: Permission denied

Moreover, this is mainly meant for mobile phones where there is only *one* user.

> 
> 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.
Can you elaborate more please?


Thanks,
Pintu

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  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@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2012-04-15 11:47 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-15  9:47 PINTU KUMAR
2012-04-15 10:00 ` santosh
2012-04-15 10:38 ` richard -rw- weinberger
2012-04-15 11:47   ` PINTU KUMAR [this message]
2012-04-15 12:10     ` richard -rw- weinberger
2012-04-16  9:16       ` PINTU KUMAR
2012-04-18 20:10       ` Alan Cox
2012-04-19 13:42         ` PINTU KUMAR
2013-01-13 15:32           ` Introducing Aggressive Low Memory Booster [1] PINTU KUMAR
2013-01-14 11:00             ` Bartlomiej Zolnierkiewicz
2013-01-20 16:03             ` PINTU KUMAR
2012-04-16 18:50 ` [NEW]: Introducing shrink_all_memory from user space Ying Han
2012-04-17 18:24 ` KOSAKI Motohiro
2012-04-18 20:07 ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1334490429.67558.YahooMailNeo@web162006.mail.bf1.yahoo.com \
    --to=pintu_agarwal@yahoo.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pintu.k@samsung.com \
    --cc=richard.weinberger@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox