Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754018AbbLKOW7 (ORCPT ); Fri, 11 Dec 2015 09:22:59 -0500 Received: from smtprelay0165.hostedemail.com ([216.40.44.165]:45319 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753902AbbLKOW6 (ORCPT ); Fri, 11 Dec 2015 09:22:58 -0500 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::,RULES_HIT:41:355:379:421:541:599:800: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:3867:3868:3870:3871:3872:3873:3874:4470:5007:6248:6261:7514:7875:7903:10004:10400:10848:10967:11026:11232:11658:11914:12438:12517:12519:12740:13069:13311:13357:14659:21060:21080:30054: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:1,LUA_SUMMARY:none X-HE-Tag: crowd01_7101077868e07 X-Filterd-Recvd-Size: 1949 Date: Fri, 11 Dec 2015 09:22:55 -0500 From: Steven Rostedt To: Minfei Huang Cc: mhuang@redhat.com, linux-kernel@vger.kernel.org Subject: Re: Some confusion about the period of updating new function in Message-ID: <20151211092255.3bc7daec@gandalf.local.home> In-Reply-To: <20151211105242.GA2826@dhcp-129-201.nay.redhat.com> References: <20151211105242.GA2826@dhcp-129-201.nay.redhat.com> 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: 1335 Lines: 40 On Fri, 11 Dec 2015 18:52:42 +0800 Minfei Huang wrote: > ftrace > Reply-To: > > Hi, Steven. > > There is a confusion which blocks my step to go further for ftrace. > > Does ftrace guarantee that the replaced function is finished while > ftrace is replacing the functions? In the other word, is there a > possible that new function starts to run, while old function is also > running (maybe this function is called before replacing the function). No there is no such guarantee. That is up to the function callbacks to handle themselves. > > Function schedule_on_each_cpu maybe fails to excute, if there is no > enough memory to be allocated? Then kernel may be unstable, if ftrace > continues, without handling the error, does it? > > Previously, I posted a patch to fix this issue, and you nacked it. > > [PATCH] workqueue: Add the allocation flags to function > schedule_on_each_cpu_gfp Ah that patch. Actually __GFP_NOFAIL is pretty much deprecated. The real solution is to manually do the schedule on each CPU. I can whip up a patch for that. -- Steve -- 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/