Re: [RFC][ only for review ] memory controller bacground reclaim [4/5] high/low watermark for memory controller

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

 



On Nov 28, 2007 12:56 AM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
>         {
> +               .name = "low_watermark_in_bytes",
> +               .private = RES_LOW_WATERMARK,
> +               .write = mem_cgroup_write,
> +               .read = mem_cgroup_read,
> +       },
> +       {
> +               .name = "high_watermark_in_bytes",
> +               .private = RES_HIGH_WATERMARK,
> +               .write = mem_cgroup_write,
> +               .read = mem_cgroup_read,
> +       },

>From a style point of view, I dislike having the "in_bytes" suffix
tacked on to all the memory controller filenames.

If people really want this to be self-documenting, how about we allow
cgroup control files to specify metadata, which would be presented to
the user via an auto-generated "api" file.

As an example, the addition above might then look something like:

{
    .name = "low_watermark",
    .units = "bytes",
    .description = "usage below which background reclaim stops",
    .write = mem_cgroup_write,
    .read = mem_cgroup_read,
}

which would correspond to a line in the "mem.api" auto-generated control file as

low_watermark: usage below which background reclaim stops (bytes)

Paul
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux