[Samba] Samba write performance in kernel

Lin Mac mkl23 at hotmail.com
Mon Sep 15 06:44:32 GMT 2008


 > > 1. If splice works, can memory copy be avoided?
> Yes, that's the whole point of splice - copy from the
> socket buffer directly to the disk buffer cache without
> going through userspace.

I think my question is not precise. And I'm not really familiar with linux block and virtual file system subsystems, so please correct me if I'm wrong.

Reading from samba can achieve zero copy  with help of sendfile and scather/gather support of NIC driver.

Writing to samba by going to user space and back again would cause 2 memory copy (copy_to_user, copy_from_user).

Writing to samba with splice could avoid going to user space, so there is no memory copy (copy_to_user, copy_from_user). But buffers received from network driver (around 1.5kB each) are  sent to file system subsystem and below. Will it be cached and gathered to become a continuous buffer (which cause 1 memory copy), or does virtual file system subsystem and below could support scatter/gather, so there will be no memory copy at all (zero copy) ?

Best Regards,
Mac Lin
ÀH¨­ªº Windows Live Messenger ©M Hotmail¡A¤£­­®É¦a´x´¤¸ê°TºÉ¦b«ü¶¡ ¡X Windows Live for Mobile 

More information about the samba mailing list