Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756252Ab3DZPWF (ORCPT ); Fri, 26 Apr 2013 11:22:05 -0400 Received: from stargate.chelsio.com ([67.207.112.58]:27509 "EHLO stargate.chelsio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751097Ab3DZPWD convert rfc822-to-8bit (ORCPT ); Fri, 26 Apr 2013 11:22:03 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Subject: RE: [nhorman@tuxdriver.com: [PATCH] libcxgbi: supress warning when we request to much space from kmalloc] Date: Fri, 26 Apr 2013 08:20:53 -0700 Message-ID: <8A71B368A89016469F72CD08050AD3340CBE8487@maui.asicdesigners.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [nhorman@tuxdriver.com: [PATCH] libcxgbi: supress warning when we request to much space from kmalloc] Thread-Index: Ac5CbYAOvcYsylDuQ7O20ZW+Gvvb0QAI9Vxg References: <20130426110203.GA13204@hmsreliant.think-freely.org> From: "Karen Xie" To: Cc: "Neil Horman" , , Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2337 Lines: 68 -----Original Message----- From: Neil Horman [mailto:nhorman@tuxdriver.com] Sent: Friday, April 26, 2013 4:02 AM To: Karen Xie Subject: [nhorman@tuxdriver.com: [PATCH] libcxgbi: supress warning when we request to much space from kmalloc] The patch looks fine to me. Thanks, Karen ----- Forwarded message from Neil Horman ----- Date: Tue, 23 Apr 2013 11:20:47 -0400 From: Neil Horman To: linux-scsi@vger.kernel.org Cc: Neil Horman , "James E.J. Bottomley" , linux-kernel@vger.kernel.org Subject: [PATCH] libcxgbi: supress warning when we request to much space from kmalloc X-Mailer: git-send-email 1.8.1.4 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 Reported-by: Honggang LI CC: "James E.J. Bottomley" 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 ----- End forwarded message ----- -- 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/