From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 16:36:59 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88FBC1065685; Fri, 24 Oct 2008 16:36:59 +0000 (UTC) (envelope-from thierry@herbelot.com) Received: from postfix2-g20.free.fr (postfix2-g20.free.fr [212.27.60.43]) by mx1.freebsd.org (Postfix) with ESMTP id 409748FC08; Fri, 24 Oct 2008 16:36:59 +0000 (UTC) (envelope-from thierry@herbelot.com) Received: from smtp6-g19.free.fr (smtp6-g19.free.fr [212.27.42.36]) by postfix2-g20.free.fr (Postfix) with ESMTP id A88572C108F2; Fri, 24 Oct 2008 16:18:59 +0200 (CEST) Received: from smtp6-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp6-g19.free.fr (Postfix) with ESMTP id 8968217EB7; Fri, 24 Oct 2008 18:19:13 +0200 (CEST) Received: from mail.herbelot.nom (bne75-4-82-227-159-103.fbx.proxad.net [82.227.159.103]) by smtp6-g19.free.fr (Postfix) with ESMTP id 4BF3A17824; Fri, 24 Oct 2008 18:19:02 +0200 (CEST) Received: from diversion.herbelot.nom (diversion.herbelot.nom [192.168.2.6]) by mail.herbelot.nom (8.14.1/8.14.1) with ESMTP id m9OGIhoU028626; Fri, 24 Oct 2008 18:18:44 +0200 (CEST) From: Thierry Herbelot To: hackers@freebsd.org Date: Fri, 24 Oct 2008 18:18:36 +0200 User-Agent: KMail/1.9.10 X-Warning: Windows can lose your files X-Op-Sys: Le FriBi de la mort qui tue X-Org: TfH&Co X-MailScanner: Found to be clean MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810241818.37262.thierry@herbelot.com> X-Mailman-Approved-At: Fri, 24 Oct 2008 16:42:48 +0000 Cc: freebsd-fs@freebsd.org Subject: question about sb->st_blksize in src/sys/kern/vfs_vnops.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: thierry@herbelot.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2008 16:36:59 -0000 Hello, the [SUBJ] file contains the following extract (around line 705) : * Default to PAGE_SIZE after much discussion. * XXX: min(PAGE_SIZE, vp->v_bufobj.bo_bsize) may be more correct. */ sb->st_blksize = PAGE_SIZE; which arrived around four years ago, with revision 1.211 (see http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/kern/vfs_vnops.c.diff?r1=1.210;r2=1.211;f=h) the net effect of this change is to decrease the block buffer size used in libc/stdio from 16 kbytes (derived from the underlying ufs partition) to PAGE_SIZE ==4 kbytes (fixed value), and consequently the I/O bandwidth is lowered (this is on a slow Flash). I have patched the kernel with a larger, fixed value (simply 4*PAGE_SIZE, to revert to the block size previoulsly used), and the kernel and world seem to be running fine. Seeing the XXX coment above, I'm a bit worried about keeping this new st_blksize value. are there any drawbacks with running with this bigger buffer size value ? TfH