Re: hacking - aio_sendfile()

2013-07-11 Thread David Xu
On 2013/07/11 14:17, Konstantin Belousov wrote: On Wed, Jul 10, 2013 at 04:36:23PM -0700, Adrian Chadd wrote: Hiya, I've started writing an aio_sendfile() syscall. http://people.freebsd.org/~adrian/ath/20130710-aio-sendfile-3.diff Yes, the diff is against -HEAD and not stable/9. It's totally

Re: hacking - aio_sendfile()

2013-07-11 Thread Konstantin Belousov
On Thu, Jul 11, 2013 at 12:04:57PM -0700, Scott Long wrote: > > On Jul 11, 2013, at 11:48 AM, Konstantin Belousov wrote: > > > On Thu, Jul 11, 2013 at 11:44:32AM -0700, Scott Long wrote: > >> > >> On Jul 10, 2013, at 11:17 PM, Konstantin Belousov > >> wrote: > >> > >>> On Wed, Jul 10, 2013 a

Re: hacking - aio_sendfile()

2013-07-11 Thread Scott Long
On Jul 11, 2013, at 11:48 AM, Konstantin Belousov wrote: > On Thu, Jul 11, 2013 at 11:44:32AM -0700, Scott Long wrote: >> >> On Jul 10, 2013, at 11:17 PM, Konstantin Belousov >> wrote: >> >>> On Wed, Jul 10, 2013 at 04:36:23PM -0700, Adrian Chadd wrote: Hiya, I've started wri

Re: hacking - aio_sendfile()

2013-07-11 Thread Scott Long
On Jul 11, 2013, at 2:56 AM, Konstantin Belousov wrote: > On Thu, Jul 11, 2013 at 02:39:00AM -0700, Adrian Chadd wrote: >> On 11 July 2013 02:36, Konstantin Belousov wrote: >> >>> No, it is not disk I/O which is problematic there. It is socket I/O >>> e.g. wait for the socket buffers lomark in

Re: hacking - aio_sendfile()

2013-07-11 Thread Konstantin Belousov
On Thu, Jul 11, 2013 at 11:44:32AM -0700, Scott Long wrote: > > On Jul 10, 2013, at 11:17 PM, Konstantin Belousov wrote: > > > On Wed, Jul 10, 2013 at 04:36:23PM -0700, Adrian Chadd wrote: > >> Hiya, > >> > >> I've started writing an aio_sendfile() syscall. > >> > >> http://people.freebsd.org/

Re: hacking - aio_sendfile()

2013-07-11 Thread Scott Long
On Jul 10, 2013, at 11:17 PM, Konstantin Belousov wrote: > On Wed, Jul 10, 2013 at 04:36:23PM -0700, Adrian Chadd wrote: >> Hiya, >> >> I've started writing an aio_sendfile() syscall. >> >> http://people.freebsd.org/~adrian/ath/20130710-aio-sendfile-3.diff >> >> Yes, the diff is against -HEAD

Re: hacking - aio_sendfile()

2013-07-11 Thread Adrian Chadd
On 11 July 2013 07:51, Gleb Smirnoff wrote: > On Thu, Jul 11, 2013 at 07:45:19AM -0700, Adrian Chadd wrote: > A> I reference the source/dest FDs in the queue method. Is that not good > enough? > > I see. Should probably work, but needs testing. It's terrible - I'd think I should pass the file re

Re: hacking - aio_sendfile()

2013-07-11 Thread Gleb Smirnoff
On Thu, Jul 11, 2013 at 07:45:19AM -0700, Adrian Chadd wrote: A> I reference the source/dest FDs in the queue method. Is that not good enough? I see. Should probably work, but needs testing. -- Totus tuus, Glebius. ___ freebsd-current@freebsd.org maili

Re: hacking - aio_sendfile()

2013-07-11 Thread Adrian Chadd
I reference the source/dest FDs in the queue method. Is that not good enough? -adrian ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@fr

Re: hacking - aio_sendfile()

2013-07-11 Thread Gleb Smirnoff
Adrian, On Wed, Jul 10, 2013 at 04:36:23PM -0700, Adrian Chadd wrote: A> I've started writing an aio_sendfile() syscall. A> A> http://people.freebsd.org/~adrian/ath/20130710-aio-sendfile-3.diff A> A> Yes, the diff is against -HEAD and not stable/9. A> A> It's totally horrible, hackish and lik

Re: hacking - aio_sendfile()

2013-07-11 Thread Konstantin Belousov
On Thu, Jul 11, 2013 at 02:39:00AM -0700, Adrian Chadd wrote: > On 11 July 2013 02:36, Konstantin Belousov wrote: > > > No, it is not disk I/O which is problematic there. It is socket I/O > > e.g. wait for the socket buffers lomark in the kern_sendfile() which > > causes unbounded sleep. Look for

Re: hacking - aio_sendfile()

2013-07-11 Thread Adrian Chadd
On 11 July 2013 02:36, Konstantin Belousov wrote: > No, it is not disk I/O which is problematic there. It is socket I/O > e.g. wait for the socket buffers lomark in the kern_sendfile() which > causes unbounded sleep. Look for the sbwait() call, both in the > kern_sendfile() itself, and in the pru

Re: hacking - aio_sendfile()

2013-07-11 Thread Konstantin Belousov
On Thu, Jul 11, 2013 at 01:37:19AM -0700, Adrian Chadd wrote: > Hiya, > > I'm more interested in the API than the implementation at the moment. > > Yes, you're right - it should eventually be driven using disk io > completion upcalls which triggers the push of data into the socket > buffer. I tot

Re: hacking - aio_sendfile()

2013-07-11 Thread Adrian Chadd
Hiya, I'm more interested in the API than the implementation at the moment. Yes, you're right - it should eventually be driven using disk io completion upcalls which triggers the push of data into the socket buffer. I totally agree. I'm hacking up some libevent-ish looking thing that uses kqueue

Re: hacking - aio_sendfile()

2013-07-10 Thread Konstantin Belousov
On Wed, Jul 10, 2013 at 04:36:23PM -0700, Adrian Chadd wrote: > Hiya, > > I've started writing an aio_sendfile() syscall. > > http://people.freebsd.org/~adrian/ath/20130710-aio-sendfile-3.diff > > Yes, the diff is against -HEAD and not stable/9. > > It's totally horrible, hackish and likely bad

hacking - aio_sendfile()

2013-07-10 Thread Adrian Chadd
Hiya, I've started writing an aio_sendfile() syscall. http://people.freebsd.org/~adrian/ath/20130710-aio-sendfile-3.diff Yes, the diff is against -HEAD and not stable/9. It's totally horrible, hackish and likely bad. I've only done some very, very basic testing to ensure it actually works; i ha