* + mm-filemap-dont-revert-iter-on-eiocbqueued.patch added to -mm tree
@ 2021-01-12 5:01 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-01-12 5:01 UTC (permalink / raw)
To: asml.silence, axboe, hch, mm-commits, viro
The patch titled
Subject: mm/filemap: don't revert iter on -EIOCBQUEUED
has been added to the -mm tree. Its filename is
mm-filemap-dont-revert-iter-on-eiocbqueued.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-filemap-dont-revert-iter-on-eiocbqueued.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-filemap-dont-revert-iter-on-eiocbqueued.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next and is updated
there every 3-4 working days
------------------------------------------------------
From: Pavel Begunkov <asml.silence@gmail.com>
Subject: mm/filemap: don't revert iter on -EIOCBQUEUED
Currently, if I/O is enqueued for async execution direct paths of
generic_file_{read,write}_iter() will always revert the iter. There are
no users expecting that, and that is also costly. Leave iterators as is
on -EIOCBQUEUED.
Link: https://lkml.kernel.org/r/f5247b60e7abbd2ff850cd108491f53a2e0c501a.1610207781.git.asml.silence@gmail.com
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/filemap.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/mm/filemap.c~mm-filemap-dont-revert-iter-on-eiocbqueued
+++ a/mm/filemap.c
@@ -2609,7 +2609,8 @@ generic_file_read_iter(struct kiocb *ioc
iocb->ki_pos += retval;
count -= retval;
}
- iov_iter_revert(iter, count - iov_iter_count(iter));
+ if (retval != -EIOCBQUEUED)
+ iov_iter_revert(iter, count - iov_iter_count(iter));
/*
* Btrfs can have a short DIO read if we encounter
@@ -3331,7 +3332,8 @@ generic_file_direct_write(struct kiocb *
}
iocb->ki_pos = pos;
}
- iov_iter_revert(from, write_len - iov_iter_count(from));
+ if (written != -EIOCBQUEUED)
+ iov_iter_revert(from, write_len - iov_iter_count(from));
out:
return written;
}
_
Patches currently in -mm which might be from asml.silence@gmail.com are
mm-filemap-dont-revert-iter-on-eiocbqueued.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-12 5:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-12 5:01 + mm-filemap-dont-revert-iter-on-eiocbqueued.patch added to -mm tree akpm
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.