From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C55DFC433F5 for ; Wed, 23 Mar 2022 21:25:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344893AbiCWV0y (ORCPT ); Wed, 23 Mar 2022 17:26:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54984 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344878AbiCWV0w (ORCPT ); Wed, 23 Mar 2022 17:26:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95D577C161 for ; Wed, 23 Mar 2022 14:25:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id F0EBE616DD for ; Wed, 23 Mar 2022 21:25:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29B2AC340ED; Wed, 23 Mar 2022 21:25:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648070721; bh=UNfONMtlF855BsJew0qEGgqnLnCWd3MQfe8qfpIICXM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SY0pUtLwEFmemMc6BZVriNke9zLCOi/pYPhuWuejyDUBd70A8xAnFJbqzgllZ6rT5 HoCLYgkEjppmpltqvKChQT37aZgltqQXNv2iWUrVVS3vSR+/tTJmWQ8vZh7RAxDcOz 3sJeUqLuSZShT/0AGNS+DKzuT8jolHvE+e8KqCq2n3yIQWnbkMAVwEbe/DQSe1PUKP QAlDU25zXQktF1giyAYmRkOqiOxe68tKJZyfleBt3/VrDB7DoglaKeKCZ93+NGalht /wSk+1BLdeDsXHv7uD+ld6Jjy21m28vAMEGeGKiAUrlxHxyRMOWD2t68D9BujI4gYf CtD4s/qFa7y0w== Date: Wed, 23 Mar 2022 14:25:19 -0700 From: Jaegeuk Kim To: Waiman Long Cc: Christoph Hellwig , Linus Torvalds , Linux Kernel Mailing List , Linux F2FS Dev Mailing List , Peter Zijlstra Subject: Re: [GIT PULL] f2fs for 5.18 Message-ID: References: <5acaaf61-5419-178d-c805-62f979697653@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5acaaf61-5419-178d-c805-62f979697653@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/23, Waiman Long wrote: > 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 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. Sure, I'll keep an eye on it, but next kernel is likely to be applied to the products in next year. It may take some time. :( > > 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 >