Re: fcntl(F_RDAHEAD)

2009-09-22 Thread Igor Sysoev
On Fri, Sep 18, 2009 at 10:40:27AM +0300, Kostik Belousov wrote: > On Thu, Sep 17, 2009 at 03:26:41PM -0700, Xin LI wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > Hi, Igor, > > > > Igor Sysoev wrote: > > > Hi, > > > > > > nginx-0.8.15 can use completely non-blocking sendfi

Re: fcntl(F_RDAHEAD)

2009-09-22 Thread Igor Sysoev
On Mon, Sep 21, 2009 at 02:29:09PM +0300, Kostik Belousov wrote: > > > What I dislike about the patch is the new kernel-private flag that is > > > eaten from the open(2) flags namespace. We do already have FHASLOCK, > > > so far the only such flag. > > > > We can change > > intf_seqcount; >

Re: fcntl(F_RDAHEAD)

2009-09-22 Thread Igor Sysoev
On Tue, Sep 22, 2009 at 11:53:46AM +0300, Kostik Belousov wrote: > On Tue, Sep 22, 2009 at 11:28:48AM +0400, Igor Sysoev wrote: > > On Mon, Sep 21, 2009 at 02:29:09PM +0300, Kostik Belousov wrote: > > > > > On Mon, Sep 21, 2009 at 03:12:45PM +0400, Igor Sysoev wrote: > > > > > > > What I dislike

Re: fcntl(F_RDAHEAD)

2009-09-22 Thread Kostik Belousov
On Tue, Sep 22, 2009 at 11:28:48AM +0400, Igor Sysoev wrote: > On Mon, Sep 21, 2009 at 02:29:09PM +0300, Kostik Belousov wrote: > > > On Mon, Sep 21, 2009 at 03:12:45PM +0400, Igor Sysoev wrote: > > > > > What I dislike about the patch is the new kernel-private flag that is > > > > eaten from the

Re: fcntl(F_RDAHEAD)

2009-09-22 Thread Igor Sysoev
On Mon, Sep 21, 2009 at 02:29:09PM +0300, Kostik Belousov wrote: > On Mon, Sep 21, 2009 at 03:12:45PM +0400, Igor Sysoev wrote: > > > What I dislike about the patch is the new kernel-private flag that is > > > eaten from the open(2) flags namespace. We do already have FHASLOCK, > > > so far the o

Re: fcntl(F_RDAHEAD)

2009-09-21 Thread Kostik Belousov
On Mon, Sep 21, 2009 at 03:12:45PM +0400, Igor Sysoev wrote: > On Fri, Sep 18, 2009 at 10:40:27AM +0300, Kostik Belousov wrote: > > > On Thu, Sep 17, 2009 at 03:26:41PM -0700, Xin LI wrote: > > > -BEGIN PGP SIGNED MESSAGE- > > > Hash: SHA1 > > > > > > Hi, Igor, > > > > > > Igor Sysoev wr

Re: fcntl(F_RDAHEAD)

2009-09-21 Thread Igor Sysoev
On Fri, Sep 18, 2009 at 10:40:27AM +0300, Kostik Belousov wrote: > On Thu, Sep 17, 2009 at 03:26:41PM -0700, Xin LI wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > Hi, Igor, > > > > Igor Sysoev wrote: > > > Hi, > > > > > > nginx-0.8.15 can use completely non-blocking sendfi

Re: fcntl(F_RDAHEAD)

2009-09-18 Thread Kostik Belousov
On Thu, Sep 17, 2009 at 03:26:41PM -0700, Xin LI wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, Igor, > > Igor Sysoev wrote: > > Hi, > > > > nginx-0.8.15 can use completely non-blocking sendfile() using SF_NODISKIO > > flag. When sendfile() returns EBUSY, nginx calls aio_read()

Re: fcntl(F_RDAHEAD)

2009-09-17 Thread Igor Sysoev
On Thu, Sep 17, 2009 at 03:50:36PM -0700, Alfred Perlstein wrote: > Please do not make the option have the same name but different > semantics. > > Strongly suggest adding the Darwin name as a toggle and a FreeBSD > name as a specific size option. Then it may be: case F_RDAHEAD:

Re: fcntl(F_RDAHEAD)

2009-09-17 Thread Alfred Perlstein
Please do not make the option have the same name but different semantics. Strongly suggest adding the Darwin name as a toggle and a FreeBSD name as a specific size option. -Alfred * Xin LI [090917 15:27] wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, Igor, > > Igor Sysoev wr

Re: fcntl(F_RDAHEAD)

2009-09-17 Thread Xin LI
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Igor, Igor Sysoev wrote: > Hi, > > nginx-0.8.15 can use completely non-blocking sendfile() using SF_NODISKIO > flag. When sendfile() returns EBUSY, nginx calls aio_read() to read single > byte. The first aio_read() preloads the first 128K part of

fcntl(F_RDAHEAD)

2009-09-17 Thread Igor Sysoev
Hi, nginx-0.8.15 can use completely non-blocking sendfile() using SF_NODISKIO flag. When sendfile() returns EBUSY, nginx calls aio_read() to read single byte. The first aio_read() preloads the first 128K part of a file in VM cache, however, all successive aio_read()s preload just 16K parts of the