Re: [PR PATCH] [Updated] Fix FreeBSD/Darwin & Linux sendfile.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [PR PATCH] [Updated] Fix FreeBSD/Darwin & Linux sendfile.

Samba - samba-technical mailing list
There is an updated pull request by j-c-m against master on the Samba Samba Github repository

https://github.com/j-c-m/samba sendfile_bsd_linux
https://github.com/samba-team/samba/pull/76

    Fix FreeBSD/Darwin & Linux sendfile.
    Use poll() to emulate a blocking sendfile().

    This avoids spinning on EAGAIN/EWOULDBLOCK under Linux implementation,
    which greatly reduces CPU usage.

(https://lists.samba.org/archive/samba/2013-September/175838.html)

    This fixes FreeBSD/Darwin implementation, which under most cases did
    not work, it would break early when nwritten == 0.  Which would happen
    anytime it spun on EAGAIN writing 0 bytes.

(https://forums.freebsd.org/threads/55017/)


A patch file from https://github.com/samba-team/samba/pull/76.patch is attached

github-pr-sendfile_bsd_linux-76.patch (13K) Download Attachment