Re: [PATCH] show per-process swap usage via procfs v3

From: KAMEZAWA Hiroyuki
Date: Thu Nov 12 2009 - 21:38:00 EST


On Fri, 13 Nov 2009 10:51:12 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:
> > > @@ -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?
>
> This path is executed when page table entry contains a entry of
> !pte_none() && !pte_present().
>
> There are not very big chance to reach here.(this path is under unlikely()).
>

[before]
text data bss dec hex filename
6649003 3221828 10232816 20103647 132c1df vmlinux
[after]
text data bss dec hex filename
6649243 3221828 10232816 20103887 132c2cf vmlinux

Now, 240 bytes of text size..Hmm.

Thanks,
-Kame

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/