02:14 dboyan: By the way, is nouveau accepting gsoc project this year? Also, does the nouveau section on the x.org idea page still apply?
02:14 dboyan: That section seems to be last updated one or two years ago
02:14 imirkin: dboyan: sure, if a qualified candidate applies with a reasonable project that someone is willing to mentor
02:20 dboyan: okay, thanks. Probably I'll apply for mesa or nouveau or something, just trying to get familiar with how they work this days
02:22 imirkin: dboyan: i think the general policy is to only accept gsoc applications from people who have made prior contributions (don't have to be enormous ones of course)
02:22 imirkin: also ensure that you have a mentor lined up
02:29 dboyan: I did make some contribution to mesa but haven't touched nouveau before. The main knowledge I got was mainly from digging the recent bug with compute shader that I reported.
02:29 dboyan: But I did find something interessting
02:30 imirkin: yeah, i haven't looked at your updated findings yet in detail
02:30 imirkin: i've been pretty sick this week, although i'm suddenly feeling a lot better. hopefully i'll be back to 100% tomorrow. that'd be nice...
02:32 dboyan: oh I'm sorry about that
02:32 imirkin: i'll survive. hopefully.
02:35 dboyan: Do you know why nouveau make sched value of join instruction 0x0? nvidia driver on my gk208 is generating 0x2f
02:36 imirkin: there is no such thing as a join instruction
02:36 imirkin: there's a join flag though
02:36 imirkin: (which in nvdisasm shows up as .S btw)
02:38 dboyan: yeah, join flag. I only learned it a few days, but most instruction with join flags are 'join nop' though
02:38 imirkin: in which case it's NOP.S
02:39 imirkin: anyways, you can look at the SchedDataCalculator in emit_nvc0.cpp
02:39 imirkin: for how it determines this stuff
02:39 imirkin: please note that it's not perfect
02:39 imirkin: also note that i didn't write it :)
02:41 dboyan: It says, if (insn->op == OP_JOIN || insn->join) insn->sched=0x00
02:41 imirkin: ok then.
02:42 dboyan: I know, that's why there's an gsoc idea on instruction scheduing ;-)
02:42 imirkin: that's for scheduling instructions
02:42 imirkin: not for computing sched codes
02:42 imirkin: i.e. if you have instructions a;b;c should you instead emit them as c;b;a
02:42 imirkin: or whatever other order
02:43 dboyan: yeah, but even the scheduling info seems not perfect now
02:45 dboyan: actually I altered that to 0x2f as a hack, I saw no problem at least with Portal 2, and it seems running just a little bit faster when playing dem files
02:45 imirkin: well, it'd need some investigation as to what's better there
02:45 dboyan: I agree
02:47 imirkin: however there should be significant gains possible from even a mild amount of instruction scheduling work
02:50 dboyan: I know there has been work done on maxwell. Maybe I'll study that a little bit these days when I have time, and read some books about compilers.
02:52 imirkin: again, that has nothing to do with scheduling instructions
02:52 imirkin: it has to do with providing delay info to the execution units
02:52 imirkin: in compilers, there's the idea that instruction order matters...
02:52 imirkin: here's a simple example
02:52 imirkin: a = b + c + d + e
02:53 imirkin: now, you could do this as
02:53 imirkin: t1 = b + c; t2 = d + e; a = t1 + t2;
02:53 imirkin: er hm. no. this is a bad example.
02:53 imirkin: (rather, it's an example of something else)
02:53 dboyan: I can get what you're saying
02:54 imirkin: depending on how you order things, you can end up with more or less values live at a time
02:54 imirkin: which means more or fewer registers required
02:54 imirkin: and also you can use up what are effectively delay slots by performing useful work that you have to do anyways
02:55 dboyan: yeah, about instruction delays and dependencies
02:55 dboyan: Do you know what reference materials are available either on web or in books about this topic? I think I'd better learn with things like that
02:56 imirkin: well, you could look at the scheduler that i965 uses for some inspiration
02:56 imirkin: unfortunately it's all an extremely difficult topic
02:56 imirkin: because it is so intertwined with register usage
02:56 imirkin: and unlike CPUs, where you have N registers, and it doesn't matter how many you use
02:57 imirkin: the number of registers you use on a GPU affects the parallelism of the program
02:58 dboyan: I see, thanks a lot for the detailed information
08:28 mupuf: dboyan: glad to hear you are willing to participate
14:33 mmaret: Hi !
14:33 mmaret: I already came here with the same issue but I've some progress I can share
14:34 mmaret: I'm using a K520(Gk104) on a amazon aws grid instance.
14:34 mmaret: inserting the nouveau module produce, on some instance, a huge amount of IRQ
14:34 mmaret: like 100000/sec
14:35 mmaret: I'm trying to understand where all those IRQ came from
14:36 mmaret: using ftrace, I can some trace showing that the nvkm_therm_intr is call very often
14:37 mmaret: (1500/sec, so far less than 100000/sec. But may be it's normal because of the activation of ftrace. Heisenberg spotted...)
14:37 mmaret: no other nvkm related interrupt are visible in my trace
14:38 mmaret: And I don't know what to do with this information
14:39 mmaret: my kernel knowledge is limited, and it's even worse with my nvidia knowledge ...
14:39 mmaret: So any suggestion will be appreciated
14:52 mmaret: In case it was not clear enought, this card is available to me in a Xen guest. I did not have access to the Xen host
15:00 RSpliet: mmaret: interesting... I think mupuf might be the best to help
15:00 RSpliet: but can you just double check (using sensors) what the temperature and trip points of your GPU are?
15:01 RSpliet: and make sure you're using a very very modern kernel
15:05 mmaret: currently i'm testing a 4.4. But i've the same issue with a 4.10-rc5
15:07 RSpliet: mmaret: If you have the opportunity of getting sensor information using the 4.10 rc that'd be very helpful. I've lost track (like presumably most people here) of all the changes already made that could impact behaviour since 4.4
15:07 mmaret: ok I'll do that
15:07 RSpliet: thanks a lot!
15:11 mupuf: OMG
15:11 mmaret: The hardest part is to have a instance from amazon at this time of the day :)
15:12 mupuf: well, I really need to stop using ptimer.alarm
15:12 mupuf: it is too difficult to use properly and to multiplex
15:12 mupuf: will use the kernel timers ... but that requires writing an abstraction and a re-implementation for nouveau to work in the userspac
15:13 RSpliet: mupuf: I was hoping it'd simply be a weird corner case caused by a more fancy fan or a missing/misinterpreted trip point from the VBIOS ;-)
15:15 RSpliet: (or an odd Amazon change to the PCB that forbids nouveau from touching the fan config at all...)
15:16 mupuf: RSpliet: I doubt it :s
15:16 mupuf: 1500 irq/s :o
15:17 mmaret: only 1500/sec with the trace activated. otherwise /proc/interupts show about 100000/sec for nvkm
15:20 RSpliet: mupuf: well, if nouveau doesn't do anything about the actual reason of the IRQ, it'll keep screaming for more attention
15:20 mmaret: I finally got an instance with a 4.10-rc10
15:20 mmaret: sensors give a temp° of 29°
15:21 mmaret: http://pastebin.com/s2YJT7Lt
15:22 RSpliet: hah, that looks plausible and valid
15:22 mmaret: I'm not very confidente in the fact that the thermal part could generate soo much IRQ. but that's the only one I can get in a trace
15:23 mmaret: any idea about how I can get more information
15:23 RSpliet: mmaret: perhaps you could take a copy of the VBIOS ( a binary that you can copy from /sys/kernel/debug/dri/<number>/vbios.rom ) and send it to mmio dot dumps at gmail etc etc
15:23 RSpliet: mupuf: anything else that might be useful?
15:24 mmaret: I forgot to tell that inserting nouveau with config="NvMSI=0" reduce the number of irq to about 1000/sec (instead of 100000/sec)
15:25 RSpliet: ah okay. Not sure if that's because of bus inefficiency or a clue
15:25 RSpliet: mupuf: think there's some debugging info that he can extract from the kernel to find out what the IRQs are trying to say? could you propose a good nouveau.debug="" param to continue investigation ;-)
15:26 RSpliet: (mmarit: bear with us btw, we're both entangled in full-time jobs not related to nouveau.)
15:27 mupuf: nouveau.debug=ptherm could help
15:27 mupuf: but honestly, can't remember now
15:27 mupuf: and I am still at work
15:27 mupuf: so this will have to wait
15:28 mmaret: I completly understand. Thank again for your help and indication
15:28 mupuf: mmaret: thanks for the initial debug!
15:29 mupuf: this is quite valuable!
15:29 RSpliet: mmaret: try and obtain a kernel log when booting with nouveau.debug=ptherm - get the dmesg and send it along with your vbios to the mmio dumps e-mail address (or attach it to a bug report on freedesktop). That way mupuf can look at it in his own time :-)
15:30 mmaret: btw, about the vbios, I notice that, some computer don't have the issue but print the same vbios version in dmesg than the ones with issues
15:30 RSpliet: oh sorry
15:30 mupuf: yes, I was about to say that making a bug report would be good
15:30 mupuf: funky...
15:30 RSpliet: nouveau.debug="PTHERM=debug" would be the right way to go
15:30 mmaret: https://bugs.freedesktop.org/show_bug.cgi?id=97367
15:30 mmaret: it's a bit old now and missing some new information that I will complete !
15:31 mupuf: amazing... I have been ignoring this bug for a long time it would seem
15:33 mmaret: RSpliet, nouveau.debug="PTHERM=debug" should be given on nouveau modprobe or kernel cmdline ?
15:34 RSpliet: mmaret: which ever way nouveau is loaded
15:34 mmaret: ok thx
15:35 RSpliet: [ 53.971504] nouveau 0000:00:03.0: therm: FAN target request: 0% [ 53.971508] nouveau 0000:00:03.0: therm: FAN update: 0
15:35 RSpliet: that already provides quite a clue :-P
15:38 mmaret: Hopefully I don't burn a card with every test :)
15:40 RSpliet: with 29 degrees, I'm sure you'll be fine ;-)
15:41 RSpliet: What's your motivation for getting nouveau to run on Amazon in the first place btw? Did you already get the warning that we can't do OpenCL yet?
15:41 mmaret: The card are doing nothing. Even X is not started. Otherwise aws may have already knock on my door :)
16:29 karolherbst: mupuf: I tried to suggest ben to not use ptimer anymore, but his responds was "nvidia does it and if the ptimer/gpu is screwed we are screwed anyway"
16:42 imirkin: mmaret: iirc delroth had a similar issue when he was playing around with it for dolphin's CI... did i already mention this to you? i don't remember whether he had any workaround...
16:48 mupuf: karolherbst: maybe, maybe
16:48 mmaret: imirkin, Yes, you mention it ! but he does not respond
16:48 mupuf: but nvidia is not multiplexing it
16:48 mmaret: I'll retry
16:49 karolherbst: mupuf: I don't really see the point in using the GPU timers on the host, if we could simply use the host timers. Or are those too unreliable?
16:55 mmaret: imirkin, good memory btw ;)
16:56 imirkin: mmaret: not a lot of crazies running around trying to get nouveau working on aws :p
16:57 mmaret: ;)
16:59 mmaret: ho, another one. AWS also have instances with 4 GPU on them. Running nouveau on them produce a kernel crash.
16:59 mmaret: but I ve not doing any research on those one
17:00 imirkin: this might come as some surprise, but nouveau doesn't get a lot of workout on such systems
17:02 mmaret: you don't have such a expensive system in our basement just for testing ? :)
17:04 imirkin: hehe
17:04 imirkin: well, i do regularly run nouveau on 3-gpu systems
17:04 mmaret: nice
17:04 imirkin: my current configuration: https://hastebin.com/ohuciqonis.go
17:05 mmaret: are you playing some game on it ?
17:07 mmaret: like, if I give you a Kerbal Space Program license, chance are that few bugs will be solved in mesa ? Or that you will be absorbed by the game and loose any interest in nouveau ?
17:08 mmaret: :)
17:08 imirkin: lol
17:08 imirkin: i actually very seldom play games, and even more rarely anything more graphically intensive than minesweeper
17:09 imirkin: these GPUs are there for ease of testing
17:09 imirkin: that's why they're from different families :)
17:09 mmaret: less fun but more interesting :)
17:10 mmaret: I have to collect my kid. Thanks for the help and the chat
17:17 AndrewR: karolherbst, hello. I tried to apply your patches from https://lists.freedesktop.org/archives/nouveau/2016-November/026622.html to my 4.10-rc7+ build (because now I have new motherboard w/ pci-e 2.0 slots!) but X start locked-up :/ reverting both patches restored X ...As far as I understand those patches will be part of drm-next/4.11 nouveau ..so, I think I like to debug this early....
17:22 AndrewR: karolherbst, http://pastebin.com/ri7KmNzs - lspci -vvv . It looks like card already running at pci-e 2.0 speeds? May be UEFI/BIOS set it up this way?
17:27 imirkin: AndrewR: is that without the patches in question?
17:28 AndrewR: imirkin, yes, without
17:30 imirkin: AndrewR: surprising. G92 was still made at a time when PCIe 2.0 was new and flaky...
17:31 AndrewR: imirkin, I wonder if there way to downspeed it temporarily (sorry, not looked at earlier code for enabling pcie link speed changes in general)?
17:32 imirkin: wait, i thought karol's code should only be run on pstate changes...
17:32 imirkin: maybe not?
17:34 AndrewR: imirkin, I also added my \patch\ for enabling pstate changes, but they themselves seems to work..and as far as I see there still no auto reclocking, so I definitely was not changing pstate during those tests with pcie patches
17:35 AndrewR: imirkin, https://paste.fedoraproject.org/551183/ - currently running with this
17:37 imirkin: yeah, that won't affect any boot-time stuff
17:37 AndrewR: imirkin, strangely enough, unigine series of benchmarks tend to hang now on highest settings even w/o any pstate changes ..may be PSU not powerful enough for new hw...or this pcie 2.0 by default thing really not that stable ...
17:38 imirkin: or nouveau is doing something wrong - always my favorite
18:00 karolherbst: AndrewR: I would need the output of dmesg
18:02 AndrewR: karolherbst, with patches applied, I assume ..moment, I was rebuilding kern for another debugging (sometimes something tend to hang on resume from STR ...sometimes it survives 3-4 susped/resume cycles, sometimes it hangs at first..)
18:02 karolherbst: AndrewR: could you then also boot with nouveau.debug=pci=debug
18:03 AndrewR: sure ...
18:04 karolherbst: oddly enough, your GPU seems to be on 5.0 GT/s pcie already, weird
18:06 AndrewR: karolherbst, I only have this mb for ~day, not played with all those knobs in UEFI setup ....
18:07 karolherbst: imirkin: I know that some of those cards report wrong speeds through their mmio regs, this could confuse nouveau maybe? Sadly all g92 I tested this with didn't show any issues
18:07 karolherbst: and getting an mmiotrace today is a bit tricky sadly
18:08 AndrewR: karolherbst, may be if I change something there it will come up at 1.0 speeds ... But then I\m not sure if hang is sane idea depending on "BIOS" settings ... (sorry, I know this is not your fault..just ..a lot of components to try and disable/change..for example this new iommu thing ...)
18:09 karolherbst: ohh, it will be most likely my fault, cause I failed to detect something, maybe
18:09 karolherbst: who knows
18:09 karolherbst: the dmesg output would help
18:11 AndrewR: karolherbst, reboot
18:13 karolherbst: ohhh crap
18:13 karolherbst: ....
18:13 karolherbst: imirkin: g84: .msi_rearm = nv46_pci_msi_rearm, g92: .msi_rearm = nv40_pci_msi_rearm,
18:14 imirkin: iirc there's a reason for that
18:15 karolherbst: obviously
18:15 karolherbst: uhm
18:15 karolherbst: nv40 does nvkm_pci_wr08(pci, 0x0068, 0xff);
18:15 karolherbst: nv46 does pci_write_config_byte(pdev, 0x68, 0xff);
18:16 karolherbst: buggy implementation I guess?
18:16 imirkin: something like that
18:16 karolherbst: maybe we could get pcie v2 to work on g8x this way as well :D but honestly... it's just broken there, like completly
18:17 imirkin: no
18:17 imirkin: g8x doesn't support pcie v2 properly
18:17 karolherbst: I know
18:17 karolherbst: the mmio interface is there, but well
18:24 karolherbst: AndrewR: we found the issue
18:24 karolherbst: AndrewR: drm/nouveau/nvkm/subdev/pci/g92.c replace ".msi_rearm = nv40_pci_msi_rearm," with ".msi_rearm = nv46_pci_msi_rearm,"
18:24 karolherbst: then it should work
18:25 AndrewR: karolherbst, thanks!
18:25 AndrewR: but I bothed my kern build :/ (something with newly enable lcok debugs)
18:26 karolherbst: need to write the patch until this weekend
18:26 karolherbst: so you really should test it today if that fixes it
18:26 AndrewR: karolherbst, https://paste.fedoraproject.org/551204/ - dmesg from 4.10.rc3
18:26 karolherbst: airlied: there will be a bugfix for nouveau most likely for 4.11
18:27 imirkin: karolherbst: why should that help?
18:27 karolherbst: I have no clue, but it's there for a reason
18:27 karolherbst: those things are odd
18:28 karolherbst: anyway, there will be a fix one way or the other
18:29 AndrewR: karolherbst, in one hour I hopefully will have new kernel with this change and bootable
18:29 karolherbst: imirkin: anyway, g94+ always used nv40_pci_msi_rearm
18:31 karolherbst: AndrewR: okay, I will drive home in the meanwhile
19:34 AndrewR: imirkin, patch from Karol seems to be working (at least X start now)
19:36 AndrewR: https://paste.fedoraproject.org/551240/ - current dmesg
19:43 AndrewR: imirkin, and on pstate change ... nouveau 0000:01:00.0: pci: set link to 2.5GT/s x0 :)
20:10 karolherbst: ohh wait, we still have time for 4.11 ... silly me
20:11 karolherbst: AndrewR: are you able to increase the pstate and so also the pcie link speed?
20:39 gregory38: hello
20:39 gregory38: does anyone have a hint of what to look in gallium hud for GPU bottleneck
20:40 imirkin: there are a ton of counters exposed that you can find via GALLIUM_HUD=help
20:40 imirkin: but sorry, no, nothing particularly specific =/
20:40 gregory38: yes but I don't know which one to look
20:40 imirkin: sad to say, i don't have a ton of experience with that
20:41 gregory38: ok
21:27 NanoSector: hmm, just checked if my gpu would turn off with pcie_port_pm=off, but it still throws "DRM: failed to idle channel 0 [DRM]"
21:29 NanoSector: uh, derp, this is kernel 4.9
21:29 NanoSector:updates to 4.10rc7
21:32 imirkin: there's some weird acpi_osi=whatever thing you have to use now
21:32 NanoSector: hmm?
21:32 NanoSector: oh this is after suspend btw, it works on a 'fresh' boot
21:34 NanoSector: imirkin, should I try setting that to Windows?
21:35 imirkin: there's a specific set of strings
21:35 imirkin: i think acpi_osi=! acpi_osi='Windows 2012' or something along those lines.
21:35 imirkin: there's a bug about it
21:40 nyef`: Bug: ACPI tables are still being stupid about supported OSI for certain features?
21:40 NanoSector: hmm I can find https://bugs.freedesktop.org/show_bug.cgi?id=94725, is this waht you're referring to?
21:40 NanoSector: someone recommends adding acpi_osi="!Windows 2013"
21:41 NanoSector:tries
21:42 imirkin: NanoSector: see https://bugzilla.kernel.org/show_bug.cgi?id=156341#c22
21:42 imirkin: depends on the specific acpi thing
21:43 NanoSector: imirkin, ah, I see, thanks
21:44 NanoSector: 2013 doesn't work. this is a laptop that shipped with windows 10 so I suppose I should try 2015?
21:46 imirkin: i think that doing acpi_osi=! acpi_osi=foo is different than !foo
21:46 imirkin: do what the comments say :p
21:46 imirkin: esp the ones from Peter Wu
21:50 NanoSector: hmm i see
21:50 NanoSector: so acpi_osi is just telling acpi what OS version it is
21:51 imirkin: i have no idea how it works
21:51 NanoSector: that makes two
21:51 imirkin: which is why you should just follow directions
21:52 NanoSector: i' m working on it :P
21:54 NanoSector: ok setting acpi_osi=! acpi_osi="Windows 2009" doesn't fix the nouveau issue but causes my touchpad, backlight, and keyboard backlight to stop working upon resume :x
21:55 imirkin: so... almost perfect ;)
21:55 imirkin: try 2016 instead of 2009
21:55 imirkin: and/or other values
21:56 NanoSector: i'll try everything between 2009 and 2016
21:57 NanoSector: 2016 breaks backlight but not touchpad
21:58 NanoSector: doesn't fix nouveau
22:04 NanoSector: nope, none between 2009 and 2016 work
22:04 NanoSector: and only 2015 makes my backlight and all that work