Re: zero copy code checkin in 2 days, new snapshot

2002-06-24 Thread Kenneth D. Merry

On Mon, Jun 24, 2002 at 01:17:03 -0500, Mike Silbersack wrote:
 On Sun, 23 Jun 2002, Kenneth D. Merry wrote:
 
  I'm planning on checking in the zero copy sockets code Tuesday evening,
  MDT.  If there are any concerns, I'm more than willing to delay it.
 
 Out of curiousity, what happens when the page being write()n is a mmap'd
 page shared by multiple processes?  Will the page be shared?  That could
 be a big reduction in mbuf cluster usage on some http/ftp systems, I'd
 guess.

The page would be shared, until one of the processes decides to write to it
while it is still referenced in the kernel.  If that happens, it'll get
copied.

Ken
-- 
Kenneth Merry
[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: zero copy code checkin in 2 days, new snapshot

2002-06-24 Thread Dag-Erling Smorgrav

Kenneth D. Merry [EMAIL PROTECTED] writes:
 I'm planning on checking in the zero copy sockets code Tuesday evening,
 MDT.

Great!

DES
-- 
Dag-Erling Smorgrav - [EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: zero copy code checkin in 2 days, new snapshot

2002-06-24 Thread Mike Silbersack


On Mon, 24 Jun 2002, Kenneth D. Merry wrote:

 On Mon, Jun 24, 2002 at 01:17:03 -0500, Mike Silbersack wrote:
  On Sun, 23 Jun 2002, Kenneth D. Merry wrote:
 
   I'm planning on checking in the zero copy sockets code Tuesday evening,
   MDT.  If there are any concerns, I'm more than willing to delay it.
 
  Out of curiousity, what happens when the page being write()n is a mmap'd
  page shared by multiple processes?  Will the page be shared?  That could
  be a big reduction in mbuf cluster usage on some http/ftp systems, I'd
  guess.

 The page would be shared, until one of the processes decides to write to it
 while it is still referenced in the kernel.  If that happens, it'll get
 copied.

 Ken

Cool, thttpd / others should benefit greatly then.

Mike Silby Silbersack


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: zero copy code checkin in 2 days, new snapshot

2002-06-24 Thread Andre Oppermann

Mike Silbersack wrote:
 
 On Mon, 24 Jun 2002, Kenneth D. Merry wrote:
 
  On Mon, Jun 24, 2002 at 01:17:03 -0500, Mike Silbersack wrote:
   On Sun, 23 Jun 2002, Kenneth D. Merry wrote:
  
I'm planning on checking in the zero copy sockets code Tuesday evening,
MDT.  If there are any concerns, I'm more than willing to delay it.
  
   Out of curiousity, what happens when the page being write()n is a mmap'd
   page shared by multiple processes?  Will the page be shared?  That could
   be a big reduction in mbuf cluster usage on some http/ftp systems, I'd
   guess.
 
  The page would be shared, until one of the processes decides to write to it
  while it is still referenced in the kernel.  If that happens, it'll get
  copied.
 
  Ken
 
 Cool, thttpd / others should benefit greatly then.

The last time I checked thttpd didn't even use sendfile(2). It does
use accf_http(9). Maybe kqueue(2) could speed it up further.

-- 
Andre

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: zero copy code checkin in 2 days, new snapshot

2002-06-24 Thread Mike Silbersack


On Mon, 24 Jun 2002, Andre Oppermann wrote:

 Mike Silbersack wrote:
  Cool, thttpd / others should benefit greatly then.

 The last time I checked thttpd didn't even use sendfile(2). It does
 use accf_http(9). Maybe kqueue(2) could speed it up further.

 --
 Andre

I thought that thttpd used kqueue (as of recent versions), and write()s
from mmap'd files.  I could be wrong, of course.  (The program seems to
evolve relatively quickly.)

Mike Silby Silbersack


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: zero copy code checkin in 2 days, new snapshot

2002-06-24 Thread Alfred Perlstein

* Mike Silbersack [EMAIL PROTECTED] [020624 10:24] wrote:
 
 On Mon, 24 Jun 2002, Andre Oppermann wrote:
 
  Mike Silbersack wrote:
   Cool, thttpd / others should benefit greatly then.
 
  The last time I checked thttpd didn't even use sendfile(2). It does
  use accf_http(9). Maybe kqueue(2) could speed it up further.
 
  --
  Andre
 
 I thought that thttpd used kqueue (as of recent versions), and write()s
 from mmap'd files.  I could be wrong, of course.  (The program seems to
 evolve relatively quickly.)

I submitted some patches to use sendfile(2) that weren't accepted
for some reason.  It's not too hard, you just have to adjust the code
not to close(2) the descriptors and make the mmap() function a stub
type thing.

really out of date...
http://people.freebsd.org/~alfred/thttpd/thttpd-sendfile-acceptfilter.diff


-- 
-Alfred Perlstein [[EMAIL PROTECTED]]
'Instead of asking why a piece of software is using 1970s technology,
 start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: zero copy code checkin in 2 days, new snapshot

2002-06-24 Thread David O'Brien

On Mon, Jun 24, 2002 at 10:33:05AM -0700, Alfred Perlstein wrote:
 I submitted some patches to use sendfile(2) that weren't accepted
 for some reason.  It's not too hard, you just have to adjust the code
 not to close(2) the descriptors and make the mmap() function a stub
 type thing.
 
 really out of date...
 http://people.freebsd.org/~alfred/thttpd/thttpd-sendfile-acceptfilter.diff

Why don't you add them as patches to the port?

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: zero copy code checkin in 2 days, new snapshot

2002-06-24 Thread Giorgos Keramidas

On 2002-06-24 12:56 +, David O'Brien wrote:
 On Mon, Jun 24, 2002 at 10:33:05AM -0700, Alfred Perlstein wrote:
  I submitted some patches to use sendfile(2) that weren't accepted
  for some reason.  It's not too hard, you just have to adjust the code
  not to close(2) the descriptors and make the mmap() function a stub
  type thing.
 
  really out of date...
  http://people.freebsd.org/~alfred/thttpd/thttpd-sendfile-acceptfilter.diff

 Why don't you add them as patches to the port?

Because he isn't prepared to maintain an external patch for an ever
changing part of the vendor code?  I don't blame him or anyone else
much, if that's why...


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: zero copy code checkin in 2 days, new snapshot

2002-06-23 Thread Mike Silbersack



On Sun, 23 Jun 2002, Kenneth D. Merry wrote:

 I'm planning on checking in the zero copy sockets code Tuesday evening,
 MDT.  If there are any concerns, I'm more than willing to delay it.

Out of curiousity, what happens when the page being write()n is a mmap'd
page shared by multiple processes?  Will the page be shared?  That could
be a big reduction in mbuf cluster usage on some http/ftp systems, I'd
guess.

Mike Silby Silbersack



To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message