All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hyunchul Lee <hyc.lee@gmail.com>
To: Chao Yu <yuchao0@huawei.com>, Chao Yu <chao@kernel.org>,
	Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>,
	linux-kernel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net, kernel-team@lge.com,
	linux-fsdevel@vger.kernel.org, Hyunchul Lee <cheol.lee@lge.com>
Subject: Re: [f2fs-dev] [PATCH 1/2] f2fs: pass down write hints to block layer for bufferd write
Date: Thu, 14 Dec 2017 10:33:59 +0900	[thread overview]
Message-ID: <5A31D507.70304@gmail.com> (raw)
In-Reply-To: <85f7fc1b-5286-c66f-6833-af1a44c5130f@huawei.com>

Hi Jaegeuk,

I need your comment about the fs_iohint mount option.

a) w/o fs_iohint, propagate user hints to low layer.
b) w/ fs_iohint, ignore user hints, and use hints which is generated
with F2FS.

Chao suggests this option. because user hints are more accurate than
file system.

This is resonable, But I have some concerns about this option. 
The first thing is that blocks of a segments have different hints. This
could make GC less effective. 
The second is that the separation between LIFE_MEDIUM and LIFE_LONG is 
really needed. I think that difference between them is a little ambigous 
for users, and LIFE_SHORT and LIFE_EXTREME is converted to different 
hints by F2FS.

Thanks.

