Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
davidtgoldblatt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
9 ms
·
31.
▲
by
davidtgoldblatt
10y ago
> You mean mode switch? Cheaper, but yes, still costly. Hah, yes. > Which means we can calculate the cost to be ~1.1 us per probe (on my system). Anyone know what XRay is clocking in at? I'm not at Google any more to check (and h
32.
▲
by
davidtgoldblatt
10y ago
Most of XRay was written before uprobes was merged into the Linux kernel (and well before such kernels were widely available). I don't think any of the alternatives you mentioned are Pareto superior to XRay when considering all of &quo
33.
▲
by
davidtgoldblatt
11y ago
Just to emphasize the truly remarkable thing here: the winning (SIMD) solution takes about 1ns per word sorted -- just over 3 machine cycles to sort 16 nibbles. Note that even extracting a nibble from a word in the naive manner would take
34.
▲
Nibble Sort Denouement
(blog.regehr.org)
2 points
by
davidtgoldblatt
11y ago
|
0 comments
35.
▲
Re: C as used/implemented in practice
(article.gmane.org)
114 points
by
davidtgoldblatt
11y ago
|
111 comments
36.
▲
by
davidtgoldblatt
11y ago
Looks good to me; that's essentially the solution I had in mind (though, I think you have a race on NintBucket::waiters in modify and append_cv). Using a custom two-mutex lock class and condition_variable_any is particularly clever, I
37.
▲
by
davidtgoldblatt
11y ago
I think his solution is a little bit tongue in cheek - it shows how much easier it is to solve using transactional memory compared to low-level concurrency primitives. So it cheats by using very powerful techniques instead of the very weak
38.
▲
by
davidtgoldblatt
11y ago
My bad; Strilanc's interpretation is correct. I updated the wording to hopefully be a little clearer.
39.
▲
A threading riddle
(dgoldblatt.com)
27 points
by
davidtgoldblatt
11y ago
|
19 comments
40.
▲
Going from lock-free to wait-free
(dgoldblatt.com)
8 points
by
davidtgoldblatt
11y ago
|
0 comments
41.
▲
by
davidtgoldblatt
11y ago
Many processors have undefined behavior. The x86 manuals, for instance, specify (or rather, explicitly decline to specify) lots of it: - Values of certain flags after certain instructions - The result of bsf or bsr on 0. - I think there are
42.
▲
by
davidtgoldblatt
11y ago
The longer I work on performance teams, the more I agree with the "performance always matters" point of view[1]. In large binaries (or at least, in the large binaries I've worked on), we don't see a few tight loops takin
43.
▲
by
davidtgoldblatt
11y ago
Nice work! I have some suggestions for future improvements: - Your CPUCycle class doesn't actually do backoff. atomic_thread_fence(m_o_relaxed) is a no-op, and at least one compiler (recent clang versions) will optimize the loop away e
44.
▲
by
davidtgoldblatt
12y ago
BTW, the problems with thread registration you mention can be solved using cpu-local storage instead of thread-local. This can also save space usage and collection time since, assuming short lifetimes for guard objects, the total maximum nu
45.
▲
by
davidtgoldblatt
12y ago
This isn't really a great solution though, since it pushes the problem of ensuring FIFO ordering outside of the queue and onto the user; but being FIFO is entirely the point of the queue data structure. If your queue doesn't provi
46.
▲
by
davidtgoldblatt
12y ago
This doesn't seem to correctly implement a queue to me? Suppose thread A enqueues an item, signals somehow to thread B that thread B may proceed, and then thread B enqueues an item. There's no guarantee that thread A's item w
47.
▲
by
davidtgoldblatt
12y ago
By the way, in case anyone was curious about the comment in the article: > Since fences are so expensive, couldn’t you add a dummy assembly instruction that prevents the X86 from re-ordering? So the pseudo assembly for thread 0 might bec
48.
▲
by
davidtgoldblatt
12y ago
The relative performance of a lock'd instruction and an mfence will vary across processors and workloads. On my machine, simple peterson locking is ~10% faster when using an mfence as opposed to an xchgl. Maybe if the non-locked code b
49.
▲
by
davidtgoldblatt
12y ago
To clarify: the strategy in the post doesn't actually work (or at least, is not guaranteed to work in every conforming implementation): the "volatile" only applies to the read of the function pointer, not to the execution o
50.
▲
by
davidtgoldblatt
12y ago
Even if you're read mostly, R/W locks often do a very bad job. If your critical sections are short (say, in a hash map, or fine-grained locks in a linked list or tree, or even a whole structure lock on a small tree or array), then
51.
▲
by
davidtgoldblatt
12y ago
This isn't true for either of the common high performance mallocs. tcmalloc doesn't support mremap at all, and jemalloc disables it in its recommended build configuration. glibc will remap, but any performance gains that get reali
52.
▲
by
davidtgoldblatt
12y ago
Sorry for being unclear; this is the comparison I was trying to draw. The new techniques look like "magic" the way SVMs did when they first became popular. It triggers excitement the way it did when people realized that they could
53.
▲
by
davidtgoldblatt
12y ago
I'm don't have a ton of expertise in the area, but I chat sometimes with people who do, so take this as a reasonably informed but lay opinion. By and large, most uses of machine learning don't get much value from better machi
54.
▲
by
davidtgoldblatt
12y ago
Something I've been wondering since the Forbes article - is inappropriate investor behavior illegal? The things described there would unambiguously be sexual harassment if someone's manager did them; it seems unfortunate if the on
55.
▲
by
davidtgoldblatt
12y ago
For those interested in additional technical details of high-performance garbage collection, the book cited (The Garbage Collection Handbook: The Art of Automatic Memory Management) is a fantastic reference. It's one of the best-writ
56.
▲
by
davidtgoldblatt
13y ago
If you're wondering why you've heard of him for non-entrepreneurial reasons, Cheriton has made major academic contributions in distributed systems; he's an author on the leases paper, the V operating system, and the "Und
57.
▲
by
davidtgoldblatt
13y ago
getcontext and setcontext also keep track of signal state, which involves a syscall.
58.
▲
by
davidtgoldblatt
14y ago
Charles Schwab (which, security practices aside, is a fantastic place to bank) doesn't (as far as I can tell) store your password unhashed. However, they manage to make this irrelevant, because passwords are restricted to between 6 and 8
59.
▲
by
davidtgoldblatt
14y ago
I've yet to find one of these types of services that you can't access by spoofing the MAC address of a real customer. A while back, Intel removed MAC address spoofing from some of its wireless cards through a driver update, citing vague "se
60.
▲
by
davidtgoldblatt
14y ago
This is only tangentially related to the article, but if you'd like to see a nice interactive visualization similar to the ones it includes, http://cs.stanford.edu/~karpathy/svmjs/demo/ is a great one. There are similar visualizations for
More ›