linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Peter Xu <peterx@redhat.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	John Hubbard <jhubbard@nvidia.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Gerald Schaefer <gerald.schaefer@de.ibm.com>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Will Deacon <will@kernel.org>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	x86@kernel.org, "H . Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH v4 23/26] mm/x86: Use general page fault accounting
Date: Thu, 2 Jul 2020 20:46:18 -0400	[thread overview]
Message-ID: <20200703004618.GA6677@xz-x1> (raw)
In-Reply-To: <f75ffbf6-5e88-74b8-ffb0-59a316dc6ff3@intel.com>

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



      reply	other threads:[~2020-07-03  0:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 20:46 [PATCH v4 23/26] mm/x86: Use general page fault accounting Peter Xu
2020-07-01 15:35 ` Dave Hansen
2020-07-03  0:46   ` Peter Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200703004618.GA6677@xz-x1 \
    --to=peterx@redhat.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=gerald.schaefer@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).