On Sun, 2011-04-17 at 14:03 +0400, Konstantin Khlebnikov wrote: > Avi Kivity wrote: > > What if nr is nonzero when the loop terminates? You need to update the > > first iovec entry so you don't redo that segment. > > Oh yes, it is simple (hunk above), so "const" from prototype must be removed, > while original syscalls declare iov argument as const. The problem here is that if we start changing the internals of the iovec struct it forces us to copy it before calling the I/O functions since if we change it within the functions it's unusable to the caller anymore. Currently it's passed as a const because we only move pointers outside the struct. Basically the trade-off here is copying iovec before every read/write vs having to sometimes read data again (< 1 block), so I've went with the latter. Do you think it's better to go with the first alternative? -- Sasha. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html