Lines Matching refs:percpu

1473 static struct page **to_addr_page(struct raid5_percpu *percpu, int i)  in to_addr_page()  argument
1475 return percpu->scribble + i * percpu->scribble_obj_size; in to_addr_page()
1480 struct raid5_percpu *percpu, int i) in to_addr_conv() argument
1482 return (void *) (to_addr_page(percpu, i) + sh->disks + 2); in to_addr_conv()
1489 to_addr_offs(struct stripe_head *sh, struct raid5_percpu *percpu) in to_addr_offs() argument
1491 return (unsigned int *) (to_addr_conv(sh, percpu, 0) + sh->disks + 2); in to_addr_offs()
1495 ops_run_compute5(struct stripe_head *sh, struct raid5_percpu *percpu) in ops_run_compute5() argument
1498 struct page **xor_srcs = to_addr_page(percpu, 0); in ops_run_compute5()
1499 unsigned int *off_srcs = to_addr_offs(sh, percpu); in ops_run_compute5()
1525 ops_complete_compute, sh, to_addr_conv(sh, percpu, 0)); in ops_run_compute5()
1592 ops_run_compute6_1(struct stripe_head *sh, struct raid5_percpu *percpu) in ops_run_compute6_1() argument
1595 struct page **blocks = to_addr_page(percpu, 0); in ops_run_compute6_1()
1596 unsigned int *offs = to_addr_offs(sh, percpu); in ops_run_compute6_1()
1632 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_1()
1647 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_1()
1656 ops_run_compute6_2(struct stripe_head *sh, struct raid5_percpu *percpu) in ops_run_compute6_2() argument
1667 struct page **blocks = to_addr_page(percpu, 0); in ops_run_compute6_2()
1668 unsigned int *offs = to_addr_offs(sh, percpu); in ops_run_compute6_2()
1714 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_2()
1742 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_2()
1750 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_2()
1758 to_addr_conv(sh, percpu, 0)); in ops_run_compute6_2()
1791 ops_run_prexor5(struct stripe_head *sh, struct raid5_percpu *percpu, in ops_run_prexor5() argument
1795 struct page **xor_srcs = to_addr_page(percpu, 0); in ops_run_prexor5()
1796 unsigned int *off_srcs = to_addr_offs(sh, percpu); in ops_run_prexor5()
1825 ops_complete_prexor, sh, to_addr_conv(sh, percpu, 0)); in ops_run_prexor5()
1833 ops_run_prexor6(struct stripe_head *sh, struct raid5_percpu *percpu, in ops_run_prexor6() argument
1836 struct page **blocks = to_addr_page(percpu, 0); in ops_run_prexor6()
1837 unsigned int *offs = to_addr_offs(sh, percpu); in ops_run_prexor6()
1847 ops_complete_prexor, sh, to_addr_conv(sh, percpu, 0)); in ops_run_prexor6()
1974 ops_run_reconstruct5(struct stripe_head *sh, struct raid5_percpu *percpu, in ops_run_reconstruct5() argument
2007 xor_srcs = to_addr_page(percpu, j); in ops_run_reconstruct5()
2008 off_srcs = to_addr_offs(sh, percpu); in ops_run_reconstruct5()
2050 to_addr_conv(sh, percpu, j)); in ops_run_reconstruct5()
2054 to_addr_conv(sh, percpu, j)); in ops_run_reconstruct5()
2072 ops_run_reconstruct6(struct stripe_head *sh, struct raid5_percpu *percpu, in ops_run_reconstruct6() argument
2101 blocks = to_addr_page(percpu, j); in ops_run_reconstruct6()
2102 offs = to_addr_offs(sh, percpu); in ops_run_reconstruct6()
2120 head_sh, to_addr_conv(sh, percpu, j)); in ops_run_reconstruct6()
2123 to_addr_conv(sh, percpu, j)); in ops_run_reconstruct6()
2146 static void ops_run_check_p(struct stripe_head *sh, struct raid5_percpu *percpu) in ops_run_check_p() argument
2153 struct page **xor_srcs = to_addr_page(percpu, 0); in ops_run_check_p()
2154 unsigned int *off_srcs = to_addr_offs(sh, percpu); in ops_run_check_p()
2177 to_addr_conv(sh, percpu, 0)); in ops_run_check_p()
2187 static void ops_run_check_pq(struct stripe_head *sh, struct raid5_percpu *percpu, int checkp) in ops_run_check_pq() argument
2189 struct page **srcs = to_addr_page(percpu, 0); in ops_run_check_pq()
2190 unsigned int *offs = to_addr_offs(sh, percpu); in ops_run_check_pq()
2204 sh, to_addr_conv(sh, percpu, 0)); in ops_run_check_pq()
2207 &sh->ops.zero_sum_result, percpu->spare_page, 0, &submit); in ops_run_check_pq()
2216 struct raid5_percpu *percpu; in raid_run_ops() local
2220 percpu = per_cpu_ptr(conf->percpu, cpu); in raid_run_ops()
2228 tx = ops_run_compute5(sh, percpu); in raid_run_ops()
2231 tx = ops_run_compute6_1(sh, percpu); in raid_run_ops()
2233 tx = ops_run_compute6_2(sh, percpu); in raid_run_ops()
2242 tx = ops_run_prexor5(sh, percpu, tx); in raid_run_ops()
2244 tx = ops_run_prexor6(sh, percpu, tx); in raid_run_ops()
2248 tx = ops_run_partial_parity(sh, percpu, tx); in raid_run_ops()
2257 ops_run_reconstruct5(sh, percpu, tx); in raid_run_ops()
2259 ops_run_reconstruct6(sh, percpu, tx); in raid_run_ops()
2264 ops_run_check_p(sh, percpu); in raid_run_ops()
2266 ops_run_check_pq(sh, percpu, 0); in raid_run_ops()
2268 ops_run_check_pq(sh, percpu, 1); in raid_run_ops()
2400 static int scribble_alloc(struct raid5_percpu *percpu, in scribble_alloc() argument
2418 kvfree(percpu->scribble); in scribble_alloc()
2420 percpu->scribble = scribble; in scribble_alloc()
2421 percpu->scribble_obj_size = obj_size; in scribble_alloc()
2442 struct raid5_percpu *percpu; in resize_chunks() local
2444 percpu = per_cpu_ptr(conf->percpu, cpu); in resize_chunks()
2445 err = scribble_alloc(percpu, new_disks, in resize_chunks()
7025 static void free_scratch_buffer(struct r5conf *conf, struct raid5_percpu *percpu) in free_scratch_buffer() argument
7027 safe_put_page(percpu->spare_page); in free_scratch_buffer()
7028 percpu->spare_page = NULL; in free_scratch_buffer()
7029 kvfree(percpu->scribble); in free_scratch_buffer()
7030 percpu->scribble = NULL; in free_scratch_buffer()
7033 static int alloc_scratch_buffer(struct r5conf *conf, struct raid5_percpu *percpu) in alloc_scratch_buffer() argument
7035 if (conf->level == 6 && !percpu->spare_page) { in alloc_scratch_buffer()
7036 percpu->spare_page = alloc_page(GFP_KERNEL); in alloc_scratch_buffer()
7037 if (!percpu->spare_page) in alloc_scratch_buffer()
7041 if (scribble_alloc(percpu, in alloc_scratch_buffer()
7047 free_scratch_buffer(conf, percpu); in alloc_scratch_buffer()
7058 free_scratch_buffer(conf, per_cpu_ptr(conf->percpu, cpu)); in raid456_cpu_dead()
7064 if (!conf->percpu) in raid5_free_percpu()
7068 free_percpu(conf->percpu); in raid5_free_percpu()
7094 struct raid5_percpu *percpu = per_cpu_ptr(conf->percpu, cpu); in raid456_cpu_up_prepare() local
7096 if (alloc_scratch_buffer(conf, percpu)) { in raid456_cpu_up_prepare()
7108 conf->percpu = alloc_percpu(struct raid5_percpu); in raid5_alloc_percpu()
7109 if (!conf->percpu) in raid5_alloc_percpu()