linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Chao Yu <yuchao0@huawei.com>
Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH v4] f2fs: add bio cache for IPU
Date: Sun, 1 Sep 2019 00:17:57 -0700	[thread overview]
Message-ID: <20190901071757.GA49907@jaegeuk-macbookpro.roam.corp.google.com> (raw)
In-Reply-To: <d2b3c101-0399-4e85-5765-7b6504aaca74@huawei.com>

On 08/31, Chao Yu wrote:
> On 2019/2/19 16:15, Chao Yu wrote:
> > @@ -1976,10 +2035,13 @@ static int __write_data_page(struct page *page, bool *submitted,
> >  	}
> >  
> >  	unlock_page(page);
> > -	if (!S_ISDIR(inode->i_mode) && !IS_NOQUOTA(inode))
> > +	if (!S_ISDIR(inode->i_mode) && !IS_NOQUOTA(inode)) {
> > +		f2fs_submit_ipu_bio(sbi, bio, page);
> >  		f2fs_balance_fs(sbi, need_balance_fs);
> > +	}
> 
> Above bio submission was added to avoid below deadlock:
> 
> - __write_data_page
>  - f2fs_do_write_data_page
>   - set_page_writeback        ---- set writeback flag
>   - f2fs_inplace_write_data
>  - f2fs_balance_fs
>   - f2fs_gc
>    - do_garbage_collect
>     - gc_data_segment
>      - move_data_page
>       - f2fs_wait_on_page_writeback
>        - wait_on_page_writeback  --- wait writeback
> 
> However, it breaks the merge of IPU IOs, to solve this issue, it looks we need
> to add global bio cache for such IPU merge case, then later
> f2fs_wait_on_page_writeback can check whether writebacked page is cached or not,
> and do the submission if necessary.
> 
> Jaegeuk, any thoughts?

How about calling f2fs_submit_ipu_bio() when we need to do GC in the same
context?

> 
> Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2019-09-01  7:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19  8:15 [PATCH v4] f2fs: add bio cache for IPU Chao Yu
2019-02-28  3:49 ` Chao Yu
2019-03-01 17:55   ` Jaegeuk Kim
2019-03-04  6:27     ` Chao Yu
2019-05-14  4:55     ` [f2fs-dev] " Ju Hyung Park
2019-08-31  7:23 ` Chao Yu
2019-09-01  7:17   ` Jaegeuk Kim [this message]
2019-09-02  1:16     ` Chao Yu
2019-09-02 23:04       ` Jaegeuk Kim
2019-09-02 23:34         ` Chao Yu

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=20190901071757.GA49907@jaegeuk-macbookpro.roam.corp.google.com \
    --to=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yuchao0@huawei.com \
    /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).