summaryrefslogtreecommitdiffstats
path: root/crypto/crypto_user_stat.c
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2019-08-02 00:50:44 +0200
committerJens Axboe <axboe@kernel.dk>2019-08-05 05:41:29 +0200
commit9cc5169cd478bc596902a57580804f1da3dfd74e (patch)
tree98fedd293733a36dae88142eafd518688ada4fbd /crypto/crypto_user_stat.c
parentblock: Simplify blk_bio_segment_split() (diff)
downloadlinux-9cc5169cd478bc596902a57580804f1da3dfd74e.tar.xz
linux-9cc5169cd478bc596902a57580804f1da3dfd74e.zip
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 'crypto/crypto_user_stat.c')
0 files changed, 0 insertions, 0 deletions