* [PATCH] Btrfs: do not async submit for nodatacsum inodes
@ 2017-08-18 17:54 Liu Bo
2017-08-21 17:38 ` Josef Bacik
0 siblings, 1 reply; 2+ messages in thread
From: Liu Bo @ 2017-08-18 17:54 UTC (permalink / raw)
To: linux-btrfs
While we submit direct writes, if the inode is flagged with nodatasum,
there's no benefit to submit asynchronously, because
a) we don't have to calculate checksum across processors,
b) and direct IO has started a plug, but async submit makes us queue
IO on each device's scheduled IO list instead of DIO's plug list, so
that IOs get much less merges in general.
Lets use sync submit for nodatasum inodes.
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
fs/btrfs/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 95c2120..f4a48d8 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -8467,7 +8467,7 @@ static inline int __btrfs_submit_dio_bio(struct bio *bio, struct inode *inode,
goto err;
}
map:
- ret = btrfs_map_bio(fs_info, bio, 0, async_submit);
+ ret = btrfs_map_bio(fs_info, bio, 0, 0);
err:
bio_put(bio);
return ret;
--
2.9.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Btrfs: do not async submit for nodatacsum inodes
2017-08-18 17:54 [PATCH] Btrfs: do not async submit for nodatacsum inodes Liu Bo
@ 2017-08-21 17:38 ` Josef Bacik
0 siblings, 0 replies; 2+ messages in thread
From: Josef Bacik @ 2017-08-21 17:38 UTC (permalink / raw)
To: Liu Bo; +Cc: linux-btrfs
On Fri, Aug 18, 2017 at 11:54:02AM -0600, Liu Bo wrote:
> While we submit direct writes, if the inode is flagged with nodatasum,
> there's no benefit to submit asynchronously, because
>
> a) we don't have to calculate checksum across processors,
>
> b) and direct IO has started a plug, but async submit makes us queue
> IO on each device's scheduled IO list instead of DIO's plug list, so
> that IOs get much less merges in general.
>
> Lets use sync submit for nodatasum inodes.
>
> Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Thanks,
Josef
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-21 17:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-18 17:54 [PATCH] Btrfs: do not async submit for nodatacsum inodes Liu Bo
2017-08-21 17:38 ` Josef Bacik
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.