In message <[EMAIL PROTECTED]>,Roland Kuhn writes: >Why can't this be replaced by read(big segment)->buffer->sendmsg(small >segments). AFAIK readv() is implemented in terms of read() in the >kernel for almost all filesystems, so it should really only have the >effect of making the disk transfer more efficient. The msg headers >interspersed with the data have to come from userspace in any case, >right?
no reason you couldnt do this i suppose. you would need twice the number of entries in the iovec though. you would need a special version of rx_AllocWritev() that only allocated packet headers and chops up a buffer you pass in. curious, i rewrote rx_FetchData() to read into a single buffer and then memcpy() into the already allocated rx packets. this had no impact on performance as far as i could tell (my typical test read was a 16k read split across 12/13 rx packets). the big problem with iovec is not iovec really but rather than you only get 1k for each rx packet you process. it quite a bit of work to handle an rx packet. (although if your lower level disk driver didnt support scatter/gather you might seem some benefit from this). _______________________________________________ OpenAFS-devel mailing list [email protected] https://lists.openafs.org/mailman/listinfo/openafs-devel
