Date: Sun, 26 Oct 2003 09:57:26 -0800 From: John-Mark Gurney <gurney_j@efn.org> To: vivek@CS.Princeton.EDU Cc: freebsd-hackers@freebsd.org Subject: Re: Some mmap observations compared to Linux 2.6/OpenBSD Message-ID: <20031026175726.GC558@funkthat.com> In-Reply-To: <1067183332.3f9bece4c0cf4@webmail.cs.princeton.edu> References: <1066789354.21430.39.camel@boxster.onthenet.com.au> <20031022082953.GA69506@rot13.obsecurity.org> <1066816287.25609.34.camel@boxster.onthenet.com.au> <20031022095754.GA70026@rot13.obsecurity.org> <1066820436.25609.93.camel@boxster.onthenet.com.au> <xzpk76sc425.fsf@dwp.des.no> <1067183332.3f9bece4c0cf4@webmail.cs.princeton.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
vivek@CS.Princeton.EDU wrote this message on Sun, Oct 26, 2003 at 10:48 -0500: > We decided to avoid all mmap/mincore operations, and opted to instead > add a flag to sendfile such that we can try sendfile and have it return > an error (instead of blocking) when a page isn't in memory. I was thinking about this myself, but how do you prevent spinning on the sendfile waiting for the page to become available? You have the send space to wait for on the socket, but there is no equivalent kqueue event to wait for when a page becomes available. Do you simply always spin on sendfile since the socket keeps returning available for writing? I have a similar web server design that I wrote at the end of last year, and your paper brought to light to problems of sendfile, so I have been thinking of switching to async io, since there you can get completion status when the io completes. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031026175726.GC558>