571 karma · joined Jan 21, 2013 (13y ago) · 134 submissions
comment 5y ago · link · parent
comment 5y ago · link · parent
This can be a slippery slope. It could easily be mis-interpreted as "Hey, I payed $3 last month so I want you to prioritize my bugs". Generally I think for these kind of sums it should be clear that you donate and pay as a thank-you for what's already there, not for what (in your opinion) should come. Using it to highlight issues would work against that IMHO.
comment 6y ago · link · parent
test.c:
int main(int argc, char **argv) {
printf("hello world\n");
return 0;
}
Dynamic linking (glibc): $ gcc -O2 -Wl,--strip-all test.c
$ ls -sh a.out
8.0K a.out
Static linking (glibc): $ gcc -O2 --static -Wl,--strip-all test.c
$ ls -l a.out
760K a.out
Static linking (musl): $ musl-gcc --static -O2 -Wl,--strip-all test.c
$ ls -sh a.out
8.0K a.outcomment 6y ago · link · parent
Indeed true, good point.
> That wouldn't help because two threads could be running at the same time on different cores against their respective L1 and store buffers.
Of course, this was related to the cost of switching coherency protocol during context switch. But as you say the overhead of just making it switchable is prohibitive in itself.
comment 6y ago · link · parent
I would assume that a more strict memory model would be enabled only for processes that needs it (ie, Rosetta translated ones). So a cpu-flag is set/cleared when entering/exiting user mode for those processes. Does this require a separate/special cache coherency protocol? A complete L1d flush when entering/leaving these processes (across all CPUs)? Not and expert in this field and it feels complicated for sure. Is it worth it for just emulating "legacy" applications during a transitional period? Perhaps Apple can pull it off though.
comment 6y ago · link · parent
void store_value_and_unlock(int *p, int *l, int v)
{
*p = v;
__sync_lock_release(l, 0);
}
on x86_64 compiles to: mov dword ptr [rdi], edx
mov dword ptr [rsi], 0
ret
vs on arm64: str w2, [x0]
stlr wzr, [x1]
ret
Notice how the second store on ARM is a store with release semantics to ensure correct memory ordering as it was intended in the original C code. This information is lost as it's not needed on x86 which guarantees (among other things) that stores are visible in-order from all other threads.comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
Came here to say this. Having a build delay for an average incremental change (edit a single file / compilation unit) be less than 2 seconds is extremely important for my productivity. Whenever I happen to do mobile development (this goes for both Xcode and Android Studio), having to wait 5+ seconds for the app to launch makes me lose focus.
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
Somewhat related, I've also used buildroot in both AWS and GCP to run workloads from read-only system images. Quite liberating in my opinion. No ssh, no ansible, etc. Build the image, launch it and off it goes. GCE even allows you to use the same boot disk, if mounted read-only, for multiple instances, perfect for these type of images.