linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH REBASED 0/7] ext4: Cleanup data=journal writeback path
@ 2023-02-28  5:13 Theodore Ts'o
  2023-02-28  5:13 ` [PATCH 1/7] ext4: Update stale comment about write constraints Theodore Ts'o
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Theodore Ts'o @ 2023-02-28  5:13 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Theodore Ts'o

This is Jan's data=journal cleanup patch series, previously submitted
here[1] rebased on top of Linus's patches to address merge conflicts
with mm-stable, per this discussion[2].

[1] https://lore.kernel.org/r/20230111152736.9608-1-jack@suse.cz
[2] https://lore.kernel.org/r/Y/k4Jvph15ugcY54@mit.edu

While retesting this patch series, I've noticed a potential regression
which doesn't trigger before applying the last patch in this series
(Convert data=journal writeback to use ext4_writepages), but which
triggers a WARNING in generic/390 about half the time.  I've gone back
and retested, and this was happening before the rebase.

Jan, could you take a look and (1) let me know what you think about my
patch conflict resolutions and (2) what you think about this warning
which is occasionally triggered by generic/390?  Many thanks!

      	 	      		   - Ted

generic/390 2s ...  [00:08:04][    2.708542] run fstests generic/390 at 2023-02-28 00:08:04
[    2.871030] EXT4-fs: Warning: mounting with data=journal disables delayed allocation, dioread_nolock, O_DIRECT and fast_commit support!
[    3.814748] ------------[ cut here ]------------
[    3.816039] WARNING: CPU: 1 PID: 151 at fs/ext4/ext4_jbd2.c:75 ext4_journal_check_start+0x67/0xa0
[    3.817902] CPU: 1 PID: 151 Comm: kworker/u4:3 Not tainted 6.2.0-xfstests-11603-g17b3ec378915 #953
[    3.818285] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.0-debian-1.16.0-5 04/01/2014
[    3.818674] Workqueue: writeback wb_workfn (flush-254:32)
[    3.818903] RIP: 0010:ext4_journal_check_start+0x67/0xa0
[    3.819277] Code: 00 04 74 26 48 8b 90 28 02 00 00 31 c0 48 85 d2 74 07 8b 02 83 e0 02 75 15 5b c3 cc cc cc cc b8 fb ff ff ff 5b c3 cc cc cc cc <0f> 0b eb d6 44 8b 42 10 45 31 c9 68 60 57 59 82 48 89 df b9 01 00
[    3.820069] RSP: 0018:ffffc900009f7930 EFLAGS: 00010246
[    3.820301] RAX: ffff888009c65000 RBX: ffff888006ec1800 RCX: ffff88800665f000
[    3.820605] RDX: 0000000000000000 RSI: 0000000000000044 RDI: ffffffff8259574c
[    3.820908] RBP: 0000000000000001 R08: 0000000000000001 R09: 0000000000000000
[    3.821213] R10: 0000000000000228 R11: 0000000000000000 R12: 0000000000000000
[    3.821512] R13: 0000000000000002 R14: 000000000000097f R15: 0000000000000008
[    3.821830] FS:  0000000000000000(0000) GS:ffff88807dd00000(0000) knlGS:0000000000000000
[    3.822179] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    3.822432] CR2: 00007f4ab2dce670 CR3: 0000000006764006 CR4: 0000000000770ee0
[    3.822739] PKRU: 55555554
[    3.822861] Call Trace:
[    3.822972]  <TASK>
[    3.823070]  __ext4_journal_start_sb+0x3f/0x190
[    3.823267]  mpage_prepare_extent_to_map+0x470/0x500
[    3.823483]  ext4_do_writepages+0x250/0x760
[    3.823661]  ext4_writepages+0x99/0x130
[    3.823828]  do_writepages+0xcf/0x1e0
[    3.823988]  ? fprop_fraction_percpu+0x2f/0x80
[    3.824186]  __writeback_single_inode+0x3d/0x280
[    3.824389]  writeback_sb_inodes+0x1ed/0x4b0
[    3.824571]  wb_writeback+0xdb/0x2f0
[    3.824724]  wb_do_writeback+0x87/0x2b0
[    3.824890]  ? set_worker_desc+0xc7/0xd0
[    3.825060]  wb_workfn+0x5f/0x260
[    3.825205]  ? ttwu_do_activate+0x83/0x1e0
[    3.825382]  ? _raw_spin_unlock_irqrestore+0xe/0x30
[    3.825592]  ? try_to_wake_up+0x275/0x480
[    3.825774]  process_one_work+0x1c3/0x3d0
[    3.825949]  worker_thread+0x51/0x3b0
[    3.826108]  ? __pfx_worker_thread+0x10/0x10
[    3.826291]  kthread+0xe7/0x110
[    3.826430]  ? __pfx_kthread+0x10/0x10
[    3.826593]  ret_from_fork+0x29/0x50
[    3.826747]  </TASK>
[    3.826846] ---[ end trace 0000000000000000 ]---
[    3.827056] ------------[ cut here ]------------


				   

Jan Kara (7):
  ext4: Update stale comment about write constraints
  ext4: Use nr_to_write directly in mpage_prepare_extent_to_map()
  ext4: Mark page for delayed dirtying only if it is pinned
  ext4: Don't unlock page in ext4_bio_write_page()
  ext4: Move page unlocking out of mpage_submit_page()
  ext4: Move mpage_page_done() calls after error handling
  ext4: Convert data=journal writeback to use ext4_writepages()

 fs/ext4/inode.c             | 410 +++++++++++-------------------------
 fs/ext4/page-io.c           |  10 +-
 include/trace/events/ext4.h |   7 -
 3 files changed, 126 insertions(+), 301 deletions(-)

-- 
2.31.0


^ permalink raw reply	[flat|nested] 15+ messages in thread
* [PATCH 0/7] ext4: Cleanup data=journal writeback path
@ 2023-01-11 15:43 Jan Kara
  2023-01-11 15:43 ` [PATCH 6/7] ext4: Move mpage_page_done() calls after error handling Jan Kara
  0 siblings, 1 reply; 15+ messages in thread
