Comment 1 for bug 1840043

Revision history for this message
Heitor Alves de Siqueira (halves) wrote :

This has been reported upstream as well, with a tentative patch in https://lkml.org/lkml/2019/3/7/8

I've done some tests in fio to get some more data on this issue, with the following scenarios:
- "raw" test -> fio test without any sysfs queries
- "sysfs" test -> fio + scripted sysfs queries
- "mutex" test -> fio + sysfs + mutex patch
- "resched" test -> fio + sysfs + cond_resched() patch

The "mutex patch" removed bucket locking from the sysfs query. This caused the stats to be computed all wrong of course, but we weren't interested in the stats themselves for now (just on the performance impact of the bucket locking).

The "cond_resched()" patch was suggested upstream by Shile Zhang, and introduces a cond_resched() call in the comparison function used for sorting.

Tests were run on a NVMe-backed bcache device with writeback enabled. The full logs and graphs are available in the bcache-results.tar.gz attachment.