From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-98.freemail.mail.aliyun.com (out30-98.freemail.mail.aliyun.com [115.124.30.98]) (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 9534F1E86E for ; Thu, 16 Jan 2025 08:46:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.98 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737017163; cv=none; b=pLeYzbItsunG3BRPvB7SHKVhzXtUPAYCXYTzINpKJjJFQdIrJtWUGAvMCEOEQZC073SyIhTkxxeW+hSO+zRAklzlhvPKwyHBXbLTzpWZmcOYzulGGxoODDQJrTxm+H/H+7towM5BR5iej5qLsOOhQP3sg1G13Mk/l0i0oE3S4Sk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737017163; c=relaxed/simple; bh=Nk2FoPIB1lkTGpLkV7ytrR9p9P6WZdHOKuMpfa0/sOc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=eL5xJnn5nXzkQp8vZy79lav+hN/9OzMDTaDLSeiij23zYZHVy7QpuWB0cstb+Q62zvfhkcYyTz8UNKZJ7vU9e1zxTiefNbKVj6V2oTCLCN2t3z467nji9UPXvn8saxm1o/cqYp+Dn94bjfa13CkWU/jg2jhWrK3Wjt68svjQUhU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=FTa6iedh; arc=none smtp.client-ip=115.124.30.98 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="FTa6iedh" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1737017159; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=eDtRUsxJBjZAyQmblhg5+I7UGqi4KmE6IPlytR+KzFs=; b=FTa6iedhSZ5dvW+Pehpil7saSCvmXjzPr6kx2HdOqy+qpE/RPimkMFNAtSct4h9pUnAxVvW+FkvRDgltN4gDa67wyLcjb/HR3Ctzc2Sc/HT0E56Thzcd5w+uqams3L5S4W095B9KWUsx5AqFwH8kV0veLCvs1hA6WS/WsHqyh1c= Received: from 30.221.130.221(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0WNl2-Hv_1737017157 cluster:ay36) by smtp.aliyun-inc.com; Thu, 16 Jan 2025 16:45:58 +0800 Message-ID: <2ce9821f-9059-4b2a-b9b7-880cece68e0d@linux.alibaba.com> Date: Thu, 16 Jan 2025 16:45:57 +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 Subject: Re: [PATCH v2] erofs(shrinker): return SHRINK_EMPTY if no objects to free To: Chen Linxuan , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Sandeep Dhavale Cc: linux-erofs@lists.ozlabs.org, linux-kernel@vger.kernel.org References: <149E6E64B5B6B5E8+20250116083303.199817-1-chenlinxuan@uniontech.com> From: Gao Xiang In-Reply-To: <149E6E64B5B6B5E8+20250116083303.199817-1-chenlinxuan@uniontech.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2025/1/16 16:33, Chen Linxuan wrote: > Comments in file include/linux/shrinker.h says that > `count_objects` of `struct shrinker` should return SHRINK_EMPTY > when there are no objects to free. > >> 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). > > Signed-off-by: Chen Linxuan Reviewed-by: Gao Xiang Thanks, Gao Xiang