From: Larry Woodman <lwoodman@redhat.com> Date: Tue, 9 Dec 2008 11:11:07 -0500 Subject: [misc] ppc64: large sends fail with unix domain sockets Message-id: 1228839067.23168.17.camel@dhcp-100-19-198.bos.redhat.com O-Subject: [RHEL5-U4 patch] Fix large sends failure with unix domain sockets on PPC-64 Bugzilla: 461312 RH-Acked-by: Rik van Riel <riel@redhat.com> RH-Acked-by: Pete Zaitcev <zaitcev@redhat.com> On PPC64 SKB_MAX_ALLOC() ends up being 256KB due to the 64KB pagesize. ----------------------------------------------------------------------- #define SKB_MAX_ORDER(X, ORDER) (((PAGE_SIZE << (ORDER)) - (X) - \ sizeof(struct skb_shared_info)) & \ ~(SMP_CACHE_BYTES - 1)) #define SKB_MAX_ALLOC (SKB_MAX_ORDER(0, 2)) ----------------------------------------------------------------------- This can cause failures in unix domain sockets because that code uses kmalloc() to allocate the buffers and the slabcache limits the largest kmalloc pool to 128KB. ------------------------------------------------------------------- if (size > SKB_MAX_ALLOC) size = SKB_MAX_ALLOC; skb=sock_alloc_send_skb(sk,size,msg->msg_flags&MSG_DONTWAIT, &err); ------------------------------------------------------------------- netperf: data send error: No buffer space available len was -1 ------------------------------------------------------------------- The fix for this problem is to simply increase the largest kmalloc() pool to 256KB for PPC64 systems since they use a 64KB page size. Fixes BZ461312 diff --git a/include/linux/kmalloc_sizes.h b/include/linux/kmalloc_sizes.h index bda23e0..78a924e 100644 --- a/include/linux/kmalloc_sizes.h +++ b/include/linux/kmalloc_sizes.h @@ -19,7 +19,7 @@ CACHE(32768) CACHE(65536) CACHE(131072) -#if (NR_CPUS > 512) || (MAX_NUMNODES > 256) || !defined(CONFIG_MMU) +#if (NR_CPUS > 512) || (MAX_NUMNODES > 256) || defined(CONFIG_PPC_64K_PAGES) || !defined(CONFIG_MMU) CACHE(262144) #endif #ifndef CONFIG_MMU