All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: lampahome <pahome.chen@mirlab.org>
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] possible to allocate a full segment for a direct IO with blocksize 2MB?
Date: Thu, 9 Jul 2020 20:41:14 -0700	[thread overview]
Message-ID: <20200710034114.GG545837@google.com> (raw)
In-Reply-To: <CAB3eZftzcywNU-cf7mRWqtj-74VqgzLHC32a6v_CycVcRsiu0A@mail.gmail.com>

On 07/10, lampahome wrote:
> I create 3 dd job write 1GB file with directIO and blocksize is 2MB
> equal to segment size.
> 
> But it seems the each IO of three job's physical block address maybe
> in different segment.
> 
> If I can get full segment for one directIO, I thought performance will be up.
> 
> Is that possible?

How about using file pinning?

1. fd = create()
2. ioctl(fd, F2FS_IOC_SET_PIN_FILE)
3. fallocate(1GB)
 -> will allocate 2MB segments to the 1GB space
4. write(DIRECT_IO)
 -> will do in-place updates directly

You can use f2fs_io built by f2fs-tools for #2.
# f2fs_io pinfile set [file_path]

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


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

  reply	other threads:[~2020-07-10  3:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-10  3:33 [f2fs-dev] possible to allocate a full segment for a direct IO with blocksize 2MB? lampahome
2020-07-10  3:41 ` Jaegeuk Kim [this message]
     [not found]   ` <CAB3eZfv5k7cwFzMAOda7+cgHJzatRRhwyEg-8U9yt8TZ5s0=ww@mail.gmail.com>
2020-07-10  4:25     ` Jaegeuk Kim
     [not found]       ` <CAB3eZfvgEsv_T0AC6imnmFvTw3-hE6-BOd1TPqqqP5RS9bHLQA@mail.gmail.com>
2020-07-10  5:14         ` Jaegeuk Kim
     [not found]           ` <CAB3eZfsm5Z7pvD1enSioHDUys7+SekkNOscW11WDjDPWF=ngog@mail.gmail.com>
2020-07-10  6:28             ` Jaegeuk Kim
     [not found]   ` <CAB3eZfuaBhGPHDCt8v_9MrFW1byni17wzLtwG-Ny40q6jj9jkw@mail.gmail.com>
2020-07-13 17:57     ` Jaegeuk Kim
2020-07-15 19:18     ` 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=20200710034114.GG545837@google.com \
    --to=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=pahome.chen@mirlab.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 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.