Ticket #3 (closed enhancement: wontfix)

Opened 21 months ago

Last modified 5 months ago

Write to pipe log using vmsplice()

Reported by: edsiper Owned by: edsiper
Priority: minor Milestone: Future Release
Component: Logger Version:
Keywords: Cc:

Description

Linux kernel provides a syscall named vmsplice() which allows to write an
iov struct with zero copy to a pipe, we must use vmsplice() instead of
writev() for that procedure.

Change History

comment:1 Changed 19 months ago by charlie_brown

I was skimming through the code and it came to my attention the following commented snippet:

        /* for some reason, vmsplice is not working as expected for us, 
         * maybe we need to fix something here, at the moment
         * we will keep using writev to push the iovec struct to the pipe
         *
         *
         * n = vmsplice(fd, 
         *            (const struct iovec *) mk_io->io, 
         *            mk_io->iov_idx, 
         *            SPLICE_F_GIFT);
         * return n;
         */

1) vmsplice's man page states that when the SPLICE_F_GIFT flag is present, the memory pointed by each iovec's iov_base MUST be aligned to page boundary:

"Data must also be properly page aligned, both in memory and length."

which, if one dumps the iov_base addresses at run-time, they're not.

2) BUT if we remove SPLICE_F_GIFT, the logger writes to the files with interleaved garbage from the response headers; I haven't checked why.

comment:2 Changed 11 months ago by edsiper

  • Priority changed from major to minor
  • Milestone set to Future Release

comment:3 Changed 5 months ago by davidlohr

  • Status changed from new to closed
  • Resolution set to wontfix

This code has been determined to be unapplicable and has already been removed.

Note: See TracTickets for help on using tickets.