HNHacker News
TopNewBestAskShowJobs

sbahra

331 karma · joined January 29, 2011

[ my public key: https://keybase.io/sbahra; my proof: https://keybase.io/sbahra/sigs/SLZoPS63iUZ33agKdi_4d0zHk1KhYRjk-OAVke4o4uA ]
submissionscomments
sbahra··on Concurrent Memory Deallocation in the Objective-C Runtime
Concurrency Kit (http://concurrencykit.org) also has ck_epoch. Performance comparison to the URCU implementations available at http://concurrencykit.org/presentations/ebr.pdf
sbahra··on Liblfds, a portable, license-free, lock-free data structure library written in C
<3
sbahra··on Ask HN: Please recommend a 13-15“ programmers laptop to replace 15” MacBook Pro
Ubuntu works just fine on the 2015 Thinkpad Carbon X1. We use them as our company laptops, and we're on Ubuntu.
sbahra··on Linearizability versus Serializability
Looks like it (confusion between 'real-time' precedence and real-time guarantee), thanks.
sbahra··on Linearizability versus Serializability
Sure, but this is not a "real-time guarantee".
sbahra··on Linearizability versus Serializability
How does linearizability provide "real-time" guarantees? It does not unless some uncommon version of "real-time" is being used here.
sbahra··on Faster Backtraces for Native Applications
Thanks for all the feedback people. We've released a new version with robust handling of attachment failures, additional DWARF features and performance improvements (up to 35% on targets with lots of shared objects).
sbahra··on Faster Backtraces for Native Applications
Will reveal the backend soon but we do not have plans to open-source it as of yet.
sbahra··on Faster Backtraces for Native Applications
1) What's most interesting to us is that with all these spare cycles mean we can start doing some computationally expensive analysis as part of crash reporting and can even do it at scale. However, this type of analysis requires a very efficient tracer. We will provide updates on the latter in an upcoming post.

2) The speed and efficiency of backtrace generation can affect recovery times. It's far more than 50ms for a lot of server-side or embedded applications.

3) Large programs today cannot be debugged feasibly (as in, good luck in generating a detailed crash report, your system will likely not have the resources), especially if they're time sensitive as well (tracing is the typical approach there). There are engineers out there who have to spend hours just to extract a small memory dump from a single thread.

4) Certain classes of bugs are best observed over time and minimizing jitter is important (more on that later as we unveil some features of the advanced tracer and user interface).

Less intrusive real-time profiling is interesting to us, but currently only in the context of state leading to a fatal bug (this also includes bugs that involve hanging such as an infinite loop). The technology does have applications for performance management but this isn't something we are focusing on at the moment.

sbahra··on Faster Backtraces for Native Applications
Come on now, you're the author of the crash reporting framework for mobile :-P Big fan of PLCrashReporter and your work with it, the mobile error reporting market has much to thank for it. I've looked at some of your code and definitely appreciated the cleanliness of it.

On performance: The execution speed being touted here is not that of a frame unwinder and we're building something that goes beyond this in scope. Our core client-side technology is a debugging library optimized for tracing. Unwinding was only a bottleneck for some specific ridiculous workloads and usually the bottleneck is elsewhere if program structure is being parsed (and this is where the general purpose debuggers end up taking up so much time).

There are applications out there that are so complex that traditional debuggers are simply infeasible (imagine 30 minute+ backtraces). However, what we're excited about are all those spare cycles we get to make use of...

On libunwind: Yes. We'll be targeting some exotic platforms, and this is where libunwind definitely helps. It definitely lacks in file format abstractions but we support multiple unwinding backends for this reason, it will be painful but not too painful.

Thanks for the SOSP link, looks interesting. I agree, this is an area that has definitely been neglected by academia.

We're very excited for the first release of our platform and I'll keep you posted on it, your feedback would be great and we think we've come up with very useful technology.

sbahra··on Faster Backtraces for Native Applications
Appreciate any feedback to the early access core software and we're all ears on feature requests. Let us know if you encounter any sub-optimal output and we'll fix it, hope some of you guys find this useful and live a more manageable life :-P
sbahra··on Errata prompt Intel to disable TSX in Haswell, early Broadwell CPUs
So, what's the bug exactly?
sbahra··on An insane idea on reference counting [pdf]
The work gleb is showing here pretty much looks to be proxy collection, which also has a whole parade of patents. An interesting mechanism with good performance characteristics is defined at http://concurrencykit.org/presentations/ebr.pdf and is easily pluggable into an RCU implementation.
sbahra··on Leo The Homeless Coder Is Still Homeless
"Give a man to fish."
sbahra··on BPF: The Forgotten Bytecode
FreeBSD has had limited support for this for a long time now (limitations may be lifted now, not sure).

http://freebsd.1045724.n5.nabble.com/PATCH-BPF-Just-In-Time-...

sbahra··on Processes Paralleling to Speed up Computing and Tasks Execution in Linux
It's not simply about getting permission, it is also about prominently attributing credit to the original author.
sbahra··on Processes Paralleling to Speed up Computing and Tasks Execution in Linux
I still don't see credits going to the original author and / or website for most of your article beyond a very easy to miss [original source] at the bottom. Many articles have no references to the original author at all. It should be very clear at the top of the article that your work is a translation from the original author. The original author's website should have a very prominent link, at the top. It really surprises me that you are knit-picking at site agreements, where is the hacker integrity?
sbahra··on Processes Paralleling to Speed up Computing and Tasks Execution in Linux
Please ban them, this is absolutely unacceptable. The original author put hard work into his writing, and I still don't see any credit in a majority of their translations. They have published 14 articles in total without any credits going to the original author. It's definitely not the type of news I would expect to be associated with a "hacker". I do not see any links to the original source at http://kukuruku.co/hub/cpp/lock-free-data-structures-introdu...

