-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
linux: DVB fixes #2382
linux: DVB fixes #2382
Conversation
Have these fixes been discussed with upstream? Is it confirmed that this is not a bug in the DVB driver(s) that the revert works around? I'm not too happy adding random reverts/patches of core Linux code without a really strong need to do. |
I agree, I've added merge blocked as this is just for testing purposes as it allows users to get back on to a current kernel and continue testing other stuff. I don't know if anyone has been in contact with upstream, or how best to pursue that. |
@MilhouseVH |
Excellent thanks @polojoe - I've got nothing more to add at this stage, it looks like they've got all the information they need in the mailing list posts. |
@polojoe thanks a lot for getting the ball rolling! I don't have any hardware to reproduce the issues so I can't add anything valuable to the discussion but I'm sure you and upstream devs will find a solution |
@polojoe I'm not subscribed to that mailing list (I already get waaay too many emails a day as it is) so please don't hesitate to ping this PR if anything useful is posted, thanks. |
quick update: Discussion is going on, Linus just posted and seems to favour reverting the ksoftirq commit: |
@MilhouseVH Please also leave a comment in libreelec forum thread for wider testing on affected hardware. |
Wondering if https://patchwork.linuxtv.org/patch/46327/ is also a fix for that problem. If so it could be a much bigger problem. |
@polojoe I've uploaded build #0107z to test the increased buffers. |
Is there a possibility to make usb dumps in le? |
Personally I'm in favour of the revert. It broke something. There's no evidence of it helping anything. But as the discussion upstream is progressing then waiting a while for their suggestions seems worthwhile. Assuming a fix/revert (that works for us) appears upstream in the near future then we take that. If nothing happens upstream (it doesn't sound like that will be the case) then the revert is the fallback option. |
Maybe usb dvb performance could be improved furthermore. Because despite revert I get errors in recordings if I'm streaming videos via lan on rpi at same time. Errors are gone if tvh is recording without lan activity. |
The "increase buffer" suggestion is interesting. If something like that fixes the problem it might even improve behaviour beyond the original regression (long shot but it's not impossible). |
@MilhouseVH |
I've added build #0108b to the thread. |
@popcornmix "If you expect/want to get stable performance out of such a small box, Would this be possible to do? Are we able to measure/show latency spikes on rpi with le as later mentioned in the post? |
From @P33M
In theory the userspace process handling DVB (I assume tvheadend or similar) could be pinned to core 2 or 3 which will separate its work from the interrupt based handling of USB in kernel. |
perf runs on the pi. It lives in the kernel tree but is a standalone application that can be built: A build of perf for LE may be interesting. I'm not an expert on its usage but it can be used to read profiling counters of various parts of the chip. |
jahutchi (who identified the original commit causing the issue) is testing with a Revo 3700 (Intel(R) Atom(TM) CPU D525 @ 1.80GHz, quad core) which may not be a powerhouse, but it's also not a Raspberry Pi, so is special tuning really required or is this a red herring? Prior to 4.9 no tuning was necessary, but now it is (or may be required) - surely that's a good argument for this being a regression, and tuning isn't the solution? |
There's some indication in the forum post that Linus' patch fixes DVB issues. Concerning tuning: there was some important lines snipped from Jesper's mail
Recording with tvheadend plus playing back the video with kodi could indeed be too much and might require some tuning - just a guess though, never tried that. When testing things we have to be very careful not to mix up probably unrelated issues. Problems with recording+playback at same time or audio dropouts can be caused by something else. If they are all caused by the softirqd patch your testbuild with that commit reverted should be perfect. If it's not, the issues can be due to other kernel changes, maybe different kodi or tvheadend versions etc. |
Agreed. Unfortunately in this case my builds are bleeding edge so userland (Kodi etc.) is a moving target and may introduce bugs that are unrelated to this issue, and LE has changed significantly over the last year since this issue was first raised.
I've uploaded a build of
produces an
Not entirely sure how it should be used, though. I'll include |
@MilhouseVH @HiassofT did upstream arrive at a solution for this yet? .. it's no issue to revert the commit for now if we know this will be resolved in a future kernel bump. |
Upstream discussion seems to have stalled a bit. Last post was from Mauro 3 days ago, he's struggling with the upstream dwc2 USB driver (isochronous transfers are broken there). I'm following this via the linux-media list, so I could be missing discussions about it in other lists. So I'd also say add the revert patch for now. |
Or we could test with the alternative patch from Linus? That way we could compare (to some extent) 8.2.y with kernel 4.11.y and ksoftirq reverted, and 9.0 with kernel 4.14.y and Linus' patch). Linus patch: https://www.mail-archive.com/linux-media@vger.kernel.org/msg124351.html |
Good idea, switching to Linus' patch - at least for a while - should provide some more info. We can also compare results with your current/older testbuilds with the revert. Could be helpful to upstream, too. |
Yes my current builds include the revert so that will give a more direct comparison - I'll add Linus's patch as a second commit, we can squash later if we decide to keep it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :)
This is currently breaking |
Ah yes... the ksoftirqd patch is in the RPi support patch (which I don't use in my builds in case anyone is wondering). I'll chat with popcornmix about a fix - drop it, or we exclude it from the support patch. Either way I'll push a new support patch once we've decided. |
See forum for ksoftirqd commit.