From: Jan Kara @ 2023-01-11 15:43 UTC (permalink / raw)
  To: Ted Tso; +Cc: linux-ext4, Jan Kara

Hello,

this patch series implements promised cleanup of ext4 data=journal writeback
path. That way we can get rid of last remnants of old support for .writepage
callback and mostly unify this writeback path with standard data handling
modes. We also update some of the stale comments regarding data=journal mode
along the way.

Note that patch 3 (ext4: Mark page for delayed dirtying only if it is pinned)
currently breaks somewhat the data=journal guarantees if mapped page cache is
used as a buffer for direct IO read because that path does not pin pages yet
(David Howels is working on it). But I figured this is not a huge deal for a
cornercase usecase of a cornercase configuration and keeping marking page for
delayed dirtying unconditionally is problematic as checkpointing dirties the
page as well so it is effectively permanently added to the journal. It was
problematic already in the past and happened to work only by luck.

								Honza

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-03-15 16:17 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-28  5:13 [PATCH REBASED 0/7] ext4: Cleanup data=journal writeback path Theodore Ts'o
2023-02-28  5:13 ` [PATCH 1/7] ext4: Update stale comment about write constraints Theodore Ts'o
2023-02-28  5:13 ` [PATCH 2/7] ext4: Use nr_to_write directly in mpage_prepare_extent_to_map() Theodore Ts'o
2023-02-28  5:13 ` [PATCH 3/7] ext4: Mark page for delayed dirtying only if it is pinned Theodore Ts'o
2023-02-28  5:13 ` [PATCH 4/7] ext4: Don't unlock page in ext4_bio_write_page() Theodore Ts'o
2023-02-28  5:13 ` [PATCH 5/7] ext4: Move page unlocking out of mpage_submit_page() Theodore Ts'o
2023-02-28  5:13 ` [PATCH 6/7] ext4: Move mpage_page_done() calls after error handling Theodore Ts'o
2023-02-28  5:13 ` [PATCH 7/7] ext4: Convert data=journal writeback to use ext4_writepages() Theodore Ts'o
2023-02-28 13:58 ` [PATCH REBASED 0/7] ext4: Cleanup data=journal writeback path Jan Kara
2023-03-02 13:37   ` Theodore Ts'o
2023-03-03  9:29     ` Jan Kara
2023-03-03 10:38       ` Jan Kara
2023-03-08 16:37         ` Jan Kara
2023-03-15 16:16 ` Theodore Ts'o
  -- strict thread matches above, loose matches on Subject: below --
2023-01-11 15:43 [PATCH " Jan Kara
2023-01-11 15:43 ` [PATCH 6/7] ext4: Move mpage_page_done() calls after error handling Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).