From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Jules Maselbas <jmaselbas@kalray.eu>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC PATCH] usb: gadget: dfu: Wrap fs operation in workqueue
Date: Sun, 31 Jan 2021 20:34:07 +0100 [thread overview]
Message-ID: <ef7e5e11-9aef-49dc-c6f9-32a232c2926b@pengutronix.de> (raw)
In-Reply-To: <20210129105152.GA22732@tellis.lin.mbt.kalray.eu>
Hello Jules,
On 29.01.21 11:51, Jules Maselbas wrote:
> Hi Ahmad,
>
> On Fri, Jan 29, 2021 at 10:51:18AM +0100, Ahmad Fatoum wrote:
>> Hello Jules,
>>
>> On 27.01.21 17:49, Jules Maselbas wrote:
>>> File system operation shouldn't be executed in a poller. Use
>>> a workqueue to delay filesystem operation to command context.
>>>
>>> This is an RFC, extra work must be done to properly handle error
>>> cases and dfu cleanup.
>>
>> I erroneously thought the poller is within the DFU bits. I wonder what
>> side-effect moving the whole USB gadget polling into a workqueue would
>> have. In that case, we wouldn't need to any changes for DFU itself.
>>
> If I understood correctly you're suggesting to wrap the entire dfu
> gadget inside a poller. I have not tried this and it might work.
> However wrapping each fs operation allow the dfu gadget to respond
> to GET_STATUS queries will erase/write operation are on-going.
To allow running in the "background", the UDC calls into the gadget code
in a poller. I was wondering if replacing that poller with a workqueue
would just make the problem go away, not for DFU. It now know it wouldn't:
Work queues work in shell context and doing console stuff in shell context
(via ttyACM gadget) is not a wise choice. So please dismiss my suggestion ^^.
>
> Jules
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-01-31 19:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-27 16:49 Jules Maselbas
2021-01-29 9:51 ` Ahmad Fatoum
2021-01-29 10:51 ` Jules Maselbas
2021-01-31 19:34 ` Ahmad Fatoum [this message]
2021-02-01 9:26 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef7e5e11-9aef-49dc-c6f9-32a232c2926b@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=jmaselbas@kalray.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox