On Tue, 2006-08-08 at 23:16 -0400, Trond Myklebust wrote: > On Tue, 2006-08-08 at 17:09 -0700, David Miller wrote: > > > Trond, I think the highmem check in xs_sendpages() is completely > > bogus, do you mind if we remove it? :-) > > > > The socket layer will properly check the device to make sure it > > can handle highmem pages, and if not it will copy the data into > > a low-mem page as-needed. > > If the special case is no longer useful, then I for one am quite happy > to get rid of it.
OK. Here is a patch that does it. [SUNRPC]: Remove the unnecessary check for highmem in xs_sendpages() and call kernel_sendpage() directly. Signed-off-by: Sridhar Samudrala <[EMAIL PROTECTED]> diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -174,7 +174,6 @@ static inline int xs_sendpages(struct so struct page **ppage = xdr->pages; unsigned int len, pglen = xdr->page_len; int err, ret = 0; - ssize_t (*sendpage)(struct socket *, struct page *, int, size_t, int); if (unlikely(!sock)) return -ENOTCONN; @@ -207,7 +206,6 @@ static inline int xs_sendpages(struct so base &= ~PAGE_CACHE_MASK; } - sendpage = kernel_sendpage; do { int flags = XS_SENDMSG_FLAGS; @@ -220,10 +218,7 @@ static inline int xs_sendpages(struct so if (pglen != len || xdr->tail[0].iov_len != 0) flags |= MSG_MORE; - /* Hmm... We might be dealing with highmem pages */ - if (PageHighMem(*ppage)) - sendpage = sock_no_sendpage; - err = sendpage(sock, *ppage, base, len, flags); + err = kernel_sendpage(sock, *ppage, base, len, flags); if (ret == 0) ret = err; else if (err > 0) - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html