Limiting in-flight requests

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

 



Hi,
this is my first post here, so feel free to redirect me if I'm trespassing in some way.

I'm trying to build a custom dm target to be used as filter for normal filesystem operations.

I managed to build a working prototype, but field-testing it I found that, in certain conditions (e.g.: untarring a large tar full of many small files) the number of in-flight requests rapidly rises to several thousands.

This is a problem since I allocate some pages for each remapping (I essentially double the allocation for the time request is fully handled by underlying device); this leads to memory starvation and, possibly, even to kernel panics.

I tried limiting the number/size of in-flight requests by returning DM_MAPIO_REQUEUE when resource consumption exceeded a certain threshold; This doesn't seem to work because the error is not trapped at dm-stage, but it is reported directly to filesystem and, from there, to application (tar or mkfs.ext4).

What is the correct way to tell dm to stop sending more requests, for a short while (i.e.: till some old requests are completed)?

Note: I'm using kernel v4.4.9 so I don't have DM_MAPIO_DELAY_REQUEUE

Note2: in my target.map I re-allocate the scatterlist, save the original one and substitute; I do the reverse in .end_io.

Thanks in advance
Mauro
--
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