Pull io_uring async discard support from Jens Axboe: "Sitting on top of both the 6.12 block and io_uring core branches, here's support for async discard through io_uring. This allows applications to issue async discards, rather than rely on the blocking sync ioctl discards we already have. The sync support is difficult to use outside of idle/cleanup periods. On a real (but slow) device, testing shows the following results when compared to sync discard: qd64 sync discard: 21K IOPS, lat avg 3 msec (max 21 msec) qd64 async discard: 76K IOPS, lat avg 845 usec (max 2.2 msec) qd64 sync discard: 14K IOPS, lat avg 5 msec (max 25 msec) qd64 async discard: 56K IOPS, lat avg 1153 usec (max 3.6 msec) and synthetic null_blk testing with the same queue depth and block size settings as above shows: Type Trim size IOPS Lat avg (usec) Lat Max (usec) ============================================================== sync 4k 144K 444 20314 async 4k 1353K 47 595 sync 1M 56K 1136 21031 async 1M 94K 680 760" * tag 'for-6.12/io_uring-discard-20240913' of git://git.kernel.dk/linux: block: implement async io_uring discard cmd block: introduce blk_validate_byte_range() filemap: introduce filemap_invalidate_pages io_uring/cmd: give inline space in request to cmds io_uring/cmd: expose iowq to cmds
Showing the changes to include/uapi/linux (1 of 10 files). Show all
Unified · Split
| @@ -0,0 +1,14 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | |
| 2 | +#ifndef _UAPI_LINUX_BLKDEV_H | |
| 3 | +#define _UAPI_LINUX_BLKDEV_H | |
| 4 | + | |
| 5 | +#include <linux/ioctl.h> | |
| 6 | +#include <linux/types.h> | |
| 7 | + | |
| 8 | +/* | |
| 9 | + * io_uring block file commands, see IORING_OP_URING_CMD. | |
| 10 | + * It's a different number space from ioctl(), reuse the block's code 0x12. | |
| 11 | + */ | |
| 12 | +#define BLOCK_URING_CMD_DISCARD _IO(0x12, 0) | |
| 13 | + | |
| 14 | +#endif | |