* [PATCH] libcxgbi: supress warning when we request to much space from kmalloc
@ 2013-04-23 15:20 Neil Horman
0 siblings, 0 replies; only message in thread
From: Neil Horman @ 2013-04-23 15:20 UTC (permalink / raw)
To: linux-scsi; +Cc: Neil Horman, James E.J. Bottomley, linux-kernel
cxgbi_alloc_big_mem allocates large chunks of memory, and can occasionally
request amounts from kmalloc that exceed the allocators capacity. This
typically leads to a stack trace from the zoned buddy allocator in the message
log. But if kmalloc fails, cxgbi_alloc_big_mem backs off and uses vmalloc
instead. Given that, and the fact that the two calls sites have their own error
messages if both kmalloc and vmalloc fail, I think the stack trace printing
isn't really needed.
Modify the call to kmalloc to pass __GFP_NOWARN in as well, so that internal
kmalloc warnings are suppressed.
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Honggang LI <honli@redhat.com>
CC: "James E.J. Bottomley" <JBottomley@parallels.com>
CC: linux-kernel@vger.kernel.org
---
drivers/scsi/cxgbi/libcxgbi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/cxgbi/libcxgbi.h b/drivers/scsi/cxgbi/libcxgbi.h
index 80fa99b..3daf996 100644
--- a/drivers/scsi/cxgbi/libcxgbi.h
+++ b/drivers/scsi/cxgbi/libcxgbi.h
@@ -658,7 +658,7 @@ static inline u32 cxgbi_tag_nonrsvd_bits(struct cxgbi_tag_format *tformat,
static inline void *cxgbi_alloc_big_mem(unsigned int size,
gfp_t gfp)
{
- void *p = kmalloc(size, gfp);
+ void *p = kmalloc(size, gfp | __GFP_NOWARN);
if (!p)
p = vmalloc(size);
if (p)
--
1.8.1.4
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-04-23 15:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-23 15:20 [PATCH] libcxgbi: supress warning when we request to much space from kmalloc Neil Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®