Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1198886
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] workqueue: Add the allocation flags to function schedule_on_each_cpu_gfp |
| Date | 2015-08-03 16:20 +0200 |
| Message-ID | <pToKS-5tZ-13@gated-at.bofh.it> (permalink) |
| References | <pTji9-5Zo-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] workqueue: Add the allocation flags to function schedule_on_each_cpu_gfp Minfei Huang <mnfhuang@gmail.com> - 2015-08-03 10:30 +0200
Re: [PATCH] workqueue: Add the allocation flags to function schedule_on_each_cpu_gfp yalin wang <yalin.wang2010@gmail.com> - 2015-08-03 11:20 +0200
Re: [PATCH] workqueue: Add the allocation flags to function schedule_on_each_cpu_gfp Steven Rostedt <rostedt@goodmis.org> - 2015-08-03 16:10 +0200
Re: [PATCH] workqueue: Add the allocation flags to function schedule_on_each_cpu_gfp Minfei Huang <mnfhuang@gmail.com> - 2015-08-03 17:10 +0200
Re: [PATCH] workqueue: Add the allocation flags to function schedule_on_each_cpu_gfp Tejun Heo <tj@kernel.org> - 2015-08-03 16:20 +0200
csiph-web