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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E5E0FC02198 for ; Mon, 10 Feb 2025 10:06:16 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1thQgA-0002sA-1n; Mon, 10 Feb 2025 10:06:14 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1thQg8-0002ry-KM for linux-f2fs-devel@lists.sourceforge.net; Mon, 10 Feb 2025 10:06:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:In-Reply-To: From:References:To:Subject:Cc:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zh0hPKaFioJKBXfvS2O0P+W39XoCgedqOEET5BeByHo=; b=G5qk0WwgS17s6URYF1eoIo3ott EyoqyqYQ2NyC7cIwq3cGy4lPyBeRY1eWyRY2IZaQmtxZsebpRnJPyKpf0D8c0S1xnEhniWtIehAd1 eYXGQtk/AEcW+T7FVTBfxQP+/e4tPWA0vLXvvGq5QgXNff4ipHTr07QVWqhHO/gT51uU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:References:To: Subject:Cc:MIME-Version:Date:Message-ID:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=zh0hPKaFioJKBXfvS2O0P+W39XoCgedqOEET5BeByHo=; b=PYjt32ElAyTmBsb8aXAOIavC6v KmJh+YggT4/kXjSpH7fONl6SaRNrjMj+2m2oRpktpBJCyu07OuundXGqpV2fHDgHUaBrq47zbtdNq rtsTAyWrQNC2Lzbi99/vhWUBfpGdAjgDkwZ8pI75dvr2TPrigzETATeSsdeHjbKCldbQ=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1thQg8-0002bu-PF for linux-f2fs-devel@lists.sourceforge.net; Mon, 10 Feb 2025 10:06:13 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id C77D25C4954; Mon, 10 Feb 2025 10:05:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90CCAC4CEE4; Mon, 10 Feb 2025 10:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739181962; bh=lF71qqCebU1OJC3HnOGdjiCKxuuDaM0gULKXsGw1eDw=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=dJ97+4SvIxmFfust64zmMcq2g3/KFZNFJQ1f7zV1y30VlqgOiSjcfUNox+6+06tMw y1+Lr/zTB32GR2K89Vjzf8I+Gkeaw8bE9/7qnUrDaJXXnUhlFiEoTTUt+sUuvMoJb4 40uT/+pY/cQXPneOMBDpiUgjFm16tRXoQZAUqF0CqJ4KKextTufrXAIVlQq/gdKidf M21ON/6KGY87sx+s9SafR4T9In7LuSYN7jigIMsTkPEF9a+IPRVI8YIGP0nM0oquR5 ZFRj8tv0YS2Ll0A8NTfrJZY7b7OUq3+M2oXK4f4xeZSwGEbE/FzZZD3N3xh2xHQYH3 7wm+wNUkKWq4g== Message-ID: <5a1b2716-bcc4-4a5e-95ce-ba45f508738d@kernel.org> Date: Mon, 10 Feb 2025 18:05:58 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Zhiguo Niu , jaegeuk@kernel.org References: <1739150649-31850-1-git-send-email-zhiguo.niu@unisoc.com> Content-Language: en-US In-Reply-To: <1739150649-31850-1-git-send-email-zhiguo.niu@unisoc.com> X-Headers-End: 1thQg8-0002bu-PF Subject: Re: [f2fs-dev] [PATCH] f2fs: fix to return SHRINK_EMPTY if no objects to free X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Chao Yu via Linux-f2fs-devel Reply-To: Chao Yu Cc: ke.wang@unisoc.com, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Hao_hao.Wang@unisoc.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 2/10/25 09:24, Zhiguo Niu wrote: > Quoted from include/linux/shrinker.h > "count_objects should return the number of freeable items in the cache. If > there are no objects to free, it should return SHRINK_EMPTY, while 0 is > returned in cases of the number of freeable items cannot be determined > or shrinker should skip this cache for this time (e.g., their number > is below shrinkable limit)." Seems in 9b996468cfdb ("mm: add SHRINK_EMPTY shrinker methods return value"), it didn't convert most of filesystems, left most filesystems to return 0 which indicate there may have objects to free. :( > > Signed-off-by: Zhiguo Niu Reviewed-by: Chao Yu Thanks, _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC4151B414F for ; Mon, 10 Feb 2025 10:06:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739181962; cv=none; b=cJAeqFNRTQ/MRNtWZTlR1HLZTD1Kh5Gy5dz59bS/HJZj0YMuRTHoidleA1nRQbsCjRuXjEziJOPvcBmgM3SM8RsnxhkCauiGnt/Zk3wDpV8bnOi+JyTV7V/vatf24mHzhku2T1hc3EQknerJcZwbkeZmVyUxO2Qn3YrAU/itrHo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739181962; c=relaxed/simple; bh=lF71qqCebU1OJC3HnOGdjiCKxuuDaM0gULKXsGw1eDw=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=Zgw2QqhhQQ1GNKAAU6bh2qJ+KZr2h0UmnLJhHy4NV2XsdD9YbVZcJkqk1zhez0+JQPU4rEQ6zj7UhvJrLuYYydZJSJ36Ix4QgZ91TE6zVWc7zlK8Q26Eqc6CoOZZcUBNI16ViLoOjZa9V+jxFG2tlcoc+ElsL7qqgF9uXl9EqMo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dJ97+4Sv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dJ97+4Sv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90CCAC4CEE4; Mon, 10 Feb 2025 10:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739181962; bh=lF71qqCebU1OJC3HnOGdjiCKxuuDaM0gULKXsGw1eDw=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=dJ97+4SvIxmFfust64zmMcq2g3/KFZNFJQ1f7zV1y30VlqgOiSjcfUNox+6+06tMw y1+Lr/zTB32GR2K89Vjzf8I+Gkeaw8bE9/7qnUrDaJXXnUhlFiEoTTUt+sUuvMoJb4 40uT/+pY/cQXPneOMBDpiUgjFm16tRXoQZAUqF0CqJ4KKextTufrXAIVlQq/gdKidf M21ON/6KGY87sx+s9SafR4T9In7LuSYN7jigIMsTkPEF9a+IPRVI8YIGP0nM0oquR5 ZFRj8tv0YS2Ll0A8NTfrJZY7b7OUq3+M2oXK4f4xeZSwGEbE/FzZZD3N3xh2xHQYH3 7wm+wNUkKWq4g== Message-ID: <5a1b2716-bcc4-4a5e-95ce-ba45f508738d@kernel.org> Date: Mon, 10 Feb 2025 18:05:58 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, niuzhiguo84@gmail.com, ke.wang@unisoc.com, Hao_hao.Wang@unisoc.com Subject: Re: [PATCH] f2fs: fix to return SHRINK_EMPTY if no objects to free To: Zhiguo Niu , jaegeuk@kernel.org References: <1739150649-31850-1-git-send-email-zhiguo.niu@unisoc.com> Content-Language: en-US From: Chao Yu In-Reply-To: <1739150649-31850-1-git-send-email-zhiguo.niu@unisoc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 2/10/25 09:24, Zhiguo Niu wrote: > Quoted from include/linux/shrinker.h > "count_objects should return the number of freeable items in the cache. If > there are no objects to free, it should return SHRINK_EMPTY, while 0 is > returned in cases of the number of freeable items cannot be determined > or shrinker should skip this cache for this time (e.g., their number > is below shrinkable limit)." Seems in 9b996468cfdb ("mm: add SHRINK_EMPTY shrinker methods return value"), it didn't convert most of filesystems, left most filesystems to return 0 which indicate there may have objects to free. :( > > Signed-off-by: Zhiguo Niu Reviewed-by: Chao Yu Thanks,