[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1488324131.9415.278.camel@edumazet-glaptop3.roam.corp.google.com>
Date: Tue, 28 Feb 2017 15:22:11 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Andy Lutomirski <luto@...capital.net>
Cc: Willem de Bruijn <willemdebruijn.kernel@...il.com>,
Michael Kerrisk <mtk.manpages@...il.com>,
netdev <netdev@...r.kernel.org>,
Willem de Bruijn <willemb@...gle.com>,
Linux API <linux-api@...r.kernel.org>
Subject: Re: [PATCH RFC v2 00/12] socket sendmsg MSG_ZEROCOPY
On Tue, 2017-02-28 at 14:52 -0800, Andy Lutomirski wrote:
> The user pages are a gift to the kernel. The application may not
> modify this memory ever, otherwise the page cache and on-disk data may
> differ.
>
> This is just not okay IMO.
TCP works just fine in this case.
TX checksum will be computed by the NIC after/while data is copied.
If really the application changes the data, that will not cause any
problems, other than user side consistency.
This is why we require a copy (for all buffers that came from zero-copy)
if network stack hits a device that can not offload TX checksum.
Even pwrite() does not guarantee consistency if multiple threads are
using it on overlapping regions.
Powered by blists - more mailing lists