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 X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0CC0C4338F for ; Mon, 16 Aug 2021 01:54:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 91DF46135E for ; Mon, 16 Aug 2021 01:54:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230455AbhHPBzC (ORCPT ); Sun, 15 Aug 2021 21:55:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:46304 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbhHPBzB (ORCPT ); Sun, 15 Aug 2021 21:55:01 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0D78B6136A; Mon, 16 Aug 2021 01:54:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629078870; bh=0LbfQkM7HZueVzmxBHA9CYfz7kOuxLMPYbK6Xw0q8y8=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=MAJB6c3us1VKhpzx3Qdh5KFrxV0ozR3opnGdhI8BVYhgcfYc9KGoM3xLzap9OHoZy yZoeCLG9AUOdQ36lZeA07li0HQ2x0p4V+OVUWeZToeROGQlfBhFCxiuhvI2opqvdE8 +RaZd5NOQWAm3SVrrxRqDT7TwA1uBUw64LZ/NevrCaCziVzoFgvY9SaELrkpfNbugJ nlNoSGJZw/WWm/RCssCVwsYwIJfvcIBkUPA16pCajoa575Dqh+0owdrB6ABDC3ObzC bOY6YMYRLhHJmbMO0kTIFo3cmbLXwYrRhvwNeLZAFHCNgyDalUbdDYwPRy/m3w23qY 8Nfg4brMigCdg== Subject: Re: [PATCH v5 1/2] f2fs: introduce proc/fs/f2fs//fsck_stack node To: =?UTF-8?B?5p2O5oms6Z+s?= Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org References: From: Chao Yu Message-ID: Date: Mon, 16 Aug 2021 09:54:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/8/14 10:08, 李扬韬 wrote: >>> We can't remove stack from depot, as we store them contiguously one after >>> another in a contiguous memory allocation. >>> >>> Or we can limit the recorded stack number. >>> >>> $ grep -nr "SBI_NEED_FSCK" fs/f2fs/ --include=*.c --include=*.h | wc -l >>> 53 >>> $ grep -nr "f2fs_bug_on" fs/f2fs/ --include=*.c --include=*.h | wc -l >>> 135 >> >> I didn't look into details of stack_depot_save(), two stack handles from below >> call paths will be the same? >> >> - move_data_block >> - f2fs_wait_on_page_writeback >> - f2fs_bug_on >> >> - ra_data_block >> - f2fs_wait_on_page_writeback >> - f2fs_bug_on >> >> If they have different stack handles, combination number of >> set_sbi_flag(NEED_FSCK)/f2fs_bug_on and their callers will be far more than two >> hundred. >> > > Yes, these will be two different stacks. In the most extreme case, there will be 1000 (I guess) different places to set fsck? It may be according to call stack height of each handle record. > Or we limit the number of recorded stacks to 10? Yes, please limit the record number, maybe 8? and stack height could be 16 at maximum? Thanks, > what do you think. The stack depot design does not consider removing the stack from the depot. > > MBR, > Yangtao >