Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6045895rwd; Mon, 5 Jun 2023 12:08:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7IzcZxkB5yjo735V7I3186cWnEYPs8mOVl9sxbPiDUwEWzDxg1zFbBNvEQJp6EdOnnJmfS X-Received: by 2002:a05:6a00:134a:b0:643:857d:87a3 with SMTP id k10-20020a056a00134a00b00643857d87a3mr666039pfu.11.1685992092473; Mon, 05 Jun 2023 12:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685992092; cv=none; d=google.com; s=arc-20160816; b=XrWPL6l14F2c0iz9ZmmDE3Ov3JHjsHE8vlqNXuMHHy8Cv/wqUBUTbE8FYJ3wfqP67k e5fn9lF5uj0CfoXe+d0sIhcgyY7dEPBuNsUotWzAXu8CTIJu5ecKBFtDMs1nj8h/Uulz 7FbS1N/XFXBBNQR0e0g8qzFdxYKDWaU8bi8/UchWHERtuS4d0wBXf22HAYI2me1L3T1W 8CkSfk1MKNEOj1mST98JQryVxyoFrTn997v/gWfVW2DfOtsiGPHgaEag5zrToSCY7oKo qLO3drRry6r22Z9aq9YgmA1hkIQvpQyXPFWOH9e+Wen5eN4lJbckbsdCnFJnJ9wKk+jX 9enA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:date:subject:to:from:dkim-signature; bh=d2A7a/fXdJ0HjFXvaIDBfJccZIVLybmyhd3Ml8uMPl8=; b=dVNKNJHYN/9Hv4HaHKWS+e25ii6xPluAzQAmCiTc3nLd2xU9Mp+KlJvJiJq7GURStT H1OQ2LUKRMqHjLcOQCt6aDg13hWdRZ/u0nxKSYp4tASN81VmpjsPuaOfCyXYBTXYkf0z DY7cqwBoSJA377tNanDZZR7SBiY85/yiuaJH9LmJsVenBZsYuYGUdMUlMoNDWm/Uix11 W3IE1yioomhfhoBnvyFh3HqNQiOS8RpFe8w4vszS4sJd2zG2+ShU2Ho+7gB7ejvUMzCP f2bi0/6f5S/ArjN3twmyMW6ye0+kczeCIDERlc/fKJ8HCarSDJj+vzYxhrFzygjyqtCP wX+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ya.ru header.s=mail header.b=vlX7aUUy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ya.ru Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q22-20020aa79616000000b00643ae7da34bsi5675206pfg.221.2023.06.05.12.07.59; Mon, 05 Jun 2023 12:08:12 -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=@ya.ru header.s=mail header.b=vlX7aUUy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ya.ru Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231508AbjFETDH (ORCPT + 99 others); Mon, 5 Jun 2023 15:03:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229893AbjFETDD (ORCPT ); Mon, 5 Jun 2023 15:03:03 -0400 Received: from forward103a.mail.yandex.net (forward103a.mail.yandex.net [178.154.239.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB988F2 for ; Mon, 5 Jun 2023 12:03:00 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-68.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-68.vla.yp-c.yandex.net [IPv6:2a02:6b8:c0f:4c8e:0:640:3460:0]) by forward103a.mail.yandex.net (Yandex) with ESMTP id E5B1F42B17; Mon, 5 Jun 2023 22:02:56 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-68.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id k2Y4EiCDXOs0-wyUCMDug; Mon, 05 Jun 2023 22:02:56 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ya.ru; s=mail; t=1685991776; bh=d2A7a/fXdJ0HjFXvaIDBfJccZIVLybmyhd3Ml8uMPl8=; h=Message-Id:Date:Subject:To:From; b=vlX7aUUym6OiLqJo1vzOwZQebF2A87eqINyFK8QRZ2kFXHDYWuV1dkXFc3WzsroCg HL3EIidYcs4s4reIg/mcheFHbs1fXQrFz/6qLbTCL2+oBlaMRK7C6+oeCsNG3i18jD 5a6FRObcYyOLT6GWimAnCJPy7GkKAKe9hiDPECMU= Authentication-Results: mail-nwsmtp-smtp-production-main-68.vla.yp-c.yandex.net; dkim=pass header.i=@ya.ru From: Kirill Tkhai To: akpm@linux-foundation.org, tkhai@ya.ru, roman.gushchin@linux.dev, vbabka@suse.cz, viro@zeniv.linux.org.uk, brauner@kernel.org, djwong@kernel.org, hughd@google.com, paulmck@kernel.org, muchun.song@linux.dev, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, zhengqi.arch@bytedance.com, david@fromorbit.com Subject: [PATCH v2 0/3] mm: Make unregistration of super_block shrinker more faster Date: Mon, 5 Jun 2023 22:02:46 +0300 Message-Id: <168599103578.70911.9402374667983518835.stgit@pro.pro> X-Mailer: git-send-email 2.40.1 User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 This patch set introduces a new scheme of shrinker unregistration. It allows to split the unregistration in two parts: fast and slow. This allows to hide slow part from a user, so user-visible unregistration becomes fast. This fixes the -88.8% regression of stress-ng.ramfs.ops_per_sec noticed by kernel test robot: https://lore.kernel.org/lkml/202305230837.db2c233f-yujie.liu@intel.com/ --- Kirill Tkhai (2): mm: Split unregister_shrinker() in fast and slow part fs: Use delayed shrinker unregistration Qi Zheng (1): mm: vmscan: move shrinker_debugfs_remove() before synchronize_srcu() fs/super.c | 3 ++- include/linux/shrinker.h | 4 ++++ mm/vmscan.c | 39 +++++++++++++++++++++++++++++++-------- 3 files changed, 37 insertions(+), 9 deletions(-) -- Signed-off-by: Kirill Tkhai