They are stealing content.

Another user (leephillips) posted the following about their posts: "I went to the site and left a comment complaining about how they stole your article. They deleted the comment, and you still aren't credited. Does HN have a blacklist of sites that steal content or publish only blogspam? I think they should consider it." - https://news.ycombinator.com/item?id=7754641

sbahra··on Transactional Memory: History and Development
Not cool at all if this is true. They gave you no obvious credit.
sbahra··on Everything You Always Wanted to Know About Synchronization
Thanks for sharing. You can find production quality and higher performance implementations of a lot of these synchronization algorithms (and more) at http://concurrencykit.org/ (available publicly for almost 3 years now).

I do question some of the results. I was disappointed with the actual lock implementations of libslock as they are anything but performant. The implementations need much more than prefetchw optimizations (many of the implementations are half as fast as they should be).

sbahra··on Lock-Free Data Structures (2004)
Also relevant and covers these topics in greater depth: http://queue.acm.org/detail.cfm?id=2492433 http://queue.acm.org/detail.cfm?id=2488549 http://queue.acm.org/detail.cfm?id=2490873 and http://queue.acm.org/detail.cfm?id=2513575
sbahra··on Writing Lock-Free Code: A Corrected Queue
You asked for a link to an explanation, I do not have a link to the explanation. I'm not sure what you found funny about referring you to a 30/50-line piece of source-code with an implementation for your own comparison. Also, people make mistakes, what does your respect for the author have to do with anything? Regardless, I will elaborate.

General issues: "If you don't yet have ordered atomic variables yet on your language and platform, you can emulate them by using ordinary but aligned variables whose reads and writes are guaranteed to be naturally atomic, and enforce ordering by using either platform-specific ordered API calls (such as Win32's InterlockedCompareExchange for compare-and-swap) or platform-specific explicit memory fences/barriers (for example, Linux mb)."

This is incorrect. A lot of memory models in languages provide no such guarantees, even of aligned variables (this includes C, even with volatile variables). This not only applies to regular loads/stores but even to RMW.

Produce/Consume function: We store to last->next and then to last. If we assume total store ordering, insertion itself is fine. However, it should be made clear that an explicit store fence is needed after updating the next pointer. The article gives the impression (due to statement above) that this algorithm is suitable for other languages.

In the consumer, we also need an explicit load fence. If the atomic is completely serializing, we are fine but in other languages even with aligned variables, these semantics are incorrect.

The "trim" functionality is broken as it makes no use of safe memory reclamation. It is fine to re-use nodes (assuming you don't have a concurrent lock-free traversal going on) but you need to be careful with destruction. Assume consumer is at some time T where divider != last (but divider = first). Let us say consumer is at result = divider->next->value. Pause execution of consumer after it has acquired divider->next. Producer enqueues another node and sees that first != divider (yet consumer has an earlier snapshot of divider), so it trims first. Consumer is now active again and dereferences the earlier snapshot it had of divider->next to get to value, but now this yields undefined behavior (crash or worse).

sbahra··on Writing Lock-Free Code: A Corrected Queue
You could also compare it to ck_fifo_spsc in the above link (look at include/ck_fifo.h).
sbahra··on Writing Lock-Free Code: A Corrected Queue
Please note that the code in this article is broken. It lacks proper use of atomics, memory barriers, let alone compiler barriers. You can find a similar and correct queue at http://concurrencykit.org (ck_fifo.h). The liblfds queue is very heavy-weight for a simple SPSC workload and is also lacking in correctness.

If you're looking for a learning resource, I suggest looking at http://www.rdrop.com/users/paulmck/perfbook/ and http://1024cores.net

sbahra··on Solve the eCommerce Hack Day programming challenge to get a free ticket
Post to ImAHacker with getCode specifier.
sbahra··on An Introduction to Lock-Free Programming
A while back I linked to the following: http://concurrencykit.org/presentations/lockfree_introductio...

Please make sure to navigate all the way down, before navigating to the right. Press the space bar to see the full layout of the presentation.

sbahra··on An Introduction to Lock-Free Programming
http://concurrencykit.org/ is also available, used in several production systems.
sbahra··on Introduction to Lock-Free Programming (in unmanaged languages)
Which real meat are you looking for? I would think that there was too much meat in that presentation. Granted, I could have accompanied notes. I would place a lot of emphasis on understanding the code examples. If you have any questions, please feel free to let me know.

Did you remember to iterate vertically rather than horizontally first? It may have been you missed a lot of the content.

sbahra··on Introduction to Lock-Free Programming (in unmanaged languages)
The deck is a work in progress and is likely best accompanied with additional notes. Regardless, I thought some people may find it interesting. Note the SMR implementations there are toy implementations for the sake of brevity (and the QSBR implementation was designed to be purely snapshot-based to help people reason through the concept of grace periods).
sbahra··on Concurrency Kit: framework for concurrent systems in unmanaged languages
Thank you for your feedback. http://concurrencykit.org/doc/ and http://concurrencykit.org/support.html attempt to elaborate the state Concurrency Kit is in. Could you please be more specific?
← PreviousPage 2 of 2