Re: [RFC mm][PATCH 2/5] percpu cached mm counter

KAMEZAWA Hiroyuki
2009-12-11T00:14:19Z

On Thu, 10 Dec 2009 19:54:59 +0100
Ingo Molnar <mingo@elte.hu> wrote:
> > [...] Exposing via perf is outside of the scope of his work.
>
> Please make thoughts about intelligent instrumentation solutions, and
> please think "outside of the scope" of your usual routine.
>

I'm sorry that I don't fully understand your suggestion...

This patch is for _usage_ counters (those can increase/decrease and can be
modified in batched manner), but you don't talk about usage counter
but about lack of (useful) _event_ counters under page fault path.

If so, yes, I agree that current events are not enough.
If not, hmm ?

More event counters I can think of around mm/page-fault is following..

- fault to new anon pages
+ a new anon page is from remote node.
- fault to file-backed area
+ a file page is from remote node.
- copy_on_write
+ a new anon page is from remote node.
+ copy-on-write to zero page.
- make page write (make page dirty)
- search vma. (find_vma() is called and goes into rb-tree lookup)
- swap-in (necessary ?)
- get_user_page() is called to snoop other process's memory.

I wonder adding event and inserting perf_sw_event(PERF_COUNT_SW....) is
enough for adding event coutners...but is there good documentation of
this hook ?

Thanks,
-Kame