LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: 李扬韬 <frank.li@vivo.com>
Cc: jaegeuk@kernel.org, linux-f2fs-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 1/2] f2fs: introduce proc/fs/f2fs/<dev>/fsck_stack node
Date: Mon, 16 Aug 2021 09:54:30 +0800	[thread overview]
Message-ID: <a6e1f93c-b45e-019b-273f-b5019052739e@kernel.org> (raw)
In-Reply-To: <AEMABgAWDwhd8*f2P*fotqoY.3.1628906905520.Hmail.frank.li@vivo.com>

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
> 

  reply	other threads:[~2021-08-16  1:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13 12:32 Yangtao Li
2021-08-13 12:32 ` [PATCH v5 2/2] f2fs: convert S_IRUGO to 0444 Yangtao Li
2021-08-13 14:44 ` [PATCH v5 1/2] f2fs: introduce proc/fs/f2fs/<dev>/fsck_stack node Chao Yu
2021-08-13 18:33   ` 李扬韬
2021-08-14  1:59     ` Chao Yu
2021-08-14  2:08       ` 李扬韬
2021-08-16  1:54         ` Chao Yu [this message]
2021-08-13 18:06 ` kernel test robot
2021-08-14  8:52 ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a6e1f93c-b45e-019b-273f-b5019052739e@kernel.org \
    --to=chao@kernel.org \
    --cc=frank.li@vivo.com \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH v5 1/2] f2fs: introduce proc/fs/f2fs/<dev>/fsck_stack node' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).