Recent submissions

Comment · 3 years ago
jax and whisper-jax support running on GPUs in addition to TPUs, this particular demo just runs on a TPU.
Comment · 3 years ago
what kind of lasers / lidar technology is this that is not reflected by trees?
Comment · 3 years ago
altra is also > 2 years old, so the age of the apple chip doesn’t matter

Neoverse N1 is hardly a dog. It’s a decent enough core in a server processor that has 80 of them.

Altra is not intended to compete core for core with any laptop/desktop/workstation processor.

Comment · 3 years ago
Comment · 3 years ago
What you describe (multiple cores sharing the same lock) sounds like true sharing, not false sharing. False sharing means cache line contention is when cores are using separate structures (i.e. not actually shared) which happen to be on the same cache line.

Compare and swap still typically requires the cache line to bounce around between cores, so if that’s the primary cost of locks for you it seems like compare and swap doesn’t really fix the problem of frequent synchronization between cores.

Comment · 3 years ago
Comment · 3 years ago
Yes, this only works for user space stacks, but that is sufficient since with ORC kernel stacks are solved (IMO) and it avoids all the issues with trying to mlock debuginfo of all processes that you mentioned. The NMI handler would still unwind the kernel stack.

> Why not implement your approach and mail it to LKML :-)

because this would still be an in-kernel dwarf unwinder and I would expect an instant reject, and because I am lazy and/or don’t care enough about this problem or linux to work on it. Even if people could be persuaded, I don’t have the interest or temperance to debate this with LKML.

Comment · 3 years ago
I don’t understand your concern - what about this would involve one process sniffing another process’s memory? The kernel would still be doing the unwinding, just not in the NMI handler.
Comment · 3 years ago
because this is about PMU based sampling, which involves triggering interrupts at some interval and doing the sampling while handling the interrupt
Comment · 3 years ago
It is not required to unwind the user space stack in the NMI handler. It can be done later before returning to user space in a context that can handle faults.
Comment · 3 years ago
See also https://lists.fedoraproject.org/archives/list/[email protected]... - the botan phoronix results with frame pointers were probably measuring debug builds.
Comment · 3 years ago
I cannot comment on whether “everyone” is oblivious but yes, this is still the case - frame pointer based unwinding sometimes skips the caller when the IP is sampled before the callee sets up a frame.

This is also common for samples in leaf functions.

compiler & tool chain folks tend to think (quite justifiably imo) that this and similar stuff is fine because dwarf allows reconstructing everything perfectly. The problem is just that the user experience of dwarf-based unwinding is poor, because the only implemented method in Linux is sampling the contents of the stack and doing the unwind in post processing.

Comment · 3 years ago
IIUC Windows implements in-kernel unwinding using FPO debug data embedded in every executable.
Comment · 3 years ago
Register renaming doesn’t significantly address the impact of reducing the number of architectural registers available to the compiler. With fewer register names available, the compiler will spill locals to stack more often, and register renaming doesn’t help - memory renaming is needed to really mitigate this.

But i agree the impact of preserving frame pointers is generally quite small and doesn’t often actually need mitigation - on amd64 there’s not much impact from losing 1 more of 16 arch registers.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton