From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754821AbbCBQhH (ORCPT ); Mon, 2 Mar 2015 11:37:07 -0500 Received: from smtprelay0050.hostedemail.com ([216.40.44.50]:42449 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751266AbbCBQhF (ORCPT ); Mon, 2 Mar 2015 11:37:05 -0500 X-Session-Marker: 6E657665747340676F6F646D69732E6F7267 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:2393:2553:2559:2562:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:3874:5007:6119:6261:7875:7903:10004:10400:10848:10967:11026:11232:11473:11658:11914:12043:12438:12517:12519:12740:13069: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: judge52_2074ccb52b555 X-Filterd-Recvd-Size: 2124 Date: Mon, 2 Mar 2015 11:37:01 -0500 From: Steven Rostedt To: Tom Zanussi Cc: masami.hiramatsu.pt@hitachi.com, namhyung@kernel.org, andi@firstfloor.org, ast@plumgrid.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH 07/15] mm: Add ___GFP_NOTRACE Message-ID: <20150302113701.2171bdd5@gandalf.local.home> In-Reply-To: <93c67b74d54ffbb3658f0d69865bfb3ad5133a27.1425310176.git.tom.zanussi@linux.intel.com> References: <93c67b74d54ffbb3658f0d69865bfb3ad5133a27.1425310176.git.tom.zanussi@linux.intel.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 Mon, 2 Mar 2015 10:01:00 -0600 Tom Zanussi wrote: > Add a gfp flag that allows kmalloc() et al to be used in tracing > functions. > > The problem with using kmalloc for tracing is that the tracing > subsystem should be able to trace kmalloc itself, which it can't do > directly because of paths like kmalloc()->trace_kmalloc()->kmalloc() > or kmalloc()->trace_mm_page_alloc()->kmalloc(). This part I don't like at all. Why can't the memory be preallocated when the hist is created (the echo 'hist:...')? kmalloc must never be called from any tracepoint callback. This change is currently a showstopper. -- Steve > > With this flag, tracing code could use a special version of kmalloc() > that sets __GFP_NOTRACE on every allocation it does, while leaving the > normal kmalloc() path untouched. > > This would allow any tracepoint in the kmalloc path to be avoided via > DEFINE_EVENT_CONDITION() redefinitions of those events, which check > for ___GFP_NOTRACE immediately in their execution and break if set, > thereby avoiding the recursion. >