On Wed, Nov 13, 2013 at 7:33 PM, Daniel Micay <danielmi...@gmail.com> wrote:
> The `stat` calls are potentially blocking, so what do you do beyond
> blocking a thread? Ideally the current thread, to avoid a context
> switch to and from another core - especially since it will often not
> block. There's nothing else you can do without a horrible performance
> reduction in the common case.

Of course, if it does block, you really have no idea whether `stat`
calls elsewhere will block because the drives could be arranged in any
fashion, and you don't know what's in the cache. The best you can do
is make the calls and have the I/O scheduler plan them out in a
reasonable way. If you only make one at a time, it's not going to go
nearly as quickly.
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to