From owner-freebsd-arch@FreeBSD.ORG Mon Oct 24 23:38:42 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4443D106566C; Mon, 24 Oct 2011 23:38:42 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 242CF8FC15; Mon, 24 Oct 2011 23:38:41 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.5/8.14.5) with ESMTP id p9ON6NdL014419; Mon, 24 Oct 2011 16:06:24 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.5/8.14.4/Submit) id p9ON6NMf014418; Mon, 24 Oct 2011 16:06:23 -0700 (PDT) (envelope-from obrien) Date: Mon, 24 Oct 2011 16:06:23 -0700 From: "David O'Brien" To: Adrian Chadd Message-ID: <20111024230623.GB14274@dragon.NUXI.org> Mail-Followup-To: obrien@freebsd.org, Adrian Chadd , freebsd-arch@freebsd.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 9.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-arch@freebsd.org Subject: Re: FreeBSD-10 -> FreeBSD-9.9 ? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2011 23:38:42 -0000 On Mon, Oct 10, 2011 at 11:04:13AM +0800, Adrian Chadd wrote: > Just an idle comment - why don't we just rename FreeBSD-10 to > FreeBSD-9.9 for now, and give the ports/developers some time to "fix" > bad autoconf/automake scripts? > That way -current can still be used for testing/development. I figured someone else would respond by now... \aol{me too!} (though I suggest 9.99 as a value we'd never hit) I've made this change on all my local systems. -- -- David (obrien@FreeBSD.org) From owner-freebsd-arch@FreeBSD.ORG Tue Oct 25 07:31:41 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E16361065670; Tue, 25 Oct 2011 07:31:41 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.c2i.net [212.247.154.194]) by mx1.freebsd.org (Postfix) with ESMTP id 4129C8FC0C; Tue, 25 Oct 2011 07:31:40 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 195545820; Tue, 25 Oct 2011 09:21:36 +0200 From: Hans Petter Selasky To: freebsd-arch@freebsd.org, obrien@freebsd.org Date: Tue, 25 Oct 2011 09:18:28 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <20111024230623.GB14274@dragon.NUXI.org> In-Reply-To: <20111024230623.GB14274@dragon.NUXI.org> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201110250918.28709.hselasky@c2i.net> Cc: Adrian Chadd Subject: Re: FreeBSD-10 -> FreeBSD-9.9 ? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 07:31:42 -0000 On Tuesday 25 October 2011 01:06:23 David O'Brien wrote: > On Mon, Oct 10, 2011 at 11:04:13AM +0800, Adrian Chadd wrote: > > Just an idle comment - why don't we just rename FreeBSD-10 to > > FreeBSD-9.9 for now, and give the ports/developers some time to "fix" > > bad autoconf/automake scripts? > > That way -current can still be used for testing/development. > > I figured someone else would respond by now... > > \aol{me too!} > > (though I suggest 9.99 as a value we'd never hit) > > I've made this change on all my local systems. Why not use 9.5.x ? Whould give more number space to increment? --HPS From owner-freebsd-arch@FreeBSD.ORG Tue Oct 25 08:01:51 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0FFB106566C; Tue, 25 Oct 2011 08:01:51 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 6D3128FC18; Tue, 25 Oct 2011 08:01:51 +0000 (UTC) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id A383A5C39; Tue, 25 Oct 2011 07:51:49 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.5/8.14.5) with ESMTP id p9P7pno3004774; Tue, 25 Oct 2011 07:51:49 GMT (envelope-from phk@phk.freebsd.dk) To: Hans Petter Selasky From: "Poul-Henning Kamp" In-Reply-To: Your message of "Tue, 25 Oct 2011 09:18:28 +0200." <201110250918.28709.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1 Date: Tue, 25 Oct 2011 07:51:49 +0000 Message-ID: <4773.1319529109@critter.freebsd.dk> Cc: Adrian Chadd , freebsd-arch@freebsd.org Subject: Re: FreeBSD-10 -> FreeBSD-9.9 ? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 08:01:51 -0000 In message <201110250918.28709.hselasky@c2i.net>, Hans Petter Selasky writes: >Why not use 9.5.x ? I'm surprised that people even ask: Because FreeBSD is all about doing things right and solve problems, rather than just kludge around them ? -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Tue Oct 25 17:11:34 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD296106564A; Tue, 25 Oct 2011 17:11:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 978158FC12; Tue, 25 Oct 2011 17:11:34 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p9PH8att004656 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Tue, 25 Oct 2011 11:08:37 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <4773.1319529109@critter.freebsd.dk> Date: Tue, 25 Oct 2011 11:08:27 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <4EB3C854-0F7A-4A06-AE83-B9C6ACAB67A9@bsdimp.com> References: <4773.1319529109@critter.freebsd.dk> To: "Poul-Henning Kamp" X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Tue, 25 Oct 2011 11:08:38 -0600 (MDT) Cc: Adrian Chadd , freebsd-arch@freebsd.org, Hans Petter Selasky Subject: Re: FreeBSD-10 -> FreeBSD-9.9 ? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 17:11:34 -0000 On Oct 25, 2011, at 1:51 AM, Poul-Henning Kamp wrote: > In message <201110250918.28709.hselasky@c2i.net>, Hans Petter Selasky = writes: >=20 >> Why not use 9.5.x ? >=20 > I'm surprised that people even ask: Because FreeBSD is all about > doing things right and solve problems, rather than just kludge around > them ? 9.9 is a kludge until the auto config scripts that still "support" = freebsd 1.x due to some mistaken cargo-cult programming are fixed to = de-stupify them. That code has been cut and paste for like 18 years, = but maybe for the past 13 years it hasn't worked in the projects it used = to work on (since they've moved on) and in many it never worked and = likely hasn't been tested in at least 10 years due to the difficulty in = even getting FreeBSD 1.x systems to test with prior to the lifting of = the bans put in place to settle the AT&T lawsuit. As such, the offending code should be fixed, not just patched around = with bogus version numbers. Warner From owner-freebsd-arch@FreeBSD.ORG Tue Oct 25 18:45:30 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BAC76106567B; Tue, 25 Oct 2011 18:45:30 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 98EAA8FC17; Tue, 25 Oct 2011 18:45:30 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.5/8.14.5) with ESMTP id p9PIjOUZ055415; Tue, 25 Oct 2011 11:45:24 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.5/8.14.4/Submit) id p9PIjNXN055414; Tue, 25 Oct 2011 11:45:23 -0700 (PDT) (envelope-from obrien) Date: Tue, 25 Oct 2011 11:45:23 -0700 From: "David O'Brien" To: Hans Petter Selasky Message-ID: <20111025184523.GC47524@dragon.NUXI.org> Mail-Followup-To: obrien@freebsd.org, Hans Petter Selasky , freebsd-arch@freebsd.org, Adrian Chadd References: <20111024230623.GB14274@dragon.NUXI.org> <201110250918.28709.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201110250918.28709.hselasky@c2i.net> X-Operating-System: FreeBSD 9.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Adrian Chadd , freebsd-arch@freebsd.org Subject: Re: FreeBSD-10 -> FreeBSD-9.9 ? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 18:45:30 -0000 On Tue, Oct 25, 2011 at 09:18:28AM +0200, Hans Petter Selasky wrote: > On Tuesday 25 October 2011 01:06:23 David O'Brien wrote: > > On Mon, Oct 10, 2011 at 11:04:13AM +0800, Adrian Chadd wrote: > > > Just an idle comment - why don't we just rename FreeBSD-10 to > > > FreeBSD-9.9 for now, and give the ports/developers some time to "fix" > > > bad autoconf/automake scripts? > > > That way -current can still be used for testing/development. > > > > I figured someone else would respond by now... > > > > \aol{me too!} > > > > (though I suggest 9.99 as a value we'd never hit) > > > > I've made this change on all my local systems. > > Why not use 9.5.x ? > Whould give more number space to increment? Eh? Sorry I don't follow -- why do we need to increment? "9.99" is a temperary work around to buy us just a few months time to fix ports. Such a band-aid should not exist long enough to need to increment anything. We mostly just need to not fall into things like: case $host_os in [...] freebsd1*) ld_shlibs=no ;; [...] in 'configure'. -- -- David (obrien@FreeBSD.org) From owner-freebsd-arch@FreeBSD.ORG Tue Oct 25 21:58:53 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFF2A1065673; Tue, 25 Oct 2011 21:58:53 +0000 (UTC) (envelope-from marka@isc.org) Received: from mx.pao1.isc.org (mx.pao1.isc.org [IPv6:2001:4f8:0:2::2b]) by mx1.freebsd.org (Postfix) with ESMTP id AEDAA8FC12; Tue, 25 Oct 2011 21:58:53 +0000 (UTC) Received: from bikeshed.isc.org (bikeshed.isc.org [IPv6:2001:4f8:3:d::19]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "bikeshed.isc.org", Issuer "ISC CA" (verified OK)) by mx.pao1.isc.org (Postfix) with ESMTPS id 85602C944A; Tue, 25 Oct 2011 21:58:40 +0000 (UTC) (envelope-from marka@isc.org) Received: from drugs.dv.isc.org (unknown [IPv6:2001:470:1f00:820:6233:4bff:fe01:7585]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bikeshed.isc.org (Postfix) with ESMTPSA id D22ED216C6A; Tue, 25 Oct 2011 21:58:39 +0000 (UTC) (envelope-from marka@isc.org) Received: from drugs.dv.isc.org (localhost [127.0.0.1]) by drugs.dv.isc.org (Postfix) with ESMTP id B6AA615DE789; Wed, 26 Oct 2011 08:58:37 +1100 (EST) To: obrien@freebsd.org, Hans Petter Selasky , freebsd-arch@freebsd.org, Adrian Chadd From: Mark Andrews References: <20111024230623.GB14274@dragon.NUXI.org> <201110250918.28709.hselasky@c2i.net> <20111025184523.GC47524@dragon.NUXI.org> Mail-Followup-To: obrien@freebsd.org, Hans Petter Selasky , freebsd-arch@freebsd.org, Adrian Chadd In-reply-to: Your message of "Tue, 25 Oct 2011 11:45:23 PDT." <20111025184523.GC47524@dragon.NUXI.org> Date: Wed, 26 Oct 2011 08:58:37 +1100 Message-Id: <20111025215837.B6AA615DE789@drugs.dv.isc.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mx.pao1.isc.org Cc: Subject: Re: FreeBSD-10 -> FreeBSD-9.9 ? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Oct 2011 21:58:53 -0000 In message <20111025184523.GC47524@dragon.NUXI.org>, "David O'Brien" writes: > On Tue, Oct 25, 2011 at 09:18:28AM +0200, Hans Petter Selasky wrote: > > On Tuesday 25 October 2011 01:06:23 David O'Brien wrote: > > > On Mon, Oct 10, 2011 at 11:04:13AM +0800, Adrian Chadd wrote: > > > > Just an idle comment - why don't we just rename FreeBSD-10 to > > > > FreeBSD-9.9 for now, and give the ports/developers some time to "fix" > > > > bad autoconf/automake scripts? > > > > That way -current can still be used for testing/development. > > > > > > I figured someone else would respond by now... > > > > > > \aol{me too!} > > > > > > (though I suggest 9.99 as a value we'd never hit) > > > > > > I've made this change on all my local systems. > > > > Why not use 9.5.x ? > > Whould give more number space to increment? > > Eh? Sorry I don't follow -- why do we need to increment? > > "9.99" is a temperary work around to buy us just a few months time to fix > ports. Such a band-aid should not exist long enough to need to increment > anything. > > We mostly just need to not fall into things like: > > case $host_os in > [...] > freebsd1*) > ld_shlibs=no > ;; > [...] > > in 'configure'. Ok, so what's the minimum versions of the auto* and libtoo* that are fixed so I can ship BIND9 w/o freebsd1*) in configure? If I need to bump the tool versions I want to do it once. Mark -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: marka@isc.org From owner-freebsd-arch@FreeBSD.ORG Wed Oct 26 01:55:10 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA2181065673 for ; Wed, 26 Oct 2011 01:55:10 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 2C4828FC08 for ; Wed, 26 Oct 2011 01:55:10 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 6223725D388E for ; Wed, 26 Oct 2011 01:55:09 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id A9976BD3C38 for ; Wed, 26 Oct 2011 01:55:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id k4R0LXpsoh-y for ; Wed, 26 Oct 2011 01:55:07 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id C3DD1BD3C2B for ; Wed, 26 Oct 2011 01:55:07 +0000 (UTC) Date: Wed, 26 Oct 2011 01:55:06 +0000 (UTC) From: "Bjoern A. Zeeb" To: freebsd-arch@freebsd.org In-Reply-To: <20111025184523.GC47524@dragon.NUXI.org> Message-ID: References: <20111024230623.GB14274@dragon.NUXI.org> <201110250918.28709.hselasky@c2i.net> <20111025184523.GC47524@dragon.NUXI.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: Re: FreeBSD-10 -> FreeBSD-9.9 ? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Oct 2011 01:55:10 -0000 On Tue, 25 Oct 2011, David O'Brien wrote: I admit we had considered this as an option if the breakage would have been for another 6 months along with other things but currently my only answer to this is: read ports@ and the regular updates from portmgr@ on the subject there. If that's not good enough you are intelligent to handle the problem locally easily yourself but starting a thread on a fourth mailing list clearly wasn't the right thing. /bz -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-freebsd-arch@FreeBSD.ORG Wed Oct 26 01:59:05 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 593C1106564A for ; Wed, 26 Oct 2011 01:59:05 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id 0EE918FC17 for ; Wed, 26 Oct 2011 01:59:05 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 5372125D3888; Wed, 26 Oct 2011 01:59:04 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 2127ABD3D48; Wed, 26 Oct 2011 01:59:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id U3EkQMMm6GNC; Wed, 26 Oct 2011 01:59:01 +0000 (UTC) Received: from nv.sbone.de (nv.sbone.de [IPv6:fde9:577b:c1a9:31::2013:138]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 9A12BBD3D43; Wed, 26 Oct 2011 01:59:00 +0000 (UTC) Date: Wed, 26 Oct 2011 01:59:00 +0000 (UTC) From: "Bjoern A. Zeeb" To: Mark Andrews In-Reply-To: <20111025215837.B6AA615DE789@drugs.dv.isc.org> Message-ID: References: <20111024230623.GB14274@dragon.NUXI.org> <201110250918.28709.hselasky@c2i.net> <20111025184523.GC47524@dragon.NUXI.org> <20111025215837.B6AA615DE789@drugs.dv.isc.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-arch@freebsd.org Subject: Re: FreeBSD-10 -> FreeBSD-9.9 ? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Oct 2011 01:59:05 -0000 On Wed, 26 Oct 2011, Mark Andrews wrote: > Ok, so what's the minimum versions of the auto* and libtoo* that are > fixed so I can ship BIND9 w/o freebsd1*) in configure? If I need to > bump the tool versions I want to do it once. libtool in ports is fixed; the changes are in the SCM upstream already but not in any released version yet as much as I know. You will release often enough so that your software will have it fixed sooner than a lot of the thousands others ... If you want further advise, ask on ports@ -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family. From owner-freebsd-arch@FreeBSD.ORG Wed Oct 26 09:35:31 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A9F0106564A for ; Wed, 26 Oct 2011 09:35:31 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (mx0.hoeg.nl [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id F095E8FC0C for ; Wed, 26 Oct 2011 09:35:30 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 5F5C02A28CBC; Wed, 26 Oct 2011 11:35:30 +0200 (CEST) Date: Wed, 26 Oct 2011 11:35:30 +0200 From: Ed Schouten To: "Bjoern A. Zeeb" Message-ID: <20111026093530.GG63910@hoeg.nl> References: <20111024230623.GB14274@dragon.NUXI.org> <201110250918.28709.hselasky@c2i.net> <20111025184523.GC47524@dragon.NUXI.org> <20111025215837.B6AA615DE789@drugs.dv.isc.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ahP6B03r4gLOj5uD" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Mark Andrews , freebsd-arch@freebsd.org Subject: Re: FreeBSD-10 -> FreeBSD-9.9 ? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Oct 2011 09:35:31 -0000 --ahP6B03r4gLOj5uD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Bjoern A. Zeeb , 20111026 03:59: > libtool in ports is fixed; the changes are in the SCM upstream already > but not in any released version yet as much as I know. I think they did. About a week ago, they released libtool 2.4.2. --=20 Ed Schouten WWW: http://80386.nl/ --ahP6B03r4gLOj5uD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQIcBAEBAgAGBQJOp9RiAAoJEG5e2P40kaK7AEQQAIHiETkJypwDJXfnhXlxhpf0 3TqW4q6pT2PkEhbvugjUGaSnloacUdRkpw+IEbmgc1GH4n3j3GIIL315HEbnJMNA OgkWtTXBp0ut3Rq5jOfwNg/fFKh9p9wvZJ+48EQ0Dbc5vV/nffcaTVbCpm0IJ07f x48K7fdkzr2M6YxWOkW5gaoMmOMsGUCL22WhypZVU1eONtSCS/ZtMkW41cNGolzp nhkBvAh7BoRqLjUl5o/oa3HbQrf+GIVcy/8uWd0Ky71DJ70IE8IW65WcDOxucdCC Z4EsR2zA5mIqjSQFyHcCaa09pyzdHgHd/B8YC7+Ils+yK5XfSTX9s8RyDVsv8ZnY a/6RMqjeWMpVR9yRp1rjrS5Dh3H2/4D4EU7M2rYO1bcUJGQw7IOavfhc1Zcpdhu3 cNc+vk0Czm88y6l2oWqTOFjyxmd9D8y+R7rBFWDIqhaaKJ4D/IMAY3uaqgZCf6Ol OZLQOGWn+EODUU5T2oxd+fmJB9i8D1ETP8N0arNSx6bEybKQFu7fwV0YaknNfyhz Txts86QzepQ14Sx5dQmKBJP9oLBIdomyTh1BtsNMltpf8tbhWJIDgzLWx8B+g/IQ W3QhgjBf5ZMD09DVrGDuTcJDHdgHrtBN/R40hZc8JIRRIVTu5pIH4k9sefjGRGIV 8pLR8za8bw4oTIfwTMnJ =+NgQ -----END PGP SIGNATURE----- --ahP6B03r4gLOj5uD-- From owner-freebsd-arch@FreeBSD.ORG Thu Oct 27 20:28:14 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE4DC106564A for ; Thu, 27 Oct 2011 20:28:14 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9A06D8FC0C for ; Thu, 27 Oct 2011 20:28:14 +0000 (UTC) Received: by vws11 with SMTP id 11so4400942vws.13 for ; Thu, 27 Oct 2011 13:28:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=p3WnUO7yjzW5thln+iAAXI2DpND//JruzM7Xnl8YwqY=; b=OSz8zM8QnDgovVBy20jwkaJcl9g4e3siu5aWo6+F4F7lRTcsR77h9WRLoP9yIWvVD8 id6lQ2dmeM0pfCS3ELLOwVJdGsL8LkYOB92VHho9LVotsAlLFHFJHK9xzYfbhAfv4CGj r75oMGJ+Cr5dXk8EjauJDGIfWVhVJ4UBAbZjY= MIME-Version: 1.0 Received: by 10.52.37.36 with SMTP id v4mr1225913vdj.61.1319747293561; Thu, 27 Oct 2011 13:28:13 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.52.176.1 with HTTP; Thu, 27 Oct 2011 13:28:13 -0700 (PDT) Date: Fri, 28 Oct 2011 04:28:13 +0800 X-Google-Sender-Auth: QdYkDSAqxohMtkALaPDJVSR8C5o Message-ID: From: Adrian Chadd To: freebsd-arch@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2011 20:28:14 -0000 Hi all, After Nathan and I diagnosed a rather annoying ath bus bug on PPC, we discovered that we're likely not the only driver/device combination that is breaking the documented newbus behaviour of IO ordering. Specifically, from the bus_space_* manpage: Because some architectures' memory systems use buffering to improve mem- ory and device access performance, there is a mechanism which can be used to create ``barriers'' in the bus space read and write stream. There are three types of barriers: read, write, and read/write. All reads started to the region before a read barrier must complete before any reads after the read barrier are started. (The analogous requirement is true for write barriers.) Read/write barriers force all reads and writes started before the barrier to complete before any reads or writes after the bar- rier are started. Correctly-written drivers will include all appropriate barriers, and assume only the read/write ordering imposed by the barrier operations. .. Read operations done by the bus_space_read_N() functions may be executed out of order with respect to other pending read and write operations unless order is enforced by use of the bus_space_barrier() function. .. Write operations done by the bus_space_write_N() functions may be exe- cuted out of order with respect to other pending read and write opera- tions unless order is enforced by use of the bus_space_barrier() func- tion. However at least ath(4) doesn't use explicit flushes where needed, which exposed bugs on PPC. I bet other drivers also have issues but as they're not tested outside of i386/amd64, these bugs aren't picked up. (There are endian issues too with some, but I digress.) So what I'm proposing is: * Make the bus default to use ordered semantics, much like what Linux does - ie, all IO read/writes (io or memory) are in-order and flushed with a barrier; * Add an option which allows the driver to request a region with loose-running/lazy semantics, what we're supposed to have now, and then leave barriers up to the driver; * Print out something nice and loud if a driver decides to use the lazy/loose semantics, which may result in unpredictable behaviour on non-{i386,amd64}. I'd appreciate some feedback/comments before I go off and code all of this up. Thanks, Adrian From owner-freebsd-arch@FreeBSD.ORG Thu Oct 27 20:45:41 2011 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47B6F106564A; Thu, 27 Oct 2011 20:45:41 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 058098FC1C; Thu, 27 Oct 2011 20:45:40 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p9RKi9Pl023840 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Thu, 27 Oct 2011 14:44:10 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Thu, 27 Oct 2011 14:43:58 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Adrian Chadd X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Thu, 27 Oct 2011 14:44:11 -0600 (MDT) Cc: freebsd-arch@FreeBSD.org Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2011 20:45:41 -0000 On Oct 27, 2011, at 2:28 PM, Adrian Chadd wrote: > So what I'm proposing is: >=20 > * Make the bus default to use ordered semantics, much like what Linux > does - ie, all IO read/writes (io or memory) are in-order and flushed > with a barrier; > * Add an option which allows the driver to request a region with > loose-running/lazy semantics, what we're supposed to have now, and > then leave barriers up to the driver; > * Print out something nice and loud if a driver decides to use the > lazy/loose semantics, which may result in unpredictable behaviour on > non-{i386,amd64}. >=20 > I'd appreciate some feedback/comments before I go off and code all of = this up. Having an option to support lazy would be easy to code up on x86 where = it isn't needed. However, on some architectures, the bus space routines = are implemented as a series of function calls from a table that's passed = around in the bus_space_t. Those architectures it would be hard to = implement differing behavior like you propose. Having it whine on lazy will ensure that lazy is never used since such a = message will "scare the horses" and people will stamped to using the = synchronous one. One question: What's the slowdown from making everything synchronous? Warner From owner-freebsd-arch@FreeBSD.ORG Thu Oct 27 20:49:13 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DFDE0106566B for ; Thu, 27 Oct 2011 20:49:13 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9D06C8FC08 for ; Thu, 27 Oct 2011 20:49:13 +0000 (UTC) Received: by vws11 with SMTP id 11so4428371vws.13 for ; Thu, 27 Oct 2011 13:49:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Zv07YY4c8cOj8zk/sau4Ub1iMgd8r763WiVXi3aP50w=; b=HPQhAn8VhIfJ4ZWqPPTMxH0wP8glU+aiRgoIWrMH9af4zWuGEcVoG7DXyA4jjaytF3 G+aRz8PlNbjigfYHF/AZz0JhnOkDoPfsnk4TzSTyJJ5ezxP6SqAJtIrqQD4PrfCbBVfZ kA4zgDLAERNABs61lVNk2jGYszUsDK7yLAQH0= MIME-Version: 1.0 Received: by 10.52.109.102 with SMTP id hr6mr1259427vdb.44.1319748552967; Thu, 27 Oct 2011 13:49:12 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.52.176.1 with HTTP; Thu, 27 Oct 2011 13:49:12 -0700 (PDT) In-Reply-To: References: Date: Fri, 28 Oct 2011 04:49:12 +0800 X-Google-Sender-Auth: o4UrTSgSw8QM89olNvnzJ1BfpFw Message-ID: From: Adrian Chadd To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-arch@freebsd.org Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2011 20:49:14 -0000 On 28 October 2011 04:43, Warner Losh wrote: > Having an option to support lazy would be easy to code up on x86 where it= isn't needed. =A0However, on some architectures, the bus space routines ar= e implemented as a series of function calls from a table that's passed arou= nd in the bus_space_t. =A0Those architectures it would be hard to implement= differing behavior like you propose. Right, but then wouldn't it just need to be: (do bus op) if (bit is set) bus_space_barrier(address range of allocation); I haven't looked to see whether the relevant information is currently exposed to those functions. This was just an idea to meet half way between what newbus documentation says, and what code actually implements. > Having it whine on lazy will ensure that lazy is never used since such a = message will "scare the horses" and people will stamped to using the synchr= onous one. > > One question: What's the slowdown from making everything synchronous? I have no idea. Which architectures would benefit? MIPS? sparc? arm? ia64? = PPC? Adrian From owner-freebsd-arch@FreeBSD.ORG Thu Oct 27 20:55:51 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36EC6106566B for ; Thu, 27 Oct 2011 20:55:51 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id F41788FC16 for ; Thu, 27 Oct 2011 20:55:50 +0000 (UTC) Received: from [172.32.16.3] (68.65.72.82.static-ip.telepacific.net [68.65.72.82]) (authenticated bits=0) by ns1.feral.com (8.14.4/8.14.4) with ESMTP id p9RKdpgo069408 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Thu, 27 Oct 2011 13:39:52 -0700 (PDT) (envelope-from mj@feral.com) Message-ID: <4EA9C197.9080407@feral.com> Date: Thu, 27 Oct 2011 13:39:51 -0700 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: freebsd-arch@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (ns1.feral.com [192.67.166.1]); Thu, 27 Oct 2011 13:39:52 -0700 (PDT) Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mj@feral.com List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2011 20:55:51 -0000 On 10/27/2011 1:28 PM, Adrian Chadd wrote: > * Make the bus default to use ordered semantics, much like what Linux > does - ie, all IO read/writes (io or memory) are in-order and flushed > with a barrier; > * Add an option which allows the driver to request a region with > loose-running/lazy semantics, what we're supposed to have now, and > then leave barriers up to the driver; > * Print out something nice and loud if a driver decides to use the > lazy/loose semantics, which may result in unpredictable behaviour on > non-{i386,amd64}. > > I'd appreciate some feedback/comments before I go off and code all of this up. > > No. Please don't change the current semantics which are well understood if only fitfully adhered to. This would put us in the position of having some drivers possibly work slower because they didn't do the "lazy" request. I also am not sure I agree with your characterization of linux semantics. From owner-freebsd-arch@FreeBSD.ORG Thu Oct 27 21:05:51 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2857106566C for ; Thu, 27 Oct 2011 21:05:51 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 711288FC17 for ; Thu, 27 Oct 2011 21:05:51 +0000 (UTC) Received: by vws11 with SMTP id 11so4452735vws.13 for ; Thu, 27 Oct 2011 14:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=kPc6jfp04qkJ3pGiCyFuL3FEXvmIyrqSfTBoX/Jod6s=; b=R34C9+Uwn32e//MH+5hePjgWLVY3+e2VRsTPOgO3Ium1nchpQhyQ/co8qEReQC8AHC tMwB7BRMyQAot2LjwOwa9H2AHNY/KQfJ4Sw0ji3MgM0w/ZRYn680UP8QkZuULHIb7rmE pxyTeFTx7lrp9PUrzQJcd4RXdjYmys1yM77vY= MIME-Version: 1.0 Received: by 10.52.72.227 with SMTP id g3mr785800vdv.10.1319749550723; Thu, 27 Oct 2011 14:05:50 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.52.176.1 with HTTP; Thu, 27 Oct 2011 14:05:50 -0700 (PDT) In-Reply-To: <4EA9C197.9080407@feral.com> References: <4EA9C197.9080407@feral.com> Date: Fri, 28 Oct 2011 05:05:50 +0800 X-Google-Sender-Auth: R1v_z06l37E6P8dM2BYRNSI0nvY Message-ID: From: Adrian Chadd To: mj@feral.com Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-arch@freebsd.org Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2011 21:05:51 -0000 On 28 October 2011 04:39, Matthew Jacob wrote: > No. Please don't change the current semantics which are well understood if > only fitfully adhered to. This would put us in the position of having some > drivers possibly work slower because they didn't do the "lazy" request. > > I also am not sure I agree with your characterization of linux semantics. Hi, The point is, all (most?) of the bus glue does flushes if needed. Ie, if I understand what's going on: * amd64/intel, it's not needed; * mips doesn't implement it yet; * ppc (and sparc?) implement a bus flush on each operation anyway. Adrian From owner-freebsd-arch@FreeBSD.ORG Thu Oct 27 21:19:40 2011 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C472106566C; Thu, 27 Oct 2011 21:19:40 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 18D498FC0A; Thu, 27 Oct 2011 21:19:40 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p9RLGdaZ024207 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Thu, 27 Oct 2011 15:16:40 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Thu, 27 Oct 2011 15:16:30 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <02D4199D-851F-4AA4-8E56-F18B7EF0E79A@bsdimp.com> References: <4EA9C197.9080407@feral.com> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Thu, 27 Oct 2011 15:16:41 -0600 (MDT) Cc: mj@feral.com, freebsd-arch@FreeBSD.org Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2011 21:19:40 -0000 On Oct 27, 2011, at 3:05 PM, Adrian Chadd wrote: > On 28 October 2011 04:39, Matthew Jacob wrote: >=20 >> No. Please don't change the current semantics which are well = understood if >> only fitfully adhered to. This would put us in the position of having = some >> drivers possibly work slower because they didn't do the "lazy" = request. >>=20 >> I also am not sure I agree with your characterization of linux = semantics. >=20 > Hi, >=20 > The point is, all (most?) of the bus glue does flushes if needed. Ie, > if I understand what's going on: >=20 > * amd64/intel, it's not needed; > * mips doesn't implement it yet; Sounds like a mips bug to me. > * ppc (and sparc?) implement a bus flush on each operation anyway. If ppc implements the flush like you say, how is it you found a bug in = ppc from missing flushes? Warner From owner-freebsd-arch@FreeBSD.ORG Thu Oct 27 22:22:10 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F7D3106566B for ; Thu, 27 Oct 2011 22:22:10 +0000 (UTC) (envelope-from marius@alchemy.franken.de) Received: from alchemy.franken.de (alchemy.franken.de [194.94.249.214]) by mx1.freebsd.org (Postfix) with ESMTP id CBBBE8FC12 for ; Thu, 27 Oct 2011 22:22:09 +0000 (UTC) Received: from alchemy.franken.de (localhost [127.0.0.1]) by alchemy.franken.de (8.14.4/8.14.4/ALCHEMY.FRANKEN.DE) with ESMTP id p9RMAJ2G000234; Fri, 28 Oct 2011 00:10:20 +0200 (CEST) (envelope-from marius@alchemy.franken.de) Received: (from marius@localhost) by alchemy.franken.de (8.14.4/8.14.4/Submit) id p9RMAJW2000233; Fri, 28 Oct 2011 00:10:19 +0200 (CEST) (envelope-from marius) Date: Fri, 28 Oct 2011 00:10:19 +0200 From: Marius Strobl To: Adrian Chadd Message-ID: <20111027221019.GA99899@alchemy.franken.de> References: <4EA9C197.9080407@feral.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: mj@feral.com, freebsd-arch@freebsd.org Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2011 22:22:10 -0000 On Fri, Oct 28, 2011 at 05:05:50AM +0800, Adrian Chadd wrote: > On 28 October 2011 04:39, Matthew Jacob wrote: > > > No. Please don't change the current semantics which are well understood if > > only fitfully adhered to. This would put us in the position of having some > > drivers possibly work slower because they didn't do the "lazy" request. > > > > I also am not sure I agree with your characterization of linux semantics. > > Hi, > > The point is, all (most?) of the bus glue does flushes if needed. Ie, > if I understand what's going on: > > * amd64/intel, it's not needed; > * mips doesn't implement it yet; > * ppc (and sparc?) implement a bus flush on each operation anyway. > For sparc64 this statement is false; the bus_space(9) implementation there relies on drivers properly using bus_space_barrier(9), mainly because bus barriers are a rather costly operation there and including them with every bus access for the most part probably unnecessarily just wastes performance. Also virtually all drivers enabled in the sparc64 GENERIC properly issue bus barriers AFAICT as we took care of this when porting "MI" drivers over to work on sparc64 (fixing endianess issues, incorrect use of bus_dma(9) etc). Also ath(4) once worked fine on sparc64, at least when it was added to GENERIC, if it no longer does (which it likely doesn't when bus_space_barrier(9) calls are missing) then this is a regression in ath(4). Also if you count in bus_dma(9) on "bus glue" then the statement that it automagically does flushes if needed also is false; bus_dmamap_sync(9) calls are vital even on x86 in order for bounce buffers to work. Marius From owner-freebsd-arch@FreeBSD.ORG Fri Oct 28 07:18:24 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FCF3106564A; Fri, 28 Oct 2011 07:18:24 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.c2i.net [212.247.154.34]) by mx1.freebsd.org (Postfix) with ESMTP id B50B78FC08; Fri, 28 Oct 2011 07:18:23 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 197516169; Fri, 28 Oct 2011 09:18:21 +0200 From: Hans Petter Selasky To: freebsd-arch@freebsd.org Date: Fri, 28 Oct 2011 09:15:18 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: In-Reply-To: X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201110280915.18111.hselasky@c2i.net> Cc: Adrian Chadd Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2011 07:18:24 -0000 On Thursday 27 October 2011 22:28:13 Adrian Chadd wrote: > * Make the bus default to use ordered semantics, much like what Linux > does - ie, all IO read/writes (io or memory) are in-order and flushed > with a barrier; I think this is the assumption of many USB controller drivers currently in the tree. --HPS From owner-freebsd-arch@FreeBSD.ORG Fri Oct 28 07:19:23 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0190E106564A; Fri, 28 Oct 2011 07:19:23 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.c2i.net [212.247.154.34]) by mx1.freebsd.org (Postfix) with ESMTP id 563798FC14; Fri, 28 Oct 2011 07:19:22 +0000 (UTC) X-T2-Spam-Status: No, hits=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe02.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 197516918; Fri, 28 Oct 2011 09:19:19 +0200 From: Hans Petter Selasky To: freebsd-arch@freebsd.org Date: Fri, 28 Oct 2011 09:16:16 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: In-Reply-To: X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201110280916.16312.hselasky@c2i.net> Cc: Adrian Chadd Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2011 07:19:23 -0000 On Thursday 27 October 2011 22:49:12 Adrian Chadd wrote: > I have no idea. Which architectures would benefit? Often PIO is rare with high performance devices. Usually data is moved using DMA. --HPS From owner-freebsd-arch@FreeBSD.ORG Fri Oct 28 08:15:19 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A344106564A; Fri, 28 Oct 2011 08:15:19 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate.funkthat.com [70.36.235.232]) by mx1.freebsd.org (Postfix) with ESMTP id 4339F8FC18; Fri, 28 Oct 2011 08:15:19 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id p9S7bBiM094503 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 28 Oct 2011 00:37:11 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id p9S7bBNj094502; Fri, 28 Oct 2011 00:37:11 -0700 (PDT) (envelope-from jmg) Date: Fri, 28 Oct 2011 00:37:10 -0700 From: John-Mark Gurney To: Adrian Chadd Message-ID: <20111028073710.GP25601@funkthat.com> Mail-Followup-To: Adrian Chadd , freebsd-arch@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Fri, 28 Oct 2011 00:37:11 -0700 (PDT) Cc: freebsd-arch@freebsd.org Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2011 08:15:19 -0000 Adrian Chadd wrote this message on Fri, Oct 28, 2011 at 04:28 +0800: > So what I'm proposing is: > > * Make the bus default to use ordered semantics, much like what Linux > does - ie, all IO read/writes (io or memory) are in-order and flushed > with a barrier; > * Add an option which allows the driver to request a region with > loose-running/lazy semantics, what we're supposed to have now, and > then leave barriers up to the driver; > * Print out something nice and loud if a driver decides to use the > lazy/loose semantics, which may result in unpredictable behaviour on > non-{i386,amd64}. > > I'd appreciate some feedback/comments before I go off and code all of this up. I think we should complain about the drivers that are NOT using the lazy/loose semantics as those are the drivers that are slower than they should be, and/or not written properly. Complaining about properly written drivers that use the lazy/loose semantics when they get updated to be correct is wrong... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-arch@FreeBSD.ORG Fri Oct 28 08:33:36 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54175106564A; Fri, 28 Oct 2011 08:33:36 +0000 (UTC) (envelope-from phk@phk.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 132A28FC12; Fri, 28 Oct 2011 08:33:35 +0000 (UTC) Received: from critter.freebsd.dk (critter-phk.freebsd.dk [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id 447ED5DAD; Fri, 28 Oct 2011 08:33:34 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.5/8.14.5) with ESMTP id p9S8Sxqb002348; Fri, 28 Oct 2011 08:29:01 GMT (envelope-from phk@phk.freebsd.dk) To: John-Mark Gurney From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 28 Oct 2011 00:37:10 MST." <20111028073710.GP25601@funkthat.com> Content-Type: text/plain; charset=ISO-8859-1 Date: Fri, 28 Oct 2011 08:28:59 +0000 Message-ID: <2347.1319790539@critter.freebsd.dk> Cc: Adrian Chadd , freebsd-arch@freebsd.org Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2011 08:33:36 -0000 In message <20111028073710.GP25601@funkthat.com>, John-Mark Gurney writes: >Adrian Chadd wrote this message on Fri, Oct 28, 2011 at 04:28 +0800: >I think we should complain about the drivers that are NOT using the >lazy/loose semantics as those are the drivers that are slower than >they should be, and/or not written properly. Amen. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. From owner-freebsd-arch@FreeBSD.ORG Fri Oct 28 13:07:45 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4AD91065675; Fri, 28 Oct 2011 13:07:45 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6970E8FC0A; Fri, 28 Oct 2011 13:07:45 +0000 (UTC) Received: by vws11 with SMTP id 11so5233185vws.13 for ; Fri, 28 Oct 2011 06:07:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=6sNMvjmvhGqB7pdWYgNZQWPJh8CtUXkwCF9RL2ibm/Y=; b=RlxihV8EczfcwCFGgvinKx8Nk+9TxGaUy78jd7NRz2d4vOtBEWLq7bPKOOBvOfS4ps BamyCBhlVbrG97nq8U8SpBjS3kMOnK18vyeInSLMZ+1flosne4KRFcsCczHu0BHtogal FnxfqJkPf7gY9ZnsTJLYbU/aZv4yb//EoIgGk= MIME-Version: 1.0 Received: by 10.52.91.237 with SMTP id ch13mr584790vdb.129.1319807264683; Fri, 28 Oct 2011 06:07:44 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.52.176.1 with HTTP; Fri, 28 Oct 2011 06:07:44 -0700 (PDT) In-Reply-To: <20111028073710.GP25601@funkthat.com> References: <20111028073710.GP25601@funkthat.com> Date: Fri, 28 Oct 2011 21:07:44 +0800 X-Google-Sender-Auth: 9UkTpNwzB0eKcKYRyqrlUxHHl94 Message-ID: From: Adrian Chadd To: Adrian Chadd , freebsd-arch@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2011 13:07:45 -0000 On 28 October 2011 15:37, John-Mark Gurney wrote: >> I'd appreciate some feedback/comments before I go off and code all of th= is up. > > I think we should complain about the drivers that are NOT using the > lazy/loose semantics as those are the drivers that are slower than > they should be, and/or not written properly. =A0Complaining about properl= y > written drivers that use the lazy/loose semantics when they get updated > to be correct is wrong... Right. My point though is that I'm not sure of how many drivers have been tested outside of i386/amd64. Marcus's response is helpful, indicating that the sparc64 guys have tested a lot of this. Yes, the barrier calls are expensive and yes, drivers on i386/amd64 still need to do bus_dmamap_sync() calls. I can only speak from my limited experience here after tracking down that ath/ath_hal bug. My experience is that ath(4) triggered on PPC because of a loop which read the same register a few times. I recall seeing an ethernet driver recently have a commit which also did this. I'm happy to do the reverse. Ie, on platforms where it matters, add a warning printf (in verbose boot) when drivers aren't indicating they've been fully tested. Or, I'm happy to completely ignore the situation. :) Adrian From owner-freebsd-arch@FreeBSD.ORG Fri Oct 28 16:09:15 2011 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BB7B106566C; Fri, 28 Oct 2011 16:09:15 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 26F508FC14; Fri, 28 Oct 2011 16:09:15 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p9SG7Aeh036981 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 28 Oct 2011 10:08:08 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Fri, 28 Oct 2011 10:07:47 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <34E9F112-930C-4836-9949-FA8A01763969@bsdimp.com> References: <20111028073710.GP25601@funkthat.com> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Fri, 28 Oct 2011 10:08:08 -0600 (MDT) Cc: freebsd-arch@FreeBSD.org Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2011 16:09:15 -0000 On Oct 28, 2011, at 7:07 AM, Adrian Chadd wrote: > On 28 October 2011 15:37, John-Mark Gurney wrote: >>> I'd appreciate some feedback/comments before I go off and code all = of this up. >>=20 >> I think we should complain about the drivers that are NOT using the >> lazy/loose semantics as those are the drivers that are slower than >> they should be, and/or not written properly. Complaining about = properly >> written drivers that use the lazy/loose semantics when they get = updated >> to be correct is wrong... >=20 > Right. My point though is that I'm not sure of how many drivers have > been tested outside of i386/amd64. Marcus's response is helpful, > indicating that the sparc64 guys have tested a lot of this. Yes, the > barrier calls are expensive and yes, drivers on i386/amd64 still need > to do bus_dmamap_sync() calls. >=20 > I can only speak from my limited experience here after tracking down > that ath/ath_hal bug. My experience is that ath(4) triggered on PPC > because of a loop which read the same register a few times. I recall > seeing an ethernet driver recently have a commit which also did this. > I'm happy to do the reverse. Ie, on platforms where it matters, add a > warning printf (in verbose boot) when drivers aren't indicating > they've been fully tested. Or, I'm happy to completely ignore the > situation. :) I would have thought that multiple reads to the same location to an = uncached location wouldn't be a problem. Perhaps you can share how that = didn't work. Warner From owner-freebsd-arch@FreeBSD.ORG Fri Oct 28 16:10:52 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5516D1065674; Fri, 28 Oct 2011 16:10:52 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 139DD8FC12; Fri, 28 Oct 2011 16:10:51 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p9SG7Aeg036981 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 28 Oct 2011 10:07:11 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <201110280915.18111.hselasky@c2i.net> Date: Fri, 28 Oct 2011 10:04:56 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201110280915.18111.hselasky@c2i.net> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Fri, 28 Oct 2011 10:07:12 -0600 (MDT) Cc: Adrian Chadd , freebsd-arch@freebsd.org Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2011 16:10:52 -0000 On Oct 28, 2011, at 1:15 AM, Hans Petter Selasky wrote: > On Thursday 27 October 2011 22:28:13 Adrian Chadd wrote: >> * Make the bus default to use ordered semantics, much like what Linux >> does - ie, all IO read/writes (io or memory) are in-order and flushed >> with a barrier; >=20 > I think this is the assumption of many USB controller drivers = currently in the=20 > tree. The ordering guarantees aren't as random as Adrian suggests. All writes = are posted before any reads is about all you can count on. Most drivers = naturally cope with this well. All reads have to be synchronous by = their very nature and in-order. There's more liberty taken with writes = wrt ordering. Where it falls down is DMA or MSI. Both of those have writes from the = device to the system memory, and ordering of the completion of those = relative to other things isn't completely guaranteed. Warner From owner-freebsd-arch@FreeBSD.ORG Fri Oct 28 17:48:41 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E83A2106566B; Fri, 28 Oct 2011 17:48:41 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate.funkthat.com [70.36.235.232]) by mx1.freebsd.org (Postfix) with ESMTP id A97A48FC0C; Fri, 28 Oct 2011 17:48:41 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id p9SHmfG9004397 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 28 Oct 2011 10:48:41 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id p9SHmf8J004396; Fri, 28 Oct 2011 10:48:41 -0700 (PDT) (envelope-from jmg) Date: Fri, 28 Oct 2011 10:48:41 -0700 From: John-Mark Gurney To: Adrian Chadd Message-ID: <20111028174840.GQ25601@funkthat.com> Mail-Followup-To: Adrian Chadd , freebsd-arch@freebsd.org References: <20111028073710.GP25601@funkthat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Fri, 28 Oct 2011 10:48:41 -0700 (PDT) Cc: freebsd-arch@freebsd.org Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2011 17:48:42 -0000 Adrian Chadd wrote this message on Fri, Oct 28, 2011 at 21:07 +0800: > On 28 October 2011 15:37, John-Mark Gurney wrote: > >> I'd appreciate some feedback/comments before I go off and code all of this up. > > > > I think we should complain about the drivers that are NOT using the > > lazy/loose semantics as those are the drivers that are slower than > > they should be, and/or not written properly.  Complaining about properly > > written drivers that use the lazy/loose semantics when they get updated > > to be correct is wrong... > > Right. My point though is that I'm not sure of how many drivers have > been tested outside of i386/amd64. Marcus's response is helpful, > indicating that the sparc64 guys have tested a lot of this. Yes, the > barrier calls are expensive and yes, drivers on i386/amd64 still need > to do bus_dmamap_sync() calls. > > I can only speak from my limited experience here after tracking down > that ath/ath_hal bug. My experience is that ath(4) triggered on PPC > because of a loop which read the same register a few times. I recall > seeing an ethernet driver recently have a commit which also did this. > I'm happy to do the reverse. Ie, on platforms where it matters, add a > warning printf (in verbose boot) when drivers aren't indicating > they've been fully tested. Or, I'm happy to completely ignore the > situation. :) How about when we have debugging turned on (i.e. -current) we warn on all platforms for drivers that aren't "correct", and then on -releases we only warn on platforms that it maters on? That gives developers encouragement to fix their bugs, but also lets users on these alternate platforms know that if something isn't working, it's possibly a driver bug... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-arch@FreeBSD.ORG Fri Oct 28 18:26:02 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BF141065675 for ; Fri, 28 Oct 2011 18:26:02 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0569F8FC19 for ; Fri, 28 Oct 2011 18:26:02 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id AD85C46B06 for ; Fri, 28 Oct 2011 14:26:01 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 4D5978A037 for ; Fri, 28 Oct 2011 14:26:01 -0400 (EDT) From: John Baldwin To: arch@freebsd.org Date: Fri, 28 Oct 2011 14:25:59 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201110281426.00013.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Fri, 28 Oct 2011 14:26:01 -0400 (EDT) Cc: Subject: [PATCH] fadvise(2) system call X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2011 18:26:02 -0000 I have been working for the last week or so on a patch to add an fadvise(2) system call. It is somewhat similar to madvise(2) except that it operates on a file descriptor instead of a memory region. It also only really makes sense for regular files and does not apply to other file descriptor types. Just as with madvise(2) there are two types of advice that can be given. One set specifies the access pattern for a specific region of the file while the second set result in immediate action. The first set consist of FADV_NORMAL, FADV_SEQUENTIAL, FADV_RANDOM, and FADV_NOREUSE. For these operations what I have done is to add an optional "advice region" to a file descriptor. When a read(2) or write(2) is performed on a file, if the requested region falls completely within an active "advice region", then the associated advice is used to modify the IO_* flags passed down with the request. FADV_NORMAL just uses the current IO_* flags including using sequential_heuristic() to determine the amount of read-ahead and/or clustering to perform. FADV_RANDOM always passes a sequential count of zero to prevent read-ahead. FADV_SEQUENTIAL is the same as FADV_NORMAL for now (perhaps it should always be setting the maximum sequential count?). FADV_NOREUSE passes a sequential count of zero and sets IO_DIRECT (as if the operation were performed on a file opened with O_DIRECT). To simplify the implementation, only a single "advice region" is maintained for now (unlike madvise(2) which will split up vm map entries if necessary to ensure all requests are honored). Since the advice is only advisory, I think this is an ok approach for now. If we really had a valid use case, we could maybe add a list of advice regions, but then you have to deal with possibly splitting up read(2) or write(2) requests that span multiple advice regions, etc. I didn't feel that this extra complexity was warranted for now. The other two operations (FADV_WILLNEED and FADV_DONTNEED) are implemented via a new VOP_ADVISE(). The patch includes a default implementation (vop_stdadvise()) which is a nop for FADV_WILLNEED (I couldn't come up with a filesystem-independent way to trigger an async read-ahead). For FADV_DONTNEED it has a functional implementation which flushes all clean buffers from the vnode (via a new V_CLEANONLY mode for vinvalbuf()) and then moves any clean, unwired pages in the specified range of the file to the cache page queue (using a new vm_object_page_cache() routine). Various versions of this patch have already been reviewed and/or glanced at by alc@, kib@, and mdf@, but I'd like to open it for wider review before committing it. I will likely also MFC it back to 8 after 9.0 is released. The patch can be found at www.freebsd.org/~jhb/patches/fadvise.patch You can read the description of posix_fadvise() (which this implements) here: http://pubs.opengroup.org/onlinepubs/009695399/functions/posix_fadvise.html -- John Baldwin From owner-freebsd-arch@FreeBSD.ORG Fri Oct 28 21:08:37 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FC9B106564A for ; Fri, 28 Oct 2011 21:08:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 0A2388FC1A for ; Fri, 28 Oct 2011 21:08:36 +0000 (UTC) Received: by vws11 with SMTP id 11so5881330vws.13 for ; Fri, 28 Oct 2011 14:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=yD9FEP4tIDLjyek+VjxlgJ9Wcu7ta2+iySVpjjmjO7o=; b=VPj/AgTOqXxpNpyzHkCpkmbB6IxlMBFAmcag2iDHhaRY5XsDoiFQ6kOsEo69mtsrmv FSHtKN7OtxU/NDiZ0bpFCu8tR1RImuAOj00o0v6aYsy8dxVlIq1LLkorQTVtHi6szR6I PtHjh7sieFFnDoktWc8IUj4M8IISf5wTeKI/Y= MIME-Version: 1.0 Received: by 10.52.38.99 with SMTP id f3mr913287vdk.117.1319836116391; Fri, 28 Oct 2011 14:08:36 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.52.164.101 with HTTP; Fri, 28 Oct 2011 14:08:36 -0700 (PDT) In-Reply-To: <34E9F112-930C-4836-9949-FA8A01763969@bsdimp.com> References: <20111028073710.GP25601@funkthat.com> <34E9F112-930C-4836-9949-FA8A01763969@bsdimp.com> Date: Sat, 29 Oct 2011 08:08:36 +1100 X-Google-Sender-Auth: 0xL0mSZy4haiNZz_y6ur76QhzIA Message-ID: From: Adrian Chadd To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-arch@freebsd.org Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2011 21:08:37 -0000 This is the offending code. Ah, I had it wrong - lots of writes, followed by a read: uint32_t ar5212GetRadioRev(struct ath_hal *ah) { uint32_t val; int i; /* Read Radio Chip Rev Extract */ OS_REG_WRITE(ah, AR_PHY(0x34), 0x00001c16); for (i = 0; i < 8; i++) OS_REG_WRITE(ah, AR_PHY(0x20), 0x00010000); val = (OS_REG_READ(ah, AR_PHY(256)) >> 24) & 0xff; val = ((val & 0xf0) >> 4) | ((val & 0x0f) << 4); return ath_hal_reverseBits(val, 8); } From owner-freebsd-arch@FreeBSD.ORG Fri Oct 28 22:32:50 2011 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34C031065670 for ; Fri, 28 Oct 2011 22:32:50 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id EE2168FC1F for ; Fri, 28 Oct 2011 22:32:49 +0000 (UTC) Received: from [172.16.135.105] (lportal.in1.lcl [172.16.1.9]) (authenticated bits=0) by ns1.feral.com (8.14.4/8.14.4) with ESMTP id p9SMWnSa043451 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Fri, 28 Oct 2011 15:32:49 -0700 (PDT) (envelope-from mj@feral.com) Message-ID: <4EAB2D8C.1060405@feral.com> Date: Fri, 28 Oct 2011 15:32:44 -0700 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: freebsd-arch@freebsd.org References: <20111028073710.GP25601@funkthat.com> <34E9F112-930C-4836-9949-FA8A01763969@bsdimp.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (ns1.feral.com [192.67.166.1]); Fri, 28 Oct 2011 15:32:49 -0700 (PDT) Subject: Re: newbus IO ordering semantics - moving forward X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: mj@feral.com List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Oct 2011 22:32:50 -0000 On 10/28/2011 2:08 PM, Adrian Chadd wrote: > This is the offending code. Ah, I had it wrong - lots of writes, > followed by a read: > > Few architectures follow the Sparc Comet axioms (a read of I/O space forces a flush). From owner-freebsd-arch@FreeBSD.ORG Sat Oct 29 00:36:57 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4AFCC106564A; Sat, 29 Oct 2011 00:36:57 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [IPv6:2607:f678:1010::34]) by mx1.freebsd.org (Postfix) with ESMTP id 2CC3E8FC22; Sat, 29 Oct 2011 00:36:57 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id p9T0augE016455 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 28 Oct 2011 17:36:57 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id p9T0ausS016454; Fri, 28 Oct 2011 17:36:56 -0700 (PDT) Received: from fbsd81 ([192.168.200.81]) by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA05044; Fri, 28 Oct 11 17:25:57 PDT Date: Sat, 29 Oct 2011 00:24:32 -0700 From: perryh@pluto.rain.com To: jhb@freebsd.org Message-Id: <4eabaa30.DY7ebNVKU5sQEFsY%perryh@pluto.rain.com> References: <201110281426.00013.jhb@freebsd.org> In-Reply-To: <201110281426.00013.jhb@freebsd.org> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org Subject: Re: [PATCH] fadvise(2) system call X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2011 00:36:57 -0000 John Baldwin wrote: > I have been working for the last week or so on a patch to add an > fadvise(2) system call. It is somewhat similar to madvise(2) > except that it operates on a file descriptor instead of a memory > region. It also only really makes sense for regular files and > does not apply to other file descriptor types. Seems to me it could also make sense for disks and geoms. The access patterns used by dump(8) and fsck(8) are likely different, from each other and from those typically encountered in the course of filesystem activity -- and I wouldn't be surprised if mounted access patterns tended to differ among, say, ufs, zfs, and msdosfs. Granted the pattern of disk activity created by a filesystem will vary greatly, depending on the patterns of file access that the filesystem is servicing. From owner-freebsd-arch@FreeBSD.ORG Sat Oct 29 01:21:18 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id B2D0B106566C; Sat, 29 Oct 2011 01:21:18 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 8F8621504E9; Sat, 29 Oct 2011 01:21:18 +0000 (UTC) Message-ID: <4EAB550E.3060603@FreeBSD.org> Date: Fri, 28 Oct 2011 18:21:18 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111001 Thunderbird/7.0.1 MIME-Version: 1.0 To: John Baldwin References: <201110281426.00013.jhb@freebsd.org> In-Reply-To: <201110281426.00013.jhb@freebsd.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org Subject: Re: [PATCH] fadvise(2) system call X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2011 01:21:18 -0000 On 10/28/2011 11:25, John Baldwin wrote: > You can read the description of posix_fadvise() (which this implements) here: If you want a real-world consumer of posix_fadvise you can take a look at net-p2p/libtorrent-rasterbar15. The code is ifdef'ed out for FreeBSD because we don't have that yet, but it should be obvious how to re-enable it. There are a few clients that use that lib, qbittorrent is probably the most straightforward. hth, Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-freebsd-arch@FreeBSD.ORG Sat Oct 29 21:40:59 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC64B1065670; Sat, 29 Oct 2011 21:40:59 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id 8BB3B8FC08; Sat, 29 Oct 2011 21:40:59 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 50AE31DD59C; Sat, 29 Oct 2011 23:40:58 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 2A2E228468; Sat, 29 Oct 2011 23:40:58 +0200 (CEST) Date: Sat, 29 Oct 2011 23:40:58 +0200 From: Jilles Tjoelker To: John Baldwin Message-ID: <20111029214057.GB90408@stack.nl> References: <201110281426.00013.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201110281426.00013.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: arch@freebsd.org Subject: Re: [PATCH] fadvise(2) system call X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2011 21:41:00 -0000 On Fri, Oct 28, 2011 at 02:25:59PM -0400, John Baldwin wrote: > I have been working for the last week or so on a patch to add an > fadvise(2) system call. It is somewhat similar to madvise(2) except > that it operates on a file descriptor instead of a memory region. It > also only really makes sense for regular files and does not apply to > other file descriptor types. Cool. Various other posix_* functions such as posix_spawn() and posix_openpt() are implemented directly, not as a wrapper around s/posix_//. I think posix_madvise() is only implemented as a wrapper because madvise() already existed. Therefore, I don't see a reason why a function named fadvise would be useful on its own (except if there are existing applications that use that name). If the advice is FADV_SEQUENTIAL, FADV_RANDOM or FADV_NOREUSE and the file descriptor is invalid (fget() fails), the struct fadvise_info is leaked. The comparisons + (fa->fa_start != 0 && fa->fa_start == end + 1) || + (uap->offset != 0 && fa->fa_end + 1 == uap->offset))) { should instead be something like + (end != OFF_MAX && fa->fa_start == end + 1) || + (fa->fa_end != OFF_MAX && fa->fa_end + 1 == uap->offset))) { to avoid integer overflow. -- Jilles Tjoelker From owner-freebsd-arch@FreeBSD.ORG Sat Oct 29 22:40:57 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69F94106564A; Sat, 29 Oct 2011 22:40:57 +0000 (UTC) (envelope-from lev@serebryakov.spb.ru) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 326B78FC12; Sat, 29 Oct 2011 22:40:56 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:504f:9791:43c0:21ab]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 920A94AC1C; Sun, 30 Oct 2011 02:40:55 +0400 (MSK) Date: Sun, 30 Oct 2011 02:40:46 +0400 From: Lev Serebryakov X-Priority: 3 (Normal) Message-ID: <458756137.20111030024046@serebryakov.spb.ru> To: John Baldwin In-Reply-To: <4EAB550E.3060603@FreeBSD.org> References: <201110281426.00013.jhb@freebsd.org> <4EAB550E.3060603@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: arch@freebsd.org Subject: Re: [PATCH] fadvise(2) system call X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2011 22:40:57 -0000 Hello, Doug. You wrote 29 =EE=EA=F2=FF=E1=F0=FF 2011 =E3., 5:21:18: >> You can read the description of posix_fadvise() (which this implements) = here: > If you want a real-world consumer of posix_fadvise you can take a look > at net-p2p/libtorrent-rasterbar15. The code is ifdef'ed out for FreeBSD > because we don't have that yet, but it should be obvious how to > re-enable it. There are a few clients that use that lib, qbittorrent is > probably the most straightforward. net-p2p/transmission-daemon could be used, too. It shows very poor performance on UFS (90% in pread() call and 50% of wall time to saturate 40Mbit/s channel from fast disk) compared to Linux, where such interface exists. --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-arch@FreeBSD.ORG Sat Oct 29 23:19:32 2011 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B31F51065673 for ; Sat, 29 Oct 2011 23:19:32 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6E7BE8FC19 for ; Sat, 29 Oct 2011 23:19:32 +0000 (UTC) Received: by ggnq2 with SMTP id q2so6325996ggn.13 for ; Sat, 29 Oct 2011 16:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=references:in-reply-to:mime-version:content-transfer-encoding :content-type:message-id:cc:x-mailer:from:subject:date:to; bh=db4XVteQeGVBhi6cy8ufPP0vmNam5zflrzLCALzCHrs=; b=VCMac58kFhuZx35aN10i3MxX1A302TbR8LgwKFVoXqTFCqRT4ukYFy94XuYlrsTDyX 3OGafMKXGXly2KD8xJCo5JFsz+K2JGnWm0df6HbzIsFVP0pJWLi/ShNdHfpBrZhdJc6f iY8RDDkdvCwfZ1sw3dEFObiPlJ6vpS8uXsEQk= Received: by 10.150.215.2 with SMTP id n2mr7189568ybg.12.1319928679200; Sat, 29 Oct 2011 15:51:19 -0700 (PDT) Received: from [10.99.45.76] ([166.137.9.199]) by mx.google.com with ESMTPS id l8sm37556628anb.1.2011.10.29.15.51.15 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 29 Oct 2011 15:51:17 -0700 (PDT) References: <201110281426.00013.jhb@freebsd.org> <4EAB550E.3060603@FreeBSD.org> <458756137.20111030024046@serebryakov.spb.ru> In-Reply-To: <458756137.20111030024046@serebryakov.spb.ru> Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-2022-jp Message-Id: <3C5CF500-E0D7-4E65-A98B-088ACC11F2D6@gmail.com> X-Mailer: iPhone Mail (9A334) From: Garrett Cooper Date: Sat, 29 Oct 2011 15:51:07 -0700 To: Lev Serebryakov Cc: "arch@freebsd.org" Subject: Re: [PATCH] fadvise(2) system call X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2011 23:19:32 -0000 On Oct 29, 2011, at 3:40 PM, Lev Serebryakov wrote:= > Hello, Doug. > You wrote 29 =1B$B'`'\'d'q'R'b'q=1B(B 2011 =1B$B'T=1B(B., 5:21:18: >=20 >>> You can read the description of posix_fadvise() (which this implements) h= ere: >> If you want a real-world consumer of posix_fadvise you can take a look >> at net-p2p/libtorrent-rasterbar15. The code is ifdef'ed out for FreeBSD >> because we don't have that yet, but it should be obvious how to >> re-enable it. There are a few clients that use that lib, qbittorrent is >> probably the most straightforward. > net-p2p/transmission-daemon could be used, too. It shows very poor > performance on UFS (90% in pread() call and 50% of wall time to > saturate 40Mbit/s channel from fast disk) compared to Linux, where > such interface exists. Pretty sure it would help rsync and samba as well based on some quick googli= ng.. -Garrett=