From patchwork Sat Jan 23 20:16:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaegeuk Kim X-Patchwork-Id: 8097941 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1B359BEEE5 for ; Sat, 23 Jan 2016 20:18:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5732020279 for ; Sat, 23 Jan 2016 20:18:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8101A20266 for ; Sat, 23 Jan 2016 20:18:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754267AbcAWUQu (ORCPT ); Sat, 23 Jan 2016 15:16:50 -0500 Received: from mail.kernel.org ([198.145.29.136]:34857 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754133AbcAWUQu (ORCPT ); Sat, 23 Jan 2016 15:16:50 -0500 Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3216E20279; Sat, 23 Jan 2016 20:16:49 +0000 (UTC) Received: from localhost (c-67-169-35-127.hsd1.ca.comcast.net [67.169.35.127]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 80D4920266; Sat, 23 Jan 2016 20:16:48 +0000 (UTC) From: Jaegeuk Kim To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: Jaegeuk Kim Subject: [PATCH 1/4] f2fs: give scheduling point in shrinking path Date: Sat, 23 Jan 2016 12:16:43 -0800 Message-Id: <1453580206-61937-1-git-send-email-jaegeuk@kernel.org> X-Mailer: git-send-email 2.6.3 X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It needs to give a chance to be rescheduled while shrinking slab entries. Signed-off-by: Jaegeuk Kim --- fs/f2fs/extent_cache.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/f2fs/extent_cache.c b/fs/f2fs/extent_cache.c index ccd5c63..325825b 100644 --- a/fs/f2fs/extent_cache.c +++ b/fs/f2fs/extent_cache.c @@ -585,6 +585,8 @@ unsigned int f2fs_shrink_extent_tree(struct f2fs_sb_info *sbi, int nr_shrink) if (node_cnt + tree_cnt >= nr_shrink) goto unlock_out; + + cond_resched(); } up_write(&sbi->extent_tree_lock); @@ -631,6 +633,7 @@ free_node: if (node_cnt + tree_cnt >= nr_shrink) goto unlock_out; } + cond_resched(); } unlock_out: up_write(&sbi->extent_tree_lock);