Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp774419rwb; Wed, 26 Jul 2023 02:38:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlGC0H4jnkQzBn4zTdtRr++c8r15yH67vR1nhmhgB1RMNYUNOUICaYjTZi17pL1vk3UGpnzj X-Received: by 2002:aca:1102:0:b0:3a4:34c8:f84e with SMTP id 2-20020aca1102000000b003a434c8f84emr1590298oir.2.1690364334339; Wed, 26 Jul 2023 02:38:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690364334; cv=none; d=google.com; s=arc-20160816; b=r0MLh9WYS2ZTnF5QcncK0fZoImL+8yO890WsRCNKjnUZ5h/rw3N5pQfF45AEA/jOXm 6p/cdaWB4LgUjW95tYFXFELAY4R3joAnHkC6LJ0awgbtDF3vQ/suqWNL8yP3+fww42gK jR1XDYUP7gCjmHC9sFwaGsJXBkSDR6Smxn+aNoM/U16x2e8qI4NHYpoZc5peK6iKO9y4 DZbHk1V22Q5eg9slTtzsXpoTHLmiXhuJwvMw7y2jj//iWmbGHiAah0PKmqG9FxB5P2RB 7Cd8juz2a1+1WRNs/COCCYVMy/KAjCpi4X1pO9kQz/SbjlDC2y8RC/3SnXumZJGCWENm 37PA== 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=ajWZi1kTG9ZsFll3P13XRfH/M90QTcK5ZSE2yNZ8xrc=; fh=CQgllgfufdlJGq+1/heAfZ6IuTlPT3RD1afr0kFP2Fo=; b=yDo63icoYY4lNM+2btP5yg9YBjitmSZdW+m7/G4Nma3DFTGMQkHjv2Awwu5yIvPRQi UgpZno8ZFcyNBMu+xQoCre0q0oCPfwEnuYgxR8U4uLG4R40/5H6o4hGKWv4gSMn72Cji OOp23P5U5pJSg0JnGPjp8bsAqEpFURV/g0D4yrR0B9wMNGF0ZmtSSSQTA80DoejBfymg QxhyndIJ/UAxPZhip2KCKV4bieFWCT0S74OlemAh5l9RP+lKLit/1tb4p6IaXtE8qK9C sYvEBqDNPJab8HlvL4az3AGAHzGZNArjMT4fV3u5nSsf+JjvXzh3pCo8lQEDZBYO+uPG 1v4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b="FbQ/cU5K"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i129-20020a636d87000000b0055beccf9921si12789087pgc.212.2023.07.26.02.38.38; Wed, 26 Jul 2023 02:38:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=@bytedance.com header.s=google header.b="FbQ/cU5K"; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230057AbjGZJ2O (ORCPT + 99 others); Wed, 26 Jul 2023 05:28:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231262AbjGZJ1c (ORCPT ); Wed, 26 Jul 2023 05:27:32 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 915874EFB for ; Wed, 26 Jul 2023 02:25:12 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-66d6a9851f3so1488057b3a.0 for ; Wed, 26 Jul 2023 02:25:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1690363511; x=1690968311; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=ajWZi1kTG9ZsFll3P13XRfH/M90QTcK5ZSE2yNZ8xrc=; b=FbQ/cU5KkBidPkx8Y2uGYCzGutSB6xNfkWiQEKQsSST8W9zvQhHhApft87PlLY8dLU DGKfOcVpxkQTOOl80Aro56BnjlNO41fZWD7CmV5GDlB1LjEDjOf3Kop2mVKp+naFiQzY As6MgqOMDkFvMljdz6Un/7KTBl/NUqtiNwtAlVNm8YXgeUKehHDEJVTDK07iwDWpbMUs Auk85ACWfB5lfW+mTAMWhogzlI0RHaQpyoe7zLfXc22574NosN/xSHT+kEdNg0VX/lgH cTQssA2/OElC5yJBDMwL3y7p8+2qs+uUi9JaKT2yW1TXFErKU2nPA1SSCU5AFvvQq6bi em9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690363511; x=1690968311; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ajWZi1kTG9ZsFll3P13XRfH/M90QTcK5ZSE2yNZ8xrc=; b=hgGeY0w+uAPYy30JPM2nyWxknI3HwCL6t6kIAjEtoiG9qo1sVgUCekRS+bqNnpyTb1 7B8mO0MqkHeJbPYNpNqm4XDQwUxvss/gBh37wFTgvTtvHlms4SDdl2MFRoVbcISoirw4 wve/zQPJwvjZ0Pb7U9f6H6lYQQotsJaG+dZHzlTRfOf/444Owyfv+sqCaOOdp3A9lhMM YMKzxLaQr+r7oaODmu7r1tcy5eNrkLVlX1KuLcr6wozHWQlw+5Id+cbWXtdjMA89d7w6 EMxnqKZdDtzwyfvmG20xS916IJe2/04am+Sni6s4+6vcPlydxJdJFuyYodHzUsZE5rb8 n0/A== X-Gm-Message-State: ABy/qLYRhuY1BuxfV5UIrQ39HT4usxif/LBSbj5M9wTJZZwbP9kCRlf/ jYWTSc8239fZv0P04AdM0kkjhg== X-Received: by 2002:a05:6a20:729a:b0:100:b92b:e8be with SMTP id o26-20020a056a20729a00b00100b92be8bemr1785615pzk.2.1690363511718; Wed, 26 Jul 2023 02:25:11 -0700 (PDT) Received: from [10.70.252.135] ([203.208.167.147]) by smtp.gmail.com with ESMTPSA id h2-20020aa786c2000000b00682a99b01basm2004283pfo.0.2023.07.26.02.25.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jul 2023 02:25:11 -0700 (PDT) Message-ID: <491f5c8f-ccc6-dab8-71b3-caeedc8c4b39@bytedance.com> Date: Wed, 26 Jul 2023 17:24:58 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v2 17/47] rcu: dynamically allocate the rcu-lazy shrinker Content-Language: en-US To: Muchun Song 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, senozhatsky@chromium.org, 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 References: <20230724094354.90817-1-zhengqi.arch@bytedance.com> <20230724094354.90817-18-zhengqi.arch@bytedance.com> <3A164818-56E1-4EB4-A927-1B2D23B81659@linux.dev> From: Qi Zheng In-Reply-To: <3A164818-56E1-4EB4-A927-1B2D23B81659@linux.dev> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-ext4@vger.kernel.org On 2023/7/26 15:04, Muchun Song wrote: > > >> On Jul 24, 2023, at 17:43, Qi Zheng wrote: >> >> Use new APIs to dynamically allocate the rcu-lazy shrinker. >> >> Signed-off-by: Qi Zheng >> --- >> kernel/rcu/tree_nocb.h | 19 +++++++++++-------- >> 1 file changed, 11 insertions(+), 8 deletions(-) >> >> diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h >> index 43229d2b0c44..919f17561733 100644 >> --- a/kernel/rcu/tree_nocb.h >> +++ b/kernel/rcu/tree_nocb.h >> @@ -1397,12 +1397,7 @@ lazy_rcu_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) >> return count ? count : SHRINK_STOP; >> } >> >> -static struct shrinker lazy_rcu_shrinker = { >> - .count_objects = lazy_rcu_shrink_count, >> - .scan_objects = lazy_rcu_shrink_scan, >> - .batch = 0, >> - .seeks = DEFAULT_SEEKS, >> -}; >> +static struct shrinker *lazy_rcu_shrinker; > > Seems there is no users of this variable, maybe we could drop > this. Yeah, will change it to a local variable. And the patch #15 is the same. >