Re: [Linux-cachefs] [PATCH 07/11] vfs: add nowait parameter for file_accessed()

2023-09-10 Thread Dave Chinner
On Fri, Sep 08, 2023 at 01:29:55AM +0100, Pavel Begunkov wrote: > On 9/3/23 23:30, Dave Chinner wrote: > > On Wed, Aug 30, 2023 at 02:11:31PM +0800, Hao Xu wrote: > > > On 8/29/23 19:53, Matthew Wilcox wrote: > > > > On Tue, Aug 29, 2023 at 03:46:13PM +0800, Hao Xu

Re: [Linux-cachefs] [PATCH 02/11] xfs: add NOWAIT semantics for readdir

2023-09-03 Thread Dave Chinner
On Sun, Aug 27, 2023 at 09:28:26PM +0800, Hao Xu wrote: > From: Hao Xu > > Implement NOWAIT semantics for readdir. Return EAGAIN error to the > caller if it would block, like failing to get locks, or going to > do IO. > > Co-developed-by: Dave Chinner Not really. "C

Re: [Linux-cachefs] [PATCH 07/11] vfs: add nowait parameter for file_accessed()

2023-09-03 Thread Dave Chinner
e or nodiratime. > > Hi Matthew, > The previous discussion shows this does cause issues in real > producations: > https://lore.kernel.org/io-uring/2785f009-2ebb-028d-8250-d5f3a3051...@gmail.com/#:~:text=fwiw%2C%20we%27ve%20just%20recently%20had%20similar%20problems%20with%20io_uring%20

Re: [Linux-cachefs] [PATCH RFC v5 00/29] io_uring getdents

2023-08-25 Thread Dave Chinner
r IO" implementation we started with and don't try to solve every little blocking problem that might exist in the VFS and filesystems... -Dave -- Dave Chinner da...@fromorbit.com -- Linux-cachefs mailing list Linux-cachefs@redhat.com https://listman.redhat.com/mailman/listinfo/linux-cachefs

Re: [Linux-cachefs] [PATCH 25/29] xfs: support nowait for xfs_buf_item_init()

2023-08-25 Thread Dave Chinner
ms in the transaction It's even worse than that - once we have committed intents, the whole chain of intent processing must be run to completionr. Hence we can't tolerate backing out of that defered processing chain half way through because we might have to block. Until we can roll back partial dirty transactions and partially completed defered intent chains at any random point of completion, XFS_TRANS_NOWAIT will not work. -Dave. -- Dave Chinner da...@fromorbit.com -- Linux-cachefs mailing list Linux-cachefs@redhat.com https://listman.redhat.com/mailman/listinfo/linux-cachefs

Re: [Linux-cachefs] [PATCH 28/29] xfs: support nowait semantics for xc_ctx_lock in xlog_cil_commit()

2023-08-25 Thread Dave Chinner
shutdown as we cannot back out from failure with dirty log items gracefully at this point. -Dave. -- Dave Chinner da...@fromorbit.com -- Linux-cachefs mailing list Linux-cachefs@redhat.com https://listman.redhat.com/mailman/listinfo/linux-cachefs

Re: [Linux-cachefs] [PATCH 26/29] xfs: return -EAGAIN when nowait meets sync in transaction commit

2023-08-25 Thread Dave Chinner
tems at this point with shutting down the filesystem. This points to XFS_TRANS_NOWAIT being completely broken, too, because we don't call xfs_trans_set_sync() until just before we commit the transaction. At this point, it is -too late- for nowait+sync to be handled gracefully, and it will *always*

Re: [Linux-cachefs] [PATCH 24/29] xfs: support nowait for xfs_buf_read_map()

2023-08-25 Thread Dave Chinner
comes back to my first comments that XBF_TRYLOCK cannot simpy be replaced with XBF_NOWAIT semantics... -Dave. -- Dave Chinner da...@fromorbit.com -- Linux-cachefs mailing list Linux-cachefs@redhat.com https://listman.redhat.com/mailman/listinfo/linux-cachefs

Re: [Linux-cachefs] [PATCH 02/29] xfs: rename XBF_TRYLOCK to XBF_NOWAIT

2023-08-25 Thread Dave Chinner
5,7 @@ struct xfs_buf; > > /* flags used only as arguments to access routines */ > #define XBF_INCORE(1u << 29)/* lookup only, return if found in cache */ > -#define XBF_TRYLOCK (1u << 30)/* lock requested, but do not wait */ > +#define XBF_NOWAIT(1u << 30)/* mem/lock requested, but do not wait */ That's now a really poor comment. It doesn't describe the semantics or constraints that NOWAIT might imply. -Dave. -- Dave Chinner da...@fromorbit.com -- Linux-cachefs mailing list Linux-cachefs@redhat.com https://listman.redhat.com/mailman/listinfo/linux-cachefs

Re: [Linux-cachefs] How capacious and well-indexed are ext4, xfs and btrfs directories?

2021-05-19 Thread Dave Chinner
On Wed, May 19, 2021 at 11:00:03AM +0300, Avi Kivity wrote: > > On 18/05/2021 02.22, Dave Chinner wrote: > > > > > What I'd like to do is remove the fanout directories, so that for each > > > logical > > > "volume"[*] I have a single dir

Re: [Linux-cachefs] How capacious and well-indexed are ext4, xfs and btrfs directories?

2021-05-17 Thread Dave Chinner
single threading modifications to your file index. You still need to use fanout directories if you want concurrency during modification for the cachefiles index, but that's a different design criteria compared to directory capacity and modification/lookup scalability. Cheers, Dave. -- Dave Chinne

