Re: problem in do_tcp_sendpages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jamie Lokier <jamie@xxxxxxxxxxxxx>
Date: Fri, 23 Dec 2005 05:57:06 +0000

> I'm not sure if it's cache-safe, on architectures which have
> non-coherent, virtually-indexed caches (like MIPS etc.).  There is no
> explicit step after modifying the data in user-space which which
> updates the cached page in kernel-space/dma-space.  Do you know about
> that?  That's unlike sendmsg(), which does it at the time, and
> sendfile(), where it's done when the file is written before
> sendfile().

pci_{map,unmap}_*() does a cache flush on such systems.

> That wouldn't work because the app also needs to know when it can
> write more data to the socket, independently of when it can recycle
> buffers.

If the buffers are free'd up by ACKs, socket space exists as well.
You can add that condition to the test to make it explicit.

> So it would need to be a separate POLLX flag.  POLLWRBAND could
> probably be abused for it, if there was a desire to wedge it
> uncomfortably into the standard API.

But you just said you don't want "just POLLX event" but
"POLLX plus socket write space available", which we can
make POLL_OUT indicate when the special socket option is
set.

It's a shame that all of these conditions are very similar,
yet different enough to require explicit settings. :-/

> No other OS which has sendfile() (there are a lot) has a way to do
> check when buffers are freed, unfortunately - they don't even have
> SIOCOUTQ (not even FreeBSD).

Not really our problem :-)

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux