]> git.karo-electronics.de Git - karo-tx-linux.git/commit
tools/vm/page-types.c: add memory cgroup dumping and filtering
authorVladimir Davydov <vdavydov@virtuozzo.com>
Tue, 9 Feb 2016 23:12:56 +0000 (10:12 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 9 Feb 2016 23:12:56 +0000 (10:12 +1100)
commit2bacf0c9302b9bdb778a0d69552f7493b8758082
treeb7b3172b5ed721ed8223d0e05ca490d3ba6639cc
parent50f0a7c37c9d627c7e225dbc8ff1a7b7376cddae
tools/vm/page-types.c: add memory cgroup dumping and filtering

On Sat, Feb 06, 2016 at 01:06:29PM +0300, Konstantin Khlebnikov wrote:
...
>  static int opt_list; /* list pages (in ranges) */
>  static int opt_no_summary; /* don't show summary */
>  static pid_t opt_pid; /* process to walk */
> -const char * opt_file;
> +const char * opt_file; /* file or directory path */
> +static int64_t opt_cgroup = -1;/* cgroup inode */

ino should be a positive number, so we could use uint64_t here. Of
course, ino=0 could be used for filtering pages not charged to any
cgroup (as it is in this patch), but I doubt this would be useful.

Also, this patch conflicts with the recent change by Naoya introducing
support of dumping swap entries - https://lkml.org/lkml/2016/2/4/50

I attached a fixlet that addresses these two issues. What do you think
about it?

Other than that the patch looks good to me,

Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/vm/page-types.c