Re: [Linux-cachefs] Metadata writtenback notification? -- was Re: fscache: Redesigning the on-disk cache

2021-03-08 Thread Dave Chinner
gt; synchronous metadata changes being committed to the cache in one go > (truncates, fallocates, fsync, xattrs, unlink+link of tmpfile) - and this > can take quite a long time. The cache needs to be more proactive in > getting stuff committed as it goes along. Workqueues giv

Re: [Linux-cachefs] fscache: Redesigning the on-disk cache

2021-03-08 Thread Dave Chinner
ted to written until the data is written back and the filesystem runs a conversion transaction. So, yeah, if you use FIEMAP to determine where data lies in a file that is being actively modified, you're going get corrupt data sooner rather than later. SEEK_HOLE/DATA are coherent with in memory

Re: [Linux-cachefs] [xfs] db962cd266: Assertion_failed

2021-01-01 Thread Dave Chinner
lifts of the context setting up into xfs_trans_alloc() back into the patchset before adding the current->journal functionality patch. Also, you need to test XFS code with CONFIG_XFS_DEBUG=y so that asserts are actually built into the code and exercised, because this ASSERT should have fired o

Re: [Linux-cachefs] [PATCH v13 4/4] xfs: use current->journal_info to avoid transaction reservation recursion

2020-12-17 Thread Dave Chinner
reservation recursion is used by XFS only, we can > move the check into xfs_vm_writepage(s), per Dave. > > Cc: Darrick J. Wong > Cc: Matthew Wilcox (Oracle) > Cc: Christoph Hellwig > Cc: Dave Chinner > Cc: Michal Hocko > Cc: David Howells > Cc: Jeff Layton > Sig

Re: [Linux-cachefs] [PATCH v13 3/4] xfs: refactor the usage around xfs_trans_context_{set, clear}

2020-12-17 Thread Dave Chinner
On Thu, Dec 17, 2020 at 03:06:27PM -0800, Darrick J. Wong wrote: > On Fri, Dec 18, 2020 at 09:15:09AM +1100, Dave Chinner wrote: > > The obvious solution: we've moved the saved process state to a > > different context, so it is no longer needed for the current > > t

Re: [Linux-cachefs] [PATCH v13 3/4] xfs: refactor the usage around xfs_trans_context_{set, clear}

2020-12-17 Thread Dave Chinner
if (tp->t_pflags) memalloc_nofs_restore(tp->t_pflags); } and the problem is solved. The NOFS state will follow the active transaction and not be reset until the entire transaction chain is completed. In the next patch you can go and introduce current->journal_info into just the wrapper functions, maintaining the same overall logic. -Dave. -- Dave Chinner da...@fromorbit.com -- Linux-cachefs mailing list Linux-cachefs@redhat.com https://www.redhat.com/mailman/listinfo/linux-cachefs

Re: [Linux-cachefs] [PATCH v13 1/4] mm: Add become_kswapd and restore_kswapd

2020-12-16 Thread Dave Chinner
n kswapd -- the only time we reach this code is when we're > exiting and the task_struct is about to be destroyed anyway. > > Cc: Dave Chinner > Acked-by: Michal Hocko > Reviewed-by: Darrick J. Wong > Reviewed-by: Christoph Hellwig > Signed-off-by: Matthew Wilcox (O

Re: [Linux-cachefs] [PATCH v12 3/4] xfs: refactor the usage around xfs_trans_context_{set, clear}

2020-12-14 Thread Dave Chinner
On Tue, Dec 15, 2020 at 08:42:08AM +0800, Yafang Shao wrote: > On Tue, Dec 15, 2020 at 5:08 AM Dave Chinner wrote: > > On Sun, Dec 13, 2020 at 05:09:02PM +0800, Yafang Shao wrote: > > > On Thu, Dec 10, 2020 at 3:52 AM Darrick J. Wong > > > wrote: > > > > O

Re: [Linux-cachefs] [PATCH v12 3/4] xfs: refactor the usage around xfs_trans_context_{set, clear}

2020-12-14 Thread Dave Chinner
> > This patch is based on Darrick's work to fix the issue in xfs/141 in the > > > earlier version. [1] > > > > > > 1. https://lore.kernel.org/linux-xfs/20201104001649.GN7123@magnolia > > > > > > Cc: Darrick J. Wong >

Re: [Linux-cachefs] [PATCH v10 4/4] xfs: use current->journal_info to avoid transaction reservation recursion

2020-12-07 Thread Dave Chinner
trans_context_active > To check whehter current is in fs transcation or not > - xfs_trans_context_swap > Transfer the transaction context when rolling a permanent transaction > > These two new helpers are instroduced in xfs_trans.h. > > Cc: Darrick J. Wong > Cc: Matt

Re: [Linux-cachefs] [PATCH v9 2/2] xfs: avoid transaction reservation recursion

2020-12-06 Thread Dave Chinner
& (PF_MEMALLOC|PF_KSWAPD)) == > PF_MEMALLOC)) > goto redirty; > > [2]. https://lore.kernel.org/linux-xfs/20201104001649.GN7123@magnolia/ > > Cc: Darrick J. Wong > Cc: Matthew Wilcox (Oracle) > Cc: Christoph Hellwig > Cc: Dave Chinner > Cc: M

Re: [Linux-cachefs] Problems doing DIO to netfs cache on XFS from Ceph

2020-12-03 Thread Dave Chinner
saction context is a bug in XFS. IOWs, we are waiting on a new version of this patchset to be posted: https://lore.kernel.org/linux-xfs/20201103131754.94949-1-laoar.s...@gmail.com/ so that we can get rid of this from iomap and check the transaction recursion case directly in the XFS code. Then your pr