<rjo>
sb0_: avago makes sfp (sfp+, qsfp, ...) modules. but milling open an fpga and glueing a transciever onto it sounds like something for hackaday...
travis-ci has joined #m-labs
<travis-ci>
m-labs/artiq#319 (master - 47191ed : Robert Jordens): The build passed.
<whitequark>
rjo: 0.6s does not sound unreasonable to me
antgreen has quit [Remote host closed the connection]
antgreen has joined #m-labs
Gurty has quit [Quit: Kooll ~o~ datalove <3³\infty]
acathla has quit [Changing host]
acathla has joined #m-labs
<sb0_>
whitequark, caching would probably be needed at some point then
<whitequark>
sure. it'd be just a map from text to text
<sb0_>
what about things like
<sb0_>
for i in range(xxx): execute_kernel(i) ?
<sb0_>
with the value of i used in the kernel
<whitequark>
wouldn't it just become a parameter?
<sb0_>
and the for loop on the host
<whitequark>
I mean, that shouldn't even result in reuploads, much less recompiles
<sb0_>
the simplest solution results in recompiles and reuploads.
<whitequark>
well, the simplest solution is wrong then
<sb0_>
others take more time
<whitequark>
assuming the python code doesn't change (i.e. we don't cache across reruns), that would literally be one if statement
<whitequark>
I don't see the problem
<sb0_>
having a protocol to pass the parameters to the runtime over the network
<sb0_>
having the runtime pass those parameters to the compiled code
<sb0_>
etc.
<whitequark>
don't you already have that for the RPCs?
<whitequark>
which reminds me
<sb0_>
I didn't say it's intractable, I said it takes time
<whitequark>
can you describe what kinds of interactions with the outside world the kernel should have? seeing as currently, new-py2llvm only has computation
<whitequark>
and a dummy syscall function
<sb0_>
yes, that's it... everything goes through syscall
<whitequark>
oh
<sb0_>
and eh functions
<sb0_>
+ compiler-rt (soft-fp & co)
<whitequark>
that's not really "interaction", but sure
<whitequark>
hm
<whitequark>
so how is that self.set_result("whatever") thing supposed to work?
<sb0_>
syscall
<sb0_>
and the runtime does the RPC
<sb0_>
the inline transform replaces non-kernel function calls with syscall("rpc", ...)
<sb0_>
should I be worried that you will rewrite all of this again and it will take months?
<whitequark>
I don't think this needs to be changed
<whitequark>
only thing I'd do is add an explicit type for the "self" inside the kernel, calls on which would result in proxying
<sb0_>
(only store it, via RPC, at the end of kernel mode)
<whitequark>
hm, so the proxy object would have attributes
<whitequark>
sure
<sb0_>
those attributes need initialization with the values they had on the host upon entering kernel mode, too
<sb0_>
and some of those are constant, others are not
<whitequark>
which effects do you want constness to have?
<sb0_>
for example, the DDS clock frequency is constant and benefits from SCCP
<sb0_>
that's one reason why the current code inlines and recompiles everything. it's not "just" a parameter, and I hope you see the problem now...
<whitequark>
I see
ohama has quit [Ping timeout: 256 seconds]
mumptai has joined #m-labs
ohama has joined #m-labs
Gurty has joined #m-labs
ylamarre has joined #m-labs
antgreen` has joined #m-labs
jaeckel has quit [Ping timeout: 248 seconds]
antgreen has quit [Ping timeout: 248 seconds]
bentley` has quit [Ping timeout: 248 seconds]
jaeckel has joined #m-labs
bentley` has joined #m-labs
ylamarre has quit [Quit: ylamarre]
antgreen` has quit [Ping timeout: 264 seconds]
<rjo>
whitequark: reasonable as a prediction or reasonable as an achievable speed? do you expect that time to be linear in the size of the code? and would a factor if 2 be reasonable for the transformations, llvm passes and assembler? then we need to think about caching and other ways to minimize kernel swaps.
<whitequark>
rjo: by "reasonable" I meant "I don't see a reason to try and make it faster", but sb0 has just provided such a reason
<whitequark>
generally speaking... most things in the pipeline are O(n)
<whitequark>
I think some of my debug asserts may be making it quadratic. you can run it as python3 -O -m artiq.compiler.testbench.irgen
<whitequark>
so that asserts would be disabled
<whitequark>
I suggest looking at the performance we'll be getting in practice before diving and optimizing this. it shouldn't be too bad
<whitequark>
oh, and LLVM is obviously massively faster than Python. its contribution will be miniscule compared to Python code
<rjo>
by "it shouldn't be too bad", do you mean 0.1 s for about 1000 lines to get it from string to binary?
<rjo>
these benchmarks are on the todo list for september. it would be great if they could be implemented early so that we can keep track of how things develop instead of being surprised afterwards.
<whitequark>
the pipeline is essentially complete (except the interleaving thing, but it not expensive)
<rjo>
is it correct that with PIC we could have multiple kernels (in from the pipeline of experiments or multiple kernels per experiment) in memory and switch between them quickly?
<whitequark>
as far as I understand -fPIC will not bring any functional improvement in that area because the current scheme of loading a relocatable file already makes that possible
<whitequark>
using -fPIC and emitting a shared library will rather simplify the dynamic linker and add .rodata/.eh_frame support in one big sweep
<rjo>
"relocatable file" is different from PIC?
<whitequark>
oh, yes.
<whitequark>
relocatable file is something that's normally only an input to the static linker. it is generally too complex to be easily/conveniently loaded by the dynamic linker
<whitequark>
whereas PIC is a mode of emitting machine code where the code itself has no relocations, and the global data access is performed through a special table
<whitequark>
shared libraries are usually built in PIC mode, so that the code and rodata pages can be shared between processes
<whitequark>
but you can actually build shared libraries without PIC. that increases memory consumption and load time, so it is not generally done.
<rjo>
and the work that needs to be done to run relocatables is resolving all the symbols, within the object and w.r.t. the runtime?
<whitequark>
yes
<whitequark>
well, all relocations
<whitequark>
(not all relocations have an associated symbol. e.g. you could write code that takes an address inside a rodata array)
<whitequark>
whereas with the shared libraries, you mostly just map them into memory, and then only resolve external symbols
<rjo>
i see. then we could do that kernel juggling already with relocatable code?
<whitequark>
which is a) less work b) less types of relocations to support
<whitequark>
yes
<whitequark>
I was actually assuming we already do
<rjo>
assumptions, assumptions... do you have the pipistrello board now?
<whitequark>
no, the german post seems to have lost it
<whitequark>
the GERMAN post. of all things, seriously
<rjo>
they have no special reputation with me.
<rjo>
so. what are we doing?
<whitequark>
I will be using the or1k simulator
<rjo>
did daniel send another one or are you waiting for Deutsche Post to find it?
<rjo>
are you in .hk now?
<whitequark>
or more like "an or1k simulator", since there are several
<whitequark>
I am in .ru still, waiting for the US embassy to return my passport
<rjo>
ha!
<whitequark>
in worst case, I can demand it to be returned before they make any decision on the visa
<whitequark>
and fly to HK.
<whitequark>
I still have a few days work which I can do without hardware, though
<rjo>
does the simulator cover enough ground? it would be single cpu, no rtio peripherals, no rtio time counter etc.
<whitequark>
it will allow me to debug libunwind.
<whitequark>
well, assuming it needs debugging. hopefully not
<whitequark>
beyond that, yes, I will need real hardware.
<whitequark>
libunwind and the dynamic linker
<rjo>
do you share the real hw in .hk with sb0?
<whitequark>
I guess
<rjo>
if you need hardware before you get to .hk, let daniel know.
<rjo>
is that passport hostage still from the (attempted) visit here? ;P
<whitequark>
rjo: (hardware) ok
<whitequark>
well
<whitequark>
probably not much point in that, since mail is for sure slower than airplanes
<whitequark>
and not really much cheaper, looking at some mail sebastien sent me
<whitequark>
($130 for a piece of paper)
<whitequark>
(I can seriously get a ticket to HK for less than that)
<whitequark>
as for the passport, yep.
<attie>
whitequark: re the german post, they were on strike for 3-4 weeks and just restarted transport of packages last week, so if your board went missing recently it might still turn up
<whitequark>
attie: a) I stand by my point that they're assholes b) it was sent at 29th and there have been zero tracking # updates at deutschepost and russianpost alike
<attie>
yeah tracking was disabled during the strike
<whitequark>
double the a), then
<attie>
even the parcels that went through normally didn't get updated afaik
<attie>
well it's gotta hurt or it's not a real strike :)
<cr1901_modern>
Workers shouldn't strike b/c it's their own damn fault that they agreed to those conditions. /s
<whitequark>
yeah. those poor postal workers. only getting a pension that's ~4x the best salary I could ever get in .ru
<attie>
well sure but I imagine your apartment also costs 1/4th etc...
<whitequark>
4th most expensive in the world
<whitequark>
well, two years ago it was, before the war that crashed the currency
<attie>
clearly the solution is to strike for better salaries in russia then :P
<whitequark>
dunno about berlin but moscow is fairly accurate in that table
<larsc>
berlin is quite cheep though in comparison to other major cities in germany
<whitequark>
"Monthly rent for 85 m2" see this is why I'm living in a closet which is technically inside the city but is treated by all delivery and taxi companies as outside
<whitequark>
which is still ~1/4 of that number
<attie>
well you'll fit right in in HK then :)
<cr1901_modern>
$2000/month... ick
<attie>
also 85m2 is pretty big, who came up with that as the default size, americans?
<cr1901_modern>
Yes, we need it to store our huge girths
<attie>
also postal workers don't live in berlin, try some other cities like frankfurt, dortmund, munich
<larsc>
for a full family 85m2 isn't that much
<attie>
hm, when I think "average apartment" I think 50-60m2
<attie>
or when in france, <40 :P
<whitequark>
mine is ~30, I pay ~$700 (well, ~$470 at current rate) for it. a family of 3 could be expected to live in it.
<whitequark>
it's been the cheapest one which did not have a completely horrible furnishing at the time I started renting it
<whitequark>
that's actually a fairly good price too. was expecting worse.
<cr1901_modern>
$470 at current rate, i.e. post-crash?
<larsc>
I have 35 pay 550 (without utilities) in the most expensive city in germany
<whitequark>
yes, post-crash
<whitequark>
larsc: is it in a 'good' place? or in some hole you need a hour and a half to get to the city center?
<larsc>
10 minute to main station and town center by underground train
<larsc>
its probably not considered the best area, but I'm not having any problems with it
<whitequark>
multiply the cost of mine by two and you'll have a comparison
<whitequark>
the rent in moscow is absolutely outrageous
<larsc>
if I'd get a new similar flat now I'd probably pay 150 euros more
<attie>
how can people pay the rent if salaries are so low?
<whitequark>
they can't
<attie>
how does that work?
<whitequark>
there is a very high rate of homeownership among people born in 70s due to past state policies
<larsc>
poorly
<whitequark>
and their children, well, don't move out.
<whitequark>
unless they're programmers with high salaries or something.
<whitequark>
in other words, yes, 'poorly'.
<attie>
how does that not lead to empty houses? who is renting these places?
<attie>
or is there just generally not much of a rental market?
<whitequark>
some people are getting mortgages, of course
<whitequark>
a lot of people, for that matter
<whitequark>
but the rental market is small, and given that a mortgage in moscow is getting you in a 15-30 year obligation... well
<attie>
ok so that's somewhat similar to the US then?
<whitequark>
no.
<whitequark>
first, US has houses. moscow only has apartments. apartments stacked 15-20 stories high
<whitequark>
and densely packed with assholes doing home renovation which will haunt you with persistent drilling for years
<whitequark>
(it is legal to drill from 7:00 to 23:00 Mon-Sat and sometimes i am woken up by the walls literally vibrating)
<whitequark>
second, US is comparatively decentralized. RU has... moscow and wilderness
<attie>
hah, we have some of these too.
<attie>
sounds a lot like HK actually
<whitequark>
but you aren't tied to them with solid reinforced concrete with perfect fucking sound conduction qualities
<whitequark>
I've spent the previous two weeks sleeping at day and working at night because it was downright impossible to get anything done at all with all the drilling
<whitequark>
naturally, I have discovered that some *other* asshole is playing loud music, or a music that is particularly well conducted, I don't know, starting at 23:00 and ending at 06:00
<whitequark>
at Tuesday
<cr1901_modern>
Note to self: Don't live in Russia. Only visit to tour the exclusion zone.
<attie>
heh. you can compare notes with sb0 one of these days, he will be able to tell how bad it is during the day
<whitequark>
anyway, RU is very centralized. anything that's not in moscow is devalued, quite unfairly so
<whitequark>
so on one hand, I could rent something outside Moscow for practically pocket change. on another, there's nothing there
<whitequark>
and I don't have a car
<whitequark>
so the property costs are like... $1700 per square meter at current rate, for mortgage for an apartment, is fairly cheap
<whitequark>
$51k for my shitty apartment in the shittiest, almost the most remote part of the city. more like $80k at pre-war rate.
<attie>
hm yeah that is much more affordable than these rent prices
<whitequark>
i live next to a garbage incinerator and a landfill.
<cr1901_modern>
THat's still less than 6 digits
<whitequark>
by 'next to' i mean that the landfill is five minutes of walk.
<attie>
that's not as important as: can you smell it?
<whitequark>
oh, and the houses were built on the fields where they evaporated sewage.
<whitequark>
you could smell that part for the first year when I moved in
<whitequark>
and the neighbourhood looks like someone has tossed a dozen concrete pillboxes around the landscape. it doesn't *have* trees. just concrete
<attie>
we have a 5h layover in moscow tomorrow, too bad we can't get out of the airport to look at it
<whitequark>
I say you're doing yourself a favor
<attie>
what the airport is so great?
<larsc>
I have BMW around the corner, if the wind is right I get to smell paint all day long, although it has gotten a lot better lately
<whitequark>
no, the airport is absolutely godawful
<whitequark>
well, there are three
<whitequark>
VKO is the literal worst I have ever seen
<whitequark>
the other two are just bad
<whitequark>
I spent an absolutely unforgettable night in VKO, with no air conditioning, and with a platoon of soldiers
<whitequark>
can you *imagine* the smell
<whitequark>
I am pretty sure it either doesn't have air conditioning by design, or the management is downright sadistic. Or both.
<attie>
wouldn't you rather have spent a few hours walking the streets?
<whitequark>
streets?
<whitequark>
it's in the middle of nowhere, and I took the last train to VKO there was
<whitequark>
and there wasn't a train in the morning before my flight
<whitequark>
attie: also, while saying that $51k for an apartment is 'affordable', keep in mind a typical russian cannot afford the rent I pay
<whitequark>
the reason people stay with their parents until thirties is that the mortgage is absolutely crushing
<rjo>
whitequark: you should have worked your way up within Наши. that could have paid off.
<rjo>
why was Deutsche Post involved at all to get the thing from .us to .ru?
<whitequark>
sebastien was in germany when we arranged that
<rjo>
ah.
<cr1901_modern>
Наши?
<whitequark>
a pro-state extremely nationalistic political group. not unlike hitlerjugend
<rjo>
lmgtfy
<cr1901_modern>
rjo: All the results are in Russian T_T
<rjo>
whitequark: once you get your hands on hardware, the first thing might be to write the glue gateware to jtag to the cpu.
<whitequark>
rjo: the thought occured to me.
<whitequark>
well, in fact, I boggle a bit as to how the hell you got anything done without jtag.
<rjo>
yes. you could gdbproxy it.
<whitequark>
isn't that the sole point of having a JTAG on a CPU core?
<whitequark>
I mean, sure
<rjo>
but openocd has a bunch of code for openrisc and mor1k has the debug unit. it does not look like a lot is needed.
<rjo>
yes. i have little experience with it but it seemed to me that that is something you can do.
<whitequark>
I've used it when I did osdev on x86
<rjo>
but hardware jtag-gdb would probably be nicer.
<whitequark>
it's fairly insensitive to errors but needs at least some working interrupts if you want single-stepping and such
<whitequark>
plus porting to or1k
<whitequark>
JTAG is probably a better way to spend that time
<cr1901_modern>
So while(true) is undefined behavior and assigning zero to something that aliases the NULL pointer on most archs is a no-op o.0;
<whitequark>
you can't assign to byte 0 in C, yes
<whitequark>
or call it, for that matter. or read it.
<cr1901_modern>
Something I'm wondering: I'm not sure if (int *) 0, becomes the NULL pointer or a pointer to address 0 on an arch where the bit representation of NULL isn't all zeros (which is basically none anymore, but still)
<whitequark>
the NULL pointer
<whitequark>
yes, this means that integer-to-pointer conversion is not "free"