Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754740AbbKMOBT (ORCPT ); Fri, 13 Nov 2015 09:01:19 -0500 Received: from smtprelay0201.hostedemail.com ([216.40.44.201]:53792 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754594AbbKMOBS (ORCPT ); Fri, 13 Nov 2015 09:01:18 -0500 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2194:2199:2393:2553:2559:2562:2693:3138:3139:3140:3141:3142:3352:3608:3622:3865:3866:3870:3871:3872:4605:5007:6119:6261:6742:7514:7875:7903:9036:9108:10004:10400:10848:10967:11026:11232:11658:11914:12517:12519:12740:13019:13069:13161:13180:13229:13311:13357:14096:14097:14659:21080:30046:30054:30083:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: loaf30_283789371aa18 X-Filterd-Recvd-Size: 2146 Date: Fri, 13 Nov 2015 09:01:15 -0500 From: Steven Rostedt To: yalin wang Cc: Vlastimil Babka , Ingo Molnar , Andrew Morton , Ebru Akagunduz , Rik van Riel , "Kirill A. Shutemov" , jmarchan@redhat.com, mgorman@techsingularity.net, willy@linux.intel.com, linux-kernel , linux-mm@kvack.org Subject: Re: [PATCH V4] mm: fix kernel crash in khugepaged thread Message-ID: <20151113090115.1ad4235b@gandalf.local.home> In-Reply-To: References: <1447316462-19645-1-git-send-email-yalin.wang2010@gmail.com> <20151112092923.19ee53dd@gandalf.local.home> <5645BFAA.1070004@suse.cz> X-Mailer: Claws Mail 3.13.0 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1067 Lines: 36 On Fri, 13 Nov 2015 19:54:11 +0800 yalin wang wrote: > >>> TP_fast_assign( > >>> __entry->mm = mm; > >>> - __entry->pfn = pfn; > >>> + __entry->pfn = page_to_pfn(page); > >> > >> Instead of the condition, we could have: > >> > >> __entry->pfn = page ? page_to_pfn(page) : -1; > > > > I agree. Please do it like this. hmm, pfn is defined as an unsigned long, would -1 be the best. Or should it be (-1UL). Then we could also have: TP_printk("mm=%p, scan_pfn=0x%lx%s, writable=%d, referenced=%d, none_or_zero=%d, status=%s, unmapped=%d", __entry->mm, __entry->pfn == (-1UL) ? 0 : __entry->pfn, __entry->pfn == (-1UL) ? "(null)" : "", Note the added %s after %lx I have in the print format. -- Steve > ok , i will send V5 patch . -- 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/