ocfs2-devel.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [Ocfs2-devel] [RFC PATCH 0/2] gfs2 readahead regression in v5.8-rc1
@ 2020-06-19  9:39 Andreas Gruenbacher
  2020-06-19  9:39 ` [Ocfs2-devel] [PATCH 1/2] fs: Add IOCB_CACHED flag for generic_file_read_iter Andreas Gruenbacher
  2020-06-19  9:39 ` [Ocfs2-devel] [PATCH 2/2] gfs2: Rework read and page fault locking Andreas Gruenbacher
  0 siblings, 2 replies; 4+ messages in thread
From: Andreas Gruenbacher @ 2020-06-19  9:39 UTC (permalink / raw)
  To: Matthew Wilcox, Linus Torvalds
  Cc: Andreas Gruenbacher, Andrew Morton, linux-xfs, Junxiao Bi,
	William Kucharski, Joseph Qi, John Hubbard, linux-kernel,
	linux-f2fs-devel, cluster-devel, linux-mm, ocfs2-devel,
	linux-fsdevel, linux-ext4, linux-erofs, Christoph Hellwig,
	linux-btrfs

Hello,

can the two patches in this set still be considered for v5.8?

Commit d4388340ae0b ("fs: convert mpage_readpages to mpage_readahead")
which converts gfs2 and other filesystems to use the new ->readahead
address space operation is leading to deadlocks between the inode glocks
and page locks: ->readahead is called with the pages to readahead
already locked.  When gfs2_readahead then tries to lock the associated
inode glock, another process already holding the inode glock may be
trying to lock the same pages.

We could work around this in gfs by using a LM_FLAG_TRY lock in
->readahead for now.  The real reason for this deadlock is that gfs2
shouldn't be taking the inode glock in ->readahead in the first place
though, so I'd prefer to fix this "properly" instead.  Unfortunately,
this depends on a new IOCB_CACHED flag for generic_file_read_iter.

A previous version was posted in November:

https://urldefense.com/v3/__https://lore.kernel.org/linux-fsdevel/20191122235324.17245-1-agruenba at redhat.com/__;!!GqivPVa7Brio!LmBheYse5B61aDX8Kb1YDtzeYu4oO-pGUU7yz2_cnE43PjIYJo_ZBkyKls4_93eUXhkSBQ$ 

Thanks,
Andreas

Andreas Gruenbacher (2):
  fs: Add IOCB_CACHED flag for generic_file_read_iter
  gfs2: Rework read and page fault locking

 fs/gfs2/aops.c     | 27 ++------------------
 fs/gfs2/file.c     | 61 ++++++++++++++++++++++++++++++++++++++++++++--
 include/linux/fs.h |  1 +
 mm/filemap.c       | 16 ++++++++++--
 4 files changed, 76 insertions(+), 29 deletions(-)


base-commit: af42d3466bdc8f39806b26f593604fdc54140bcb
-- 
2.26.2

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

end of thread, other threads:[~2020-06-19 11:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-19  9:39 [Ocfs2-devel] [RFC PATCH 0/2] gfs2 readahead regression in v5.8-rc1 Andreas Gruenbacher
2020-06-19  9:39 ` [Ocfs2-devel] [PATCH 1/2] fs: Add IOCB_CACHED flag for generic_file_read_iter Andreas Gruenbacher
2020-06-19  9:39 ` [Ocfs2-devel] [PATCH 2/2] gfs2: Rework read and page fault locking Andreas Gruenbacher
2020-06-19 11:55   ` Matthew Wilcox

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).