Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753474AbbHCORF (ORCPT ); Mon, 3 Aug 2015 10:17:05 -0400 Received: from mail-yk0-f178.google.com ([209.85.160.178]:33262 "EHLO mail-yk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752012AbbHCORC (ORCPT ); Mon, 3 Aug 2015 10:17:02 -0400 Date: Mon, 3 Aug 2015 10:16:59 -0400 From: Tejun Heo To: Minfei Huang Cc: rostedt@goodmis.org, mingo@redhat.com, linux-kernel@vger.kernel.org, mhuang@redhat.com Subject: Re: [PATCH] workqueue: Add the allocation flags to function schedule_on_each_cpu_gfp Message-ID: <20150803141659.GC32599@mtj.duckdns.org> References: <1438590425-30307-1-git-send-email-mnfhuang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1438590425-30307-1-git-send-email-mnfhuang@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1102 Lines: 27 On Mon, Aug 03, 2015 at 04:27:05PM +0800, Minfei Huang wrote: > Rename the function schedule_on_each_cpu to schedule_on_each_cpu_gfp to > add the allocation flags as parameter. > > In several situation in ftrace, we are nervous and never come back, once > schedule_on_each_cpu fails to alloc the percpu work. Add the allocation > flags __GFP_NOFAIL to guarantee it. I don't know the context well here but new usages of __GFP_NOFAIL are strongly frowned upon. __GFP_NOFAIL was introduced to replace explicit infinite allocation loops and its main purpose is marking "this site is broken and a deadlock possibility, somebody please figure out how to fix it". After all, retrying over and over again can't possibly guarantee to create more memory. Maybe the constant should be renamed to something more vulgar. So, please reconsider. Thanks. -- tejun -- 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/