summaryrefslogtreecommitdiff
path: root/include/linux/blk-cgroup.h
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2019-08-01 15:50:44 -0700
committerJens Axboe <axboe@kernel.dk>2019-08-04 21:41:29 -0600
commit9cc5169cd478bc596902a57580804f1da3dfd74e (patch)
tree98fedd293733a36dae88142eafd518688ada4fbd /include/linux/blk-cgroup.h
parent708b25b344fd9bedd02ccc0f8eee71f7006d7d07 (diff)
block: Improve physical block alignment of split bios
Consider the following example: * The logical block size is 4 KB. * The physical block size is 8 KB. * max_sectors equals (16 KB >> 9) sectors. * A non-aligned 4 KB and an aligned 64 KB bio are merged into a single non-aligned 68 KB bio. The current behavior is to split such a bio into (16 KB + 16 KB + 16 KB + 16 KB + 4 KB). The start of none of these five bio's is aligned to a physical block boundary. This patch ensures that such a bio is split into four aligned and one non-aligned bio instead of being split into five non-aligned bios. This improves performance because most block devices can handle aligned requests faster than non-aligned requests. Since the physical block size is larger than or equal to the logical block size, this patch preserves the guarantee that the returned value is a multiple of the logical block size. Cc: Christoph Hellwig <hch@infradead.org> Cc: Ming Lei <ming.lei@redhat.com> Cc: Hannes Reinecke <hare@suse.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blk-cgroup.h')
0 files changed, 0 insertions, 0 deletions