linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chao Yu <chao@kernel.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: should use GFP_NOFS for directory inodes
Date: Fri, 10 Sep 2021 07:51:29 +0800	[thread overview]
Message-ID: <6c40b766-2bdc-03c2-9e8a-e399d6e83282@kernel.org> (raw)
In-Reply-To: <20210907174351.1104857-1-jaegeuk@kernel.org>

On 2021/9/8 1:43, Jaegeuk Kim wrote:
> We use inline_dentry which requires to allocate dentry page when adding a link.
> If we allow to reclaim memory from filesystem, we do down_read(&sbi->cp_rwsem)
> twice by f2fs_lock_op(). I think this should be okay, but how about stopping
> the lockdep complaint [1]?
> 
> f2fs_create()
>   - f2fs_lock_op()
>   - f2fs_do_add_link()
>    - __f2fs_find_entry
>     - f2fs_get_read_data_page()
>     -> kswapd
>      - shrink_node
>       - f2fs_evict_inode
>        - f2fs_lock_op()
> 
> [1]
> 
> fs_reclaim
> ){+.+.}-{0:0}
> :
> kswapd0:        lock_acquire+0x114/0x394
> kswapd0:        __fs_reclaim_acquire+0x40/0x50
> kswapd0:        prepare_alloc_pages+0x94/0x1ec
> kswapd0:        __alloc_pages_nodemask+0x78/0x1b0
> kswapd0:        pagecache_get_page+0x2e0/0x57c
> kswapd0:        f2fs_get_read_data_page+0xc0/0x394
> kswapd0:        f2fs_find_data_page+0xa4/0x23c
> kswapd0:        find_in_level+0x1a8/0x36c
> kswapd0:        __f2fs_find_entry+0x70/0x100
> kswapd0:        f2fs_do_add_link+0x84/0x1ec
> kswapd0:        f2fs_mkdir+0xe4/0x1e4
> kswapd0:        vfs_mkdir+0x110/0x1c0
> kswapd0:        do_mkdirat+0xa4/0x160
> kswapd0:        __arm64_sys_mkdirat+0x24/0x34
> kswapd0:        el0_svc_common.llvm.17258447499513131576+0xc4/0x1e8
> kswapd0:        do_el0_svc+0x28/0xa0
> kswapd0:        el0_svc+0x24/0x38
> kswapd0:        el0_sync_handler+0x88/0xec
> kswapd0:        el0_sync+0x1c0/0x200
> kswapd0:
> -> #1
> (
> &sbi->cp_rwsem
> ){++++}-{3:3}
> :
> kswapd0:        lock_acquire+0x114/0x394
> kswapd0:        down_read+0x7c/0x98
> kswapd0:        f2fs_do_truncate_blocks+0x78/0x3dc
> kswapd0:        f2fs_truncate+0xc8/0x128
> kswapd0:        f2fs_evict_inode+0x2b8/0x8b8
> kswapd0:        evict+0xd4/0x2f8
> kswapd0:        iput+0x1c0/0x258
> kswapd0:        do_unlinkat+0x170/0x2a0
> kswapd0:        __arm64_sys_unlinkat+0x4c/0x68
> kswapd0:        el0_svc_common.llvm.17258447499513131576+0xc4/0x1e8
> kswapd0:        do_el0_svc+0x28/0xa0
> kswapd0:        el0_svc+0x24/0x38
> kswapd0:        el0_sync_handler+0x88/0xec
> kswapd0:        el0_sync+0x1c0/0x200
> 
> Fixes: bdbc90fa55af ("f2fs: don't put dentry page in pagecache into highmem")
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,


      reply	other threads:[~2021-09-09 23:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07 17:43 [PATCH] f2fs: should use GFP_NOFS for directory inodes Jaegeuk Kim
2021-09-09 23:51 ` Chao Yu [this message]

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=6c40b766-2bdc-03c2-9e8a-e399d6e83282@kernel.org \
    --to=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).