From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751332AbbCSUeR (ORCPT ); Thu, 19 Mar 2015 16:34:17 -0400 Received: from smtprelay0141.hostedemail.com ([216.40.44.141]:53904 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750776AbbCSUeQ (ORCPT ); Thu, 19 Mar 2015 16:34:16 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::::::::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:960:966:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2196:2199:2393:2553:2559:2562:2693:2892:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4385:5007:6119:6248:6261:6742:6743:7875:7903:10004:10400:10848:10967:11026:11232:11658:11914:12043:12050:12296:12517:12519:12663:12740:13069:13255:13311:13357:14096:14097: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: cows85_2412a5b815852 X-Filterd-Recvd-Size: 3055 Date: Thu, 19 Mar 2015 16:34:06 -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: <20150319163406.4050cdaf@gandalf.local.home> In-Reply-To: <550B2F0A.3010909@partner.samsung.com> References: <550741BD.9080109@partner.samsung.com> <20150316194750.04885ee7@grimm.local.home> <550B2F0A.3010909@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 Thu, 19 Mar 2015 23:18:18 +0300 Stefan Strogin wrote: > Thank you for the reply, Steven. > I supposed that page_to_pfn() cannot change after mem_map > initialization, can it? I'm not sure about such things as memory hotplug > though... > Also cma_alloc() calls alloc_contig_range() which returns pfn, then it's > converted to struct page * and cma_alloc() returns struct page *, and > vice versa in cma_release() (receives struct page * and passes pfn to > free_contig_rage()). > Do you mean that printing pfn (or struct page *) in trace event is > redundant? I'm concerned about the time TP_printk() is executed and when TP_fast_assign() is. That is, when the tracepoint is called, TP_fast_assign() is executed, but TP_printk() is called when someone reads the trace files, which can happen seconds, hours, days, weeks, months later. As long as the result of page_to_pfn() and pfn_to_page() stay the same throughout the life of the boot, things will be fine. But if they could ever change, due to hotplug memory or whatever. The data in the trace buffer will become stale, and report the wrong information. -- Steve