Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
davidtgoldblatt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
davidtgoldblatt
2y ago
It kinda depends; you only do the membarrier when you're about to sleep anyways, and the non-expedited membarrier() call is just a synchronize_rcu(), so it's not that drastically more expensive than a futex wait. You don't ne
2.
▲
by
davidtgoldblatt
2y ago
There's two I've tried to do this: - On the wait side, do the CAS to set the "waiter present" bit. Down unlock, do a (relaxed) read of the lock word, and if "waiter present" isn't set, just do a release st
3.
▲
by
davidtgoldblatt
3y ago
> There's clearly an opportunity for a much longer talk, this teases that Paul (McKenney, of Linux fame) will have a very different take and we don't hear what it is, maybe that was presented at another session of this conferen
4.
▲
by
davidtgoldblatt
4y ago
> Maybe there is a way to paper over this in the glibc implementation of free_sized (rather than calling free unconditionally), and still do something useful for the glibc allocator. I don't know. We emailed about this a little cont
5.
▲
by
davidtgoldblatt
4y ago
My usages are similar to yours, but new C standards still benefit me because I can opportunistically detect and make use of new features in a configure script. To use my baby as an example: free_sized(void *ptr, size_t alloc_size) is new in
6.
▲
by
davidtgoldblatt
6y ago
Of particular interest is section 20.18 -- "Mirroring memory operands"; extending (something like) register renaming to memory.
7.
▲
by
davidtgoldblatt
6y ago
> Maybe there's some reason this doesn't work, or maybe the performance improvements aren't worth the effort? I work on an allocator, and I've lobbied (Linux) kernel people for this over the years. I think everyone mo
8.
▲
by
davidtgoldblatt
7y ago
I can't imagine how pissed off I'd be if I survived a nuclear winter and traveled hundreds of miles to read the prophesied guidestones that could save us all, only to find out that they had several weird eugenicist rules but zero
9.
▲
by
davidtgoldblatt
7y ago
Example usage on some code with interesting pipelining + resource contention properties: https://godbolt.org/z/11oyav (The code is from the stream vbyte repo; see https://lemire.me/blog/2017/0
10.
▲
by
davidtgoldblatt
8y ago
Depending on what exactly you mean by "hand it a block of memory to manage", you can do this with jemalloc's extent hook functionality. Though that's meant for "I have some long-lived data structures, I want all the
11.
▲
by
davidtgoldblatt
8y ago
Oh yes; while certainly mismatched new[]/delete has been a source of problems since forever, what I mean specifically is the new types of exploits possible with the "operator delete(void* ptr, size_t sz)" overload (and its ar
12.
▲
by
davidtgoldblatt
8y ago
Another fun attack vector that I don't think has been well explored yet involves the use of C++ sized deallocation functions. If a base class is missing a virtual destructor, or if an array allocated with new[] is deallocated with dele
13.
▲
by
davidtgoldblatt
8y ago
(As background, I'm a jemalloc developer; reposting my twitter comment on the same article): This is quite a bad way of doing a malloc benchmark -- getting realistic activity patterns is critical (see e.g. Wilson et al.'s survey).
14.
▲
by
davidtgoldblatt
8y ago
It's implementable with a kernel driver on Solaris because of its scheduling hooks. (This was done in the "Mostly Lock-Free Malloc" paper).
15.
▲
by
davidtgoldblatt
9y ago
My experience working on an OSS project has been that the biggest thing missing from the bug-reporter side isn't phrasing or planning, just dedication. If someone doesn't post a useful initial bug report, we can still probably wor
16.
▲
by
davidtgoldblatt
9y ago
All the volume 4A listings are in MMIX, and there's "The MMIX Supplement" by Martin Ruckert, redoing the first three volumes in MMIX, which I believe is regarded as the authoritative edition. As to the ultimate versions (or e
17.
▲
by
davidtgoldblatt
10y ago
tl;dr for people familiar with the C/C++11 MM: It's very similar. `relaxed` -> `Opaque`, `seq_cst` -> `volatile`. `acquire` and `release` map more or less the same. Interestingly, there's no equivalent to C++ `acq_rel`
18.
▲
by
davidtgoldblatt
10y ago
I think you're on the right track (i.e. viewing it as a permutation, and looking at the cycle decomposition of that permutation). Try indexing from 0 instead of 1 if you're not. Then the cycle containing 1 will start with (1, 2, 4
19.
▲
by
davidtgoldblatt
10y ago
It's part of the core language semantics (arguably the core language semantics) for Java2K ( http://p-nand-q.com/programming/languages/java2k/ ).
20.
▲
Address Sanitizer in Hardware (proposal)
(github.com)
1 points
by
davidtgoldblatt
10y ago
|
0 comments
21.
▲
by
davidtgoldblatt
10y ago
Here's a fun related issue: A common Linux mutex-implementation strategy to deal with this issue (waker-waiter races) is by releasing a mutex before futex-waking any threads blocked on it. Since the waker doesn't know for sure if
22.
▲
by
davidtgoldblatt
10y ago
Hah, I think I'm that person you're referring to. I would characterize my response differently. Stripping out the specifics, the problem was: "write some code that blocks until one of a set of memory locations changes its val
23.
▲
by
davidtgoldblatt
10y ago
I don't totally follow the conclusion you're trying to draw w.r.t. the definition of a patent troll; clearly there's a lot of people who think that filing and then attempting to enforce a bogus patent applies (though people d
24.
▲
by
davidtgoldblatt
10y ago
Saying that "patent troll" is synonymous with "NPE" is more restrictive than its common usage; for example, wikipedia defines it as "a person or company that attempts to enforce patent rights against accused infring
25.
▲
by
davidtgoldblatt
10y ago
An anecdote for those who hoped they'd find suggestions in the comments: I ended up buying some over-the-head earmuff headphones aimed at construction workers (I think with a 25dB noise reduction rating). I put in ear plugs, then the h
26.
▲
by
davidtgoldblatt
10y ago
The KMP paper is "Fast Pattern Matching In Strings", which cites Cook's "Linear time simulation of deterministic two-way pushdown automata". The former has a neat history section that gives a little more detail than
27.
▲
by
davidtgoldblatt
10y ago
I got curious about the etymology of this, and it's not clear to me that wikipedia is right on this one. According to [1], the earliest use of "even" and "odd" for functions goes back to Euler [2]. It's been a
28.
▲
by
davidtgoldblatt
10y ago
> Disabling interrupts prevents you from using interrupt-unsafe logic inside the critical section, which is impractical in most cases. It would mean, for example, that you wouldn't be able to touch memory that had been swapped. Pres
29.
▲
by
davidtgoldblatt
10y ago
I assume interrupts would be disabled or deferred during this section, so you get stronger guarantees on worst-case behavior; hence the bound on the number of cycles a thread is allowed to execute for. On one of the less common unixes (Sun&
30.
▲
Did I just win?
(twitter.com)
950 points
by
davidtgoldblatt
10y ago
|
129 comments
More ›