| Summary: | ftpd did not use sendfile(2) when sending regular files | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Jukka Ukkonen <Jukka.Ukkonen> | ||||
| Component: | bin | Assignee: | dan <dan> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 3.2-RELEASE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
Responsible Changed From-To: freebsd-bugs->adrian I'll handle this one and probably make it a compile time option .. Responsible Changed From-To: adrian->dan This patch is on my review plate State Changed From-To: open->closed This functionality exists now. |
The ftpd could have performed better by using the sendfile(2) call instead of mmap(), read(), write(), and munmap() combination while sending out a regular file. Fix: A tentative quick hack patch below. Modify it, if you think changes are needed. Otherwise: share and enjoy. ;-) How-To-Repeat: Check the ftpd code for sending regular files to see what it does, and try it as it is and with sendfile() replacing the looping method using mmap(), read(), write(), and munmap() calls.