Thread (57 messages) 57 messages, 13 authors, 2017-05-02

Re: [PATCH] block,blkcg: use __GFP_NOWARN for best-effort allocations in blkcg

From: Michal Hocko <mhocko@kernel.org>
Date: 2016-11-29 17:13:50
Also in: lkml
Subsystem: arm port, bcache (block layer cache), dma buffer sharing framework, filesystems (vfs and infrastructure), kernel nfsd, sunrpc, and lockd servers, kernel virtual machine (kvm), memory management, memory management - core, memory management - page allocator, memory management - rmap (reverse mapping), mmu gather and tlb invalidation, networking [general], networking [tcp], nfs, sunrpc, and lockd clients, performance events subsystem, s390 architecture, the rest, uprobes · Maintainers: Russell King, Coly Li, Kent Overstreet, Sumit Semwal, Christian König, Alexander Viro, Christian Brauner, Chuck Lever, Jeff Layton, Paolo Bonzini, Andrew Morton, David Hildenbrand, Vlastimil Babka, Lorenzo Stoakes, Will Deacon, "Aneesh Kumar K.V", Nick Piggin, Peter Zijlstra, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Neal Cardwell, Trond Myklebust, Anna Schumaker, Ingo Molnar, Arnaldo Carvalho de Melo, Namhyung Kim, Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Linus Torvalds, Masami Hiramatsu, Oleg Nesterov

On Tue 29-11-16 17:57:08, Vlastimil Babka wrote:
On 11/29/2016 05:38 PM, Tejun Heo wrote:
quoted
On Tue, Nov 29, 2016 at 08:25:07AM +0100, Michal Hocko wrote:
quoted
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -246,7 +246,7 @@ struct vm_area_struct;
 #define GFP_ATOMIC	(__GFP_HIGH|__GFP_ATOMIC|__GFP_KSWAPD_RECLAIM)
 #define GFP_KERNEL	(__GFP_RECLAIM | __GFP_IO | __GFP_FS)
 #define GFP_KERNEL_ACCOUNT (GFP_KERNEL | __GFP_ACCOUNT)
-#define GFP_NOWAIT	(__GFP_KSWAPD_RECLAIM)
+#define GFP_NOWAIT	(__GFP_KSWAPD_RECLAIM|__GFP_NOWARN)
 #define GFP_NOIO	(__GFP_RECLAIM)
 #define GFP_NOFS	(__GFP_RECLAIM | __GFP_IO)
 #define GFP_TEMPORARY	(__GFP_RECLAIM | __GFP_IO | __GFP_FS | \
this will not catch users who are doing gfp & ~__GFP_DIRECT_RECLAIM but
I would rather not make warn_alloc() even more cluttered with checks.
Yeah, FWIW, looks good to me.
Me too. Just don't forget to update the comment describing GFP_NOWAIT and
check the existing users if duplicite __GFP_NOWARN can be removed, and if
they really want to be doing GFP_NOWAIT and not GFP_ATOMIC.
How does this look like?
---
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help