#linuxtv 2019-07-17,Wed

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)

WhoWhatWhen
***ChanServ sets mode: +o mchehab` [01:03]
............ (idle for 56mn)
ChanServ sets mode: +o mchehab` [01:59]
...................... (idle for 1h48mn)
ChanServ sets mode: +o mchehab` [03:47]
...................................................................................................................................... (idle for 11h8mn)
marc|gonzalezmchehab: there are occurrences of kmalloc(1, GFP_KERNEL); and kmalloc(2, GFP_KERNEL); just for the lifetime of a single function. That seems excessive... [14:55]
mchehabagreed. the code probably need some rework
without knowing where it happens, I bet those are due to DMA buffers that can't be at stack
the right fix would be to have a temp buffer allocated together with the dev-specific struct
[14:58]
marc|gonzalezmchehab: hehehe, I didn't dare say where, because it's one of the media maintainers ;-) [14:59]
mchehaband having a mutex to avoid concurrency
the code you're likely mentioning is due to a bug fix
after a Kernel change that caused a regression on almost every USB media driver
the quick/safe fix were to change stack alloc to kmalloc
[14:59]
marc|gonzalezI see, but allocating 1 or 2 bytes on the heap sounds very wasteful (in memory and CPU), and it's unlikely to be a problem on the stack [15:11]
mchehabstack doesn't do DMA transfers
any URB object should be allocated with kmalloc
[15:11]
marc|gonzalezmchehab: haaaaa [15:12]
mchehabwhat most drivers do is that a temp buff is allocated at their struct driver_dev
so, a single allocation
but that requires a mutex
[15:12]
marc|gonzalezI think I see the issue now
Thanks for taking the time to explain
[15:13]
mchehabspecially if the same buffer is used also for polling events (for CI and IR) [15:13]
marc|gonzalezmchehab: in dvb_pll_attach() it is an URB object? [15:14]
mchehabon several drivers, I2C transfers happen via URB
dvb_pll can be used for I2C transfers
[15:14]
marc|gonzalezwow, so much complexity, it's humbling... [15:15]
mchehabalso, tuning a device is an operation that doesn't occur too often - the memory pressure of doing a kalloc/kfree inside it is minimal [15:15]
marc|gonzalezI see, I was thinking about the maintenance burden of the error-handling [15:16]
mchehabthe maintainance burden of breaking random devices due to DMA on stack is a lot worse [15:16]
marc|gonzalezsmirk
I have a random crash in my system that comes several seconds after a dvbv5-scan, mchehab any idea what could this be?
[15:17]
mchehabno, sorry. my crystal ball is broken :-p [15:19]
marc|gonzalezsmirk :-)
Do you know that there is one girl named Kristal Ball?
weird parents...
[15:20]
mchehabor maybe it is an artistic name she choose [15:21]
b-radyou wany mysterious names go to africa where they just choose two arbitrary words they like
i've met lawyer doctor, patient person, etc
[15:22]
mchehabI suspect that most names are like that... [15:24]
b-radyup, you choose what you like [15:24]
mchehabexcept that the origin of a name usually comes from an old language [15:24]
marc|gonzalez"Ball was born to Edward and Rose Marie Ball, a physicist and a teacher, respectively. The name Krystal came from her father, a physicist who did his dissertation on crystals." [15:25]

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)