Now multi-page bvec can cover CONFIG_THP_SWAP, so we don't need to increase BIO_MAX_PAGES for it. CONFIG_THP_SWAP needs to split one THP into normal pages and adds them all to one bio. With multipage-bvec, it just takes one bvec to hold them all.
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -34,15 +34,7 @@ · 33 unmodified lines | ||
| 34 | 34 | #define BIO_BUG_ON |
| 35 | 35 | #endif |
| 36 | 36 | |
| 37 | −#ifdef CONFIG_THP_SWAP | |
| 38 | −#if HPAGE_PMD_NR > 256 | |
| 39 | −#define BIO_MAX_PAGES HPAGE_PMD_NR | |
| 40 | −#else | |
| 41 | 37 | #define BIO_MAX_PAGES 256 |
| 42 | −#endif | |
| 43 | −#else | |
| 44 | −#define BIO_MAX_PAGES 256 | |
| 45 | −#endif | |
| 46 | 38 | |
| 47 | 39 | #define bio_prio(bio) (bio)->bi_ioprio |
| 48 | 40 | #define bio_set_prio(bio, prio) ((bio)->bi_ioprio = prio) |