[11:07] *** mchehab has left [11:56] *** ChanServ sets mode: +v mchehab [11:56] <mchehab> hi all [12:01] <mkrufky> hi [12:05] <mchehab> mkrufky: I've been experimenting with the new DVB mmap API... [12:05] <mkrufky> i forgot about that [12:05] <mchehab> results are impressive - even on usb drivers [12:05] <mkrufky> was it merged? [12:05] <mchehab> not yet [12:06] <mkrufky> i have next week off and i plan to build myself a new kernel test box [12:06] <mkrufky> ill probably use that new box to test this mmap as well [12:06] <mchehab> on my tests, it reduced about 5x the number of context switches [12:07] <mkrufky> anyway, im glad to hear its working for you [12:07] <mchehab> 3x the number of CPU cycles [12:07] <mkrufky> that's great! [12:07] <mchehab> and 5x the number of cache misses [12:07] <mkrufky> is there anything that can possibly go wrong with it? [12:08] <mchehab> the API is about the same as the one used by V4L2, and it uses videobuf2 [12:08] <mchehab> so, I guess the risk of troubles is minimal [12:08] <mkrufky> and its a new mmap, no existing code path is affected [12:08] <mchehab> yes [12:08] <mkrufky> we should just merge it [12:09] <mkrufky> it means only new apps that use mmap can be affected by it. ie, no apps will be affected until they are patched. there is no risk [12:09] <mchehab> yes [12:09] <mchehab> we can add some warnings to Kconfig, saying that the API is new and support is experimental [12:10] <mkrufky> yes that makes sense [12:10] <mchehab> Kernel patches are at: https://git.linuxtv.org/mchehab/experimental.git/log/?h=dvb_mmap [12:11] <mchehab> userspace test is at: https://git.linuxtv.org/mchehab/experimental-v4l-utils.git/log/?h=dvb_mmap [12:11] <mkrufky> very nice :-D i'll try to test it on tuesday or wednesday next week... my new box should be up & running by then. [12:11] <mchehab> currently, userspace test only works for dvbv5-zap, and requires -o flag [12:11] <mkrufky> this is such a great improvement [12:11] <mchehab> yes, it is! [12:12] <mchehab> my intention is to post some notes at the ML [12:12] <mkrufky> how can userspace know if DVB mmap is available? will it test for the DVB API version or will there be some other way? [12:12] <mchehab> with my test results, and ask people to test [12:12] <mchehab> well, you can always try to use reqbufs and, if not available, fall back to read() [12:13] <mchehab> the current patchset doesn't increment DVB API version, nor document it [12:13] <mchehab> my plan is to write such patches before merging it upstream [12:13] <mkrufky> thats fine [12:14] <mkrufky> once merged, all dvb devices will have it, right? there are no such "special cases" that wont be able to use mmap for any reason, is that correct? [12:14] <mchehab> yes. it is implemented at the core [12:14] <mchehab> we can add later support for DMA BUF [12:15] <mchehab> with should likely be trivial [12:15] <mkrufky> yes [12:15] <mchehab> pinchartl, sailus, syoung: anything from your side? I'll need to go out in short [12:15] <mkrufky> i saw your email about the drx-d patch [12:16] <mkrufky> that i will also try to test on my new box next week [12:16] <mchehab> great! [12:17] <mchehab> yeah, I was figuring out that you could have some of those devices with you [12:17] <mchehab> I guess I used to have one, but not really sure [12:17] <mchehab> but I was unable to find any here [12:17] <mkrufky> im not sure where, but also on my agenda for next week is to clean and reorganize... im bound to find a pile of usb tuners somewhere [12:17] <mkrufky> i think its the HVR900 [12:17] <mchehab> yes [12:18] <mchehab> HVR900(R2) [12:18] <mkrufky> ah yes [12:18] <mchehab> not sure if this was labeled with a different numbering [12:18] <mchehab> I guess I used to have an hvr900 that it is based on tm6000 [12:18] <mchehab> probably a different revision [12:18] <mkrufky> i have them labeled special like cheat sheets [12:19] <mchehab> :-) [12:19] <mkrufky> because i used to test them all in succession for regression tests [12:19] <mkrufky> (some time ago) [12:19] <mchehab> anyway, I was unable to find any hvr900... it is probably burried on some hidden stash [12:22] <mchehab> I moved 3 times since the last time I tested [12:22] <mchehab> anything else? [12:23] <mkrufky> `b/drivers/media/dvb-core/dvb_vb2.h` has whitespace problems :-/ [12:23] <mchehab> well, this kind of thing I usually fix during merges [12:23] <mkrufky> i just noticed where this patch actually came from :-D good work! [12:23] <mchehab> :-) [12:23] <mkrufky> ok good, id hate to complain to those guys about whitespace [12:23] <mchehab> the patch itself was written back in 2015... by that time, we had a project related to TV [12:24] <mchehab> but, due to an strategy change, the project didn't proceed in 2016-2017 [12:24] <mkrufky> the one on my desk at the time, i think was running this code [12:24] <mkrufky> (or maybe not) [12:24] <mchehab> Fortunately, I was able to convince one guy to rebase the patch [12:25] <mchehab> mkrufky: anyway, in this case, I prefer to do any fixes that would be required [12:25] <mkrufky> and now those guys wont have to rebase that functionality again for the future [12:25] <mchehab> yes [12:26] <mchehab> (if their code is close enough to upstream) [13:33] <mchehab> mkrufky: hmm... no need to update dvb API version if we merge it before the next merge window, as it was already incremented due to DVB-S gold sequence patches [13:34] <mkrufky> ah, good :-) [13:45] <mkrufky> mchehab: what userspace app did you use for your dvb_mmap tests? [13:48] <mchehab> dvbv5-zap [13:49] <mchehab> I want to port the code there to libdvbv5, as it would allow Kaffeine to use it as well (after some changes at Kaffeine's code) [13:58] <mkrufky> and you obviously had to change dvbv5-zap, right? [13:59] <mchehab> yes [13:59] <mkrufky> :-) if you can post those patches then i can try them out too :-) [13:59] <mchehab> that's on the links I passed you [13:59] <mkrufky> hmm, looking again, maybe i missed something [13:59] <mchehab> (10:10:25) mchehab: Kernel patches are at: https://git.linuxtv.org/mchehab/experimental.git/log/?h=dvb_mmap [13:59] <mchehab> (10:11:02) mchehab: userspace test is at: https://git.linuxtv.org/mchehab/experimental-v4l-utils.git/log/?h=dvb_mmap [13:59] <mkrufky> oh, yes, i missed the second link [13:59] <mkrufky> im sorry [13:59] <mchehab> :-) [14:00] <mchehab> you need to use -o filename [14:00] <mchehab> for streaming to work on this version [14:00] <mkrufky> great! will be playing with this on tuesday or wednesday [14:00] <mchehab> OK! [14:00] <mchehab> maybe, by then, I'll have the code there improved [14:00] <mkrufky> and i will alter my own userspace lib to also use mmap [14:00] <mkrufky> (the dvbtee TS parser) [14:01] <mchehab> good, the more apps/libs use it, the merrier :-) [14:02] <mkrufky> it will help me do edge case testing [14:02] <mchehab> yes [14:02] <mkrufky> when all seems ok and merged and next kernel release, then we can start patching mythtv etc [14:02] <mkrufky> maybe my DVR machine will run less hot 8-) [14:03] <mchehab> yes, it is better to test it/stress it with trivial apps first [14:03] <mkrufky> exactly [14:04] <mchehab> I suspect that the real performance gains will start after we add dmabuf support, and use zero-copy buffers from DVB to GPU codecs [14:06] <mkrufky> yes [14:21] <mchehab> btw, DMA export buffer is already implemented there - I didn't test it, though [16:02] <mchehab> mkrufky: FYI, I'm rebasing the Kernel tree with the DVB mmap patches, in order to make easier for me to push the patches I wrote. [21:48] <mkrufky> no problem... i was afk, first seeing that now