Commit 45ffbca
Kent Overstreet
bcachefs: use kvzalloc() for journal bios
We can write quite large journal entries.
It's possible that JOURNAL_ENTRY_SIZE_MAX is far larger than it needs to
be and should be reduced to something more reasonable (1-2MB), but
performance can be sensitive to anything that affects journal
pipelining - we've had issues there in the past, so we shouldn't change
that without first doing performance testing.
For now, apply the simple fix to deal with the following, which caused a
mount to fail:
[43579.348135] mount.bcachefs: page allocation failure: order:5, mode:0x40dc0(GFP_KERNEL|__GFP_ZERO|__GFP_COMP), nodemask=(null),cpuset=openrc.sshd,mems_allowed=0
[43579.349792] CPU: 3 UID: 0 PID: 14702 Comm: mount.bcachefs Tainted: G U 6.16.0-rc4 #18 VOLUNTARY
[43579.349798] Tainted: [U]=USER
[43579.349799] Hardware name: MSI MS-7982/B150M PRO-VDH (MS-7982), BIOS 3.H0 07/10/2018
[43579.349800] Call Trace:
[43579.349803] <TASK>
[43579.349806] dump_stack_lvl (lib/dump_stack.c:122)
[43579.349814] warn_alloc (mm/page_alloc.c:3744)
[43579.349821] ? __alloc_pages_direct_compact (./arch/x86/include/asm/jump_label.h:36 ./include/linux/delayacct.h:211 mm/page_alloc.c:3882)
[43579.349827] __alloc_pages_slowpath.constprop.0 (mm/page_alloc.c:4699)
[43579.349833] __alloc_frozen_pages_noprof (mm/page_alloc.c:4972)
[43579.349838] __alloc_pages_noprof (mm/page_alloc.c:4994)
[43579.349843] ___kmalloc_large_node (./include/linux/gfp.h:284 ./include/linux/gfp.h:311 mm/slub.c:4272)
[43579.349848] __kmalloc_large_noprof (./arch/x86/include/asm/bitops.h:414 ./include/asm-generic/getorder.h:46 mm/slub.c:4292)
[43579.349852] bch2_dev_journal_init (fs/bcachefs/journal.c:1629 (discriminator 4))
[43579.349857] __bch2_dev_attach_bdev (fs/bcachefs/super.c:1588)
[43579.349861] ? kernfs_create_link (fs/kernfs/symlink.c:48)
[43579.349865] bch2_dev_attach_bdev (fs/bcachefs/super.c:1630)
[43579.349868] bch2_fs_open (fs/bcachefs/super.c:2440)
[43579.349874] bch2_fs_get_tree (fs/bcachefs/fs.c:2474)
[43579.349880] vfs_get_tree (fs/super.c:1805)
Reported-by: Marcin Mirosław <[email protected]>
Signed-off-by: Kent Overstreet <[email protected]>1 parent 56d8d90 commit 45ffbca
1 file changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1591 | 1591 | | |
1592 | 1592 | | |
1593 | 1593 | | |
1594 | | - | |
| 1594 | + | |
1595 | 1595 | | |
1596 | 1596 | | |
1597 | 1597 | | |
| |||
1628 | 1628 | | |
1629 | 1629 | | |
1630 | 1630 | | |
1631 | | - | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
1632 | 1641 | | |
1633 | 1642 | | |
1634 | 1643 | | |
| |||
0 commit comments