All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] fs: remove retry loop
@ 2020-06-17 10:40 John Ogness
  2020-06-17 10:40 ` [RFC PATCH 1/1] fs/namespace.c: use spinlock instead of busy loop John Ogness
  0 siblings, 1 reply; 5+ messages in thread
From: John Ogness @ 2020-06-17 10:40 UTC (permalink / raw)
  To: Alexander Viro
  Cc: Sebastian Andrzej Siewior, Peter Zijlstra, Thomas Gleixner,
	linux-fsdevel, linux-kernel

Hello,

This patch removes the last retry loop in VFS. It is partially
reverting

   commit d3ef3d7351cc ("fs: mnt_want_write speedup")

by re-introducing per-cpu spinlocks for each mount. The patch
includes benchmark results in the diffstat section to show that the
previous optimization work is not undone.

I would have liked to use a percpu_rw_semaphore per mount instead
of the many spinlocks. However, percpu_rw_semaphore can sleep, which
is a problem for sb_prepare_remount_readonly() since it needs to
take the spinlock in @mount_lock in order to iterate @sb->s_mounts.
Perhaps using a mutex to sychronize @sb->s_mounts is an option. I am
not sure. That is why this is an RFC.

I am suggesting this partial revert because it removes the retry
loop and does not show any obvious negative benchmark effects.

John Ogness (1):
  fs/namespace.c: use spinlock instead of busy loop

 fs/mount.h     |   7 +++
 fs/namespace.c | 118 +++++++++++++++++++++++++++++++++----------------
 2 files changed, 86 insertions(+), 39 deletions(-)

-- 
2.20.1


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

end of thread, other threads:[~2020-06-17 12:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 10:40 [RFC PATCH 0/1] fs: remove retry loop John Ogness
2020-06-17 10:40 ` [RFC PATCH 1/1] fs/namespace.c: use spinlock instead of busy loop John Ogness
2020-06-17 11:26   ` Peter Zijlstra
2020-06-17 11:27   ` Peter Zijlstra
2020-06-17 12:09     ` Sebastian Andrzej Siewior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.