lkml.org 
[lkml]   [2003]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: RPCSVC_MAXPAGES doesn't account for overhead(?) pages
On Sat, 22 Mar 2003, Zwane Mwaikambo wrote:

> I got this BUG with a 32k PAGE_SIZE, it looks like we unconditionally
> allocate 2 extra pages on top of requested size so we wouldn't be able to
> service a maximum payload from nfsd.
>
> Is there a more suitable/elegant fix?

I forgot the patch...

Index: linux-2.5.65-pgcl/include/linux/sunrpc/svc.h
===================================================================
RCS file: /build/cvsroot/linux-2.5.65/include/linux/sunrpc/svc.h,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 svc.h
--- linux-2.5.65-pgcl/include/linux/sunrpc/svc.h 17 Mar 2003 23:08:31 -0000 1.1.1.1
+++ linux-2.5.65-pgcl/include/linux/sunrpc/svc.h 22 Mar 2003 16:22:22 -0000
@@ -73,7 +73,8 @@ struct svc_serv {
* This assumes that the non-page part of an rpc reply will fit
* in a page - NFSd ensures this. lockd also has no trouble.
*/
-#define RPCSVC_MAXPAGES ((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE + 1)
+
+#define RPCSVC_MAXPAGES (2+((RPCSVC_MAXPAYLOAD+PAGE_SIZE-1)/PAGE_SIZE+1))

static inline u32 svc_getu32(struct iovec *iov)
{
--
function.linuxpower.ca
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.169 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site