Skip to content

Commit 6861428

Browse files
Ming Leiaxboe
authored andcommitted
block: always define BIO_MAX_PAGES as 256
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. Reviewed-by: Omar Sandoval <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 07173c3 commit 6861428

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

include/linux/bio.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,7 @@
3434
#define BIO_BUG_ON
3535
#endif
3636

37-
#ifdef CONFIG_THP_SWAP
38-
#if HPAGE_PMD_NR > 256
39-
#define BIO_MAX_PAGES HPAGE_PMD_NR
40-
#else
4137
#define BIO_MAX_PAGES 256
42-
#endif
43-
#else
44-
#define BIO_MAX_PAGES 256
45-
#endif
4638

4739
#define bio_prio(bio) (bio)->bi_ioprio
4840
#define bio_set_prio(bio, prio) ((bio)->bi_ioprio = prio)

0 commit comments

Comments
 (0)