User: Password:
Subscribe / Log in / New account

Patchset API

Patchset API

Posted Oct 1, 2009 10:48 UTC (Thu) by epa (subscriber, #39769)
Parent article: Featherstitch: Killing fsync() softly

The pg_* calls look like a great way for apps to specify exactly what they want from the filesystem. I wonder to what extent it's possible to provide them on plain vanilla filesystems without Featherstitch. For example, on minixfs almost every pg_* call would just do sync() or fsync(); on ext3 it would be either fsync() or a no-op depending on whether data=ordered already provides the necessary guarantees; and so on. Then apps could start using the rich interface now, even if the kernel is at the moment a bit stupid and does things slower than it could. Over time, the kernel can be optimized to provide the same guarantees but faster.

(Log in to post comments)

Patchset API

Posted Oct 1, 2009 15:09 UTC (Thu) by nix (subscriber, #2304) [Link]

i.e. time to write a trivial wrapper library? Maybe, but let's get the names right first: pg_*() is pretty awful: it doesn't say 'disk writes' to me at all, it says 'PostgreSQL'!

writegroup_*() might be better but is a bit long. wg_*() is shorter but somewhat opaque...

Patchset API

Posted Oct 7, 2009 22:18 UTC (Wed) by sfink (guest, #6405) [Link]

Ooh! A bikeshed with peeling paint!

How about batch_*()? Or wb_*() for writebatch? (I'm ignoring the "patch" word, since I find it far more confusing than enlightening.)

Will it always be write-specific? Would it ever be useful to say something like "read blocks A-D, but I'll need either both A and B or both C and D before I can make progress"? Something to do with RAID parity blocks, or quasi-realtime processing using memory that needs to be pinned but only while the process is scheduled or starts a pass, or maybe (ooh, here's a confusing one) when you want to read data from in-progress writes that are themselves being controlled by a dependency DAG? Or heck, maybe you're trying to read off of multiple devices and you only have enough power to spin up a subset at a time.

I guess I'm just making up bullshit.

Mmm. Bullshit and bikesheds. They go so well together, like chocolate and peanut butter. If you'll excuse the juxtaposition.

Patchset API

Posted Oct 9, 2009 22:33 UTC (Fri) by nix (subscriber, #2304) [Link]

Quite so, this is really silly :) I'd recommend against using prefixes
like 'batch_*()' in available-everywhere interfaces, though, 'cos it's the
sort of prefix that batch-processing systems are *certain* to be using

Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds