Re: Idle Loop
Denis Kenzior <[email protected]>
| Newsgroups | dev.linux.lists.ofono |
|---|---|
| Message-ID | <[email protected]> |
Hi Adam, On 7/26/24 12:03 PM, Adam Pigg wrote: > Hi Dennis > > Wondered if I could pick your brain about a new issue I have. > > In the patches I apply ontop of stock Ofono for Sailfish, there is a plugin > called the Slot Manager. > > On 2.7 all is fine. > > On 2.9 not so. > > The code in the slot manager, after its creation waits for 5 iterations of the > event loop before disallowing any more drivers to register, and it seems that > in 2.9, this is much more likely to happen, though its a bit inconsistent. Why would it be doing that? > > I wondered if it could be related to https://git.kernel.org/pub/scm/network/ > ofono/ofono.git/commit/?id=063856a2ba9308e1776a3f906bd2ed9a9f760744 and what a > correct solution might look like (I understand this is my issue as the code > isnt upstream!) This commit makes drivers register on probe such that no main loop iterations are needed between probe() and register(). I assume we are talking about atom drivers here (everything in drivers/*). Atom drivers when probed (probe() is invoked) start their initialization process. This process can take as much time as these drivers need. Putting a cap of the number of iterations doesn't make any sense. > > Potentially the check for 5 iterations of the loop isnt even necessary (and > seems very arbitrary!) so Ill test without it. > > Is there a reason that the gobi plugin/qmimodem driver combination now takes > an indeterminate amount of event loop time to appear? See above. gobi / qmimodem now perform more steps after probe() and before register(). > > Any thoughts welcome, > Kind Regards > > Adam > > Regards, -Denis