[PATCH v2] usb: gadget: f_mass_storage: Move schedule() in sleep_thread()
Marek Vasut
marek.vasut at mailbox.org
Mon Jun 29 23:08:38 CEST 2026
On 6/29/26 8:24 AM, Patrice CHOTARD wrote:
>
>
> On 6/25/26 14:36, Marek Vasut wrote:
>> On 6/25/26 10:38 AM, Patrice Chotard wrote:
>>> On STM32MP157C-DK2, when aborting the command "ums" using CTRL-C
>>> it may take a while to get the control back on the console,
>>> sometimes around 1 second.
>>
>> Why does that happen ?
>>
>> [...]
>
> On STM32MP157C-DK2 board, there are 3 cyclics registered which are called by schedule():
> _ mmc_cyclic_cd_poll (1 to 2us) every 100 ms
> _ watchdog at 5a002000
> _ video_idle
>
> schedule is called on every loop, whereas ctrlc() (CTRL+C detection) is called every 10 * 20000 loops.
> That means ctrlc() is called every ~700ms on STM32MP157C-DK2 board,
What takes 700ms in sleep_thread() , surely not schedule() ?
> Moving schedule() from main loop to same level that ctrlc(), it allows to call ctrlc() every ~70ms
> which increase reactivity when user hit CTRL+C.
Maybe I am too tired, but that does not sound right to me. Why is
ctrlc() called every 700ms, where does that massive delay come from?
More information about the U-Boot
mailing list