writev performance
writev performance
- Subject: writev performance
- From: Godfrey van der Linden <email@hidden>
- Date: Sun, 07 Feb 2010 20:35:20 +1100
G'day, Kernel experts.
I've been doing a little bit of coding using UDP protocols recently and tripped over the sendto api that takes two user land addresses: a data address and a sockaddr pointer. I realised that this means that two uio_copyin transfers needs to be made, this then made me wonder about the general efficiency of writev style system calls.
I have been using as a rule of thumb that limiting accesses to the vm system is a guaranteed way of increasing performance as the Mach VM system has been slow. It seems then if we have more than one uio interaction with user addresses copying data into the kernel we are multiply the number of vm interactions, and that is bad.
Given how fast modern processors can move memory wouldn't it be better to copy the vector of data into a single transfer buffer into the kernel. This means that the processor caches are nice and hot and everything is ready to go when the single transfer into the kernel goes, this seems to me to be probably faster. I haven't run any experiments yet but I'm sort of interested in your ideas. I'm pretty sure that the 4Gbyte KVA on 32 bit is going to make the uio_copyin() operations relatively expensive, but what about the 64bit kernels do they naturally have better access to user space mappings?
Thoughts?
Godfrey
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden