Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: Christoph Hellwig <hch@lst.de>, Chris Mason <clm@fb.com>,
	Josef Bacik <josef@toxicpanda.com>,
	David Sterba <dsterba@suse.com>,
	"Darrick J. Wong" <djwong@kernel.org>,
	linux-btrfs@vger.kernel.org, linux-xfs@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Subject: Re: reduce memory allocation in the btrfs direct I/O path v2
Date: Thu, 12 May 2022 12:25:52 +0200	[thread overview]
Message-ID: <20220512102552.GR18596@twin.jikos.cz> (raw)
In-Reply-To: <dcab2ed0-d48f-e987-47fa-2fd1fc2dba08@oracle.com>

On Thu, May 12, 2022 at 12:25:57PM +0530, Anand Jain wrote:
> On 5/6/22 01:41, Christoph Hellwig wrote:
> > Hi all,
> > 
> > this series adds two minor improvements to iomap that allow btrfs
> > to avoid a memory allocation per read/write system call and another
> > one per submitted bio.  I also have at last two other pending uses
> > for the iomap functionality later on, so they are not really btrfs
> > specific either.
> > 
> > Changes since v1:
> >   - pass the private data direct to iomap_dio_rw instead of through the
> >     iocb
> >   - better document the bio_set in iomap_dio_ops
> >   - split a patch into three
> >   - use kcalloc to allocate the checksums
> > 
> > Diffstat:
> >   fs/btrfs/btrfs_inode.h |   25 --------
> >   fs/btrfs/ctree.h       |    6 -
> >   fs/btrfs/file.c        |    6 -
> >   fs/btrfs/inode.c       |  152 +++++++++++++++++++++++--------------------------
> >   fs/erofs/data.c        |    2
> >   fs/ext4/file.c         |    4 -
> >   fs/f2fs/file.c         |    4 -
> >   fs/gfs2/file.c         |    4 -
> >   fs/iomap/direct-io.c   |   26 ++++++--
> >   fs/xfs/xfs_file.c      |    6 -
> >   fs/zonefs/super.c      |    4 -
> >   include/linux/iomap.h  |   16 ++++-
> >   12 files changed, 123 insertions(+), 132 deletions(-)
> 
> This patch got me curious a couple of days back while I was tracing
> a dio read performance issue on nvme. I am sharing the results as below.
> [1]. There is no performance difference. Thx.

Thanks for the results.

      reply	other threads:[~2022-05-12 10:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-05 20:11 reduce memory allocation in the btrfs direct I/O path v2 Christoph Hellwig
2022-05-05 20:11 ` [PATCH 1/7] btrfs: add a btrfs_dio_rw wrapper Christoph Hellwig
2022-05-05 20:11 ` [PATCH 2/7] iomap: allow the file system to provide a bio_set for direct I/O Christoph Hellwig
2022-05-05 20:38   ` Darrick J. Wong
2022-05-05 20:11 ` [PATCH 3/7] iomap: add per-iomap_iter private data Christoph Hellwig
2022-05-06 17:18   ` Darrick J. Wong
2022-05-05 20:11 ` [PATCH 4/7] btrfs: allocate dio_data on stack Christoph Hellwig
2022-05-05 20:11 ` [PATCH 5/7] btrfs: remove the disk_bytenr in struct btrfs_dio_private Christoph Hellwig
2022-05-05 20:11 ` [PATCH 6/7] btrfs: move struct btrfs_dio_private to inode.c Christoph Hellwig
2022-05-05 20:11 ` [PATCH 7/7] btrfs: allocate the btrfs_dio_private as part of the iomap dio bio Christoph Hellwig
2022-05-09 18:58 ` reduce memory allocation in the btrfs direct I/O path v2 David Sterba
2022-05-10  7:56 ` Nikolay Borisov
2022-05-12  6:55 ` Anand Jain
2022-05-12 10:25   ` David Sterba [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=20220512102552.GR18596@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=anand.jain@oracle.com \
    --cc=clm@fb.com \
    --cc=djwong@kernel.org \
    --cc=dsterba@suse.com \
    --cc=hch@lst.de \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@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