lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <661de9470708311454l3aaea0d3g4555721ba84c8aba@mail.gmail.com>
Date:	Sat, 1 Sep 2007 03:24:45 +0530
From:	"Balbir Singh" <balbir@...ux.vnet.ibm.com>
To:	"Andrew Morton" <akpm@...ux-foundation.org>
Cc:	Linux@...p2.linux-foundation.org,
	"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
	"Linux MM Mailing List" <linux-mm@...ck.org>,
	"David Rientjes" <rientjes@...gle.com>,
	Containers <containers@...ts.osdl.org>,
	"Paul Menage" <menage@...gle.com>
Subject: Re: [-mm PATCH] Memory controller improve user interface (v2)

On 9/1/07, Andrew Morton <akpm@...ux-foundation.org> wrote:
> On Fri, 31 Aug 2007 00:22:46 +0530
> Balbir Singh <balbir@...ux.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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