When reading a request from the kernel, only allocate as much memory
as needed to read a request instead of the maximum message size. Insanely enough, this makes "cheap backend I/O" file systems such dtfs and sysctlfs perform 10-30% better (depending on the average size of incoming requests).
This commit is contained in:
parent
c3420b91a3
commit
04973f7441
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: requests.c,v 1.22 2008/01/29 10:07:30 pooka Exp $ */
|
||||
/* $NetBSD: requests.c,v 1.23 2008/01/29 14:54:08 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Antti Kantee. All Rights Reserved.
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
#include <sys/cdefs.h>
|
||||
#if !defined(lint)
|
||||
__RCSID("$NetBSD: requests.c,v 1.22 2008/01/29 10:07:30 pooka Exp $");
|
||||
__RCSID("$NetBSD: requests.c,v 1.23 2008/01/29 14:54:08 pooka Exp $");
|
||||
#endif /* !lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
|
@ -65,8 +65,6 @@ puffs__fsframe_read(struct puffs_usermount *pu, struct puffs_framebuf *pb,
|
|||
ssize_t n;
|
||||
int lenstate;
|
||||
|
||||
puffs_framebuf_reserve_space(pb, PUFFS_MSG_MAXSIZE);
|
||||
|
||||
/* How much to read? */
|
||||
the_next_level:
|
||||
curoff = puffs_framebuf_telloff(pb);
|
||||
|
|
Loading…
Reference in New Issue