From owner-freebsd-arch@FreeBSD.ORG Sat Jan 3 20:30:26 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 468A316A4CE for ; Sat, 3 Jan 2004 20:30:26 -0800 (PST) Received: from smtp.mho.com (smtp.mho.net [64.58.4.6]) by mx1.FreeBSD.org (Postfix) with SMTP id DECE543D49 for ; Sat, 3 Jan 2004 20:30:24 -0800 (PST) (envelope-from scottl@freebsd.org) Received: (qmail 97906 invoked by uid 1002); 4 Jan 2004 04:30:22 -0000 Received: from unknown (HELO freebsd.org) (64.58.1.252) by smtp.mho.net with SMTP; 4 Jan 2004 04:30:22 -0000 Message-ID: <3FF7967A.1090401@freebsd.org> Date: Sat, 03 Jan 2004 21:28:42 -0700 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031103 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "M. Warner Losh" References: <20040103.153644.107852018.imp@bsdimp.com> In-Reply-To: <20040103.153644.107852018.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: arch@freebsd.org Subject: Re: Simple patch: Make DFLTPHYS an option X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2004 04:30:26 -0000 M. Warner Losh wrote: > My brother was talking to me about the problems he was having with > scanners. Turns out that he needed to incrase DFLTYPHYS to 128k to > make it work. I'd like to make this a simple option, but wanted to > ask people about it first, for both DFLTPHYS and MAXPHYS. This would > be an experts only option, since you can do bad things with some > drivers (eg, aha can't do more than 64k of physio at a time, and bad > things may happen if you try > 128k). > > The folks on IRC cautioned that this is not for the feign of heart, > since there's 'issues' with physio, MAXPHYS, etc. > > Comments? > > Warner > > P.S. Here's a trivial patch to implement this: > > ==== //depot/user/imp/newcard/conf/options#70 - /dell/imp/p4/newcard/src/sys/conf/options ==== > @@ -470,10 +470,12 @@ > DEBUG opt_global.h > DEBUG_LOCKS opt_global.h > DEBUG_VFS_LOCKS opt_global.h > +DFLTPHYS opt_global.h > DIAGNOSTIC opt_global.h > INVARIANT_SUPPORT opt_global.h > INVARIANTS opt_global.h > LOOKUP_SHARED opt_global.h > +MAXPHYS opt_global.h > MCLSHIFT opt_global.h > MSIZE opt_global.h > REGRESSION opt_global.h I'm really not comfortable with a patch like this. Changing the default i/o size is better served as a per-driver tunable/sysctl, like it is in aac(4). The key, though, is to ensure that the block system is actually honoring the per-device disk.d_maxsize variable. I'm not sure if it is right now. Also, increasing MAXPHYS will lead to your KVA being chewed up quite quickly, which in turn will lead to unpleasant panics. A lot of work needs to go in to fixing this; increasing the value here has little value even to people who shun seatbelts. Scott