Skip to contentSkip to conversation

sendpage and high mem pages

DISCUSSION Mike Christie 2 participants 2 messages Apr 20, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

I was wondering if it is ok to pass sendpage high mem pages. If a piece of code does this:

struct socket *sock;

sock->ops->sendpage(pg...)

and pg is a highmem page will the network layer do the right thing or should the caller check the page type and call sock_no_sendpage() for highmen? It looks like net/sunrpc/xprtsock.c does a check but drivers/scsi/iscsi_tcp.c and some others do not.

maintainer
#1 lore raw

From: Mike Christie <[email protected]>
Date: Thu, 20 Apr 2006 14:29:06 -0500

Quoted 11 lines

I was wondering if it is ok to pass sendpage high mem pages. If a piece of code does this:

struct socket *sock;

sock->ops->sendpage(pg...)

and pg is a highmem page will the network layer do the right thing or should the caller check the page type and call sock_no_sendpage() for highmen? It looks like net/sunrpc/xprtsock.c does a check but drivers/scsi/iscsi_tcp.c and some others do not.

TCP and others handle this just fine, if something doesn't then it needs to be fixed. Any page in the page cache can be sent over this interface.