From owner-freebsd-doc Mon Mar 10 15:38:12 2003 Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A39DF37B401; Mon, 10 Mar 2003 15:38:09 -0800 (PST) Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id AC5BD43FBF; Mon, 10 Mar 2003 15:38:08 -0800 (PST) (envelope-from keramida@freebsd.org) Received: from gothmog.gr (patr530-a084.otenet.gr [212.205.215.84]) by mailsrv.otenet.gr (8.12.8/8.12.8) with ESMTP id h2ANc5NJ027920; Tue, 11 Mar 2003 01:38:06 +0200 (EET) Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.8/8.12.8) with ESMTP id h2ANc5Tf007159; Tue, 11 Mar 2003 01:38:05 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from giorgos@localhost) by gothmog.gr (8.12.8/8.12.8/Submit) id h2ANc5NN007158; Tue, 11 Mar 2003 01:38:05 +0200 (EET) (envelope-from keramida@freebsd.org) Date: Tue, 11 Mar 2003 01:38:05 +0200 From: Giorgos Keramidas To: Sean Chittenden Cc: freebsd-doc@freebsd.org Subject: Re: Updated sendfile(2)... Message-ID: <20030310233805.GA7010@gothmog.gr> References: <20030310231907.GX79234@perrin.int.nxad.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030310231907.GX79234@perrin.int.nxad.com> Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 2003-03-10 15:19, Sean Chittenden wrote: > Small but important update for sendfile(2) to include a TUNING > section. This patch also updates tuning(7) to include a reference to > sendfile(2)'s TUNING section. > > http://people.freebsd.org/~seanc/patches/#sendfile_2_tuning Seems ok. Just a few minor details that I noticed are shown below: : Index: share/man/man7/tuning.7 : =================================================================== : RCS file: /home/ncvs/src/share/man/man7/tuning.7,v : retrieving revision 1.59 : diff -u -r1.59 tuning.7 : --- share/man/man7/tuning.7 27 Dec 2002 12:15:34 -0000 1.59 : +++ share/man/man7/tuning.7 10 Mar 2003 23:12:28 -0000 : @@ -774,7 +774,11 @@ : with : .Va kern.maxusers : so you should not need to modify this parameter except under extreme : -circumstances. : +circumstances. See the : +.Dq TUNING : +section in the : +.Xr sendfile 2 : +man page for details. You should probably avoid starting a sentence on the same line as the previous sentence here: +See the +.Dq TUNING +section in the +.Xr sendfile 2 +man page for details. This is a shorter diff and doesn't touch parts of the mdoc source that don't need to be touched anyway :) : --- lib/libc/sys/sendfile.2 19 Dec 2002 09:40:25 -0000 1.16 : +++ lib/libc/sys/sendfile.2 10 Mar 2003 23:12:28 -0000 : @@ -106,6 +106,41 @@ : implementation of : .Fn sendfile : is "zero-copy", meaning that it has been optimized so that copying of the file data is avoided. : +.Sh TUNING : +Internally this system call uses a special : +.Xr sendfile 2 : +buffer : +.Pq Fa struct sf_buf Quote this: .Pq Fa "struct sf_buf" : +to handle sending file data to the client. If the sending socket is : +blocking and there are not enough sendfile buffers available, Start sentences on new line. : +If the sending socket is non-blocking and there are not enough : +sendfile buffers available, the call will block and wait for the : +necessary buffers to become available before finishing the call. : +.Pp : +The number of : +.Fa sf_buf's Not quite right. This will mark up the 's part as Fa too. You can always write this as: .Fa sf_buf Ns s or even, if you like the 's thing, like this: .Fa sf_buf Ns 's : +allocated should be proportional to the number of nmbclusters used to : +send data to a client via : +.Xr sendfile 2 : : +tune accordingly to avoid blocking! Busy installations that make : +tune accordingly to avoid blocking! Busy installations that make : +extensive use of : +.Xr sendfile 2 "Tune accordingly..." is really a new sentence here. Breaking the lines at the end of the sentences, this can be written as: +allocated should be proportional to the number of nmbclusters used to +send data to a client via +.Xr sendfile 2. +Tune accordingly to avoid blocking! +Busy installations that make extensive use of +.Xr sendfile 2 ... : +kernel configuration tunable. The number of sendfile buffers scales with Break at end of sentence here too. - Giorgos To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message