linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: yalin wang <yalin.wang2010@gmail.com>
To: Hillf Danton <hillf.zj@alibaba-inc.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Rik van Riel <riel@redhat.com>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Vlastimil Babka <vbabka@suse.cz>, Mel Gorman <mgorman@suse.de>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-mm@kvack.org
Subject: Re: [PATCH V4] mm: fix kernel crash in khugepaged thread
Date: Fri, 13 Nov 2015 18:24:24 +0800	[thread overview]
Message-ID: <031A099B-6020-4946-896F-92D3CBE9443B@gmail.com> (raw)
In-Reply-To: <0ab001d11def$081c80d0$18558270$@alibaba-inc.com>


> On Nov 13, 2015, at 16:41, Hillf Danton <hillf.zj@alibaba-inc.com> wrote:
> 
>> 
>> Instead of the condition, we could have:
>> 
>> 	__entry->pfn = page ? page_to_pfn(page) : -1;
>> 
>> 
>> But if there's no reason to do the tracepoint if page is NULL, then
>> this patch is fine. I'm just throwing out this idea.
>> 
> we trace only if page is valid
> 
> --- linux-next/mm/huge_memory.c	Fri Nov 13 16:00:22 2015
> +++ b/mm/huge_memory.c	Fri Nov 13 16:26:19 2015
> @@ -1987,7 +1987,8 @@ static int __collapse_huge_page_isolate(
> 
> out:
> 	release_pte_pages(pte, _pte);
> -	trace_mm_collapse_huge_page_isolate(page_to_pfn(page), none_or_zero,
> +	if (page)
> +		trace_mm_collapse_huge_page_isolate(page_to_pfn(page), none_or_zero,
> 					    referenced, writable, result);
> 	return 0;
> }
> —
> 
my V4  patch move  if (!page)  into trace function,
so that we don’t need call page_to_fn()  if the trace if disabled .
more efficient  .
Thanks


--
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:[~2015-11-13 10:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13  8:41 Hillf Danton
2015-11-13 10:24 ` yalin wang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-11-12  8:21 yalin wang
2015-11-12 14:29 ` Steven Rostedt
2015-11-13 10:47   ` Vlastimil Babka
2015-11-13 11:54     ` yalin wang
2015-11-13 14:01       ` Steven Rostedt
2015-11-16  1:35         ` yalin wang
2015-11-16 10:16           ` Vlastimil Babka
2015-11-16 14:25             ` Steven Rostedt
2015-11-17  2:21               ` yalin wang
2015-11-17  2:43                 ` Steven Rostedt
2015-11-17  3:58                   ` yalin wang
2015-11-17  7:43                     ` Vlastimil Babka
2015-11-16 14:22           ` Steven Rostedt

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=031A099B-6020-4946-896F-92D3CBE9443B@gmail.com \
    --to=yalin.wang2010@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=hillf.zj@alibaba-inc.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=riel@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=vbabka@suse.cz \
    /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