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] [thread-next>] [day] [month] [year] [list]
Message-Id: <20091104090225.54a70927.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Wed, 4 Nov 2009 09:02:25 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	David Rientjes <rientjes@...gle.com>
Cc:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	minchan.kim@...il.com, vedran.furac@...il.com,
	Hugh Dickins <hugh.dickins@...cali.co.uk>
Subject: Re: [RFC][-mm][PATCH 2/6] oom-killer: count swap usage per process.

On Tue, 3 Nov 2009 11:47:23 -0800 (PST)
David Rientjes <rientjes@...gle.com> wrote:

> On Mon, 2 Nov 2009, KAMEZAWA Hiroyuki wrote:
> 
> > Now, anon_rss and file_rss is counted as RSS and exported via /proc.
> > RSS usage is important information but one more information which
> > is often asked by users is "usage of swap".(user support team said.)
> > 
> > This patch counts swap entry usage per process and show it via
> > /proc/<pid>/status. I think status file is robust against new entry.
> > Then, it is the first candidate..
> > 
> > Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
> 
> Acked-by; David Rientjes <rientjes@...gle.com>
> 
> Thanks!  I think this should be added to -mm now while the remainder of 
> your patchset is developed and reviewed, it's helpful as an independent 
> change.
> 
> > Index: mmotm-2.6.32-Nov2/fs/proc/task_mmu.c
> > ===================================================================
> > --- mmotm-2.6.32-Nov2.orig/fs/proc/task_mmu.c
> > +++ mmotm-2.6.32-Nov2/fs/proc/task_mmu.c
> > @@ -17,7 +17,7 @@
> >  void task_mem(struct seq_file *m, struct mm_struct *mm)
> >  {
> >  	unsigned long data, text, lib;
> > -	unsigned long hiwater_vm, total_vm, hiwater_rss, total_rss;
> > +	unsigned long hiwater_vm, total_vm, hiwater_rss, total_rss, swap;
> >  
> >  	/*
> >  	 * Note: to minimize their overhead, mm maintains hiwater_vm and
> > @@ -36,6 +36,8 @@ void task_mem(struct seq_file *m, struct
> >  	data = mm->total_vm - mm->shared_vm - mm->stack_vm;
> >  	text = (PAGE_ALIGN(mm->end_code) - (mm->start_code & PAGE_MASK)) >> 10;
> >  	lib = (mm->exec_vm << (PAGE_SHIFT-10)) - text;
> > +
> > +	swap = get_mm_counter(mm, swap_usage);
> >  	seq_printf(m,
> >  		"VmPeak:\t%8lu kB\n"
> >  		"VmSize:\t%8lu kB\n"
> 
> Not sure about this newline though.

I'll clean up more. Thank you for pointing out.

Thanks,
-Kame

--
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