Messages in this thread | | | Date | Thu, 12 Nov 2009 10:20:29 -0500 (EST) | From | Christoph Lameter <> | Subject | Re: [PATCH] show per-process swap usage via procfs v3 |
| |
On Wed, 11 Nov 2009, KAMEZAWA Hiroyuki wrote:
> > Index: mm-test-kernel/include/linux/mm_types.h > =================================================================== > --- mm-test-kernel.orig/include/linux/mm_types.h > +++ mm-test-kernel/include/linux/mm_types.h > @@ -228,6 +228,7 @@ struct mm_struct { > */ > mm_counter_t _file_rss; > mm_counter_t _anon_rss; > + mm_counter_t _swap_usage;
This is going to be another hit on vm performance if we get down this road.
At least put
#ifdef CONFIG_SWAP ?
around this so that we can switch it off?
> @@ -597,7 +600,9 @@ copy_one_pte(struct mm_struct *dst_mm, s > &src_mm->mmlist); > spin_unlock(&mmlist_lock); > } > - if (is_write_migration_entry(entry) && > + if (!non_swap_entry(entry)) > + rss[2]++; > + else if (is_write_migration_entry(entry) && > is_cow_mapping(vm_flags)) { > /*
What are the implications for fork performance?
| |