]> git.baikalelectronics.ru Git - kernel.git/commit
RDS: Use page_remainder_alloc() for recv bufs
authorAndy Grover <andy.grover@oracle.com>
Tue, 25 May 2010 03:12:41 +0000 (20:12 -0700)
committerAndy Grover <andy.grover@oracle.com>
Thu, 9 Sep 2010 01:15:20 +0000 (18:15 -0700)
commit583e223a5bded15a2646f470f608fba298528405
tree76fb8b9ab49729a97e137b73bbf4e12b65cde89d
parentf17995132d78c490693e85058f8b49952071eb83
RDS: Use page_remainder_alloc() for recv bufs

Instead of splitting up a page into RDS_FRAG_SIZE chunks
ourselves, ask rds_page_remainder_alloc() to do it. While it
is possible PAGE_SIZE > FRAG_SIZE, on x86en it isn't, so having
duplicate "carve up a page into buffers" code seems excessive.

The other modification this spawns is the use of a single
struct scatterlist in rds_page_frag instead of a bare page ptr.
This causes verbosity to increase in some places, and decrease
in others.

Finally, I decided to unify the lifetimes and alloc/free of
rds_page_frag and its page. This is a nice simplification in itself,
but will be extra-nice once we come to adding cmason's recycling
patch.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
net/rds/ib.h
net/rds/ib_recv.c
net/rds/page.c