lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 23 Mar 2015 15:04:17 +0100
From:	Ingo Molnar <mingo@...nel.org>
To:	Stefan Strogin <s.strogin@...tner.samsung.com>
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	Joonsoo Kim <iamjoonsoo.kim@....com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	Michal Nazarewicz <mina86@...a86.com>,
	aneesh.kumar@...ux.vnet.ibm.com,
	Laurent Pinchart <laurent.pinchart@...asonboard.com>,
	Dmitry Safonov <d.safonov@...tner.samsung.com>,
	Pintu Kumar <pintu.k@...sung.com>,
	Weijie Yang <weijie.yang@...sung.com>,
	Laura Abbott <lauraa@...eaurora.org>,
	SeongJae Park <sj38.park@...il.com>,
	Hui Zhu <zhuhui@...omi.com>, Minchan Kim <minchan@...nel.org>,
	Dyasly Sergey <s.dyasly@...sung.com>,
	Vyacheslav Tyrtov <v.tyrtov@...sung.com>,
	Aleksei Mateosian <a.mateosian@...sung.com>,
	gregory.0xf0@...il.com, sasha.levin@...cle.com, gioh.kim@....com,
	pavel@....cz, stefan.strogin@...il.com,
	Steven Rostedt <rostedt@...dmis.org>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH v4 1/5] mm: cma: add trace events to debug
 physically-contiguous memory allocations


* Stefan Strogin <s.strogin@...tner.samsung.com> wrote:

> 
> On 17/03/15 10:40, Ingo Molnar wrote:
> > 
> > * Stefan Strogin <s.strogin@...tner.samsung.com> wrote:
> > 
> >>> +TRACE_EVENT(cma_alloc,
> >>> +
> >>> +	TP_PROTO(struct cma *cma, struct page *page, int count),
> >>> +
> >>> +	TP_ARGS(cma, page, count),
> >>> +
> >>> +	TP_STRUCT__entry(
> >>> +		__field(struct page *, page)
> >>> +		__field(unsigned long, count)
> >>> +	),
> >>> +
> >>> +	TP_fast_assign(
> >>> +		__entry->page = page;
> >>> +		__entry->count = count;
> >>> +	),
> >>> +
> >>> +	TP_printk("page=%p pfn=%lu count=%lu",
> >>> +		  __entry->page,
> >>> +		  __entry->page ? page_to_pfn(__entry->page) : 0,
> >>> +		  __entry->count)
> > 
> > So I'm wondering, the fast-assign side is not equivalent to the 
> > TP_printk() side:
> > 
> >>> +		__entry->page = page;
> >>> +		  __entry->page ? page_to_pfn(__entry->page) : 0,
> > 
> > to me it seems it would be useful if MM tracing standardized on pfn 
> > printing. Just like you did for trace_cma_release().
> > 
> 
> Hello Ingo, thank you for the reply.
> I afraid there is no special sense in printing both struct page * and
> pfn. But cma_alloc() returns struct page *, cma_release receives struct
> page *, and pr_debugs in these functions print struct page *. Maybe it
> would be better to print the same here too?

So will the tracepoints primarily log 'struct page *'?

If yes, my question is: why not log pfn? pfn is much more informative 
(it's a hardware property of the page, not a kernel-internal 
descriptor like 'struct page *') , and it tells us (without knowing 
the layout of the kernel) which NUMA node a given area lies on, etc.

Or do other mm tracepoints already (mistakenly) use 'struct page *'?

> > Again I'd double check the various boundary conditions.
> > 
> 
> Sorry, I don't quite understand. Boundary conditions are already 
> [should be] checked in cma_alloc()/cma_release, we should only pass 
> to a trace event the information we want to be known, isn't it so?

No, I mean tracing info boundary conditions: what is returned when no 
such page is allocated, what is returned when pfn #0 is allocated, 
etc.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