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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63391C6FA8E for ; Tue, 28 Feb 2023 18:41:05 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A85356B0074; Tue, 28 Feb 2023 13:41:04 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A35C86B0075; Tue, 28 Feb 2023 13:41:04 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8FD026B0078; Tue, 28 Feb 2023 13:41:04 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 7C5B76B0074 for ; Tue, 28 Feb 2023 13:41:04 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 50C3C40BE2 for ; Tue, 28 Feb 2023 18:41:04 +0000 (UTC) X-FDA: 80517567648.02.94B51C7 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf09.hostedemail.com (Postfix) with ESMTP id F0CE014000D for ; Tue, 28 Feb 2023 18:40:59 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=O50oe4UA; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf09.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1677609660; h=from:from:sender: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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=lQm+5CRB4MooQZ5+WKEamIY+UtdzzUtqSxH+oRSqz8Y=; b=louzFLde6qe/fZYGF+pp7qURkzG0LJurgWrdbUBHsusop65bM0psHvePKeLsdIZIOyS34w GG8TvtM1X7V4uDizk2Yh0AMmHMoYjgUBH6CXK+E/03N5pDeWcVOx0StoflkzUeGrWpeYWp P1xzkWW0gBIOmDTRrHqQPnGGXvCV2fY= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=O50oe4UA; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf09.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1677609660; a=rsa-sha256; cv=none; b=grq0Io8rpVqNLGG4BGn1km1DOVSKOj5HfQeC1mG2ig2yKoHhwVsSkC/uxofyGNlQyfQAZU XzUnHdFiH6k9b2kI7tpyARHhztcJiT5eQ24SyQWzsj3JPjNbfH06lRDNeKXBqJVlSqTdUT 4/v59UQL1T3eLtbGwux83utGBE/c0Uw= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 548CF1FDE0; Tue, 28 Feb 2023 18:40:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1677609658; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=lQm+5CRB4MooQZ5+WKEamIY+UtdzzUtqSxH+oRSqz8Y=; b=O50oe4UAkLYQX5YY88oax1/6TVpNXyIvQARg44ilqYskgYEPv3IFa3xWxm46BlXv2fTg5X Mtg2K8SFs/p5XYiG6MW9KaNW83m/zJoozvw1FVVo/4nZoYS9IRbyH/NVNr3rULeNDxfwUm SXvaOoQkbrILwE6GAX5t3H14Q61E8fc= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 321811333C; Tue, 28 Feb 2023 18:40:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 9t6NCbpK/mNsWQAAMHmgww (envelope-from ); Tue, 28 Feb 2023 18:40:58 +0000 Date: Tue, 28 Feb 2023 19:40:57 +0100 From: Michal Hocko To: Mike Rapoport Cc: Qi Zheng , Andrew Morton , tkhai@ya.ru, hannes@cmpxchg.org, shakeelb@google.com, roman.gushchin@linux.dev, muchun.song@linux.dev, david@redhat.com, shy828301@gmail.com, sultan@kerneltoast.com, dave@stgolabs.net, penguin-kernel@i-love.sakura.ne.jp, paulmck@kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 0/8] make slab shrink lockless Message-ID: References: <20230226144655.79778-1-zhengqi.arch@bytedance.com> <20230226115100.7e12bda7931dd65dbabcebe3@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Queue-Id: F0CE014000D X-Rspamd-Server: rspam09 X-Rspam-User: X-Stat-Signature: qjaoaey36wx1ohddd7f8gp3u84kmmshn X-HE-Tag: 1677609659-42300 X-HE-Meta: U2FsdGVkX1+dteo8/8YyY0I9rWlElo0yErsWKGkB4C1JE13sY4OrDsaotOXaJ5sGhRiZKYCGcqV+fwqRN5+Mr3kK1feO5+GihR61MDVl28qlWXgnllhK+TDaiPrmUEINUNvzDvc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-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon 27-02-23 17:08:30, Mike Rapoport wrote: [...] > The results you present do show improvement in IPC for an artificial test > script. But more interesting would be to see how a real world workloads > benefit from your changes. It's been quite some time ago (2018ish) when we have seen bug report where mount got stalled when racing with memory reclaim. This was nasty because the said mount was a part of login chain and users simply had to wait for a long time to get loged in in that particular deployment. The mount was blocked on a shrinker registration and the reclaim was stalled in a slab shrinker IIRC. I do not remember all the details but the underlying problem was that a shrinker callback took a long time because there were too many objects to scan or it had to sync with other fs operation. I believe we ended up using Minchan's break out from slab shrinking if the shrinker semaphore was contended and that helped to some degree but there were still some corner cases where a single slab shrinker could take a noticeable amount of time. In general using a "big" lock like shrinker_rwsem from the reclaim and potentially block many unrelated subsystems that just want to register or unregister shrinkers is a potential source of hard to predict problems. So this is a very welcome change. -- Michal Hocko SUSE Labs