Pull block driver updates from Jens Axboe: - mtip32xx pci cleanups (Bjorn) - mtip32xx conversion to generic power management (Vaibhav) - rsxx pci powermanagement cleanups (Bjorn) - Remove the rsxx driver. This hardware never saw much adoption, and it's been end of lifed for a while. (Christoph) - MD pull request from Song: - REQ_NOWAIT support (Vishal Verma) - raid6 benchmark optimization (Dirk Müller) - Fix for acct bioset (Xiao Ni) - Clean up max_queued_requests (Mariusz Tkaczyk) - PREEMPT_RT optimization (Davidlohr Bueso) - Use default_groups in kobj_type (Greg Kroah-Hartman) - Use attribute groups in pktcdvd and rnbd (Greg) - NVMe pull request from Christoph: - increment request genctr on completion (Keith Busch, Geliang Tang) - add a 'iopolicy' module parameter (Hannes Reinecke) - print out valid arguments when reading from /dev/nvme-fabrics (Hannes Reinecke) - Use struct_group() in drbd (Kees) - null_blk fixes (Ming) - Get rid of congestion logic in pktcdvd (Neil) - Floppy ejection hang fix (Tasos) - Floppy max user request size fix (Xiongwei) - Loop locking fix (Tetsuo) * tag 'for-5.17/drivers-2022-01-11' of git://git.kernel.dk/linux-block: (32 commits) md: use default_groups in kobj_type md: Move alloc/free acct bioset in to personality lib/raid6: Use strict priority ranking for pq gen() benchmarking lib/raid6: skip benchmark of non-chosen xor_syndrome functions md: fix spelling of "its" md: raid456 add nowait support md: raid10 add nowait support md: raid1 add nowait support md: add support for REQ_NOWAIT md: drop queue limitation for RAID1 and RAID10 md/raid5: play nice with PREEMPT_RT block/rnbd-clt-sysfs: use default_groups in kobj_type pktcdvd: convert to use attribute groups block: null_blk: only set set->nr_maps as 3 if active poll_queues is > 0 nvme: add 'iopolicy' module parameter nvme: drop unused variable ctrl in nvme_setup_cmd nvme: increment request genctr on completion nvme-fabrics: print out valid arguments when reading from /dev/nvme-fabrics block: remove the rsxx driver rsxx: Drop PCI legacy power management ...
Showing the changes to lib (3 of 40 files). Show all
Unified · Split
| @@ -145,13 +145,13 @@ static inline const struct raid6_recov_calls *raid6_choose_recov(void) · 144 unmodified lines | |||
| 145 | static inline const struct raid6_calls *raid6_choose_gen( | 145 | static inline const struct raid6_calls *raid6_choose_gen( |
| 146 | void *(*const dptrs)[RAID6_TEST_DISKS], const int disks) | 146 | void *(*const dptrs)[RAID6_TEST_DISKS], const int disks) |
| 147 | { | 147 | { |
| 148 | unsigned long perf, bestgenperf, bestxorperf, j0, j1; | 148 | unsigned long perf, bestgenperf, j0, j1; |
| 149 | int start = (disks>>1)-1, stop = disks-3; /* work on the second half of the disks */ | 149 | int start = (disks>>1)-1, stop = disks-3; /* work on the second half of the disks */ |
| 150 | const struct raid6_calls *const *algo; | 150 | const struct raid6_calls *const *algo; |
| 151 | const struct raid6_calls *best; | 151 | const struct raid6_calls *best; |
| 152 | 152 | ||
| 153 | for (bestgenperf = 0, bestxorperf = 0, best = NULL, algo = raid6_algos; *algo; algo++) { | 153 | for (bestgenperf = 0, best = NULL, algo = raid6_algos; *algo; algo++) { |
| 154 | if (!best || (*algo)->prefer >= best->prefer) { | 154 | if (!best || (*algo)->priority >= best->priority) { |
| 155 | if ((*algo)->valid && !(*algo)->valid()) | 155 | if ((*algo)->valid && !(*algo)->valid()) |
| 156 | continue; | 156 | continue; |
| 157 | 157 | ||
| @@ -180,50 +180,48 @@ static inline const struct raid6_calls *raid6_choose_gen( · 22 unmodified lines | |||
| 180 | pr_info("raid6: %-8s gen() %5ld MB/s\n", (*algo)->name, | 180 | pr_info("raid6: %-8s gen() %5ld MB/s\n", (*algo)->name, |
| 181 | (perf * HZ * (disks-2)) >> | 181 | (perf * HZ * (disks-2)) >> |
| 182 | (20 - PAGE_SHIFT + RAID6_TIME_JIFFIES_LG2)); | 182 | (20 - PAGE_SHIFT + RAID6_TIME_JIFFIES_LG2)); |
| 183 | } | ||
| 184 | } | ||
| 183 | 185 | ||
| 184 | if (!(*algo)->xor_syndrome) | 186 | if (!best) { |
| 185 | continue; | 187 | pr_err("raid6: Yikes! No algorithm found!\n"); |
| 188 | goto out; | ||
| 189 | } | ||
| 186 | 190 | ||
| 187 | perf = 0; | 191 | raid6_call = *best; |
| 188 | 192 | ||
| 189 | preempt_disable(); | 193 | if (!IS_ENABLED(CONFIG_RAID6_PQ_BENCHMARK)) { |
| 190 | j0 = jiffies; | 194 | pr_info("raid6: skipped pq benchmark and selected %s\n", |
| 191 | while ((j1 = jiffies) == j0) | 195 | best->name); |
| 192 | cpu_relax(); | 196 | goto out; |
| 193 | while (time_before(jiffies, | 197 | } |
| 194 | j1 + (1<<RAID6_TIME_JIFFIES_LG2))) { | ||
| 195 | (*algo)->xor_syndrome(disks, start, stop, | ||
| 196 | PAGE_SIZE, *dptrs); | ||
| 197 | perf++; | ||
| 198 | } | ||
| 199 | preempt_enable(); | ||
| 200 | |||
| 201 | if (best == *algo) | ||
| 202 | bestxorperf = perf; | ||
| 203 | 198 | ||
| 204 | pr_info("raid6: %-8s xor() %5ld MB/s\n", (*algo)->name, | 199 | pr_info("raid6: using algorithm %s gen() %ld MB/s\n", |
| 205 | (perf * HZ * (disks-2)) >> | 200 | best->name, |
| 206 | (20 - PAGE_SHIFT + RAID6_TIME_JIFFIES_LG2 + 1)); | 201 | (bestgenperf * HZ * (disks - 2)) >> |
| 202 | (20 - PAGE_SHIFT + RAID6_TIME_JIFFIES_LG2)); | ||
| 203 | |||
| 204 | if (best->xor_syndrome) { | ||
| 205 | perf = 0; | ||
| 206 | |||
| 207 | preempt_disable(); | ||
| 208 | j0 = jiffies; | ||
| 209 | while ((j1 = jiffies) == j0) | ||
| 210 | cpu_relax(); | ||
| 211 | while (time_before(jiffies, | ||
| 212 | j1 + (1 << RAID6_TIME_JIFFIES_LG2))) { | ||
| 213 | best->xor_syndrome(disks, start, stop, | ||
| 214 | PAGE_SIZE, *dptrs); | ||
| 215 | perf++; | ||
| 207 | } | 216 | } |
| 208 | } | 217 | preempt_enable(); |
| 209 | 218 | ||
| 210 | if (best) { | 219 | pr_info("raid6: .... xor() %ld MB/s, rmw enabled\n", |
| 211 | if (IS_ENABLED(CONFIG_RAID6_PQ_BENCHMARK)) { | 220 | (perf * HZ * (disks - 2)) >> |
| 212 | pr_info("raid6: using algorithm %s gen() %ld MB/s\n", | 221 | (20 - PAGE_SHIFT + RAID6_TIME_JIFFIES_LG2 + 1)); |
| 213 | best->name, | 222 | } |
| 214 | (bestgenperf * HZ * (disks-2)) >> | ||
| 215 | (20 - PAGE_SHIFT+RAID6_TIME_JIFFIES_LG2)); | ||
| 216 | if (best->xor_syndrome) | ||
| 217 | pr_info("raid6: .... xor() %ld MB/s, rmw enabled\n", | ||
| 218 | (bestxorperf * HZ * (disks-2)) >> | ||
| 219 | (20 - PAGE_SHIFT + RAID6_TIME_JIFFIES_LG2 + 1)); | ||
| 220 | } else | ||
| 221 | pr_info("raid6: skip pq benchmark and using algorithm %s\n", | ||
| 222 | best->name); | ||
| 223 | raid6_call = *best; | ||
| 224 | } else | ||
| 225 | pr_err("raid6: Yikes! No algorithm found!\n"); | ||
| 226 | 223 | ||
| 224 | out: | ||
| 227 | return best; | 225 | return best; |
| 228 | } | 226 | } |
| 229 | 227 | ||
| @@ -132,7 +132,7 @@ const struct raid6_calls raid6_avx2x1 = { · 131 unmodified lines | |||
| 132 | raid6_avx21_xor_syndrome, | 132 | raid6_avx21_xor_syndrome, |
| 133 | raid6_have_avx2, | 133 | raid6_have_avx2, |
| 134 | "avx2x1", | 134 | "avx2x1", |
| 135 | 1 /* Has cache hints */ | 135 | .priority = 2 /* Prefer AVX2 over priority 1 (SSE2 and others) */ |
| 136 | }; | 136 | }; |
| 137 | 137 | ||
| 138 | /* | 138 | /* |
| @@ -262,7 +262,7 @@ const struct raid6_calls raid6_avx2x2 = { · 123 unmodified lines | |||
| 262 | raid6_avx22_xor_syndrome, | 262 | raid6_avx22_xor_syndrome, |
| 263 | raid6_have_avx2, | 263 | raid6_have_avx2, |
| 264 | "avx2x2", | 264 | "avx2x2", |
| 265 | 1 /* Has cache hints */ | 265 | .priority = 2 /* Prefer AVX2 over priority 1 (SSE2 and others) */ |
| 266 | }; | 266 | }; |
| 267 | 267 | ||
| 268 | #ifdef CONFIG_X86_64 | 268 | #ifdef CONFIG_X86_64 |
| @@ -465,6 +465,6 @@ const struct raid6_calls raid6_avx2x4 = { · 196 unmodified lines | |||
| 465 | raid6_avx24_xor_syndrome, | 465 | raid6_avx24_xor_syndrome, |
| 466 | raid6_have_avx2, | 466 | raid6_have_avx2, |
| 467 | "avx2x4", | 467 | "avx2x4", |
| 468 | 1 /* Has cache hints */ | 468 | .priority = 2 /* Prefer AVX2 over priority 1 (SSE2 and others) */ |
| 469 | }; | 469 | }; |
| 470 | #endif | 470 | #endif /* CONFIG_X86_64 */ |
| @@ -162,7 +162,7 @@ const struct raid6_calls raid6_avx512x1 = { · 161 unmodified lines | |||
| 162 | raid6_avx5121_xor_syndrome, | 162 | raid6_avx5121_xor_syndrome, |
| 163 | raid6_have_avx512, | 163 | raid6_have_avx512, |
| 164 | "avx512x1", | 164 | "avx512x1", |
| 165 | 1 /* Has cache hints */ | 165 | .priority = 2 /* Prefer AVX512 over priority 1 (SSE2 and others) */ |
| 166 | }; | 166 | }; |
| 167 | 167 | ||
| 168 | /* | 168 | /* |
| @@ -319,7 +319,7 @@ const struct raid6_calls raid6_avx512x2 = { · 150 unmodified lines | |||
| 319 | raid6_avx5122_xor_syndrome, | 319 | raid6_avx5122_xor_syndrome, |
| 320 | raid6_have_avx512, | 320 | raid6_have_avx512, |
| 321 | "avx512x2", | 321 | "avx512x2", |
| 322 | 1 /* Has cache hints */ | 322 | .priority = 2 /* Prefer AVX512 over priority 1 (SSE2 and others) */ |
| 323 | }; | 323 | }; |
| 324 | 324 | ||
| 325 | #ifdef CONFIG_X86_64 | 325 | #ifdef CONFIG_X86_64 |
| @@ -557,7 +557,7 @@ const struct raid6_calls raid6_avx512x4 = { · 231 unmodified lines | |||
| 557 | raid6_avx5124_xor_syndrome, | 557 | raid6_avx5124_xor_syndrome, |
| 558 | raid6_have_avx512, | 558 | raid6_have_avx512, |
| 559 | "avx512x4", | 559 | "avx512x4", |
| 560 | 1 /* Has cache hints */ | 560 | .priority = 2 /* Prefer AVX512 over priority 1 (SSE2 and others) */ |
| 561 | }; | 561 | }; |
| 562 | #endif | 562 | #endif |
| 563 | 563 | ||