1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-19 04:44:09 +00:00
Taotao Chen 048832a3f4
drm/i915: Refactor shmem_pwrite() to use kiocb and write_iter
Refactors shmem_pwrite() to replace the ->write_begin/end logic
with a write_iter-based implementation using kiocb and iov_iter.

While kernel_write() was considered, it caused about 50% performance
regression. vfs_write() is not exported for kernel use. Therefore,
file->f_op->write_iter() is called directly with a synchronously
initialized kiocb to preserve performance and remove write_begin
usage.

Performance results use gem_pwrite on Intel CPU i7-10700
(average of 10 runs):

- ./gem_pwrite --run-subtest bench -s 16384
  Before: 0.205s, After: 0.214s

- ./gem_pwrite --run-subtest bench -s 524288
  Before: 6.1021s, After: 4.8047s

Part of a series refactoring address_space_operations write_begin and
write_end callbacks to use struct kiocb for passing write context and
flags.

Signed-off-by: Taotao Chen <chentaotao@didiglobal.com>
Link: https://lore.kernel.org/20250716093559.217344-3-chentaotao@didiglobal.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-07-16 14:48:18 +02:00
..
2025-06-03 11:53:55 -07:00
2025-05-30 20:21:36 +02:00
2025-06-03 13:24:14 -07:00
2025-06-07 10:05:35 -07:00
2025-05-27 15:22:01 -07:00
2025-06-03 08:39:20 -07:00
2025-06-05 08:49:30 -07:00
2025-06-03 11:53:55 -07:00
2025-06-08 11:33:00 -07:00
2025-05-28 14:55:35 -07:00
2025-06-05 08:20:21 -07:00
2025-06-06 13:20:26 -07:00
2025-06-02 11:04:29 -07:00
2025-05-31 07:53:30 -07:00
2025-06-05 08:07:24 -07:00
2025-06-06 13:22:31 -07:00
2025-06-06 20:02:51 -07:00
2025-06-04 11:26:17 -07:00
2025-05-29 08:15:35 -07:00
2025-05-27 10:27:54 -04:00