lkml.org 
[lkml]   [2020]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 23/26] mm/x86: Use general page fault accounting
Hi, Dave,

On Wed, Jul 01, 2020 at 08:35:40AM -0700, Dave Hansen wrote:
> On 6/30/20 1:46 PM, Peter Xu wrote:
> > Use the general page fault accounting by passing regs into handle_mm_fault().
> ...
> > - /*
> > - * Major/minor page fault accounting. If any of the events
> > - * returned VM_FAULT_MAJOR, we account it as a major fault.
> > - */
> > - if (major) {
> > - tsk->maj_flt++;
> > - perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address);
> > - } else {
> > - tsk->min_flt++;
> > - perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
> > - }
> > -
> > check_v8086_mode(regs, address, tsk);
> > }
>
> I did a quick grep and it wasn't obvious to me how
> PERF_COUNT_SW_PAGE_FAULTS_MIN/MAJ get bumped in the handle_mm_fault() path.
>
> Are you sure they get set?

Sorry for missing the context. This patch is based on the 1st patch of the
same series:

https://lore.kernel.org/lkml/20200630204504.38516-1-peterx@redhat.com/

Both of them are set there.

Thanks,

--
Peter Xu

\
 
 \ /
  Last update: 2020-07-03 02:47    [W:0.046 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site