From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752542AbbCTObr (ORCPT ); Fri, 20 Mar 2015 10:31:47 -0400 Received: from smtprelay0106.hostedemail.com ([216.40.44.106]:59354 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751219AbbCTObo (ORCPT ); Fri, 20 Mar 2015 10:31:44 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::::::::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2194:2199:2393:2553:2559:2562:2693:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:5007:6119:6261:6742:6743:7875:7903:9108:10004:10400:10848:10967:11026:11232:11658:11914:12043:12517:12519:12663:12740:13069:13161:13229:13255:13311:13357:14040:14096:14097:21063:21080,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 X-HE-Tag: blood15_82f82a166f439 X-Filterd-Recvd-Size: 3253 Date: Fri, 20 Mar 2015 10:31:39 -0400 From: Steven Rostedt To: Stefan Strogin Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Joonsoo Kim , Andrew Morton , Marek Szyprowski , Michal Nazarewicz , aneesh.kumar@linux.vnet.ibm.com, Laurent Pinchart , Dmitry Safonov , Pintu Kumar , Weijie Yang , Laura Abbott , SeongJae Park , Hui Zhu , Minchan Kim , Dyasly Sergey , Vyacheslav Tyrtov , Aleksei Mateosian , gregory.0xf0@gmail.com, sasha.levin@oracle.com, gioh.kim@lge.com, pavel@ucw.cz, stefan.strogin@gmail.com, Ingo Molnar Subject: Re: [PATCH v4 1/5] mm: cma: add trace events to debug physically-contiguous memory allocations Message-ID: <20150320103139.1f5e79ea@gandalf.local.home> In-Reply-To: <550BFA8F.9050803@partner.samsung.com> References: <550741BD.9080109@partner.samsung.com> <20150316194750.04885ee7@grimm.local.home> <550B2F0A.3010909@partner.samsung.com> <20150319163406.4050cdaf@gandalf.local.home> <550BFA8F.9050803@partner.samsung.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; 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 On Fri, 20 Mar 2015 13:46:39 +0300 Stefan Strogin wrote: > Ah, thanks, I see. So will this solve the described issue? > + TP_fast_assign( > + __entry->page = page; > + __entry->pfn = page_to_pfn(__entry->page) : 0; > /* or -1 as Ingo suggested */ > + __entry->count = count; > + ), > + > + TP_printk("page=%p pfn=%lu count=%u", > + __entry->page, > + __entry->pfn, > + __entry->count) > > Should we do the same in trace/events/kmem.h then? > > But really I'm not sure why page_to_pfn()/pfn_to_page() can return > different results... I thought that there can appear new 'struct page' > entries arrays throughout one boot due to memory hotplug or smth. But > how can existing 'struct page' entries associated with the same physical > pages change their physical addresses? Or how can one physical address > correspond to different physical page throughout one boot? I don't know if those mappings can change. I'm just warning you that if they can, then you can have an issue with it. If that's the case, then it would be best to do the work in the tracepoint instead of the print. One benefit for making this change is that it will let userspace tools such as perf and trace-cmd parse it better. -- Steve