linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RFC PATCH 0/1] fs: remove retry loop
Date: Wed, 17 Jun 2020 12:46:57 +0206	[thread overview]
Message-ID: <20200617104058.14902-1-john.ogness@linutronix.de> (raw)

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


             reply	other threads:[~2020-06-17 10:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17 10:40 John Ogness [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200617104058.14902-1-john.ogness@linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).