Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2582931imm; Thu, 11 Oct 2018 12:37:45 -0700 (PDT) X-Google-Smtp-Source: ACcGV602Gg1tHGZECWjilq4NcnCRRFpPW1KGgvtWaQpOZTh0i32SYKTwJFJmyR40UxSGkDWnsnNI X-Received: by 2002:a62:2606:: with SMTP id m6-v6mr2863949pfm.104.1539286665380; Thu, 11 Oct 2018 12:37:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539286665; cv=none; d=google.com; s=arc-20160816; b=XOHow2tm8iwAro8w/ZMqz1J7Tm6J093HjWGlwe0gMGAAFSavq15P/5JlRjOjWSDYg2 6wKRigmVe8Zx40Wyasnc54vWSIagiqyUR1cdMYTWAnGO4+wAOCX6QuuewTBwitPIVtZ/ Ptbe+dhzT2gdCntBLqkQmiTDC2Z0oGEqnNJBzqi3/mQFxPJa5o1IDgm32TAeqIf56zzW j7zYybK3ZuXElUsWzadvBSaDZyV/W88965jVpo1zAb0phHIGNTb3JTZlqs/Ha9mLkhb5 whi94Rc1Xs7wK7Px4T5DXWFJ2Fixyxk/B7trqXch56HcPdLuKEq8w5yf6ziJHbK62OC6 oIoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from; bh=Ms+eeBCmK0clbDN4hyFKfNL1XCKsEV1t82xsiSO1OA4=; b=aXIDiDEaAlPkC86hWlBzNnVy08GDMe3CZkg0VSM35cFIdSIHlMJ02mhVx7cmdzmqrA +chLXpQ+bfWqBgIMlACpcDY8nwusA15rj5w1LuBFasbU4ylM425yMgfZK5MM3JUSARl8 Y3usabURgbQdr0+zlI4flBl17BZiopoHUHoVBksF5DabUjz0jTzRq2dQhKlTO1JC7HQx X6ct8M6qWNHydYry8RxdRT5U20Rx6Df/dV3kcn1tbn14MRsYvfp6sYV/P61gSC7UcdQX TpPFSccTxGW0gzLdqIYqoFe0tzLGNq6tg5AKZfG7Pyzxs//z2kWYPEt7kGSFgKhl10au ERuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j6-v6si25594259pgb.62.2018.10.11.12.37.29; Thu, 11 Oct 2018 12:37:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729709AbeJLCS5 (ORCPT + 99 others); Thu, 11 Oct 2018 22:18:57 -0400 Received: from mail.parknet.co.jp ([210.171.160.6]:47992 "EHLO mail.parknet.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727944AbeJLCS5 (ORCPT ); Thu, 11 Oct 2018 22:18:57 -0400 Received: from ibmpc.myhome.or.jp (server.parknet.ne.jp [210.171.168.39]) by mail.parknet.co.jp (Postfix) with ESMTPSA id BCF0312B6A4; Fri, 12 Oct 2018 03:50:28 +0900 (JST) Received: from devron.myhome.or.jp (foobar@devron.myhome.or.jp [192.168.0.3]) by ibmpc.myhome.or.jp (8.15.2/8.15.2/Debian-12) with ESMTPS id w9BIoR4J008860 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 Oct 2018 03:50:28 +0900 Received: from devron.myhome.or.jp (foobar@localhost [127.0.0.1]) by devron.myhome.or.jp (8.15.2/8.15.2/Debian-12) with ESMTPS id w9BIoQJY015523 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 Oct 2018 03:50:26 +0900 Received: (from hirofumi@localhost) by devron.myhome.or.jp (8.15.2/8.15.2/Submit) id w9BIoQXT015522; Fri, 12 Oct 2018 03:50:26 +0900 From: OGAWA Hirofumi To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Khazhismel Kumykov Subject: Re: [PATCH] fs/fat: add cond_resched to fat_count_free_clusters References: <20181010172623.57033-1-khazhy@google.com> Date: Fri, 12 Oct 2018 03:50:26 +0900 In-Reply-To: <20181010172623.57033-1-khazhy@google.com> (Khazhismel Kumykov's message of "Wed, 10 Oct 2018 10:26:23 -0700") Message-ID: <875zy85nd9.fsf@mail.parknet.co.jp> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Khazhismel Kumykov writes: > On non-preempt kernels this loop can take a long time (more than 50 > ticks) processing through entries. > > Signed-off-by: Khazhismel Kumykov > --- > fs/fat/fatent.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/fat/fatent.c b/fs/fat/fatent.c > index defc2168de91..f58c0cacc531 100644 > --- a/fs/fat/fatent.c > +++ b/fs/fat/fatent.c > @@ -682,6 +682,7 @@ int fat_count_free_clusters(struct super_block *sb) > if (ops->ent_get(&fatent) == FAT_ENT_FREE) > free++; > } while (fat_ent_next(sbi, &fatent)); > + cond_resched(); > } > sbi->free_clusters = free; > sbi->free_clus_valid = 1; Acked-by: OGAWA Hirofumi Thanks, looks good. -- OGAWA Hirofumi