News for hackers. Stuff that matters.

rostayob

Re:How to stop Linux threads cleanly on Monday October 20, 2025 @05:59PM (#45649963)
I talk about the cancelability state and how it can help us shortly after that statement: https://mazzo.li/posts/stopping-linux-threads.html#controlle... . In hindsight I should have made a forward reference to that section when talking about C++. My broad point was that combining C++ exceptions and thread cancellation is fraught with danger and imo best avoided.
Re:How to stop Linux threads cleanly on Monday October 20, 2025 @02:23PM (#45647312)
As I note in the blog post in various places if one can organize the code so that cancellation is explicit things are indeed easier. I also cite eventfd as one way of doing so. What I meant to convey is that there's no easy way to cancel arbitrary code safely.
Re:How to stop Linux threads cleanly on Monday October 20, 2025 @01:50PM (#45646891)
Cancellation points and cancellability state are discussed in the post. In a C codebase that you fully control pthread cancellation _can_ be made to work, but if you control the whole codebase I'd argue you're better off just structuring your program so that you yield cooperatively frequently enough to ensure prompt termination.
Re:How to stop Linux threads cleanly on Monday October 20, 2025 @01:43PM (#45646809)
This option is described in detail in the blog posts, with its associated problems, see this section: https://mazzo.li/posts/stopping-linux-threads.html#homegrown... .
Re:How to stop Linux threads cleanly on Monday October 20, 2025 @12:38PM (#45645875)
This is noted in the blog post, but the problem is that sometimes you don't have the freedom to do so. See this sidenote and the section next to it: https://mazzo.li/posts/stopping-linux-threads.html#fn3 .
Re:Lánczos Interpolation Explained (2022) on Saturday October 11, 2025 @10:07AM (#45549280)
(I'm the author)

I don't really claim that Lanczos interpolation as presented is the "best" 2D interpolation there is. It is definitely popular though, and I couldn't find a source explaining how it is derived, so I thought it'd be an interesting topic for a blog post.

There was no battle actually, everybody (well, my boss and my boss's boss) was very supportive of open sourcing. And thanks for the kind words!
We do use Reed-Solomon codes, as the blog post explains.
No, we have our custom compressor as well but it's outside the filesystem.
The question is whether there are single Ceph deployments are that large. I believe Hetzner uses Ceph for its cloud offering, and that's probably very large, but I'd imagine that no single tenant is storing hundreds of PBs in it. So it's very easy to shard across many Ceph instances. In our use-case we have a single tenant which stores 100s of PBs (and soon EBs).
I'm not fully up to date since we looked into this a few years ago, at the time the CERN deployments of Ceph were cited as particularly large examples and they topped out at ~30PB.

Also note that when I say "single deployment" I mean that the full storage capacity is not subdivided in any way (i.e. there are no "zones" or "realms" or similar concepts). We wanted this to be the case after experiencing situations where we had significant overhead due to having to rebalance different storage buckets (albeit with a different piece of software, not Ceph).

If there are EB-scale Ceph deployments I'd love to hear more about them.

(Disclaimer: I'm one of the authors of TernFS and while we evaluated Ceph I am not intimately familiar with it)

Main factors:

* Ceph stores both metadata and file contents using the same object store (RADOS). TernFS uses a specialized database for metadata which takes advantage of various properties of our datasets (immutable files, few moves between directories, etc.).

* While Ceph is capable of storing PBs, we currently store ~600PBs on a single TernFS deployment. Last time we checked this would be an order of magnitude more than even very large Ceph deployments.

* More generally, we wanted a system that we knew we could easily adapt to our needs and more importantly quickly fix when something went wrong, and we estimated that building out something new rather than adapting Ceph (or some other open source solution) would be less costly overall.

Re:Jelly Star – The Smallest Android 13 Smartphone on Saturday July 13, 2024 @07:21PM (#40957643)
I am, but I only type the messages I need to type. Which aren't that many. If there's some long explanation to be had I call or I leave a voice message. And yes, I am aware of the fact that everybody hates voice messages, but it's only fair if somebody requires my immediate attention :).

Typing is painful, but not disastrous actually. It's perfectly serviceable.

Re:Jelly Star – The Smallest Android 13 Smartphone on Saturday July 13, 2024 @06:10PM (#40957277)
Note that I was fairly careless with it, and I'm pretty clumsy. It probably fell 20+ times. But still, it feels very cheap (and I suppose it makes sense given the price).
Re:Jelly Star – The Smallest Android 13 Smartphone on Saturday July 13, 2024 @06:06PM (#40957242)
I've been using this phone as my full time phone for 1 year. It's a great compromise for people that ideally would not want a smartphone, but need to have one since many life situations require it.

I basically only use it for WhatsApp and music, but when some other need arises, it can do everything a normal smartphone can do.

The only problem is that the build quality is not good. The audio jack of the first one I bought (off the initial kickstarter) broke after 6 months or so. I bought another one, and the up volume button recently broke. But otherwise, no complaints.

Re:Beating the L1 cache with value speculation (2021) on Friday July 12, 2024 @11:52AM (#40946695)
gpderetta is right -- test/cmp + jump will get fused.

uiCA is a very nice tool which tries to simulate how instructions will get scheduled, e.g. this is the trace it produces for sum3 on Haswell, showing the fusion: https://uica.uops.info/tmp/75182318511042c98d4d74bc026db179_... .

Re:How fast are Linux pipes anyway? on Friday October 06, 2023 @04:38AM (#37788386)
This post is an excuse to explain VM concepts, rather than a tutorial, something I maybe could have made clearer.

Older »