linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>, Christoph Hellwig <hch@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux F2FS Dev Mailing List 
	<linux-f2fs-devel@lists.sourceforge.net>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [GIT PULL] f2fs for 5.18
Date: Wed, 23 Mar 2022 15:28:26 -0400	[thread overview]
Message-ID: <5acaaf61-5419-178d-c805-62f979697653@redhat.com> (raw)
In-Reply-To: <YjtPUec8jiqUXGuf@google.com>

On 3/23/22 12:48, Jaegeuk Kim wrote:
> On 03/23, Christoph Hellwig wrote:
>> On Tue, Mar 22, 2022 at 10:22:50AM -0700, Linus Torvalds wrote:
>>> On Mon, Mar 21, 2022 at 1:39 PM Jaegeuk Kim <jaegeuk@kernel.org> wrote:
>>>> In this cycle, f2fs has some performance improvements for Android workloads such
>>>> as using read-unfair rwsems [...]
>>> I've pulled this, but that read-unfair rwsem code looks incredibly
>>> dodgy. Doing your own locking is always a bad sign, and it ahs
>>> traditionally come back to bite us pretty much every time. At least it
>>> uses real lock primitives, just in a really odd way.
>> FYI, Peter and I both pointed this out when the patches were posted
>> and NAKed the patch, but the feedback was ignored.
> Christoph, I proposed,
>
> "I've been waiting for a generic solution as suggested here. Until then, I'd like
> to keep this in f2fs *only* in order to ship the fix in products. Once there's
> a right fix, let me drop or revise this patch again."
>
> https://lore.kernel.org/linux-f2fs-devel/YhZzV11+BlgI1PBd@google.com/
>
I suspect f2fs may also need the 617f3ef95177 ("locking/rwsem: Remove 
reader optimistic spinning") to give higher priority to writer. Please 
let me know the test result when you are able to test v5.15 LTS to see 
if these commits are able to address the f2fs issue.

I have some ideas of making a reader-unfair rwsem, but that requires 
either the introduction of a set of new down_read() variants or keeping 
the unfair state in the rwsem itself. I would like to make sure that 
there is really a need for such a thing before working on it.

Cheers,
Longman



  parent reply	other threads:[~2022-03-23 19:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-21 20:39 [GIT PULL] f2fs for 5.18 Jaegeuk Kim
2022-03-22 17:22 ` Linus Torvalds
2022-03-22 17:37   ` Waiman Long
2022-03-22 17:50     ` Linus Torvalds
2022-03-22 20:58       ` Jaegeuk Kim
2022-06-15 20:13         ` Pavel Machek
2022-06-16 17:02           ` Jaegeuk Kim
2022-03-23  0:34       ` Tim Murray
2022-03-23  2:03         ` Linus Torvalds
2022-03-23 16:26           ` Jaegeuk Kim
2022-03-23 17:06             ` Linus Torvalds
2022-03-23 21:21               ` Jaegeuk Kim
2022-03-23  7:33   ` Christoph Hellwig
2022-03-23 16:48     ` Jaegeuk Kim
2022-03-23 16:49       ` Christoph Hellwig
2022-03-23 17:00         ` Jaegeuk Kim
2022-03-23 19:28       ` Waiman Long [this message]
2022-03-23 21:25         ` Jaegeuk Kim
2022-03-22 18:32 ` [f2fs-dev] " pr-tracker-bot

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=5acaaf61-5419-178d-c805-62f979697653@redhat.com \
    --to=longman@redhat.com \
    --cc=hch@infradead.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    --cc=torvalds@linux-foundation.org \
    /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).