On 12/12/2017 11:45 AM, Chao Yu wrote:
> Hi Hyunchul,
> 
> On 2017/12/12 10:15, Hyunchul Lee wrote:
>> Hi Chao,
>>
>> On 12/11/2017 10:15 PM, Chao Yu wrote:
>>> Hi Hyunchul,
>>>
>>> On 2017/12/1 16:28, Hyunchul Lee wrote:
>>>> Hi Chao,
>>>>
>>>> On 11/30/2017 04:06 PM, Chao Yu wrote:
>>>>> Hi Hyunchul,
>>>>>
>>>>> On 2017/11/28 8:23, Hyunchul Lee wrote:
>>>>>> From: Hyunchul Lee <cheol.lee@lge.com>
>>>>>>
>>>>>> This implements which hint is passed down to block layer
>>>>>> for datas from the specific segment type.
>>>>>>
>>>>>> segment type                     hints
>>>>>> ------------                     -----
>>>>>> COLD_NODE & COLD_DATA            WRITE_LIFE_EXTREME
>>>>>> WARM_DATA                        WRITE_LIFE_NONE
>>>>>> HOT_NODE & WARM_NODE             WRITE_LIFE_LONG
>>>>>> HOT_DATA                         WRITE_LIFE_MEDIUM
>>>>>> META_DATA                        WRITE_LIFE_SHORT
>>>>>
>>>>> Just noticed, if our user do not give the hint via ioctl, f2fs can
>>>>> provider hint to lower layer according to hot/cold separation ability,
>>>>> it will be okay. But once user give his hint which may be more accurate
>>>>> than filesystem, hint converted by f2fs may be wrong.
>>>>>
>>>>> So what do you think of adding an option to control whether filesystem
>>>>> can convert hint user given?
>>>>>
>>>>
>>>> I think it is okay for LIFE_SHORT and LIFE_EXTREME. because they are 
>>>> converted to different hints.
>>>
>>> What I mean is introducing a mount option, e.g. fs_iohint,
>>> a) w/o fs_iohint, propagate file/inode io_hint to low layer.
>>> b) w/ fs_iohint, ignore file/inode io_hint, use io_hint which is generated
>>> with filesystem's private rule.
>>>
>>
>> Okay, I will implement this option and send this patch again.
> 
> Let's wait for Jaegeuk's comments first?
> 
>>
>> Without fs_iohint, Even if data blocks are moved due to GC, 
>> we should keep user hints. And if user hints are not given, 
>> any hints are not passed down to block layer, right?
> 
> Hmm.. that will be a problem, IMO, we can store last user's io_hint into inode
> layout, so later when we trigger GC, we can use the last io_hint in inode rather
> than giving no hint or fs' hint.
> 
> I think it needs to discuss with original author of IO hint, what is the IO hint
> policy when filesystem move block by itself after inode has been released in system.
> 
> Thanks,
> 
>>
>> Thank you for comments.
>>
>>> Thanks,
>>>
>>>>
>>>> file hint      segment type        io hint
>>>> ---------      ------------        -------
>>>> LIFE_SHORT     HOT_DATA            LIFE_MEDIUM
>>>> LIFE_MEDIUM    WARM_DATA           LIFE_NONE
>>>> LIFE_LONG      WARM_DATA           LIFE_NONE
>>>> LIFE_EXTREME   COLD_DATA           LIFE_EXTREME
>>>>
>>>> the problem is that LIFE_MEDIUM and LIFE_LONG are converted to 
>>>> the same hint, LIFE_NONE. I am not sure that the seperation between 
>>>> LIFE_MEDIUM and LIFE_LONG is really needed. Because I guess that the 
>>>> difference between them is a little ambigous for users, and if WARM_DATA 
>>>> segment has two different hints, it can makes GC non-efficient.
>>>>
>>>> I wonder your thought about this.
>>>>
>>>> Thanks.
>>>>
>>>>> Thanks,
>>>>>
>>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Check out the vibrant tech community on one of the world's most
>>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>>> _______________________________________________
>>>> Linux-f2fs-devel mailing list
>>>> Linux-f2fs-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
>>>>
>>>
>>
>> .
>>
> 
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
> 

  reply	other threads:[~2017-12-14  1:34 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-28  0:23 [PATCH 1/2] f2fs: pass down write hints to block layer for bufferd write Hyunchul Lee
2017-11-28  0:23 ` Hyunchul Lee
2017-11-28  0:23 ` [PATCH 2/2] f2fs: pass down write hints to block layer for direct write Hyunchul Lee
2017-11-30  6:32 ` [PATCH 1/2] f2fs: pass down write hints to block layer for bufferd write Chao Yu
2017-11-30  6:32   ` Chao Yu
2017-12-01  7:28   ` Jaegeuk Kim
2017-12-01  7:28     ` Jaegeuk Kim
2017-12-01  8:50     ` Hyunchul Lee
2017-12-14 21:18       ` Jaegeuk Kim
2017-11-30  7:06 ` Chao Yu
2017-11-30  7:06   ` Chao Yu
2017-12-01  8:28   ` Hyunchul Lee
2017-12-01  8:28     ` Hyunchul Lee
2017-12-11 13:15     ` [f2fs-dev] " Chao Yu
2017-12-12  2:15       ` Hyunchul Lee
2017-12-12  2:15         ` Hyunchul Lee
2017-12-12  2:45         ` [f2fs-dev] " Chao Yu
2017-12-12  2:45           ` Chao Yu
2017-12-14  1:33           ` Hyunchul Lee [this message]
2017-12-15  2:06             ` Jaegeuk Kim
2017-12-18  7:28               ` Hyunchul Lee
2017-12-18  7:28                 ` Hyunchul Lee
2017-12-23  9:44               ` [f2fs-dev] " Chao Yu
2017-12-23  9:44                 ` Chao Yu
2017-12-28  3:26                 ` [f2fs-dev] " Jaegeuk Kim
2017-12-28  3:26                   ` Jaegeuk Kim
2017-12-28  5:05                   ` [f2fs-dev] " Hyunchul Lee
2017-12-28  5:05                     ` Hyunchul Lee
2017-12-28 16:32                     ` [f2fs-dev] " Jaegeuk Kim

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=5A31D507.70304@gmail.com \
    --to=hyc.lee@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=chao@kernel.org \
    --cc=cheol.lee@lge.com \
    --cc=jaegeuk@kernel.org \
    --cc=kernel-team@lge.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.