Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3211461pxp; Tue, 22 Mar 2022 14:38:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCD4YDA+VHmz1ILYC1/IBbGWN88Cj1Y1GOlaoQHXh4QVVqNlVAZjbf1TvNVXnBriSiECYT X-Received: by 2002:a17:902:bf07:b0:150:9b8a:a14f with SMTP id bi7-20020a170902bf0700b001509b8aa14fmr20245395plb.127.1647985124439; Tue, 22 Mar 2022 14:38:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647985124; cv=none; d=google.com; s=arc-20160816; b=Ul3WnL0EqnDv4d06C8lFh2cqCqTFZVwulEfQeOsH472/Ia8akYxamBc19VPfBtNAW9 XwSPvr15c7zwE0TCur9Ck5iv4mPQfOIgvQW4nBDMRmflH48m8m1ZkDmsueNxSHrwv+Cq A3l/a56Q0kKk/dpqpPC46pmbYiXqYomMIJg8OjEWzDjaw+VSNoU6vLYoJpn8YaKHsEZG H2QxWyVaRzxeCHDYrJOoMPj76YwpmRnjjbiB90JFC5JOaApJ1H7Ilgpj6U3eoX9cEhJZ ZoErKssv08Q/bjRIoCZKgyoTzKa0ty+zyx2E05UPjn68ZxZ/OAy0L0bcnn6Gn1MMvQZ1 4t+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=UI6IdkHO1Ce++v4SaLpwOnJOwU7d+FJPmUdI5pUTRyE=; b=T3fNePpMpcanZy9WaxY1wG5MfHbmSOalhtzxddDf6gtM/zBCEuashfv7vpfCVAhhWc EN9chC9Qx+aHyGrsaqoYVVte8v+/SZ5WpaNYeATJDco2qByaEltv86QnYcAX3cK5RWuU 7+fnyvDJK55Mb0GEzy7THzJpAcYNuWwlZz97mjSPz70iq2FWXi0zu3VK6UJzEAo5C/tn K4QIfEkh3YyRYb/2XrjOflUMWqbbPFc6hF/SWGJNx6Mmr6fUoNAf+fpVJC0bH1kUgdWz aUxkXR4wPg1aJilcBzeBgZ8IugIEDldqgNbUSraajC/8V2tPWZp0ozhQnaJoTuhMHXuA hApQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=ODOcxjgt; 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 c3-20020a6566c3000000b003816043f0d6si17702503pgw.715.2022.03.22.14.37.17; Tue, 22 Mar 2022 14:38:44 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=ODOcxjgt; 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 S239532AbiCVRYo (ORCPT + 99 others); Tue, 22 Mar 2022 13:24:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239525AbiCVRYk (ORCPT ); Tue, 22 Mar 2022 13:24:40 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9302697 for ; Tue, 22 Mar 2022 10:23:11 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id h7so13500881lfl.2 for ; Tue, 22 Mar 2022 10:23:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UI6IdkHO1Ce++v4SaLpwOnJOwU7d+FJPmUdI5pUTRyE=; b=ODOcxjgtnTokJhq+iwqHbWCzeAZBV5BHLUnl+SfPcnQbCPUA32VYdzSgQPu+R0V5Oc LOX36yzr/Ok6oTqeCrrsPc9enhp/AEQ4fLBbhY9IM+kEdjwZ0kheWb9v+kvXcu2eaHu4 49yhuMftUCepZufEyK9CKXp+4gagEX4g0EloY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UI6IdkHO1Ce++v4SaLpwOnJOwU7d+FJPmUdI5pUTRyE=; b=13TKir04ncyzAFiB/5JH8x7JrVxnXlnBJKEq/Eee+TobXz5hjKPy1uXQHMBGC64N/R v2N7w9+gXW6WJNlsAijoHJBEt26MvYD7Qga2Fv9GMKxlpIn77k8aCb9Rrj3xvaNv8uOZ faJz/pLCk9+FsfNIhvqeV+9pgP7UKvOM83wSFQKzHiAtQZq/m8zPkWffl93GmWft4t7d A5Z0MZj0MagBZjU+9u2T61+XIxhxniqddbQGl3eExOVsnuUAhwzWa8kFHzydEuHVxiFB nSeR9KTcgf0nB5IN8xQ/7VwcUckZdCEx5inASSXZqxzmtM8k7Yake4Xi3vupac5txjla 1oEA== X-Gm-Message-State: AOAM533Iq9gpIJLRAJo/UxTUTQubiLN1biKE0iMiNXJNclgaVpYGnwsN Foe3OFPEOHTwVbMhcwP/61XED+9cD2ecjoEAOQQ= X-Received: by 2002:a05:6512:3c96:b0:44a:3c85:ddb0 with SMTP id h22-20020a0565123c9600b0044a3c85ddb0mr2584996lfv.457.1647969788350; Tue, 22 Mar 2022 10:23:08 -0700 (PDT) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com. [209.85.208.182]) by smtp.gmail.com with ESMTPSA id 11-20020a2e154b000000b0024967cd674esm2117503ljv.35.2022.03.22.10.23.07 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Mar 2022 10:23:07 -0700 (PDT) Received: by mail-lj1-f182.google.com with SMTP id h11so24915698ljb.2 for ; Tue, 22 Mar 2022 10:23:07 -0700 (PDT) X-Received: by 2002:a2e:9b10:0:b0:247:f28c:ffd3 with SMTP id u16-20020a2e9b10000000b00247f28cffd3mr19288283lji.152.1647969787311; Tue, 22 Mar 2022 10:23:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Linus Torvalds Date: Tue, 22 Mar 2022 10:22:50 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] f2fs for 5.18 To: Jaegeuk Kim , Waiman Long Cc: Linux Kernel Mailing List , Linux F2FS Dev Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 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. The whole notion of making an rwsem unfair to readers sounds really really odd. I mean, the whole and only _point_ of an rwsem is to allow concurrent readers, and traditionally if it's unfair it's unfair to _writers_ because that tends to be better for throughput (but unfairness can cause horrible latency). So it smells like there's something bad going on in f2fs. That said, I'm adding Waiman to the cc here in case he would have ideas at least for a cleaner interface. Our rw_semaphores are explicitly trying to be fair, because unfairness (the other way) was such a big problem. I'm wondering it the optimistic read lock stealing is bothering f2fs? Linus