MiCode / Xiaomi_Kernel_OpenSource

Xiaomi Mobile Phone Kernel OpenSource
8.66k stars 3.19k forks source link

[SOLVED] [jasmine-o-oss] Large Data R/W Causing Hangs #977

Open tytydraco opened 5 years ago

tytydraco commented 5 years ago

Take a look at these three lines of Xiaomi's initial commit for Jasmine: https://github.com/MiCode/Xiaomi_Kernel_OpenSource/commit/91d64da2433390582cdbeb8e2ce9fae0e78eec78#diff-b335e0e983fcf2a9b8c6406e89148be5R118

Here's the snippet of code: drivers/mmc/card/queue.c

struct sched_param scheduler_params = {0};
scheduler_params.sched_priority = 1;
sched_setscheduler(current, SCHED_FIFO, &scheduler_params);

By setting the MMC driver's scheduler to FIFO and restricting it's priority to 1, large data transfers are held up, causing noticeable hangs. These hangs often require a hard reset when writing 300+ MB of data to the MMC storage device.

To solve this issue, simply remove these three lines of code, as they are detrimental to the performance of the device, severely limiting disk performance.

ArneAmeye commented 5 years ago

Have you tried making a pull request, maybe that will get the ball rolling?