HN user

osandov

112 karma
Posts4
Comments24
View on HN

This was great. Before Powder Game, there were several games in this genre, and a very active Falling Sand Game BBS forum. I got my start in programming by writing mods for one of those games, Burning Sand. I wonder if anyone from those forums is around here...

It should work on ARM with a couple of caveats:

* Stack tracing needs architecture-specific support which is currently only implemented for x86-64 and ppc64. It's not too hard to add for other architectures, so if this is a feature you need, please open a GitHub issue and I'll get around to it soon. * 32-bit ARM doesn't support /proc/kcore, so drgn can't do live kernel debugging on 32-bit ARM. This seems to be due to historical reasons rather than any technical limitations, so I may send a patch to enable /proc/kcore for future kernel releases. AArch64 doesn't have this issue.

Userspace application debugging with drgn also has a couple of limitations mentioned in the blog post, namely the lack of breakpoints and stack tracing for live processes. Again, feel free to open issues asking for these so I know to move them up my todo list.

The filesystem track at LSF/MM tends to focus on topics which impact more of the kernel than one specific filesystem, and we didn't have any of those topics for Btrfs this year. Plus, only a couple of the Btrfs developers were at LSF/MM this year, and we typically sync up via other means.

Every subsystem is tested differently. Because of the wide variety of subsystems and workflows in the kernel, it's pretty much impossible to have a single test suite you can run and call good. For example, some subsystems have unit tests that run in the kernel at boot time if you compiled the kernel with a specific config option (e.g., Btrfs [1] and ftrace [2]). Additionally, some subsystems have integration tests where we set stuff up and run from userspace. Filesystems use xfstests [3] and the block layer has something similar [4]. For the most part, developers and maintainers run these before sending patches or pull requests. Additionally, Intel operates an automated system [5] which runs several test suites and reports the results to developers.

1: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...

2: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin...

3: https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/

4: https://github.com/osandov/blktests

5: https://01.org/lkp/documentation/0-day-test-service

Linux 4.10 is out 9 years ago

I don't get why BFQ hasn't been mainlined yet

BFQ hasn't been mainlined because it is written for the legacy block layer in the Linux kernel, which will be replaced entirely with the new block multiqueue implementation. It doesn't make much sense to replace CFQ or add a brand new scheduler only to rip it out in a few releases. Linux 4.11 will have support for I/O scheduling for blk-mq. BFQ is currently being ported to blk-mq; that work is the first big hurdle to getting it merged.

I'm curious about your NBD performance issues. When you say large number of blocks, are you talking a large filesystem? The free space cache tends to be a performance bottleneck for large filesystems, you might want to try out space_cache=v2.

Signalfd is useless 11 years ago

You could certainly imagine some kernel extensions that take all of this useful functionality and make it available in ways other than signals, leaving just signals for things you have to deal with immediately like SIGSEGV (so you can print a nice error message before quitting), but they don't exist yet.

In the SIGCHLD case, there's a proposed CLONE_FD flag to clone which would return a file descriptor instead of a PID. This fd could be read poll'd on and read from, which is much nicer than dealing with SIGCHLD. See http://lwn.net/Articles/638613/

So those kernel extensions are happening :)

There's also f2fs [1][2], which has a similar design but runs on flash devices with an FTL and thus takes a more middle road. It still has a log structure and tries to make things easy for the FTL by doing large, sequential, out-of-place writes whenever possible, but it takes advantage of the FTL when it makes things simpler, like for certain metadata that's easier to update as a small random write.

[1] http://lwn.net/Articles/518988/ [2]: http://lwn.net/Articles/518718/

This is orthogonal to the argument in the article, but the "buffer overflow" example in C is incorrect. Even if sizeof(b) is smaller in the receiver than in the sender, the receiver will only read at most as many bytes as it (the receiver) thinks are in b -- whatever it got for sizeof(b). Of course, this could still lead to a truncated message, but we'd all be in pretty big trouble if you could buffer overflow a server by sending it a message larger than its recv buffer :)

Cool! Back in 2012, I got impatient and put together my own resistive touch screen for the Raspberry Pi: https://www.youtube.com/watch?v=uwEwHFglq8M. I just got a small LCD, a resistive touch panel, soldered up a microcontroller, and wrote a simple kernel module (https://github.com/osandov/raspi/tree/master/tsc2007) to get it all working. Unfortunately, I never really got around to documenting how I did it, and it looks like this makes it obsolete, but it's all for the best :)

A nitpicky tip: --help is normal execution, not an error, so the usage information should be printed to stdout, not stderr (and it should exit with a successful status). Nothing is more annoying than trying to use a convoluted program with a million flags (which should have a man page in the first place) and piping --help into less with no success.