Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp830888iog; Wed, 15 Jun 2022 13:22:53 -0700 (PDT) X-Google-Smtp-Source: AGRyM1skW24IqF8NfNnUOr28DAYpS2n32PSnRRbuJO9cFtVd08TGRxs1alzYIwOZUpizjSOj2kbR X-Received: by 2002:a17:907:e93:b0:711:ca66:6d06 with SMTP id ho19-20020a1709070e9300b00711ca666d06mr1355685ejc.477.1655324573644; Wed, 15 Jun 2022 13:22:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655324573; cv=none; d=google.com; s=arc-20160816; b=hQlLIJfY0TvP1MCtH3HGe9FdL+01X9Lo1xhlXEJnPj4b9skeZRI5YQZfz3w7JpBddB 1TZkviXOw8xUO+SgHfxbomjv2/+dE0WLfa9YkUNg3uIZiG4uFHNRT8VxeB6m2+vWDr0X msW7bvneA3Vac9uGaoUNsltRp2RaDPPx58Oqm5xluzgceY6Mww+L9m93Hp9c+DSae5TP eunU0YTIyIY252s6UpFqC01j3tHA4U4ehnj+yKUSUthMwb8uuAWfhRY8Ipua8TDOwlQu 9ticRBpTg634iWCaYU3lcMWfZwDcN+k0hIYdDpMUe5zcVS5aVKTmtY8cnfG851owOBou uwXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=wU2vl8ograCYRqzxelq/GPl/Y66unF02H0h5i03KDKQ=; b=WG856LmTcopOmovEt/fIRkQpB7w4wg/0cik6zHcpMsfN8XTP9J0I2XouIah0+BNGiq EUv5B1ipL55T3nfAp8xGpliW/V47eaaYS4oqNVjKbdqT40DNaQRohhhKtdsaP8/v66Xj mZPzx7Tx8d8GFXMvPIazVp+CKkZqpgSTPsieIu4QggUaTG9I4ZKPxbkP2JK7rqVw/fqw 6y/3lbsLPZpCePs4Hf22Id3A4EVoY7+uDumycKEpMuMFyLV9c1deCzkpsDDxMjvePhWR OGnff9K3rLIJfDOmRbADsMRl6XSzoYMJCD4uCh0xD0sEQBaYJ8GkxS8krvKSgzVUfOJS ZmHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 13-20020a17090600cd00b006e8925846cesi13428183eji.471.2022.06.15.13.22.28; Wed, 15 Jun 2022 13:22:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347100AbiFOUNg convert rfc822-to-8bit (ORCPT + 99 others); Wed, 15 Jun 2022 16:13:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346543AbiFOUNX (ORCPT ); Wed, 15 Jun 2022 16:13:23 -0400 Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0512340F6 for ; Wed, 15 Jun 2022 13:13:21 -0700 (PDT) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 08FE01C0BC7; Wed, 15 Jun 2022 22:13:20 +0200 (CEST) Date: Wed, 15 Jun 2022 22:13:18 +0200 From: Pavel Machek To: Jaegeuk Kim Cc: Linus Torvalds , Waiman Long , Tim Murray , Linux Kernel Mailing List , Linux F2FS Dev Mailing List Subject: Re: [GIT PULL] f2fs for 5.18 Message-ID: <20220615201318.GA1194@bug> References: <51cded74-3135-eed8-06d3-0b2165e3b379@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Hi! > > > AFAICS, the read-unfair rwsem code is created to resolve a potential > > > lock starvation problem that they found on linux-5.10.y stable tree. I > > > believe I have fixed that in the v5.11 kernel, see commit 2f06f702925 > > > ("locking/rwsem: Prevent potential lock starvation"). > > > > Ahh. > > > > Adding Tim Murray to the cc, since he was the source of that odd > > reader-unfair thing. > > > > I really *really* dislike people thinking they can do locking > > primitives, because history has taught us that they are wrong. > > > > Even when people get the semantics and memory ordering right (which is > > not always the case, but at least the f2fs code uses real lock > > primitives - just oddly - and should thus be ok), it invariably tends > > to be a sign of something else being very wrong. > > > > And I can easily believe that in this case it's due to a rmsem issue > > that was already fixed long long ago as per Waiman. > > > > Can people please test with the actual modern rwsem code and with the > > odd reader-unfair locks disabled? > > The pain point is 1) we don't have a specific test to reproduce the issue, > but got some foundings from field only, 2) in order to test the patches, we > need to merge the patches into Android kernel [1] through LTS, 3) but, LTS > wants to see any test results [2]. > > [1] https://android-review.googlesource.com/q/topic:rwsem_unfair > [2] https://lore.kernel.org/stable/988fd9b5-8e89-03ae-3858-85320382792e@redhat.com/ Wait, what? Normally, patches are tested before going to mainline, and especially before being backported to stable. If you can't reproduce issue on mainline kernel, there's something very wrong with trying to fix it on mainline kernel. You should not be merging untested fixes so that they can make it into mainline and then into stable and then into android kernel to be tested. If there's no other way, you should be able to backport those patches to android kernel and test them _before_ merging them. Android phones are rather cheap. Some should even run mainline kernels -- see for example Oneplus 4T -- if you don't need all the features. It looks hch was right NAKing the patches. Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html