aboutsummaryrefslogtreecommitdiffstats
path: root/net/rds/page.c
diff options
context:
space:
mode:
authorAndy Grover <andy.grover@oracle.com>2010-05-24 23:12:41 -0400
committerAndy Grover <andy.grover@oracle.com>2010-09-08 21:15:20 -0400
commit0b088e003ccf316a76c51be5dec2d70b93be3be8 (patch)
tree76fb8b9ab49729a97e137b73bbf4e12b65cde89d /net/rds/page.c
parentfc19de38be924728fea76026c0d1a6c4b6156084 (diff)
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>
Diffstat (limited to 'net/rds/page.c')
-rw-r--r--net/rds/page.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/rds/page.c b/net/rds/page.c
index e5b2527ae257..5e44f5ae7898 100644
--- a/net/rds/page.c
+++ b/net/rds/page.c
@@ -186,6 +186,7 @@ out:
186 ret ? 0 : scat->length); 186 ret ? 0 : scat->length);
187 return ret; 187 return ret;
188} 188}
189EXPORT_SYMBOL_GPL(rds_page_remainder_alloc);
189 190
190static int rds_page_remainder_cpu_notify(struct notifier_block *self, 191static int rds_page_remainder_cpu_notify(struct notifier_block *self,
191 unsigned long action, void *hcpu) 192 unsigned long action, void *hcpu)