* Re: [PATCH] mm: do not print backtraces on GFP_ATOMIC failures [not found] <20100921121818.4745f038@annuminas.surriel.com> @ 2010-09-21 16:46 ` Andrew Morton 2010-09-21 17:00 ` Eric Dumazet 0 siblings, 1 reply; 4+ messages in thread From: Andrew Morton @ 2010-09-21 16:46 UTC (permalink / raw) To: Rik van Riel; +Cc: linux-mm, linux-kernel, KOSAKI Motohiro, netdev On Tue, 21 Sep 2010 12:18:18 -0400 Rik van Riel <riel@redhat.com> wrote: > Atomic allocations cannot fall back to the page eviction code > and are expected to fail. In fact, in some network intensive > workloads, it is common to experience hundreds of GFP_ATOMIC > allocation failures. > > Printing out a backtrace for every one of those expected > allocation failures accomplishes nothing good. At multi-gigabit > network speeds with jumbo frames, a burst of allocation failure > backtraces could even slow down the system. > > We're better off not printing out backtraces on GFP_ATOMIC > allocation failures. > > Signed-off-by: Rik van Riel <riel@redhat.com> > > diff --git a/include/linux/gfp.h b/include/linux/gfp.h > index 975609c..5a0bddb 100644 > --- a/include/linux/gfp.h > +++ b/include/linux/gfp.h > @@ -72,7 +72,7 @@ struct vm_area_struct; > /* This equals 0, but use constants in case they ever change */ > #define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH) > /* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */ > -#define GFP_ATOMIC (__GFP_HIGH) > +#define GFP_ATOMIC (__GFP_HIGH | __GFP_NOWARN) > #define GFP_NOIO (__GFP_WAIT) > #define GFP_NOFS (__GFP_WAIT | __GFP_IO) > #define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS) A much finer-tuned implementation would be to add __GFP_NOWARN just to the networking call sites. I asked about this in June and it got nixed: http://www.spinics.net/lists/netdev/msg131965.html -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: do not print backtraces on GFP_ATOMIC failures 2010-09-21 16:46 ` [PATCH] mm: do not print backtraces on GFP_ATOMIC failures Andrew Morton @ 2010-09-21 17:00 ` Eric Dumazet 2010-09-27 2:17 ` KOSAKI Motohiro 0 siblings, 1 reply; 4+ messages in thread From: Eric Dumazet @ 2010-09-21 17:00 UTC (permalink / raw) To: Andrew Morton Cc: Rik van Riel, linux-mm, linux-kernel, KOSAKI Motohiro, netdev Le mardi 21 septembre 2010 à 09:46 -0700, Andrew Morton a écrit : > On Tue, 21 Sep 2010 12:18:18 -0400 Rik van Riel <riel@redhat.com> wrote: > > > Atomic allocations cannot fall back to the page eviction code > > and are expected to fail. In fact, in some network intensive > > workloads, it is common to experience hundreds of GFP_ATOMIC > > allocation failures. > > > > Printing out a backtrace for every one of those expected > > allocation failures accomplishes nothing good. At multi-gigabit > > network speeds with jumbo frames, a burst of allocation failure > > backtraces could even slow down the system. > > > > We're better off not printing out backtraces on GFP_ATOMIC > > allocation failures. > > > > Signed-off-by: Rik van Riel <riel@redhat.com> > > > > diff --git a/include/linux/gfp.h b/include/linux/gfp.h > > index 975609c..5a0bddb 100644 > > --- a/include/linux/gfp.h > > +++ b/include/linux/gfp.h > > @@ -72,7 +72,7 @@ struct vm_area_struct; > > /* This equals 0, but use constants in case they ever change */ > > #define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH) > > /* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */ > > -#define GFP_ATOMIC (__GFP_HIGH) > > +#define GFP_ATOMIC (__GFP_HIGH | __GFP_NOWARN) > > #define GFP_NOIO (__GFP_WAIT) > > #define GFP_NOFS (__GFP_WAIT | __GFP_IO) > > #define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS) > > A much finer-tuned implementation would be to add __GFP_NOWARN just to > the networking call sites. I asked about this in June and it got > nixed: > > http://www.spinics.net/lists/netdev/msg131965.html > -- Yes, I remember this particular report was useful to find and correct a bug. I dont know what to say. Being silent or verbose, it really depends on the context ? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: do not print backtraces on GFP_ATOMIC failures 2010-09-21 17:00 ` Eric Dumazet @ 2010-09-27 2:17 ` KOSAKI Motohiro 2010-09-27 18:49 ` Andrew Morton 0 siblings, 1 reply; 4+ messages in thread From: KOSAKI Motohiro @ 2010-09-27 2:17 UTC (permalink / raw) To: Eric Dumazet Cc: kosaki.motohiro, Andrew Morton, Rik van Riel, linux-mm, linux-kernel, netdev > > > @@ -72,7 +72,7 @@ struct vm_area_struct; > > > /* This equals 0, but use constants in case they ever change */ > > > #define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH) > > > /* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */ > > > -#define GFP_ATOMIC (__GFP_HIGH) > > > +#define GFP_ATOMIC (__GFP_HIGH | __GFP_NOWARN) > > > #define GFP_NOIO (__GFP_WAIT) > > > #define GFP_NOFS (__GFP_WAIT | __GFP_IO) > > > #define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS) > > > > A much finer-tuned implementation would be to add __GFP_NOWARN just to > > the networking call sites. I asked about this in June and it got > > nixed: > > > > http://www.spinics.net/lists/netdev/msg131965.html > > -- > > Yes, I remember this particular report was useful to find and correct a > bug. > > I dont know what to say. > > Being silent or verbose, it really depends on the context ? At least, MM developers don't want to track network allocation failure issue. We don't have enough knowledge in this area. To be honest, We are unhappy current bad S/N bug report rate ;) Traditionally, We hoped this warnings help to debug VM issue. but It haven't happen. We haven't detect VM issue from this allocation failure report. Instead, We've received a lot of network allocation failure report. Recently, The S/N ratio became more bad. If the network device enable jumbo frame feature, order-2 GFP_ATOMIC allocation is called frequently. Anybody don't have to assume order-2 allocation can success anytime. I'm not against accurate warning at all. but I cant tolerate this semi-random warning steal our time. If anyone will not make accurate warning, I hope to remove this one completely instead. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mm: do not print backtraces on GFP_ATOMIC failures 2010-09-27 2:17 ` KOSAKI Motohiro @ 2010-09-27 18:49 ` Andrew Morton 0 siblings, 0 replies; 4+ messages in thread From: Andrew Morton @ 2010-09-27 18:49 UTC (permalink / raw) To: KOSAKI Motohiro Cc: Eric Dumazet, Rik van Riel, linux-mm, linux-kernel, netdev On Mon, 27 Sep 2010 11:17:19 +0900 (JST) KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote: > > > > @@ -72,7 +72,7 @@ struct vm_area_struct; > > > > /* This equals 0, but use constants in case they ever change */ > > > > #define GFP_NOWAIT (GFP_ATOMIC & ~__GFP_HIGH) > > > > /* GFP_ATOMIC means both !wait (__GFP_WAIT not set) and use emergency pool */ > > > > -#define GFP_ATOMIC (__GFP_HIGH) > > > > +#define GFP_ATOMIC (__GFP_HIGH | __GFP_NOWARN) > > > > #define GFP_NOIO (__GFP_WAIT) > > > > #define GFP_NOFS (__GFP_WAIT | __GFP_IO) > > > > #define GFP_KERNEL (__GFP_WAIT | __GFP_IO | __GFP_FS) > > > > > > A much finer-tuned implementation would be to add __GFP_NOWARN just to > > > the networking call sites. I asked about this in June and it got > > > nixed: > > > > > > http://www.spinics.net/lists/netdev/msg131965.html > > > -- > > > > Yes, I remember this particular report was useful to find and correct a > > bug. > > > > I dont know what to say. > > > > Being silent or verbose, it really depends on the context ? > > At least, MM developers don't want to track network allocation failure > issue. We don't have enough knowledge in this area. To be honest, We > are unhappy current bad S/N bug report rate ;) > > Traditionally, We hoped this warnings help to debug VM issue. Well, no, not really. I thought that the main reason for having that warning was to debug _callers_ of the memory allocator. Firstly it tells us when callsites are being too optimistic: asking for large amounts of contiguous pages, sometimes from atomic context. Quite a number of such callsites have been fixed as a result. Secondly, memory allocation failures are a rare event, so the calling code's error paths are not well tested. This warning turns the bug report "hey, my computer locked up" into the much better "hey, I got this error message and then my computer locked up". This allows us to go and look at the offending code and see if it is handling ENOMEM correctly. However I don't recall this scenario ever having actually happened. > but > It haven't happen. We haven't detect VM issue from this allocation > failure report. Instead, We've received a lot of network allocation > failure report. > > Recently, The S/N ratio became more bad. If the network device enable > jumbo frame feature, order-2 GFP_ATOMIC allocation is called frequently. > Anybody don't have to assume order-2 allocation can success anytime. > > I'm not against accurate warning at all. but I cant tolerate this > semi-random warning steal our time. If anyone will not make accurate > warning, I hope to remove this one completely instead. We can disable the warning for only net drivers quite easily. I don't have any strong opinions, really - yes, we get quite a few such bug reports but most of them end up in my lap anyway and it can't be more than one per week, shrug. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-27 18:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20100921121818.4745f038@annuminas.surriel.com>
2010-09-21 16:46 ` [PATCH] mm: do not print backtraces on GFP_ATOMIC failures Andrew Morton
2010-09-21 17:00 ` Eric Dumazet
2010-09-27 2:17 ` KOSAKI Motohiro
2010-09-27 18:49 ` Andrew Morton
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).