From owner-freebsd-stable@FreeBSD.ORG Thu May 8 13:37:54 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACBD11065673 for ; Thu, 8 May 2008 13:37:54 +0000 (UTC) (envelope-from freebsd-stable@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 342568FC14 for ; Thu, 8 May 2008 13:37:53 +0000 (UTC) (envelope-from freebsd-stable@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Ju6Jj-0003he-08 for freebsd-stable@freebsd.org; Thu, 08 May 2008 13:37:51 +0000 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 May 2008 13:37:50 +0000 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 08 May 2008 13:37:50 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-stable@freebsd.org From: Ivan Voras Date: Thu, 08 May 2008 15:37:42 +0200 Lines: 72 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig6DA7B003B2455196A5899AB1" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.12 (X11/20080227) In-Reply-To: X-Enigmail-Version: 0.95.0 Sender: news Subject: Re: Dreadful gmirror performance - suggested changes to 'prefer' X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 13:37:54 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6DA7B003B2455196A5899AB1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Pete French wrote: >> Couple of ideas: >> >> - Don't use "128" as the default since it will lead people to think >> there's an 8-bit quantity behind the setting (and subsequently develop= >> weird theories about how the setting works), when it isn't so. Use 100= >> or 1000. >=20 > Are you sure it isn't an 8 bit value underneath ? I know it is defined = as > an int, but trying to set it to anything outside the range 0-255 result= s > in it wrapping round (e.g. you try making the defalt 1000 and it comes > out as 232). I havent looked in detail as *why* thats happening, but it= > certainly behaves like it is 8 bits, hence my choice of default. Ah, I see; It's defined as u_int d_priority; /* Disk priority. */ in struct g_mirror_disk but as uint8_t md_priority; /* Disk priority. */ in struct g_mirror_metadata. Ok, 128 looks reasonable now. > I thought about that, but the priority scheme doesnt just specify one > drive, it specifies a whole set - effectively you find the highest usab= le > drive. Just defining one isn't sufficient, you need to have a defined > way of falling back if that one isn't active. Secondly I want to avoid > having to search the whole list event time. Currently the list of drive= s > is created in priority order (no matter what the balance algorithm) so > the 'prefer' algorithm simply traverses the list looking for the first > active drive. I wanted to keep that and thus simply convert the list to= > a tailq so I can traverse it both ways, rather than having to seek the > whole list every time. It keeps the code as close to the current code > as possible. Hmm, it would seem you need "N-and-upper" and "N-and-lower", but this is inconvenient. Your original idea is probably better. > I'll get an initial version out and then maybe take a look at doing > something more complex though. --------------enig6DA7B003B2455196A5899AB1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIIwImldnAQVacBcgRAsjSAJ9tPDR9d1k1nsU9XV1CbmA6Z2TlkgCgpDFI p5FTZOLH2ITU2Nb5qg0yWX8= =JEsm -----END PGP SIGNATURE----- --------------enig6DA7B003B2455196A5899AB1--