Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp2182791pxb; Fri, 25 Mar 2022 12:34:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWJhHJqE/aTnDDYEpEx8+VWEkMMlXxWXlBWzNe3E88GZIlOpIKTLzbrRX1mAjd/dwnmHD6 X-Received: by 2002:a17:902:b692:b0:14c:935b:2b03 with SMTP id c18-20020a170902b69200b0014c935b2b03mr13418190pls.81.1648236846951; Fri, 25 Mar 2022 12:34:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648236846; cv=none; d=google.com; s=arc-20160816; b=C68BHohXx+qkbXj9apOyYdT/RPJJc0GI0Frzi/QFEnXgaJp2FbUSDfkTPjLm5VxzQb ZEP7ZjkfHHVw3iT4B4qLhep5nGCGPWp1xMBcPo2ed4XaE7iSI8T/UYYLxZW7qmvB9C+r OJVVxCRaHN76MepqxasEMbkZn5VAHKSfQWRHusUJM0mc5x8vsXOaoOfYlxX/piVavbM0 tMULadMzetDpq3rxc24CumdlahUPq8Wqc5Atpyp12emCflmc7+GIkQgdLHlPp2VLPp6j D5aG2J55LePEtPpov9ABRbb/gCfA/J19WI3QCFEkuY50Zw6+r63icXRgZHAmSUwns1bj DaHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=1BxydPwtCIAbFGiK7PPwmV0E1KM4yb30F0xyHFE5Tbk=; b=OIvJyzySfH+6GdL3+c4HXa+B4wAQtA0Ww+3PYGPTNIKgifPtwy+FmJNZ8o3Jhp+etb /gehF+K5+R4InFmM2ZLdXOyXMWZ1V50rJyPpvWVKNveRHpvf4UhCL6pi6c7q4Nf4JRXT xwbfwZn0GnnJwgbMv2tskaApijfb7fPRh7zbMdr0jjPYUXTbWazsPN+29nWPSiJIfeaC W5JpeCvJXLbCEAHE21hzggABY3CrWcO6bFCUU8eLaNTrnb53TJkorGRAOq1bU3l2nPDx wBlSoS2Jj8Ufx2e0i6Ok0NvMh0ClToK4SPdLSTa2//0W7PryX9Wt6EgNTpFw6YRUP+rX +vkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="PPc/PeP7"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id c5-20020a170902d48500b00153f6255da6si3619165plg.571.2022.03.25.12.34.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Mar 2022 12:34:06 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="PPc/PeP7"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 48168255AB8; Fri, 25 Mar 2022 11:24:57 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245345AbiCWTaE (ORCPT + 99 others); Wed, 23 Mar 2022 15:30:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344197AbiCWTaC (ORCPT ); Wed, 23 Mar 2022 15:30:02 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0127A888F9 for ; Wed, 23 Mar 2022 12:28:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648063711; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1BxydPwtCIAbFGiK7PPwmV0E1KM4yb30F0xyHFE5Tbk=; b=PPc/PeP7rti4Uw2XkOEsJNOgv8FeI/f2QGwgB27kHL/q9iMNK2MG1l4YnGQswcownkZmaH r065eqQdH2O0HBuLYyTCgtsL+3JW7qOByDLoILFlrwYAw3XyIRBRTgXnagyIe6a9QaFwmS UTGP2YDUuusSEZAENq1/PFprGdm8Yqw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-93-X2yUEWyfOoOHcOqFVi1J1A-1; Wed, 23 Mar 2022 15:28:27 -0400 X-MC-Unique: X2yUEWyfOoOHcOqFVi1J1A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E39EC38008B5; Wed, 23 Mar 2022 19:28:26 +0000 (UTC) Received: from [10.22.35.45] (unknown [10.22.35.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id A25E52166B4C; Wed, 23 Mar 2022 19:28:26 +0000 (UTC) Message-ID: <5acaaf61-5419-178d-c805-62f979697653@redhat.com> Date: Wed, 23 Mar 2022 15:28:26 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [GIT PULL] f2fs for 5.18 Content-Language: en-US To: Jaegeuk Kim , Christoph Hellwig Cc: Linus Torvalds , Linux Kernel Mailing List , Linux F2FS Dev Mailing List , Peter Zijlstra References: From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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