From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40861C77B73 for ; Mon, 5 Jun 2023 19:03:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232196AbjFETDI (ORCPT ); Mon, 5 Jun 2023 15:03:08 -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 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