10:06 karolherbst: mupuf: would be nice if you could looker over the power budget patch series for exposing the max power cap on supported hardware, so that we could even merge it in for 4.10
10:17 bloblo: Hi, for my gt 630, 0f: core 780 MHz memory 535 MHz AC: core 405 MHz memory 324 MHz, can expect use 780 Mhz core with kernel 4.10 ?
11:05 mupuf: karolherbst: sounds reasonable
11:05 mupuf: I will have a look at it tomorrow
11:08 karolherbst: thanks :)
11:09 karolherbst: mupuf: got no ticket for the 33c3 event :( I joined the queue a few seconds after opening
11:09 mupuf: karolherbst: :s
11:09 karolherbst: queue position was around 3000
11:09 mupuf: shit, this event is truly insane
11:09 karolherbst: and they sold around 2000 in this day
11:09 karolherbst: _D
11:09 karolherbst: :D
11:09 karolherbst: yes
11:09 karolherbst: within minutes
11:09 karolherbst: well
11:09 karolherbst: the biggest conference in europe there is
11:09 karolherbst: 12.000 tickets sold
11:15 Calinou: "33c3: now more trendy than BronyCon!"
11:19 karolherbst: Calinou: better this way
11:20 karolherbst: :D
11:27 karolherbst: mupuf: mhh, nvidia caps around 38.7W if I set the cap to 40W. I would have expected to be more close. It actually also stays there, so there is no reading above 40W
11:28 mupuf: how did you make sure of this?
11:28 mupuf: using the tool I wrote?
11:28 mupuf: that spys on the bus?
11:28 mupuf: I guess nvidia has a model of the power consumption for their GPU
11:29 mupuf: and so, they can compute that the next cstate would put the power usage too high
11:29 karolherbst: https://gist.github.com/karolherbst/208172a07fab8d982e4f3b691eca90df
11:29 karolherbst: now I did it with 50W
11:29 karolherbst: 40W used too low clocks
11:29 karolherbst: interesting is 5445 and later
11:30 mupuf: yeah, this time it was more reactive
11:31 karolherbst: added more data
11:31 karolherbst: 126065 and later
11:31 karolherbst: it rasises the clock a little again
11:31 karolherbst: but drops it later
11:31 karolherbst: allthough the 50W weren't hit
11:31 karolherbst: I could imagine there is some kind of function defined as well
11:31 mupuf: maybe because it has a moving average for the power
11:32 karolherbst: it actually has
11:32 karolherbst: but the avarage is always below 50W
11:32 karolherbst: or maybe just a 2% buffer?
11:33 mupuf: nah, I think it really has a crude model of the power consumption
11:33 karolherbst: mhh
11:34 mupuf: for the static power, there may be tables to get the voltage -> leakage
11:34 karolherbst: yeah
11:34 mupuf: and then, for the dynamic power consumption
11:34 mupuf: you can use a linear model
11:34 karolherbst: this sill be fun
11:34 karolherbst: anyway, the first step is to find the cap at all anyway
11:34 karolherbst: well for the other gpus that is
11:35 mupuf: like: if you consume 100W at 1GHz
11:35 mupuf: you will consume 110W at 1.1GHz
11:35 karolherbst: doesn't this depend more on the votlage?
11:35 karolherbst: I noticed that increased frequency doesn't do much
11:35 mupuf: yeah, it does
11:35 karolherbst: like if the fsrm cuts to 1/16
11:35 karolherbst: it means 1/2 power consumption
11:36 mupuf: but you can probably ignore it when wondering if you could increase the frequency by 12.5 MHz ;)
11:36 karolherbst: so I would simply do it based on the voltage
11:36 karolherbst: mupuf: I can ignore it wehn I increase by 200MHz actually
11:36 karolherbst: when I did my OC tests with nouvau
11:37 karolherbst: it made a difference of like 3W
11:37 karolherbst: at 60W consumption
11:37 karolherbst: frequency really doesn't matter
11:37 mupuf: it does only a bit, yeah
11:37 karolherbst: yes
11:37 karolherbst: but it is not enough to actually matter significantly
11:37 mupuf: well, anyway, we can model the GPU a bit
11:37 karolherbst: random work load will have a bigger impact
11:38 mupuf: but we would need to know the static power consumption at different voltages
11:38 karolherbst: or already change in the work
11:38 mupuf: this is important
11:38 karolherbst: right
11:38 karolherbst: worst case, we can meassure it
11:38 mupuf: good luck
11:38 karolherbst: I said worst case ;)
11:38 mupuf: you would need to disable all the clock power gatin
11:38 mupuf: g
11:39 mupuf: the one controlled by the driver ... and the automatic hw one
11:39 karolherbst: doesn't matter if we enable clock gating
11:39 mupuf: POWER GATING
11:39 mupuf: :D
11:39 karolherbst: it is disabled on kepler :p
11:39 mupuf: read again what I wrote, please ;)
11:40 mupuf: 99% of the power gating domains are fully automatic
11:40 karolherbst: right
11:40 mupuf: only the engine-level power gating can be controlled by sw
11:40 karolherbst: ohhhh
11:40 karolherbst: I see
11:40 mupuf: hence the: good luck
11:40 karolherbst: mhh
11:41 mupuf: so we would need these tables from nvidia
11:41 karolherbst: silly low end cards without sensors
11:41 mupuf: hehe
11:42 karolherbst: mhh
11:43 karolherbst: removed the " 2: min = 1 mW, avg = 8000 mW, peak = 8000 mW (unkn12 = 0)" entry
11:43 karolherbst: nvidia doesn't load anymore
11:43 karolherbst: this one looks like super boring
11:43 karolherbst: :D
11:43 karolherbst: mhh
11:43 karolherbst: no 02 in the header
11:43 mupuf: all this work would have been heaven for my PhD :FD
11:43 mupuf: I did it too early :D
11:44 karolherbst: the heck :O
11:44 karolherbst: the entries reference each other
11:44 karolherbst: ....
11:44 karolherbst: higher clocks now after I disabled the reference
11:44 karolherbst: mhhh
11:44 karolherbst: odd
11:44 mupuf: ?
11:44 karolherbst: entry 0
11:45 karolherbst: byte 1 was 2
11:45 karolherbst: after I set it to 0
11:45 karolherbst: nvidia loaded again
11:45 karolherbst: but now it uses slightly higher clocks
11:46 karolherbst: mhh, not really though
11:46 karolherbst: but stays stable on the highest one
11:46 karolherbst: ohh actually not
11:48 karolherbst: huh
11:49 karolherbst: I managed that nvidia doesn't read the sensor anymore
11:49 karolherbst: it isn't even setup anymore
11:49 karolherbst: ohh wait
11:49 karolherbst: the tool messed up
11:53 karolherbst: the heck
11:54 karolherbst: \o/
11:54 karolherbst: now I get values close to 50W
11:54 karolherbst: slightly above, but more like 50.5W
11:54 karolherbst: or 49.7W
11:57 karolherbst: okay
11:57 karolherbst: if there is only one entry in the table
11:57 karolherbst: I am able to get the cap
11:59 mupuf: oh, that is quite interesting
11:59 mupuf: that would mean they may not have this model yet
12:00 karolherbst: that table is insane one way or the other
12:01 karolherbst: I think some "types" of entries are picked implicitly
12:02 karolherbst: jo
12:02 karolherbst: added a second entry
12:02 karolherbst: just like the first one, but 10W lower
12:02 karolherbst: guess what, it caps 10W lower
12:02 karolherbst: didn't change anything in the header
12:03 karolherbst: the hell
12:04 karolherbst: mupuf: https://gist.github.com/karolherbst/b4c173b04e363c94de4549ec3560ab45
12:04 karolherbst: it caps to 35W now
12:04 karolherbst: I simply added the last entry
12:05 mupuf: but aren't you simply finding out again that the selection of entry is based on conditions?\
12:05 mupuf: like beong on battery?
12:06 karolherbst: well yes
12:06 karolherbst: maybe not
12:06 karolherbst: I just want to know how to figure out what is the power cap
12:06 karolherbst: the one header field only works if it is set
12:06 karolherbst: and it isn't on mine
12:08 karolherbst: okay
12:08 karolherbst: changed the 0 byte from c2 to c0
12:08 karolherbst: and now it caps to 40W
12:08 karolherbst: ...
12:09 karolherbst: okay
12:10 karolherbst: the entry is enable if entry[0] & 0x2
12:10 karolherbst: *enabled
12:10 karolherbst: at least something
12:10 mupuf: hehe
12:10 mupuf: have to go, see you!
12:11 karolherbst: bye
12:19 karolherbst: okay
12:19 karolherbst: if entry[0] & 0x4 enabled
12:19 karolherbst: but then entry[1] influences the drop from the avg
12:19 karolherbst: 04 00 40W, caps to 40W
12:19 karolherbst: 04 01 40W caps to around 38.5W
12:24 karolherbst: this drops to lowest clocks : https://gist.github.com/karolherbst/78db0404c14e978139a451e1c7465ced
12:24 karolherbst: ...
12:24 karolherbst: what the hell is going on here