Lines Matching refs:rem
71 struct rds_page_remainder *rem; in rds_page_remainder_alloc() local
90 rem = &per_cpu(rds_page_remainders, get_cpu()); in rds_page_remainder_alloc()
95 if (rem->r_page && bytes > (PAGE_SIZE - rem->r_offset)) { in rds_page_remainder_alloc()
97 __free_page(rem->r_page); in rds_page_remainder_alloc()
98 rem->r_page = NULL; in rds_page_remainder_alloc()
102 if (rem->r_page && bytes <= (PAGE_SIZE - rem->r_offset)) { in rds_page_remainder_alloc()
103 sg_set_page(scat, rem->r_page, bytes, rem->r_offset); in rds_page_remainder_alloc()
106 if (rem->r_offset != 0) in rds_page_remainder_alloc()
109 rem->r_offset += ALIGN(bytes, 8); in rds_page_remainder_alloc()
110 if (rem->r_offset >= PAGE_SIZE) { in rds_page_remainder_alloc()
111 __free_page(rem->r_page); in rds_page_remainder_alloc()
112 rem->r_page = NULL; in rds_page_remainder_alloc()
124 rem = &per_cpu(rds_page_remainders, get_cpu()); in rds_page_remainder_alloc()
133 if (rem->r_page) { in rds_page_remainder_alloc()
139 rem->r_page = page; in rds_page_remainder_alloc()
140 rem->r_offset = 0; in rds_page_remainder_alloc()
158 struct rds_page_remainder *rem; in rds_page_exit() local
160 rem = &per_cpu(rds_page_remainders, cpu); in rds_page_exit()
163 if (rem->r_page) in rds_page_exit()
164 __free_page(rem->r_page); in rds_page_exit()
165 rem->r_page = NULL; in rds_page_exit()