Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932207AbbKMImW (ORCPT ); Fri, 13 Nov 2015 03:42:22 -0500 Received: from mail113-249.mail.alibaba.com ([205.204.113.249]:38601 "EHLO us-alimail-mta2.hst.scl.en.alidc.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753403AbbKMImV (ORCPT ); Fri, 13 Nov 2015 03:42:21 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R781e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e02c03270;MF=hillf.zj@alibaba-inc.com;NM=1;PH=DS;RN=10;SR=0; Reply-To: "Hillf Danton" From: "Hillf Danton" To: "Steven Rostedt" Cc: "'yalin wang'" , "Ingo Molnar" , "Andrew Morton" , "Rik van Riel" , "Kirill A. Shutemov" , "Vlastimil Babka" , "Mel Gorman" , "linux-kernel" , Subject: Re: [PATCH V4] mm: fix kernel crash in khugepaged thread Date: Fri, 13 Nov 2015 16:41:03 +0800 Message-ID: <0ab001d11def$081c80d0$18558270$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AdEd7an1/U6vLI9sSLG6uozxbhULzg== Content-Language: zh-cn Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 934 Lines: 32 > > 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; } -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/