**** BEGIN LOGGING AT Mon Aug 12 02:59:58 2013 Aug 12 08:15:44 Hi! Aug 12 09:46:13 How are our students doing? Aug 12 09:47:48 sleepy? Aug 12 10:58:27 keesj: hello and welcome back. Aug 12 10:59:02 thanks Aug 12 10:59:24 tcort has been doing great work! Aug 12 11:00:07 thanks :) Aug 12 11:00:49 not sure if you had time to read my blog since you got back, but I've posted a couple of youtube videos. Aug 12 11:01:52 watched a few indeed (powerdown and rtc related) also looked at the patches and submitted work Aug 12 11:03:30 I'll go through some of the code comments when I've had a bit more coffee :) Aug 12 11:03:37 I plan on doing some profiling in the next 2 weeks or so. Aug 12 11:04:20 do you have the weather cape? Aug 12 11:04:23 some minix/arm stuff is pretty slow. Aug 12 11:05:00 not yet Aug 12 11:05:35 yes it's dead slow hence the profiling :P Aug 12 11:05:57 lets hope it is not a architectural problem Aug 12 11:06:01 maybe the clock interrupt? on i386 it's 60Hz and on arm it's 1kHz Aug 12 11:06:19 isn't minix just inherently slower due to the micro-kernel arch? Aug 12 11:06:25 yes that's quite high indeed but there is more Aug 12 11:06:52 panto: yes certainly and currently but not that slow Aug 12 11:07:10 keeps us posted :) Aug 12 11:07:15 I hope it's the curerent context switching code and flushes that cause the problem Aug 12 11:07:48 define dead slow Aug 12 11:08:05 I also plan to give CCS and the profiling tools there a second chance Aug 12 11:08:19 panto: time gcc hello.c => 36 seconds Aug 12 11:09:18 panto: some problems are indeed related to the micro architecture e.g. we do way more context swiching for trivial stuff Aug 12 11:09:46 tcort, wtf Aug 12 11:09:52 you got issues Aug 12 11:10:06 panto: but I want to "define" dead slow in numbers Aug 12 11:10:49 run this on both minix & linux Aug 12 11:10:57 time ./hello Aug 12 11:11:17 mmc == slow , exec == slow Aug 12 11:11:22 that will tell us if the problem is I/O or not Aug 12 11:11:33 can you root nf? Aug 12 11:11:34 *nfs Aug 12 11:12:13 any help is welcome but it is not trivial figuring out where it is slow Aug 12 11:12:47 we can boot using tftp and a ramdisk or create a ramdisk and copy the content but can not nfs mount root Aug 12 11:13:14 ok, try ramdisk booting Aug 12 11:13:27 sounds like you got serious I/O problems Aug 12 11:16:57 also dd of /dev/null to /dev/null is not that fast either (I need to boot up my board) / setup my stuff again Aug 12 11:17:09 but it is fun work! Aug 12 11:48:27 it is not so much I/O related but something else. I mean it's not the amount of I/O that matters but the amount of call/context switches. I did a simple test using dd and different block sizes and counts. http://pastebin.com/Th4T07PS and a second (transfering 10 MB using different block size) Aug 12 11:53:05 needless to say it takes zero time on linux http://pastebin.com/urMSFKV3 Aug 12 11:56:38 you need to profile Aug 12 11:56:51 does minix has anything like oprofile or perf? Aug 12 12:12:23 I did some hacking around using the arm performance counters a few month ago Aug 12 12:12:47 I wonder it using the embedded trace (en openocd or ccs) is a fast solution Aug 12 12:13:33 Also I wonder how to train qemu to do this Aug 12 12:13:56 documentation around profiling and qemu is .. not that great Aug 12 12:18:48 (and perormance counters are not implemented in the armv7 emulator in qemu) Aug 12 12:19:21 nah Aug 12 12:19:26 use a real arm Aug 12 14:15:32 panto: what's the best way to find dynamically assigned "adapter number" for an i2c bus, given the address; from C code preferably Aug 12 14:34:22 system tracing using CCS is no longer completely borken (for me) Aug 12 14:45:33 upon inspection reading the timers is expensive(in terms of cycles) Aug 12 14:45:58 about 116 Aug 12 15:45:29 back Aug 12 15:45:51 hatguy, err, what do you mean? Aug 12 15:47:04 panto: I had a discussion about this with bradfa... https://www.kernel.org/doc/Documentation/i2c/dev-interface says that the adapter number is assigned dynamically.... so what's the best way to determine it at runtime? Aug 12 15:48:25 panto: I was thinking along the lines of checking if /sys/devices/ocp.2/4819c000.i2c/i2c-* was a valid path or not Aug 12 15:50:22 do you mean making sure that each adapter number is matching the hardware TRM number? Aug 12 15:50:35 so that I2C0 -> i2c-0 etc? Aug 12 15:50:50 or that the clients are assigned numbers that you control? Aug 12 15:52:17 panto: I don't think that if they match or not matters at all... I just want to be sure that I'm controlling the right device.. so I guess the latter Aug 12 15:55:34 the i2c-* directory is always valid in /sys/devices/ocp.2/*.i2c/ Aug 12 15:56:26 it is dynamically assigned but you know the hardware i2c # by that name Aug 12 15:56:41 you also have /sys/class/i2c-adapter & /sys/class/i2c-dev Aug 12 15:58:06 panto: does your second message mean that the hardware i2c# match the linux ones? Aug 12 16:05:28 no Aug 12 16:05:50 but that #.i2c is the address of the I2C IP block in the global memory space Aug 12 16:06:01 so you can very easily infer Aug 12 16:07:13 panto: ok, so the #.i2c directory is the most reliable way to find out the i2c # number, is that correct? Aug 12 16:07:34 as things stand yes Aug 12 16:07:47 there is another way but needs driver hacking Aug 12 16:08:16 go with mapping the #.i2c names to hardware I2C blocks Aug 12 16:08:43 panto: ok great Aug 12 16:09:05 * hatguy just needs to figure out the C code to do this Aug 12 16:10:52 panto, is there anything preventing us (other than having to do the sysfs incantation dance) from implementing status/control sysfs entries for the JTAG vring/remoteproc driver? Aug 12 16:18:40 ka6sox, no Aug 12 16:19:32 but by it's nature sysfs is not a very high speed interface Aug 12 16:19:58 it's perfectly acceptable for starting up, but we will need a device I/O interface Aug 12 16:19:58 this is just for things like start/stop running/not Aug 12 16:20:04 that's fine Aug 12 16:20:25 but if you have a device I/O interface it costs nothing to add some ioctls Aug 12 16:20:42 polling sucks Aug 12 16:20:54 who said anything about polling? Aug 12 16:21:04 it's a filedescriptor Aug 12 16:21:07 nobody...I just had to throw that in. Aug 12 16:21:18 you can make sure select, poll works sanely Aug 12 16:21:20 hehe :) Aug 12 16:21:27 true Aug 12 16:21:46 remember I'm old school...we have status bits mostly Aug 12 16:21:56 not 32bit registers. Aug 12 16:22:06 and file descriptors. Aug 12 16:23:06 heh Aug 12 18:42:15 panto: can we add some kind of aliases in the DT to for i2c3 to be called i2c3 in linux? Aug 12 18:42:37 koen, it's complicated :( Aug 12 18:42:53 I have a patch that puts the devices in order Aug 12 18:43:03 but it's in of/device core Aug 12 18:43:12 and you know how well things go there Aug 12 18:43:22 even bug fixes get everyone's panties in a bunch Aug 12 18:44:11 as long as pantos don't get in a bunch :) Aug 12 18:45:02 panto: hey, I take device core patches all the time, and my panties are just fine :) Aug 12 18:45:08 I only use beagleborad approved panties Aug 12 18:45:21 gregkh, ah, it lives! :) Aug 12 18:45:45 let's just say that pointing faults in other people's code never goes down easily Aug 12 18:46:06 panto: that's what kernel development is all about, that's why we do it, so that others can fix the bugs we add :) Aug 12 18:46:15 hehe Aug 12 18:46:23 are you making elce13? Aug 12 18:47:35 panto: elce13? Aug 12 18:48:37 embedded linux conference europe 2013 Aug 12 18:49:55 I'm pretty sure its elce7 (7th elce conference) Aug 12 18:50:31 panto: ah, yeah, I'll be there, it's part of linuxcon 2013, right? and the kernel summit, and probably 5 other conferences at the same time/place... Aug 12 18:50:37 yes Aug 12 18:50:51 kernel summit is at the same time (about)? Aug 12 18:50:58 23rd-25th Aug 12 18:51:03 panto: yes, the days before/after, can't remember which. Aug 12 18:51:14 * gregkh travel schedule is crazy for the next few months Aug 12 18:51:25 invite only Aug 12 18:51:49 can't seem to be with the cool folks then Aug 12 18:51:58 panto: yes, invite only, but you have to nominate yourself to go (you invite yourself) and then the people are picked from there. Aug 12 18:52:33 panto: there are still some open slots for "hobbyists" that don't get paid to do kernel development. Aug 12 18:52:39 I think the other conference is cloud something Aug 12 18:52:48 panto: the call for those applications hasn't gone out yet, but will in a few days Aug 12 18:53:22 I'm not sure I fit the hobbyists monicker Aug 12 18:55:14 elce is oct 24-25 Aug 12 18:55:48 I guess we can hang out someplace Aug 12 19:07:11 panto, you should swing over to connect .us when you're done there Aug 12 19:13:05 ka6sox, ping Aug 12 19:16:10 panto, ping Aug 12 19:18:27 mluckham, pong Aug 12 19:18:49 hi panto Aug 12 19:18:55 hi Aug 12 19:19:09 I've been looking at OpenOCD drivers - looking for a simple one, to start with Aug 12 19:19:13 mdp, err, since I'm paying out of pocket it's not going to happen Aug 12 19:19:57 contrary to what the rumors say I'm not an independently wealthy playboy/kernel-developer/philanthropist Aug 12 19:20:17 no, you club baby seals Aug 12 19:20:23 looking at http://openocd.sourceforge.net/doc/doxygen/html/interface_8h.html Aug 12 19:20:50 panto, could have fooled me Aug 12 19:20:52 koen, it's a weakness of mine Aug 12 19:21:12 who can resist bashing their cute faces in? Aug 12 19:21:27 the most trivial is bitbang.c Aug 12 19:21:43 but with the shiny pate and the audi, mistaking you for a playboy is easy Aug 12 19:21:52 not to mention that foreign accent chicks dig Aug 12 19:22:09 da Aug 12 19:22:26 lets ask ze wife Aug 12 19:22:57 * mdp tries to decode the "foreign accent" comment from koen's perspective Aug 12 19:22:58 ;) Aug 12 19:24:02 californian and hawaiian people say I have a texas accent Aug 12 19:24:15 texas people don't really speak to me after I mention my fondness for umbrella drinks Aug 12 19:24:40 the weirdest case of wtf english accent was that .de eurovision song a couple years back Aug 12 19:25:07 http://www.youtube.com/watch?v=8QSgNM9yNjo Aug 12 19:25:51 that's indeed weird Aug 12 19:26:11 that reminds me, need to further my research on mlocke's accent Aug 12 19:27:12 koen, unpossible to trace...military kid that moved about Aug 12 19:27:53 not unpossible Aug 12 19:27:56 we have prism Aug 12 19:28:21 mlocke has "nothing to hide" :P Aug 12 19:28:28 prism, where locate mlocke's accent on the map... Aug 12 19:28:42 s/where/ Aug 12 19:28:44 s/where// Aug 12 19:28:45 bah Aug 12 19:28:47 can't type Aug 12 19:29:28 mluckham, http://sourceforge.net/p/openocd/code/ci/master/tree/src/jtag/drivers/amt_jtagaccel.c Aug 12 19:30:12 that looks interesting Aug 12 19:30:35 although the bitbang approach could be useful at first Aug 12 19:30:41 yes Aug 12 19:30:52 you can try a two pronged approach Aug 12 19:31:08 first, get open ocd running with a simple bitbanged (or sysfs gpio) Aug 12 19:31:38 http://sourceforge.net/p/openocd/code/ci/master/tree/src/jtag/drivers/OpenULINK/README Aug 12 19:31:51 the above is something like our stuff Aug 12 19:31:54 i guess gpio would get me familiar with how to use openocd targeting the launchpad Aug 12 19:32:03 right Aug 12 19:32:14 I don't even care about launchpad atm Aug 12 19:32:21 just get it running Aug 12 19:32:30 no, but I need something to see results Aug 12 19:32:41 gdb not good enough? Aug 12 19:32:57 no prob, I can use gpio to see pin states changing on the logic analyzer Aug 12 19:33:17 then shift same functionality to pru Aug 12 19:33:20 I don't want you to get bogged down in fixing problems that are not part of the project Aug 12 19:33:51 the thing is, lacking an interface definition for the code I need to learn enough about how to use OpenOCD to create something sane Aug 12 19:33:57 btw, it looks like that even the hardware accelerated jtag interfaces ain't too fast Aug 12 19:34:08 go with the bitbang/sysfs stuff first Aug 12 19:34:21 "Maximum achievable TCK frequency is 182 kHz for ULINK clocked at 24 MHz." Aug 12 19:34:38 for speed we'll need to come up with an efficient arm-pru protocol Aug 12 19:34:49 http://sourceforge.net/p/openocd/code/ci/master/tree/src/jtag/drivers/OpenULINK/src/jtag.c Aug 12 19:35:39 yeah, like that Aug 12 19:36:34 i had been looking at openjtag http://openocd.sourceforge.net/doc/doxygen/html/openjtag_8c.html Aug 12 19:38:22 so: gpio bitbang -> pru bitbang -> pru+cpld bitbang -> then revisit? Aug 12 19:38:41 or leave out pru+cpld, if there's no board available yet Aug 12 19:41:04 pru bitbang is not going to be 'call pru to toggle pin' Aug 12 19:41:38 until I know more about jtag, that's all it could be Aug 12 19:41:48 start learning :) Aug 12 19:42:03 somewhere in the middle (?) now :) Aug 12 19:42:46 well, middle for the project (I think I can code gpio + pru bitbang solutions) Aug 12 19:42:56 but daa-daa goo-goo for jtag Aug 12 19:43:38 the actual jtag wire protcol looks simple enough (TMS, TCK, TDI, TDO, TRST, SRST) Aug 12 19:44:01 OpenOCD does the heavy lifting for knowing WHEN to operate those signals Aug 12 19:44:02 yes Aug 12 19:44:07 and how Aug 12 19:44:22 I guess you'll need to understand how the bulk transfer stuff happens Aug 12 19:44:32 if you got to accelerate something it's that Aug 12 19:44:51 right - then the vrings come into play Aug 12 19:45:09 right Aug 12 19:45:18 get cracking Aug 12 19:45:21 * panto cracks the whip Aug 12 19:45:24 ow! Aug 12 19:46:37 do you have some idea of the performance for writing 1 byte with downcall/interrupt vs 1 byte to vring - how fast the PRU can react? Aug 12 19:47:05 the downcall is probably going to be as fast as the vring Aug 12 19:47:26 that's what I thought, for that case Aug 12 19:47:52 you can even do bulk transfers Aug 12 19:47:53 dunno Aug 12 19:47:59 it all depends Aug 12 19:48:08 this is all brand new stuff Aug 12 19:48:23 do you mean, downcall bulk transfers? Aug 12 19:48:39 the downcall is just an rpc mechanism Aug 12 19:48:52 you can just as easily pass the buffer Aug 12 19:48:56 k Aug 12 19:49:02 the PRU code is going to be just as fast Aug 12 19:49:13 the only diff is that the linux side will block waiting for the transfer to end Aug 12 19:49:25 which could be not what you want Aug 12 19:49:39 but again, it depends Aug 12 19:49:58 it's much easier to do than vrings Aug 12 19:50:38 well, i can get started now - will share this with Tom when he appears Aug 12 19:51:36 and for PRU bitbang, i'll create the signal-level sysfs attribute names, we discussed the other day, and use downcalls Aug 12 19:51:41 gpio firt though Aug 12 19:51:45 first Aug 12 19:52:15 is jj2baile still around? Aug 12 19:52:28 jj2baile, ping Aug 12 19:54:56 tx panto Aug 12 20:00:37 np Aug 12 20:33:50 oh where oh where has the GSoC students gone Aug 12 20:37:31 ds2, hopefully they're all busy working :) Aug 12 20:41:33 they are students Aug 12 20:42:01 it seems both students I been helping have not been seen in the last few days Aug 12 20:42:33 ds2, the sirens of booze + young summer sex beckon them Aug 12 20:50:28 ah I see Aug 12 20:51:58 can you blame them? **** BEGIN LOGGING AT Mon Aug 12 22:07:56 2013 Aug 13 01:42:21 ka6sox, ping **** ENDING LOGGING AT Tue Aug 13 02:59:59 2013