From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chao Yu Subject: Re: [PATCH 08/12] f2fs: introduce a shrinker for mounted fs Date: Tue, 30 Jun 2015 11:43:29 +0800 Message-ID: <00e901d0b2e7$0fa893c0$2ef9bb40$@samsung.com> References: <1435603176-63219-1-git-send-email-jaegeuk@kernel.org> <1435603176-63219-8-git-send-email-jaegeuk@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net To: 'Jaegeuk Kim' Return-path: In-reply-to: <1435603176-63219-8-git-send-email-jaegeuk@kernel.org> Content-language: zh-cn List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net List-Id: linux-fsdevel.vger.kernel.org > -----Original Message----- > From: Jaegeuk Kim [mailto:jaegeuk@kernel.org] > Sent: Tuesday, June 30, 2015 2:40 AM > To: linux-kernel@vger.kernel.org; linux-fsdevel@vger.kernel.org; > linux-f2fs-devel@lists.sourceforge.net > Cc: Jaegeuk Kim > Subject: [f2fs-dev] [PATCH 08/12] f2fs: introduce a shrinker for mounted fs > > This patch introduces a shrinker targeting to reduce memory footprint consumed > by a number of in-memory f2fs data structures. > > In addition, it newly adds: > - sbi->umount_mutex to avoid data races on shrinker and put_super > - sbi->shruinker_run_no to not revisit objects > > Noteh that the basic implementation was copied from fs/btrfs/shrinker.c Great! Good to see it's being implemented in f2fs. > > Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu [snip] > @@ -1406,6 +1425,9 @@ static int __init init_f2fs_fs(void) > err = f2fs_init_crypto(); > if (err) > goto free_kset; > + > + register_shrinker(&f2fs_shrinker_info); This function can fail due to no memory, please check the return value here. Thanks, ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/