Readit News logoReadit News
plq commented on lsr: ls with io_uring   rockorager.dev/log/lsr-ls... · Posted by u/mpweiher
loeg · a month ago
> More system calls mean more overall OS overhead [than the equivalent operations performed with io_uring]

Again, this just isn't true. The same "stat" operations are being performed one way or another.

> Also, more fs-related system calls mean less available kernel threads to process these system calls.

Generally speaking sync system calls are processed in the context of the calling (user) thread. They don't consume kernel threads generally. In fact the opposite is true here -- io_uring requests are serviced by an internal kernel thread pool, so to the extent this matters, io_uring requests consume more kernel threads.

plq · a month ago
> Again, this just isn't true.

Again, it just is true.

More fs-related operations mean less kthreads available for others. More syscalls means more OS overhead. It's that simple.

plq commented on lsr: ls with io_uring   rockorager.dev/log/lsr-ls... · Posted by u/mpweiher
loeg · a month ago
> 35x less system calls = others wait less for the kernel to handle their system calls

That isn't how it works. There isn't a fixed syscall budget distributed among running programs. Internally, the kernel is taking many of the same locks and resources to satisfy io_uring requests as ordinary syscall requests.

plq · a month ago
More system calls mean more overall OS overhead eg. more context switches, or as you say more contention on internal locks etc.

Also, more fs-related system calls mean less available kernel threads to process these system calls. eg. XFS can paralellize mutations only up to its number of allocation groups (agcount)

plq commented on lsr: ls with io_uring   rockorager.dev/log/lsr-ls... · Posted by u/mpweiher
loeg · a month ago
Why do you say more importantly? The time is all that matters, I think.
plq · a month ago
%70 faster = you wait less

35x less system calls = others wait less for the kernel to handle their system calls

plq commented on Reading Neuromancer for the first time in 2025   mbh4h.substack.com/p/neur... · Posted by u/keiferski
jfengel · a month ago
I find that very believable, since Neuromancer isn't at all about computers. The computers involved are little different from what you might have seen on Star Trek. They are story engines -- except for the ones that are really just people.

This is not a negative. Sci fi is always about people.

plq · a month ago
Ursula K. Leguin has a thought-provoking piece in this vein about why she wrote sci-fi:

https://web.archive.org/web/20191119030142/http://theliterar...

EDIT: Here's a better link: https://archive.org/details/dreams-must-explain-themsel-z-li...

plq commented on Reading Neuromancer for the first time in 2025   mbh4h.substack.com/p/neur... · Posted by u/keiferski
plq · a month ago
Man, I loved Neuromancer when I read it as a kid. Yes, it's a tough book to read, especially today where there are too many distractions as well as too many works of art built on the sci-fi ideas of that era.

Neuromancer is the first installment of the Sprawl trilogy, followed by Count Zero and Mona Lisa Overdrive.

So trying not to spoil too much: Count Zero asks questions about / describes how AI could have influence over religious/spiritual life of humans.

Will we see AI preachers having a real influence on human religious life? ChatGPT the prophet? Maybe this is the real danger of today's nascent AI tech?

plq commented on Jank is C++   jank-lang.org/blog/2025-0... · Posted by u/Jeaye
johnnyjeans · 2 months ago
I'm not surprised to see that Jank's solution to this is to embed LLVM into their runtime. I really wish there was a better way to do this.

There are a lot of things I don't like about C++, and close to the top of the list is the lack of standardization for name-mangling, or even a way mangle or de-mangle names at compile-time. Sepples is a royal pain in the ass to target for a dynamic FFI because of that. It would be really nice to have some way to get symbol names and calling semantics as constexpr const char* and not have to deal with generating (or writing) a ton of boilerplate and extern "C" blocks.

It's absolutely possible, but it's not low-hanging fruit so the standards committee will never put it in. Just like they'll never add a standardized equivalent for alloca/VLAs. We're not allowed to have basic, useful things. Only more ways to abuse type deduction. Will C++26 finally give us constexpr dynamic allocations? Will compilers ever actually implement one of the three (3) compile-time reflection standards? Stay tuned to find out!

plq · 2 months ago
> the lack of standardization for name-mangling

I don't see the point of standardizing name mangling. Imagine there is a standard, now you need to standardize the memory layout of every single class found in the standard library. Without that, instead of failing at link-time, your hypothetical program would break in ugly ways while running because eg two functions that invoke one other have differing opinions about where exactly the length of a std::string can be found in the memory.

plq commented on NativeJIT: A C++ expression –> x64 JIT (2018)   github.com/BitFunnel/Nati... · Posted by u/nateb2022
whizzter · 2 months ago
I think what GP was referring to that there is nothing stopping the code from being designed so that:

AST<float> p1 = exp.GetP1();

AST<float> rsqr = p1 * p1; // AST<float> implements an operator* overload that produces an AST<float> object

Even if many frown upon operator overloading due to the annoying magical-ness of the standard-librarys appropriation of the shift operators for "piping" (<< and >>), it's still what makes many people prefer C++ for vector-math,etc tasks.

So whilst the result isn't a direct multiplication it should still be an acceptable use since the resulting code will actually be doing multiplications.

Considering what goes on under the hood however, I guess there might be some compiler optimization reasons to keep everything in the expression object in the example as the holder of data instead of spread out in an allocation tree with lots of pointer-chasing.

plq · 2 months ago
> So whilst the result isn't a direct multiplication it should still be an acceptable use since the resulting code will actually be doing multiplications.

First, nope, if it's not multiplication it should not be using the * operator, period. Operator overloading is already overused and it leads to so much problematic code that looks fine to the untrained eye (string concat using operator+ being a famous example).

That said, you may also want to pass more options to the Mul node in the future and operator*() can only accept two arguments.

As another example, run the following Python code to see how python represents its own AST:

    import ast;print(ast.dump(ast.parse("2*PI*r*r"),indent=2))

plq commented on NativeJIT: A C++ expression –> x64 JIT (2018)   github.com/BitFunnel/Nati... · Posted by u/nateb2022
kookamamie · 2 months ago
> auto & rsquared = expression.Mul(expression.GetP1(), expression.GetP1());

This is C++, no? Why not use operator overloading for the project?

plq · 2 months ago
This line is part of the code that creates an AST-like structure that is then fed into the compiler. The actual multiplication is done by calling the function handle returned from the Compile method.
plq commented on In-Memory C++ Leap in Blockchain Analysis   caudena.com/the-in-memory... · Posted by u/caudena
plq · 2 months ago
When implementing the lock-free stuff, was portability (across processors) a goal? If yes, did you have to deal with anything specific? Do you notice any difference in behavior of correct implementations when ran on different processors? How do you test for correctness of lock-free stuff?

EDIT: Oh and did you implement from scratch? Why not use eg. the RCU implementation from folly?

plq commented on Occurences of swearing in the Linux kernel source code over time   vidarholen.net/contents/w... · Posted by u/microsoftedging
tianqi · 2 months ago
I am particularly interested in the rapid and steady growth of "garbage", among rubbish, trash and junk. What does this indicate? An evolution of English?
plq · 2 months ago
AFAICT the consensus is to say that an uninitialized variable (eg. int i;) has "garbage value". I'd say it's rather a technical term than profanity.

u/plq

KarmaCake day1341April 2, 2010
About
github.com/plq ext-hn@burakarslan.com
View Original