From: "Balbir Singh" <balbir@linux.vnet.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linux@smtp2.linux-foundation.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux MM Mailing List <linux-mm@kvack.org>,
David Rientjes <rientjes@google.com>,
Containers <containers@lists.osdl.org>,
Paul Menage <menage@google.com>
Subject: Re: [-mm PATCH] Memory controller improve user interface (v2)
Date: Sat, 1 Sep 2007 03:24:45 +0530 [thread overview]
Message-ID: <661de9470708311454l3aaea0d3g4555721ba84c8aba@mail.gmail.com> (raw)
In-Reply-To: <20070831130216.226db806.akpm@linux-foundation.org>
On 9/1/07, Andrew Morton <akpm@linux-foundation.org> wrote:
> On Fri, 31 Aug 2007 00:22:46 +0530
> Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
>
> > +/*
> > + * Strategy routines for formating read/write data
> > + */
> > +int mem_container_read_strategy(unsigned long long val, char *buf)
> > +{
> > + return sprintf(buf, "%llu Bytes\n", val);
> > +}
>
> It's a bit cheesy to be printing the units like this. It's better to just
> print the raw number.
>
> If you really want to remind the user what units that number is in (not a
> bad idea) then it can be encoded in the filename, like
> /proc/sys/vm/min_free_kbytes, /proc/sys/vm/dirty_expire_centisecs, etc.
>
Sounds good, I'll change the file to memory.limit_in_bytes and
memory.usage_in_bytes.
>
> > +int mem_container_write_strategy(char *buf, unsigned long long *tmp)
> > +{
> > + *tmp = memparse(buf, &buf);
> > + if (*buf != '\0')
> > + return -EINVAL;
> > +
> > + printk("tmp is %llu\n", *tmp);
>
> don't think we want that.
>
Yes, I'll redo the patch and resend.
> > + /*
> > + * Round up the value to the closest page size
> > + */
> > + *tmp = ((*tmp + PAGE_SIZE - 1) >> PAGE_SHIFT) << PAGE_SHIFT;
> > + return 0;
> > +}
Thanks,
Balbir
--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2007-08-31 21:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-30 18:52 Balbir Singh
2007-08-30 19:00 ` Balbir Singh
2007-08-31 20:02 ` Andrew Morton
2007-08-31 21:54 ` Balbir Singh [this message]
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=661de9470708311454l3aaea0d3g4555721ba84c8aba@mail.gmail.com \
--to=balbir@linux.vnet.ibm.com \
--cc=Linux@smtp2.linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=containers@lists.osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=menage@google.com \
--cc=rientjes@google.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