linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: SeongJae Park <sj38.park@gmail.com>,
	akpm@linux-foundation.org, kirill.shutemov@linux.intel.com
Cc: hannes@cmpxchg.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/khugepaged: Add missed tracepoint for collapse_huge_page_swapin
Date: Wed, 10 May 2017 15:09:37 +0200	[thread overview]
Message-ID: <b478e564-fa10-79de-f9df-5b55b211e85d@suse.cz> (raw)
In-Reply-To: <20170507101813.30187-1-sj38.park@gmail.com>

On 05/07/2017 12:18 PM, SeongJae Park wrote:
> One return case of `__collapse_huge_page_swapin()` does not invoke
> tracepoint while every other return case does.  This commit adds a
> tracepoint invocation for the case.
> 
> Signed-off-by: SeongJae Park <sj38.park@gmail.com>

Right. But extra points by turning all of the "trace+return false"
instances into some kind of "goto out".

> ---
>  mm/khugepaged.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/khugepaged.c b/mm/khugepaged.c
> index ba40b7f673f4..9aad377c67a8 100644
> --- a/mm/khugepaged.c
> +++ b/mm/khugepaged.c
> @@ -909,8 +909,10 @@ static bool __collapse_huge_page_swapin(struct mm_struct *mm,
>  				return false;
>  			}
>  			/* check if the pmd is still valid */
> -			if (mm_find_pmd(mm, address) != pmd)
> +			if (mm_find_pmd(mm, address) != pmd) {
> +				trace_mm_collapse_huge_page_swapin(mm, swapped_in, referenced, 0);
>  				return false;
> +			}
>  		}
>  		if (ret & VM_FAULT_ERROR) {
>  			trace_mm_collapse_huge_page_swapin(mm, swapped_in, referenced, 0);
> 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2017-05-10 13:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-07 10:18 SeongJae Park
2017-05-10 13:09 ` Vlastimil Babka [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=b478e564-fa10-79de-f9df-5b55b211e85d@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sj38.park@gmail.com \
    /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