Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp716262rwb; Wed, 26 Jul 2023 01:23:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlHnjS4FOA+R9c3LCvoYU81dyKro83sHicMKX5xXEPMin4OJyWexafEBt1YN6ul5q4u8h8Zl X-Received: by 2002:aca:1905:0:b0:3a5:ca93:fb69 with SMTP id l5-20020aca1905000000b003a5ca93fb69mr1371721oii.55.1690359806065; Wed, 26 Jul 2023 01:23:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690359806; cv=none; d=google.com; s=arc-20160816; b=itjx5GvLsXSKszLghJsXCW34RgKuMTHPKhY+TJl9s90J0CZa9YJnVzN1JWEJpIxGd2 RyHYK4PZs/bltpgP+QVLtfP/SjBARAthRb9n6sjjXryz/hEyF+wIskVUzPTZ1wXiFiVw IDeYp4LtlLYZcte+MOIpdJVcd61ne11x0JDXMgs1AxyNksbk8jwnOZRjaHzhvS25yYZI 51wPQ3NWf5x/uUNWEheqm7YpCp1jSe4EVUTLF6qht/IAv0sGivYjY/ztYuoTVGV7Ucnn 4SmcUPmjeXuMywK2S/dFKIZD59CIVh9ktiMN7WrldyBEtr6VetquEa7/uzMOR8zUJWcv 7hcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=DrTjaApThAuzzzwg/AJ38QfJI73QqK5cZWNfOYAaBzo=; fh=G5Ivpgr6jpacEdHMoxfoNLtYLWx4G+pEaINoSx6siHM=; b=z8liFiW8XpqgszJR/oVAJP1nxVFXWhl1CLfP8IMRMWTLdwIb4hM1rJdQSzaeGcnyOx VoLkJUTxpGXImZoniBfa417XuGqpJwCi55y5Fk3P5o+Q7UzIRsKIOkGXHEdo6XwU1YtD 8XuLqXiiBNJfZHb1n1kwyviBydPcXmJUF9PeqAp+6myKtWqDlsyn3Q+FkxNcbu9Oz7TP BQyNM+0pldM2wBF+AwY5G4+QgX01ZlMcZqoNvU24koWwgULssZ8Mq1pxQbSQU4TJM4s2 S4HS6ksbeyzCYst6867aLV210DA3D2oYzCjRm2sLcpj7ITus5W8yZQSHhdX9Z0QNc9Ld NDdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=wmb9Oc63; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a17-20020a637051000000b0055c95e91f67si13082058pgn.155.2023.07.26.01.23.13; Wed, 26 Jul 2023 01:23:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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.dev header.s=key1 header.b=wmb9Oc63; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232942AbjGZIFb (ORCPT + 99 others); Wed, 26 Jul 2023 04:05:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232401AbjGZIE7 (ORCPT ); Wed, 26 Jul 2023 04:04:59 -0400 Received: from out-49.mta1.migadu.com (out-49.mta1.migadu.com [IPv6:2001:41d0:203:375::31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DE0F448C for ; Wed, 26 Jul 2023 00:57:14 -0700 (PDT) Content-Type: text/plain; charset=us-ascii DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1690358232; 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=DrTjaApThAuzzzwg/AJ38QfJI73QqK5cZWNfOYAaBzo=; b=wmb9Oc63rqgJphlqbAiUGQf+QfWRu1BB5RekgtePch6TWeTBhXF8/rZbaJe3xMLy22V28n AB61q+qfNpO4zxg1WfzVWjZzQVs0/ao+ef/zXMB6L8A11iP2pUjCxTGOuptX1W/mgnuJdh cKneJyV5E4YSzAPypp2CHjNMfrcxLhY= MIME-Version: 1.0 Subject: Re: [PATCH v2 42/47] drm/ttm: introduce pool_shrink_rwsem X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Muchun Song In-Reply-To: <20230724094354.90817-43-zhengqi.arch@bytedance.com> Date: Wed, 26 Jul 2023 15:56:40 +0800 Cc: Andrew Morton , david@fromorbit.com, tkhai@ya.ru, Vlastimil Babka , Roman Gushchin , djwong@kernel.org, Christian Brauner , "Paul E. McKenney" , tytso@mit.edu, steven.price@arm.com, cel@kernel.org, Sergey Senozhatsky , yujie.liu@intel.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org, linux-erofs@lists.ozlabs.org, linux-f2fs-devel@lists.sourceforge.net, cluster-devel@redhat.com, linux-nfs@vger.kernel.org, linux-mtd@lists.infradead.org, rcu@vger.kernel.org, netdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, dm-devel@redhat.com, linux-raid@vger.kernel.org, linux-bcache@vger.kernel.org, virtualization@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, linux-btrfs@vger.kernel.org Content-Transfer-Encoding: 7bit Message-Id: References: <20230724094354.90817-1-zhengqi.arch@bytedance.com> <20230724094354.90817-43-zhengqi.arch@bytedance.com> To: Qi Zheng X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-nfs@vger.kernel.org > On Jul 24, 2023, at 17:43, Qi Zheng wrote: > > Currently, the synchronize_shrinkers() is only used by TTM pool. It only > requires that no shrinkers run in parallel. > > After we use RCU+refcount method to implement the lockless slab shrink, > we can not use shrinker_rwsem or synchronize_rcu() to guarantee that all > shrinker invocations have seen an update before freeing memory. > > So we introduce a new pool_shrink_rwsem to implement a private > synchronize_shrinkers(), so as to achieve the same purpose. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song