Re: [PATCH 9/9] dm crypt: sort writes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/28/2014 09:11 PM, Mike Snitzer wrote:
> From: Mikulas Patocka <mpatocka@xxxxxxxxxx>
> 
> Write requests are sorted in a red-black tree structure and are submitted
> in the sorted order.
> 
> In theory the sorting should be performed by the underlying disk scheduler,
> however, in practice the disk scheduler accepts and sorts only 128 requests.
> In order to sort more requests, we need to implement our own sorting.

Hi,

I think it would be nice to mention why simply increasing queue nr_request
doesn't help. It is definitely not limited to 128, it is only default value.

(I just wonder how this helps for SSDs where I think it depends what's fw
doing with io requests anyway).

It would be nice to have sysfs switch to disable sorting in dmcrypt but that
can be added later.

Anyway, thanks for rebasing these patches!

...
> +#define io_node rb_entry(parent, struct dm_crypt_io, rb_node)
> +		if (sector < io_node->sector)
> +			p = &io_node->rb_node.rb_left;
> +		else
> +			p = &io_node->rb_node.rb_right;
> +#undef io_node

Btw, could this be switched to inline function instead of define,
or it is only me who thinks #define here is ugly? :)

Thanks,
Milan

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux