[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] Mirage-Block-Unix Error
Hi, On Sat, Mar 5, 2016 at 2:53 PM, Rupert Horlick <rh572@xxxxxxxxx> wrote:
We default to O_DIRECT to act more like a raw block device, bypassing any cache in the host OS. It makes the Unix case more like the Xen case, and if we observe poor performance (perhaps through lack of caching) on Unix, then we know it'll probably be poor on Xen too, and provoke us to think about adding a cache ourselves :-)
Aha interesting -- if it works in buffered mode then I bet the buffers aren't sector-aligned. Try allocating your buffers with something like `let page = Io_page.(to_cstruct (get 1))` Also make sure to supply whole numbers of sectors -- a buffer of length 1 will not work, instead you would have to perform a read of a sector, a modify of a byte, and then a write of a sector.
There are certainly things we could improve in this area: - the error message is poor and doesn't really help identify the problem. It would be quite straightforward to check the required alignment and length constraints, emit a helpful log message and then abort the program. - we don't do a good job of reflecting the alignment or length of buffers in signatures. We've discussed copying versus zero-copy interfaces a few times in the past though-- a copying interface would probably limit block performance on very fast devices but would be easier to use. - the string prefix `buffered:` is a poor interface: I think a better way to do this is to add a default boolean argument to the `connect` function rather than string splitting. Cheers, Dave
Dave Scott
_______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |