From owner-freebsd-arch@FreeBSD.ORG Sun Jan 21 03:13:31 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 23FE216A402; Sun, 21 Jan 2007 03:13:31 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.freebsd.org (Postfix) with SMTP id 27E0613C428; Sun, 21 Jan 2007 03:13:29 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie ([134.226.81.10] helo=walton.maths.tcd.ie) by salmon.maths.tcd.ie with SMTP id ; 20 Jan 2007 21:51:08 +0000 (GMT) Date: Sat, 20 Jan 2007 21:51:03 +0000 From: David Malone To: Bruce Evans Message-ID: <20070120215103.GA93101@walton.maths.tcd.ie> References: <20070117134022.V18339@besplex.bde.org> <20070117224812.Q23194@besplex.bde.org> <45AE7BF8.10703@fer.hr> <3bbf2fe10701171315g696bca4fi3bf676b62c06f4d@mail.gmail.com> <20070118094808.F11834@delplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070118094808.F11834@delplex.bde.org> User-Agent: Mutt/1.5.6i Sender: dwmalone@maths.tcd.ie Cc: Attilio Rao , freebsd-current@freebsd.org, Ivan Voras , freebsd-arch@freebsd.org Subject: Re: Optimized copy&move (was: Re: [PATCH] Mantaining turnstile aligned to 128 bytes in i386 CPUs) 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: Sun, 21 Jan 2007 03:13:31 -0000 On Thu, Jan 18, 2007 at 11:16:19AM +1100, Bruce Evans wrote: > - the FPU routines are faster on Athlons (XP and 64 at least), but these > didn't exist until 2001. The introduction of these CPUs may have > been the trigger for turning off the FPU routines in -current in 2001. > Until then problems were limited to Pentium-1's since the dynamic > configuration prevented the routines being used on all other machines. I think a very quirky K6-2 machine that I had let us reproduce the problem fairly dependably and may have been part of the reason it was finally turned off. David. From owner-freebsd-arch@FreeBSD.ORG Sun Jan 21 04:03:52 2007 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA8FC16A402; Sun, 21 Jan 2007 04:03:52 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout1.pacific.net.au (mailout1-3.pacific.net.au [61.8.2.210]) by mx1.freebsd.org (Postfix) with ESMTP id 84B8813C459; Sun, 21 Jan 2007 04:03:52 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.2.162]) by mailout1.pacific.net.au (Postfix) with ESMTP id 29CF5328299; Sun, 21 Jan 2007 15:03:51 +1100 (EST) Received: from besplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (Postfix) with ESMTP id 9D5438C04; Sun, 21 Jan 2007 15:03:49 +1100 (EST) Date: Sun, 21 Jan 2007 15:03:48 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: David Malone In-Reply-To: <20070120215103.GA93101@walton.maths.tcd.ie> Message-ID: <20070121140716.W4007@besplex.bde.org> References: <20070117134022.V18339@besplex.bde.org> <20070117224812.Q23194@besplex.bde.org> <45AE7BF8.10703@fer.hr> <3bbf2fe10701171315g696bca4fi3bf676b62c06f4d@mail.gmail.com> <20070118094808.F11834@delplex.bde.org> <20070120215103.GA93101@walton.maths.tcd.ie> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Attilio Rao , freebsd-current@FreeBSD.org, Ivan Voras , freebsd-arch@FreeBSD.org Subject: Re: Optimized copy&move (was: Re: [PATCH] Mantaining turnstile aligned to 128 bytes in i386 CPUs) 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: Sun, 21 Jan 2007 04:03:53 -0000 On Sat, 20 Jan 2007, David Malone wrote: > On Thu, Jan 18, 2007 at 11:16:19AM +1100, Bruce Evans wrote: >> - the FPU routines are faster on Athlons (XP and 64 at least), but these >> didn't exist until 2001. The introduction of these CPUs may have >> been the trigger for turning off the FPU routines in -current in 2001. >> Until then problems were limited to Pentium-1's since the dynamic >> configuration prevented the routines being used on all other machines. > > I think a very quirky K6-2 machine that I had let us reproduce the > problem fairly dependably and may have been part of the reason it > was finally turned off. I just looked again at your old (2001) mail about this. The userland benchmark was flawed. It tried 3 methods sequentially without warming up caches, so all methods did unintended testing of I-cache misses (including branch target cache cache) and the first method (userland bzero) warmed up the D-cache for the other 2. The kernel runtime configuration also fails to either warm or cool the caches initially. It assumes P1 cache sizes and depends on a 1MB buffer being much larger than caches. Maybe this was not enough for K6-2. It is certainly not enough for Athlon64, but I think it would mostly cause false negatives so I don't understand why it gave a false positive for the K6-2. After fixing the userland benchmark, userland bzero did much better and your benchmark agreed with mine that FPU methods for bzero are just pessimizations on A64-AXP. However, the behaviour for bcopy is quite different on A64-AXP -- even the old FPU methods are small optimizations in some cases (on A64, about 25% in the fully-L2 cached case; little difference for other large copies). Bruce From owner-freebsd-arch@FreeBSD.ORG Sun Jan 21 18:10:20 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C765E16A400 for ; Sun, 21 Jan 2007 18:10:20 +0000 (UTC) (envelope-from grafan@gmail.com) Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.224]) by mx1.freebsd.org (Postfix) with ESMTP id 9004113C45E for ; Sun, 21 Jan 2007 18:10:20 +0000 (UTC) (envelope-from grafan@gmail.com) Received: by nz-out-0506.google.com with SMTP id i11so364560nzh for ; Sun, 21 Jan 2007 10:10:19 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=RYGc/z0ycxDlGiqpqvRekDvOuJhVvZXCSpanmkwugRzFw6bs294nN698Q3bHWgJhkGxMGCDtqCFfg8TN1elsV5rzc4w3a9LTEvhbZLtZZUCFqZ+JexEdpWtI7H1WKDM8k2/CCcUDNFINCdyzT8ji59c3MV4sgocCg0VGUl9oL0M= Received: by 10.114.12.9 with SMTP id 9mr7047wal.1169401529998; Sun, 21 Jan 2007 09:45:29 -0800 (PST) Received: by 10.115.19.5 with HTTP; Sun, 21 Jan 2007 09:45:29 -0800 (PST) Message-ID: <6eb82e0701210945r686e54d5vfc7529d57cf372a6@mail.gmail.com> Date: Mon, 22 Jan 2007 01:45:29 +0800 From: "Rong-en Fan" To: freebsd-arch@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: src/gnu 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: Sun, 21 Jan 2007 18:10:20 -0000 >From hier(7), it says sources covered by GPL are placed here. Does that mean all build glue for things covered by GPL have to be placed in src/gnu/? I'm asking because I noticed there are some applications/libraries that are covered by GPL live in outside src/gnu. Regards, Rong-En Fan From owner-freebsd-arch@FreeBSD.ORG Sun Jan 21 21:25:21 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E72216A403 for ; Sun, 21 Jan 2007 21:25:21 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (relay0.rambler.ru [81.19.66.187]) by mx1.freebsd.org (Postfix) with ESMTP id 36B3E13C457 for ; Sun, 21 Jan 2007 21:25:21 +0000 (UTC) (envelope-from ru@rambler-co.ru) Received: from relay0.rambler.ru (localhost [127.0.0.1]) by relay0.rambler.ru (Postfix) with ESMTP id 2459C5C6C; Mon, 22 Jan 2007 00:02:38 +0300 (MSK) Received: from edoofus.park.rambler.ru (unknown [81.19.65.108]) by relay0.rambler.ru (Postfix) with ESMTP id 022BD5C48; Mon, 22 Jan 2007 00:02:38 +0300 (MSK) Received: (from ru@localhost) by edoofus.park.rambler.ru (8.13.8/8.13.8) id l0LL1dRu047224; Mon, 22 Jan 2007 00:01:39 +0300 (MSK) (envelope-from ru) Date: Mon, 22 Jan 2007 00:01:39 +0300 From: Ruslan Ermilov To: Rong-en Fan Message-ID: <20070121210139.GA47122@rambler-co.ru> References: <6eb82e0701210945r686e54d5vfc7529d57cf372a6@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8t9RHnE3ZwKMSgU+" Content-Disposition: inline In-Reply-To: <6eb82e0701210945r686e54d5vfc7529d57cf372a6@mail.gmail.com> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: No virus found Cc: freebsd-arch@freebsd.org Subject: Re: src/gnu 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: Sun, 21 Jan 2007 21:25:21 -0000 --8t9RHnE3ZwKMSgU+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 22, 2007 at 01:45:29AM +0800, Rong-en Fan wrote: > From hier(7), it says sources covered by GPL are placed here. > Does that mean all build glue for things covered by GPL have to > be placed in src/gnu/? >=20 It means we prefer to keep them there. > I'm asking because I noticed there are some applications/libraries > that are covered by GPL live in outside src/gnu. >=20 Yes, there could be historical exceptions. Cheers, --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --8t9RHnE3ZwKMSgU+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFs9SzqRfpzJluFF4RAqrUAJ9tdD5voeRPRZXOyJL0DDcNac+I8ACfecgY h98kng5iicbA3iWd8Uy4Cjo= =DijO -----END PGP SIGNATURE----- --8t9RHnE3ZwKMSgU+-- From owner-freebsd-arch@FreeBSD.ORG Sun Jan 21 21:42:12 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 94B5316A400 for ; Sun, 21 Jan 2007 21:42:12 +0000 (UTC) (envelope-from freebsd-arch@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 5080813C428 for ; Sun, 21 Jan 2007 21:42:12 +0000 (UTC) (envelope-from freebsd-arch@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1H8kRY-0003E9-Ax for freebsd-arch@freebsd.org; Sun, 21 Jan 2007 22:41:40 +0100 Received: from 89-172-46-31.adsl.net.t-com.hr ([89.172.46.31]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Jan 2007 22:41:40 +0100 Received: from ivoras by 89-172-46-31.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Jan 2007 22:41:40 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-arch@freebsd.org From: Ivan Voras Date: Sun, 21 Jan 2007 22:41:09 +0100 Lines: 52 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigEAA368BA96799C3BF6F3A114" X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 89-172-46-31.adsl.net.t-com.hr User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) X-Enigmail-Version: 0.94.1.2 Sender: news Subject: bzero & bcopy alignment 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: Sun, 21 Jan 2007 21:42:12 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigEAA368BA96799C3BF6F3A114 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Following recent discussion on alignment of bzero() and bcopy(), I've added some statistics collecting code to bzero() and bcopy() for practice (on a RELENG_6 box), and here are the cumulative results for argument alignment: 128: 117190 64: 46495 32: 745178 16: 35313 8: 64580 4: 131045 2: 17969 1: 25099 This is somewhat early after bootup. First number is the alignment, second argument is the number of calls that passed a pointer having the alignment (e.g. there were 131045 instances of arguments which had data aligned to 4 bytes in either bcopy or bzero). After some compiling (start of a buildkernel), the data is: 128: 341440 64: 66812 32: 1020807 16: 75574 8: 192189 4: 266904 2: 44975 1: 36411 If the data is correct, most data seem to be aligned fairly ok. --------------enigEAA368BA96799C3BF6F3A114 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.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFs939ldnAQVacBcgRAk0tAJ0aqms6W+MzFiqWRYKrLiZ7MuuD9gCg8Udc 2hzU0zV9TLUgjEMiWe8ocUU= =/dCH -----END PGP SIGNATURE----- --------------enigEAA368BA96799C3BF6F3A114-- From owner-freebsd-arch@FreeBSD.ORG Sun Jan 21 22:00:25 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 291D916A403 for ; Sun, 21 Jan 2007 22:00:25 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.freebsd.org (Postfix) with ESMTP id E6FCA13C442 for ; Sun, 21 Jan 2007 22:00:24 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.13.6) with ESMTP id l0LM0Jh7083781; Sun, 21 Jan 2007 14:00:19 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id l0LM0JYG083780; Sun, 21 Jan 2007 14:00:19 -0800 (PST) (envelope-from rizzo) Date: Sun, 21 Jan 2007 14:00:19 -0800 From: Luigi Rizzo To: Ivan Voras Message-ID: <20070121140019.A83688@xorpc.icir.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from ivoras@fer.hr on Sun, Jan 21, 2007 at 10:41:09PM +0100 Cc: freebsd-arch@freebsd.org Subject: Re: bzero & bcopy alignment 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: Sun, 21 Jan 2007 22:00:25 -0000 On Sun, Jan 21, 2007 at 10:41:09PM +0100, Ivan Voras wrote: > Following recent discussion on alignment of bzero() and bcopy(), I've > added some statistics collecting code to bzero() and bcopy() for > practice (on a RELENG_6 box), and here are the cumulative results for > argument alignment: i think these profiles depend heavily on the hardware and usage patterns. e.g. some network drivers force you to aligned buffers which results in misaligned payload requesting in turn an unaligned bcopy. Not that one can help with this, but i think that is also important to locate the locations in the source where the poorly aligned (1-2, maybe 4 and 8 to some degree) ops occur. cheers luigi > 128: 117190 > 64: 46495 > 32: 745178 > 16: 35313 > 8: 64580 > 4: 131045 > 2: 17969 > 1: 25099 > > This is somewhat early after bootup. First number is the alignment, > second argument is the number of calls that passed a pointer having the > alignment (e.g. there were 131045 instances of arguments which had data > aligned to 4 bytes in either bcopy or bzero). After some compiling > (start of a buildkernel), the data is: > > 128: 341440 > 64: 66812 > 32: 1020807 > 16: 75574 > 8: 192189 > 4: 266904 > 2: 44975 > 1: 36411 > > If the data is correct, most data seem to be aligned fairly ok. > From owner-freebsd-arch@FreeBSD.ORG Sun Jan 21 22:10:26 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AAB5316A400 for ; Sun, 21 Jan 2007 22:10:26 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 6AC0A13C4B9 for ; Sun, 21 Jan 2007 22:10:26 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id 9C3D91747B; Sun, 21 Jan 2007 22:10:24 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.8/8.13.8) with ESMTP id l0LMANcw018142; Sun, 21 Jan 2007 22:10:23 GMT (envelope-from phk@critter.freebsd.dk) To: Luigi Rizzo From: "Poul-Henning Kamp" In-Reply-To: Your message of "Sun, 21 Jan 2007 14:00:19 PST." <20070121140019.A83688@xorpc.icir.org> Date: Sun, 21 Jan 2007 22:10:23 +0000 Message-ID: <18141.1169417423@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Ivan Voras , freebsd-arch@freebsd.org Subject: Re: bzero & bcopy alignment 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: Sun, 21 Jan 2007 22:10:26 -0000 In message <20070121140019.A83688@xorpc.icir.org>, Luigi Rizzo writes: >On Sun, Jan 21, 2007 at 10:41:09PM +0100, Ivan Voras wrote: >> Following recent discussion on alignment of bzero() and bcopy(), I've >> added some statistics collecting code to bzero() and bcopy() for >> practice (on a RELENG_6 box), and here are the cumulative results for >> argument alignment: > >i think these profiles depend heavily on the hardware >and usage patterns. Undoubtedly, but on the other hand, a lot of them operate on structs and other data laid out by the compiler, so the unaligned calls are special cases. -- 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 Sun Jan 21 22:21:44 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 249EF16A405 for ; Sun, 21 Jan 2007 22:21:44 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.freebsd.org (Postfix) with ESMTP id 0E67E13C478 for ; Sun, 21 Jan 2007 22:21:44 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.13.6) with ESMTP id l0LMLgnn083988; Sun, 21 Jan 2007 14:21:42 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id l0LMLf0B083987; Sun, 21 Jan 2007 14:21:41 -0800 (PST) (envelope-from rizzo) Date: Sun, 21 Jan 2007 14:21:41 -0800 From: Luigi Rizzo To: Poul-Henning Kamp Message-ID: <20070121142141.A83926@xorpc.icir.org> References: <20070121140019.A83688@xorpc.icir.org> <18141.1169417423@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <18141.1169417423@critter.freebsd.dk>; from phk@phk.freebsd.dk on Sun, Jan 21, 2007 at 10:10:23PM +0000 Cc: Ivan Voras , freebsd-arch@freebsd.org Subject: Re: bzero & bcopy alignment 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: Sun, 21 Jan 2007 22:21:44 -0000 On Sun, Jan 21, 2007 at 10:10:23PM +0000, Poul-Henning Kamp wrote: > In message <20070121140019.A83688@xorpc.icir.org>, Luigi Rizzo writes: > >On Sun, Jan 21, 2007 at 10:41:09PM +0100, Ivan Voras wrote: > >> Following recent discussion on alignment of bzero() and bcopy(), I've > >> added some statistics collecting code to bzero() and bcopy() for > >> practice (on a RELENG_6 box), and here are the cumulative results for > >> argument alignment: > > > >i think these profiles depend heavily on the hardware > >and usage patterns. > > Undoubtedly, but on the other hand, a lot of them operate on > structs and other data laid out by the compiler, so the > unaligned calls are special cases. and that is why i suggested to instrument the functions to record where in the source the unaligned functions are called, so we can figure out whether it is something unavoidable or something that can be fixed. cheers luigi From owner-freebsd-arch@FreeBSD.ORG Sun Jan 21 22:25:53 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 767B316A400 for ; Sun, 21 Jan 2007 22:25:53 +0000 (UTC) (envelope-from freebsd-arch@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 05DF613C45E for ; Sun, 21 Jan 2007 22:25:52 +0000 (UTC) (envelope-from freebsd-arch@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1H8l83-0002Cn-Sj for freebsd-arch@freebsd.org; Sun, 21 Jan 2007 23:25:35 +0100 Received: from 89-172-46-31.adsl.net.t-com.hr ([89.172.46.31]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Jan 2007 23:25:35 +0100 Received: from ivoras by 89-172-46-31.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Jan 2007 23:25:35 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-arch@freebsd.org From: Ivan Voras Date: Sun, 21 Jan 2007 23:25:14 +0100 Lines: 44 Message-ID: References: <20070121140019.A83688@xorpc.icir.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigC9AE47529EA53A2D2EC99121" X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 89-172-46-31.adsl.net.t-com.hr User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) In-Reply-To: <20070121140019.A83688@xorpc.icir.org> X-Enigmail-Version: 0.94.1.2 Sender: news Subject: Re: bzero & bcopy alignment 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: Sun, 21 Jan 2007 22:25:53 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigC9AE47529EA53A2D2EC99121 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Luigi Rizzo wrote: > On Sun, Jan 21, 2007 at 10:41:09PM +0100, Ivan Voras wrote: >> Following recent discussion on alignment of bzero() and bcopy(), I've >> added some statistics collecting code to bzero() and bcopy() for >> practice (on a RELENG_6 box), and here are the cumulative results for >> argument alignment: >=20 > i think these profiles depend heavily on the hardware > and usage patterns. Yes, I agree. For what it's worth, this was on vmware, almost no network activity. > e.g. some network drivers force you to aligned buffers > which results in misaligned payload requesting in > turn an unaligned bcopy. Not that one can help with this, > but i think that is also important to locate the locations > in the source where the poorly aligned (1-2, maybe > 4 and 8 to some degree) ops occur. Any magic tricks to identify the caller of "current" function in the kern= el? --------------enigC9AE47529EA53A2D2EC99121 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.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFs+hQldnAQVacBcgRAtH1AKC0mBWy3Vo8Bk6fs+U1YAvPDGjNPACeN2T6 R/rpwr714lUqF0g0nBP8vjM= =YKvt -----END PGP SIGNATURE----- --------------enigC9AE47529EA53A2D2EC99121-- From owner-freebsd-arch@FreeBSD.ORG Sun Jan 21 23:02:33 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A8E1B16A403 for ; Sun, 21 Jan 2007 23:02:33 +0000 (UTC) (envelope-from marius.nuennerich@gmx.net) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id ECB6913C45B for ; Sun, 21 Jan 2007 23:02:32 +0000 (UTC) (envelope-from marius.nuennerich@gmx.net) Received: (qmail invoked by alias); 21 Jan 2007 22:35:52 -0000 Received: from dslb-084-061-193-105.pools.arcor-ip.net (EHLO sol.hackerzberg.local) [84.61.193.105] by mail.gmx.net (mp027) with SMTP; 21 Jan 2007 23:35:52 +0100 X-Authenticated: #5707313 Date: Sun, 21 Jan 2007 23:35:45 +0100 From: Marius Nuennerich To: freebsd-arch@freebsd.org Message-ID: <20070121233545.2a8ce09a@sol.hackerzberg.local> In-Reply-To: References: <20070121140019.A83688@xorpc.icir.org> X-Mailer: Claws Mail 2.7.0 (GTK+ 2.10.7; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Subject: Re: bzero & bcopy alignment 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: Sun, 21 Jan 2007 23:02:33 -0000 On Sun, 21 Jan 2007 23:25:14 +0100 Ivan Voras wrote: > Luigi Rizzo wrote: > > On Sun, Jan 21, 2007 at 10:41:09PM +0100, Ivan Voras wrote: > >> Following recent discussion on alignment of bzero() and bcopy(), I've > >> added some statistics collecting code to bzero() and bcopy() for > >> practice (on a RELENG_6 box), and here are the cumulative results for > >> argument alignment: > > > > i think these profiles depend heavily on the hardware > > and usage patterns. > > Yes, I agree. For what it's worth, this was on vmware, almost no network > activity. > > > e.g. some network drivers force you to aligned buffers > > which results in misaligned payload requesting in > > turn an unaligned bcopy. Not that one can help with this, > > but i think that is also important to locate the locations > > in the source where the poorly aligned (1-2, maybe > > 4 and 8 to some degree) ops occur. > > Any magic tricks to identify the caller of "current" function in the kernel? I don't know if the dtrace port is ready for this, but afaik it would be easy with dtrace. From owner-freebsd-arch@FreeBSD.ORG Sun Jan 21 23:22:56 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C8AE116A400 for ; Sun, 21 Jan 2007 23:22:56 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.freebsd.org (Postfix) with ESMTP id B3EF613C44B for ; Sun, 21 Jan 2007 23:22:56 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.13.6) with ESMTP id l0LNMqGR084473; Sun, 21 Jan 2007 15:22:52 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id l0LNMqJG084472; Sun, 21 Jan 2007 15:22:52 -0800 (PST) (envelope-from rizzo) Date: Sun, 21 Jan 2007 15:22:52 -0800 From: Luigi Rizzo To: Ivan Voras Message-ID: <20070121152251.A84413@xorpc.icir.org> References: <20070121140019.A83688@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from ivoras@fer.hr on Sun, Jan 21, 2007 at 11:25:14PM +0100 Cc: freebsd-arch@freebsd.org Subject: Re: bzero & bcopy alignment 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: Sun, 21 Jan 2007 23:22:56 -0000 On Sun, Jan 21, 2007 at 11:25:14PM +0100, Ivan Voras wrote: > Luigi Rizzo wrote: > > On Sun, Jan 21, 2007 at 10:41:09PM +0100, Ivan Voras wrote: > >> Following recent discussion on alignment of bzero() and bcopy(), I've > >> added some statistics collecting code to bzero() and bcopy() for > >> practice (on a RELENG_6 box), and here are the cumulative results for > >> argument alignment: > > > > i think these profiles depend heavily on the hardware > > and usage patterns. > > Yes, I agree. For what it's worth, this was on vmware, almost no network > activity. > > > e.g. some network drivers force you to aligned buffers > > which results in misaligned payload requesting in > > turn an unaligned bcopy. Not that one can help with this, > > but i think that is also important to locate the locations > > in the source where the poorly aligned (1-2, maybe > > 4 and 8 to some degree) ops occur. > > Any magic tricks to identify the caller of "current" function in the kernel? i suppose i would remap those function as #define bcopy(a, b, c) \ do { \ track_bcopy(__PRETTY_FUNCTION__, __FILE__, __LINE__, a, b, c); original_bcopy(a, b, c); } and the same for bzero, and then use function track_bcopy() to simply record the instances in some data structure that you can then export in some way to userland for stats gathering. In the simplest form you could e.g. filter unaligned accesses and just dump them to a buffer exported via sysctl; if you want to make things smarter/more efficient, you could hash __FILE__, __LINE__ to avoid duplicates (and probably, because these are constant strings, you can just compare the string pointers without having to do a full strcmp). cheers luigi a hash table From owner-freebsd-arch@FreeBSD.ORG Sun Jan 21 23:30:42 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 788DE16A403 for ; Sun, 21 Jan 2007 23:30:42 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by mx1.freebsd.org (Postfix) with ESMTP id 1109313C44B for ; Sun, 21 Jan 2007 23:30:41 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by nf-out-0910.google.com with SMTP id m19so315824nfc for ; Sun, 21 Jan 2007 15:30:40 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=Fl6uE/VomJWuS2kTs9JrdCLa+AscEnZQw3mjGkAV2zibQrCMOZIZSE7VdlsAHDuqRS0i7xRCRhJ8QbXH9C8urG/eF0Cu4TchUXm+pHnCcDT2dMak7Un553k8UVKj8Jlanmyjw8antu93OPg4uQ3da0507HsDcSuiuvyQxyAKHrc= Received: by 10.48.48.13 with SMTP id v13mr91419nfv.1169422240526; Sun, 21 Jan 2007 15:30:40 -0800 (PST) Received: by 10.48.238.14 with HTTP; Sun, 21 Jan 2007 15:30:40 -0800 (PST) Message-ID: <3bbf2fe10701211530o7c2e8977k2df02a546cb4cb8f@mail.gmail.com> Date: Mon, 22 Jan 2007 00:30:40 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Luigi Rizzo" In-Reply-To: <20070121152251.A84413@xorpc.icir.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070121140019.A83688@xorpc.icir.org> <20070121152251.A84413@xorpc.icir.org> X-Google-Sender-Auth: b8a6dbd2e12ceeb1 Cc: Ivan Voras , freebsd-arch@freebsd.org Subject: Re: bzero & bcopy alignment 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: Sun, 21 Jan 2007 23:30:42 -0000 2007/1/22, Luigi Rizzo : > On Sun, Jan 21, 2007 at 11:25:14PM +0100, Ivan Voras wrote: > > Luigi Rizzo wrote: > > > On Sun, Jan 21, 2007 at 10:41:09PM +0100, Ivan Voras wrote: > > >> Following recent discussion on alignment of bzero() and bcopy(), I've > > >> added some statistics collecting code to bzero() and bcopy() for > > >> practice (on a RELENG_6 box), and here are the cumulative results for > > >> argument alignment: > > > > > > i think these profiles depend heavily on the hardware > > > and usage patterns. > > > > Yes, I agree. For what it's worth, this was on vmware, almost no network > > activity. > > > > > e.g. some network drivers force you to aligned buffers > > > which results in misaligned payload requesting in > > > turn an unaligned bcopy. Not that one can help with this, > > > but i think that is also important to locate the locations > > > in the source where the poorly aligned (1-2, maybe > > > 4 and 8 to some degree) ops occur. > > > > Any magic tricks to identify the caller of "current" function in the kernel? > > i suppose i would remap those function as > > #define bcopy(a, b, c) \ > do { \ > track_bcopy(__PRETTY_FUNCTION__, __FILE__, __LINE__, a, b, c); > original_bcopy(a, b, c); > } > > and the same for bzero, and then use function track_bcopy() > to simply record the instances in some data structure that you > can then export in some way to userland for stats gathering. > In the simplest form you could e.g. filter unaligned accesses > and just dump them to a buffer exported via sysctl; > if you want to make things smarter/more efficient, you could > hash __FILE__, __LINE__ to avoid duplicates (and probably, > because these are constant strings, you can just compare > the string pointers without having to do a full strcmp). A better approach (at least for ia32, I'm not aware what is the situation on the other architectures) would be using the vectorized entry for this family of function (i386/include/md_var.h). Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-arch@FreeBSD.ORG Sun Jan 21 23:49:04 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 201C216A401; Sun, 21 Jan 2007 23:49:04 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.freebsd.org (Postfix) with ESMTP id E3F7F13C448; Sun, 21 Jan 2007 23:49:03 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.13.6) with ESMTP id l0LNn2Nj084710; Sun, 21 Jan 2007 15:49:02 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id l0LNn1Bd084709; Sun, 21 Jan 2007 15:49:01 -0800 (PST) (envelope-from rizzo) Date: Sun, 21 Jan 2007 15:49:01 -0800 From: Luigi Rizzo To: Attilio Rao Message-ID: <20070121154901.B84480@xorpc.icir.org> References: <20070121140019.A83688@xorpc.icir.org> <20070121152251.A84413@xorpc.icir.org> <3bbf2fe10701211530o7c2e8977k2df02a546cb4cb8f@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <3bbf2fe10701211530o7c2e8977k2df02a546cb4cb8f@mail.gmail.com>; from attilio@freebsd.org on Mon, Jan 22, 2007 at 12:30:40AM +0100 Cc: Ivan Voras , freebsd-arch@freebsd.org Subject: Re: bzero & bcopy alignment 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: Sun, 21 Jan 2007 23:49:04 -0000 On Mon, Jan 22, 2007 at 12:30:40AM +0100, Attilio Rao wrote: > 2007/1/22, Luigi Rizzo : > > On Sun, Jan 21, 2007 at 11:25:14PM +0100, Ivan Voras wrote: > > > Luigi Rizzo wrote: > > > > On Sun, Jan 21, 2007 at 10:41:09PM +0100, Ivan Voras wrote: > > > >> Following recent discussion on alignment of bzero() and bcopy(), I've > > > >> added some statistics collecting code to bzero() and bcopy() for > > > >> practice (on a RELENG_6 box), and here are the cumulative results for > > > >> argument alignment: > > > > > > > > i think these profiles depend heavily on the hardware > > > > and usage patterns. > > > > > > Yes, I agree. For what it's worth, this was on vmware, almost no network > > > activity. > > > > > > > e.g. some network drivers force you to aligned buffers > > > > which results in misaligned payload requesting in > > > > turn an unaligned bcopy. Not that one can help with this, > > > > but i think that is also important to locate the locations > > > > in the source where the poorly aligned (1-2, maybe > > > > 4 and 8 to some degree) ops occur. > > > > > > Any magic tricks to identify the caller of "current" function in the kernel? > > > > i suppose i would remap those function as > > > > #define bcopy(a, b, c) \ > > do { \ > > track_bcopy(__PRETTY_FUNCTION__, __FILE__, __LINE__, a, b, c); > > original_bcopy(a, b, c); > > } > > > > and the same for bzero, and then use function track_bcopy() > > to simply record the instances in some data structure that you > > can then export in some way to userland for stats gathering. > > In the simplest form you could e.g. filter unaligned accesses > > and just dump them to a buffer exported via sysctl; > > if you want to make things smarter/more efficient, you could > > hash __FILE__, __LINE__ to avoid duplicates (and probably, > > because these are constant strings, you can just compare > > the string pointers without having to do a full strcmp). > > A better approach (at least for ia32, I'm not aware what is the > situation on the other architectures) would be using the vectorized > entry for this family of function (i386/include/md_var.h). you still need the macro wrappers to acquire __FILE__ and __LINE__ information. cheers luigi From owner-freebsd-arch@FreeBSD.ORG Mon Jan 22 00:37:28 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6E60616A403 for ; Mon, 22 Jan 2007 00:37:28 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by mx1.freebsd.org (Postfix) with ESMTP id 06A5913C441 for ; Mon, 22 Jan 2007 00:37:27 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by nf-out-0910.google.com with SMTP id m19so328215nfc for ; Sun, 21 Jan 2007 16:37:26 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=tEjAB2t9qr+LVDwafeRsVtBHmivzW3qxlHYa3ZvFRNHLi6JHu+gY/5XJD7DGstJ9Km/G30WgBHXamVe4eFCvouu9SkxbdINSSq7Vkpv1pioz4QBo+daJqMck5SOqdZPBI4bsTV8UuSNjFEobOzI1ur6HUsG1zg+Q9JSxmxEdsV4= Received: by 10.49.58.13 with SMTP id l13mr5158843nfk.1169426246050; Sun, 21 Jan 2007 16:37:26 -0800 (PST) Received: by 10.48.238.14 with HTTP; Sun, 21 Jan 2007 16:37:25 -0800 (PST) Message-ID: <3bbf2fe10701211637n12b78989l25ba45621585ffa1@mail.gmail.com> Date: Mon, 22 Jan 2007 01:37:25 +0100 From: "Attilio Rao" Sender: asmrookie@gmail.com To: "Luigi Rizzo" In-Reply-To: <20070121154901.B84480@xorpc.icir.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070121140019.A83688@xorpc.icir.org> <20070121152251.A84413@xorpc.icir.org> <3bbf2fe10701211530o7c2e8977k2df02a546cb4cb8f@mail.gmail.com> <20070121154901.B84480@xorpc.icir.org> X-Google-Sender-Auth: 712d95112c9269c6 Cc: Ivan Voras , freebsd-arch@freebsd.org Subject: Re: bzero & bcopy alignment 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: Mon, 22 Jan 2007 00:37:28 -0000 2007/1/22, Luigi Rizzo : > On Mon, Jan 22, 2007 at 12:30:40AM +0100, Attilio Rao wrote: > > 2007/1/22, Luigi Rizzo : > > > On Sun, Jan 21, 2007 at 11:25:14PM +0100, Ivan Voras wrote: > > > > Luigi Rizzo wrote: > > > > > On Sun, Jan 21, 2007 at 10:41:09PM +0100, Ivan Voras wrote: > > > > >> Following recent discussion on alignment of bzero() and bcopy(), I've > > > > >> added some statistics collecting code to bzero() and bcopy() for > > > > >> practice (on a RELENG_6 box), and here are the cumulative results for > > > > >> argument alignment: > > > > > > > > > > i think these profiles depend heavily on the hardware > > > > > and usage patterns. > > > > > > > > Yes, I agree. For what it's worth, this was on vmware, almost no network > > > > activity. > > > > > > > > > e.g. some network drivers force you to aligned buffers > > > > > which results in misaligned payload requesting in > > > > > turn an unaligned bcopy. Not that one can help with this, > > > > > but i think that is also important to locate the locations > > > > > in the source where the poorly aligned (1-2, maybe > > > > > 4 and 8 to some degree) ops occur. > > > > > > > > Any magic tricks to identify the caller of "current" function in the kernel? > > > > > > i suppose i would remap those function as > > > > > > #define bcopy(a, b, c) \ > > > do { \ > > > track_bcopy(__PRETTY_FUNCTION__, __FILE__, __LINE__, a, b, c); > > > original_bcopy(a, b, c); > > > } > > > > > > and the same for bzero, and then use function track_bcopy() > > > to simply record the instances in some data structure that you > > > can then export in some way to userland for stats gathering. > > > In the simplest form you could e.g. filter unaligned accesses > > > and just dump them to a buffer exported via sysctl; > > > if you want to make things smarter/more efficient, you could > > > hash __FILE__, __LINE__ to avoid duplicates (and probably, > > > because these are constant strings, you can just compare > > > the string pointers without having to do a full strcmp). > > > > A better approach (at least for ia32, I'm not aware what is the > > situation on the other architectures) would be using the vectorized > > entry for this family of function (i386/include/md_var.h). > > you still need the macro wrappers to acquire __FILE__ and __LINE__ > information. BTW, you should treact bzero/bcopy and friends with a lot of care since they are used in the very early stages of boot (so your track_bcopy would no do any sort of magics). Attilio -- Peace can only be achieved by understanding - A. Einstein From owner-freebsd-arch@FreeBSD.ORG Mon Jan 22 08:46:41 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E4B716A402 for ; Mon, 22 Jan 2007 08:46:41 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-3-125.belrs4.nsw.optusnet.com.au [220.239.3.125]) by mx1.freebsd.org (Postfix) with ESMTP id 15F3713C428 for ; Mon, 22 Jan 2007 08:46:40 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.8/8.13.8) with ESMTP id l0M8kZAq001193; Mon, 22 Jan 2007 19:46:35 +1100 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.8/8.13.8/Submit) id l0M8kY8q001192; Mon, 22 Jan 2007 19:46:34 +1100 (EST) (envelope-from peter) Date: Mon, 22 Jan 2007 19:46:34 +1100 From: Peter Jeremy To: Ivan Voras Message-ID: <20070122084634.GH837@turion.vk2pj.dyndns.org> References: <20070121140019.A83688@xorpc.icir.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kVXhAStRUZ/+rrGn" Content-Disposition: inline In-Reply-To: X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-arch@freebsd.org Subject: Re: bzero & bcopy alignment 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: Mon, 22 Jan 2007 08:46:41 -0000 --kVXhAStRUZ/+rrGn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, 2007-Jan-21 23:25:14 +0100, Ivan Voras wrote: >Any magic tricks to identify the caller of "current" function in the kerne= l? On gcc: __builtin_return_address() --=20 Peter Jeremy --kVXhAStRUZ/+rrGn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFtHnq/opHv/APuIcRAqKQAJ4zw6xjresGly2mzv/s9E5IcDM3sgCfbP7r olE2IfGrxi2CiUlIbKJrQUs= =EzQG -----END PGP SIGNATURE----- --kVXhAStRUZ/+rrGn-- From owner-freebsd-arch@FreeBSD.ORG Mon Jan 22 10:15:56 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D18DF16A401 for ; Mon, 22 Jan 2007 10:15:56 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-3-125.belrs4.nsw.optusnet.com.au [220.239.3.125]) by mx1.freebsd.org (Postfix) with ESMTP id 64B3C13C45D for ; Mon, 22 Jan 2007 10:15:56 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.8/8.13.8) with ESMTP id l0MAFpPD005690; Mon, 22 Jan 2007 21:15:51 +1100 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.8/8.13.8/Submit) id l0MAFpOI005689; Mon, 22 Jan 2007 21:15:51 +1100 (EST) (envelope-from peter) Date: Mon, 22 Jan 2007 21:15:51 +1100 From: Peter Jeremy To: Ivan Voras Message-ID: <20070122101551.GJ837@turion.vk2pj.dyndns.org> References: <20070121140019.A83688@xorpc.icir.org> <20070122084634.GH837@turion.vk2pj.dyndns.org> <45B48968.20506@fer.hr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zjcmjzIkjQU2rmur" Content-Disposition: inline In-Reply-To: <45B48968.20506@fer.hr> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-arch@freebsd.org Subject: Re: bzero & bcopy alignment 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: Mon, 22 Jan 2007 10:15:56 -0000 --zjcmjzIkjQU2rmur Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, 2007-Jan-22 10:52:40 +0100, Ivan Voras wrote: >Peter Jeremy wrote: >> On Sun, 2007-Jan-21 23:25:14 +0100, Ivan Voras wrote: >>> Any magic tricks to identify the caller of "current" function in the ke= rnel? >>=20 >> On gcc: __builtin_return_address() > >Ok, this looks nice. Can I convert the result to something processable >by addr2line? (in other words: is kernel relocated on load?) Yes and no (respectively) for the core kernel (kld's are relocated). --=20 Peter Jeremy --zjcmjzIkjQU2rmur Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFtI7X/opHv/APuIcRAvy2AJ4s8lBZfluaihbQYTsvsSvCSHJg+ACgoFh6 dqpQzHfEllFAEOKK34jc9ho= =yOk2 -----END PGP SIGNATURE----- --zjcmjzIkjQU2rmur-- From owner-freebsd-arch@FreeBSD.ORG Mon Jan 22 10:22:33 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2756A16A404 for ; Mon, 22 Jan 2007 10:22:33 +0000 (UTC) (envelope-from ivoras@fer.hr) Received: from lara.cc.fer.hr (lara.cc.fer.hr [161.53.72.113]) by mx1.freebsd.org (Postfix) with ESMTP id A6EE213C45A for ; Mon, 22 Jan 2007 10:22:32 +0000 (UTC) (envelope-from ivoras@fer.hr) Received: from [127.0.0.1] (localhost.cc.fer.hr [127.0.0.1]) by lara.cc.fer.hr (8.13.8/8.13.8) with ESMTP id l0MAMUkb027892; Mon, 22 Jan 2007 11:22:30 +0100 (CET) (envelope-from ivoras@fer.hr) Message-ID: <45B49066.2030100@fer.hr> Date: Mon, 22 Jan 2007 11:22:30 +0100 From: Ivan Voras User-Agent: Thunderbird 1.5.0.4 (X11/20060625) MIME-Version: 1.0 To: Peter Jeremy References: <20070121140019.A83688@xorpc.icir.org> <20070122084634.GH837@turion.vk2pj.dyndns.org> <45B48968.20506@fer.hr> <20070122101551.GJ837@turion.vk2pj.dyndns.org> In-Reply-To: <20070122101551.GJ837@turion.vk2pj.dyndns.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org Subject: Re: bzero & bcopy alignment 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: Mon, 22 Jan 2007 10:22:33 -0000 Peter Jeremy wrote: > On Mon, 2007-Jan-22 10:52:40 +0100, Ivan Voras wrote: >> Peter Jeremy wrote: >>> On Sun, 2007-Jan-21 23:25:14 +0100, Ivan Voras wrote: >>>> Any magic tricks to identify the caller of "current" function in the kernel? >>> On gcc: __builtin_return_address() >> Ok, this looks nice. Can I convert the result to something processable >> by addr2line? (in other words: is kernel relocated on load?) > > Yes and no (respectively) for the core kernel (kld's are relocated). Ok, so assuming the caller is in the kernel, the address is directly usable in addr2line? From owner-freebsd-arch@FreeBSD.ORG Mon Jan 22 10:30:36 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0DEE16A405 for ; Mon, 22 Jan 2007 10:30:36 +0000 (UTC) (envelope-from ivoras@fer.hr) Received: from lara.cc.fer.hr (lara.cc.fer.hr [161.53.72.113]) by mx1.freebsd.org (Postfix) with ESMTP id 379FD13C44B for ; Mon, 22 Jan 2007 10:30:36 +0000 (UTC) (envelope-from ivoras@fer.hr) Received: from [127.0.0.1] (localhost.cc.fer.hr [127.0.0.1]) by lara.cc.fer.hr (8.13.8/8.13.8) with ESMTP id l0M9qfWe027760; Mon, 22 Jan 2007 10:52:41 +0100 (CET) (envelope-from ivoras@fer.hr) Message-ID: <45B48968.20506@fer.hr> Date: Mon, 22 Jan 2007 10:52:40 +0100 From: Ivan Voras User-Agent: Thunderbird 1.5.0.4 (X11/20060625) MIME-Version: 1.0 To: Peter Jeremy References: <20070121140019.A83688@xorpc.icir.org> <20070122084634.GH837@turion.vk2pj.dyndns.org> In-Reply-To: <20070122084634.GH837@turion.vk2pj.dyndns.org> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org Subject: Re: bzero & bcopy alignment 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: Mon, 22 Jan 2007 10:30:36 -0000 Peter Jeremy wrote: > On Sun, 2007-Jan-21 23:25:14 +0100, Ivan Voras wrote: >> Any magic tricks to identify the caller of "current" function in the kernel? > > On gcc: __builtin_return_address() Ok, this looks nice. Can I convert the result to something processable by addr2line? (in other words: is kernel relocated on load?) From owner-freebsd-arch@FreeBSD.ORG Wed Jan 24 15:48:09 2007 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A687916A400 for ; Wed, 24 Jan 2007 15:48:09 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.freebsd.org (Postfix) with ESMTP id 975F513C45B for ; Wed, 24 Jan 2007 15:48:09 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.13.6) with ESMTP id l0OFPHRl057784; Wed, 24 Jan 2007 07:25:17 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id l0OFPHeb057783; Wed, 24 Jan 2007 07:25:17 -0800 (PST) (envelope-from rizzo) Date: Wed, 24 Jan 2007 07:25:17 -0800 From: Luigi Rizzo To: arch@freebsd.org Message-ID: <20070124072517.A57678@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Cc: Subject: linux compat layer for device drivers. 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, 24 Jan 2007 15:48:09 -0000 I have been doing some work on building a linux compatibility layer to help porting linux device drivers to FreeBSD. If someone wants to have a look at the details and maybe help with suggestions on the proper layout and implementation, you can find a snapshot of the code and a more info at http://info.iet.unipi.it/~luigi/FreeBSD.html A somewhat more detailed description is available at http://info.iet.unipi.it/~luigi/FreeBSD//README_linux_kld (the URL is so that you can access the latest version from the archived email), i am attaching the current content of the file below. Note, i know it is a monumental task to to provide a full emulation of all internal linux API. I don't want to do that, i just want to provide enough glue to ease the porting of drivers for devices that we currently do not support. Among these, certainly usb cameras/webcams/dvb receivers, and probably some wireless network adapters (for most of these things, the linux is written with the help of reverse engineering or usb sniffers, so it is extremely confusing to dig through the source code in order to do a 'real' port). cheers luigi --------------------------------------------------------------- # $Id: README,v 1.3 2007/01/24 15:10:06 luigi Exp $ This archive contains some headers and source files to help porting linux drivers to FreeBSD (6.x and above). The idea is that you should be able to take linux sources, write a suitable Makefile.kld following the example below, and then build a working driver for FreeBSD. At the moment (2007.01.24) this is still work in progress so we are basically just building a loadable kld module (with all symbols resolved), and providing enough glue to invoke the probe routine for USB devices. As time goes we are adding emulation of the USB layer (not much is needed, in fact) and hooks from the BSD driver calls to the linux ones. ---------------------------------------------------------------------- U S A G E + extract the archive in a work/ directory. With the exception of this README, everything ends up under linux_compat/ (note, you can use a different, system-wide place provided you set up the paths in Makefile.kld accordingly). + extract the driver you want to port into the same work/ directory. Depending on the structure of the driver it may extract just a few files, or a large number of subdirectories. + write a Makefile.kld using the template supplied below. + run "make -f Makefile.kld" to try and build the driver. If you are lucky, everything works and you end up with a .kld file. Most likely, you will encounter one or more of the following problems: + compiler error due to the strict checks we make (-Werror ...). You can usually remove them by adding missing prototypes, removing extra ones, and fixing the qualifiers (const etc) on arguments. + clashes between the FreeBSD and the Linux symbols (e.g. msleep() has different meaning on the two; the FreeBSD system headers define a "version" as a global symbol (string) while some Linux drivers appear to use it as a local variable; and so on. The fix of these errors depends on a case-by-case + missing function in the linux emulation library. We are only implementing what our sample drivers need, so it is likely that some parts are missing. Your best option is to look at some suitable linux distribution (e.g. i like http://www.gelato.unsw.edu.au/lxr/ ) to find out how to implement what is missing. The first step is to provide the prototype in some of the header files, and then a stub routine (returning an error) in some of the .c file, and then try to fill up the details. + error loading the module, typically because the kernel loader could not resolve some of the symbols. Fix is the same as above. + finally, even if everything loads, in order to achieve the desired functionality you are likely to need to implement in full some of the emulation functions for which we only provide stubs. That's all... this is developer stuff! ---------------------------------------------------------------------- A R C H I T E C T U R E The system is structured as follows. Note that paths need to be revisited to make this installable as a port. Also the content of some of the headers may be moved from one to another in order to match better the original linux layout. linux_compat/ contains the whole subtree (headers, sources, .mk files) linux_compat/linux/ linux_compat/asm adapted linux headers with enough definitions to compile stuff under FreeBSD linux_compat/linux_compat.c implementation of the linux function called by drivers. This may be expanded into multiple files for the various subsystem (memory, usb, pci, ...) as needed. In principle, these files should be compilable as a library so they should have no dependency (also in terms of cpp magic) on the actual driver they are used for. linux_compat/ldev_stub.c, linux_compat/ldev_stub.h A template for a FreeBSD device driver that calls the wrappers for the linux functions. This should be recompiled each time, as there are some parts whose output depends on the preprocessor symbols, e.g. DRIVER_NAME and DEV_NAME. linux_compat/bsd.linux_kmod.mk bmake include file to be added at the end of the driver-specific Makefile.kld to add the required .PATH, CFLAGS and SRCS (see example at the end of this file). ------------------------------------------------------------------ P R O J E C T S T A T U S 2007.01.24 Linked the _probe() routine to the usb_device table provided by the linux driver, so that device matching works. Implemented an initial wrapper for the linux attach routine (which is called probe). However, it does not yet provide a suitable emulation of the usb layer so it is simply instructed to fail. 2007.01.23 Implemented stubs for all hooks needed by the gspca driver. You can now build and load it. 2007.01.22 start of project ------------------------------------------------------------------- ----- example Makefile.kld (taken from gspca) ----- # Makefile.kld to build a driver with linux emulation. # $Id: README,v 1.3 2007/01/24 15:10:06 luigi Exp $ # # Here you should set the following: # .PATH: driver-specific paths # SRCS= list of (driver) source files that we want to compile. # KMOD= driver name (one word, will be used also elsewhere). # CFLAGS= any driver-specific flags you might need. Often # -Ixyz listing all directories with include files. # # Any other driver-specific variables. .PATH: ${.CURDIR} ${.CURDIR}/decoder # sources for the linux driver SRCS= gspca_core.c gspcadecoder.c KMOD=gspca CFLAGS+= -ISunplus -ISunplus-jpeg -ISonix -IConexant CFLAGS+= -IVimicro -Idecoder CFLAGS+= -DUSB_DEBUG #DEBUG_FLAGS=-g #--- Here are the driver-specific variables VERSION = 01.00.12 ### # The following flags enable experimental features. # By default, these are enabled for development versions of the driver, and # disabled for release versions. # Optional: Enable driver debugging CFLAGS += -DGSPCA_ENABLE_DEBUG # Optional: Enable direct register read/write for PAC207 development #CFLAGS += -DGSPCA_ENABLE_REGISTERPLAY ### # The following flags enable features that aren't yet implemented, and # therefore are disabled by default. # Optional: Enable compression CFLAGS += -DGSPCA_ENABLE_COMPRESSION ### # Rest of Makefile follows here. You probably won't need to touch this. # Setup defines CFLAGS += -DCONFIG_USB_GSPCA_MODULE=1 -D__KERNEL__ #CFLAGS += -DCONFIG_USB_GSPCA_MODULE=1 -DMODULE -D__KERNEL__ CFLAGS += -DVID_HARDWARE_GSPCA=0xFF -DGSPCA_VERSION=\"$(VERSION)\" .include # -------- end of file ---------- From owner-freebsd-arch@FreeBSD.ORG Wed Jan 24 20:10:14 2007 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8920416A403 for ; Wed, 24 Jan 2007 20:10:14 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id 3901313C43E for ; Wed, 24 Jan 2007 20:10:14 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id CFBDA1747C; Wed, 24 Jan 2007 19:51:37 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.8/8.13.8) with ESMTP id l0OJpaRV053983; Wed, 24 Jan 2007 19:51:37 GMT (envelope-from phk@critter.freebsd.dk) To: Luigi Rizzo From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 24 Jan 2007 07:25:17 PST." <20070124072517.A57678@xorpc.icir.org> Date: Wed, 24 Jan 2007 19:51:36 +0000 Message-ID: <53982.1169668296@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@freebsd.org Subject: Re: linux compat layer for device drivers. 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, 24 Jan 2007 20:10:14 -0000 In message <20070124072517.A57678@xorpc.icir.org>, Luigi Rizzo writes: >I have been doing some work on building a linux compatibility >layer to help porting linux device drivers to FreeBSD. Please remember to deal with the licensing issue. -- 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 Thu Jan 25 07:59:48 2007 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D6F716A401 for ; Thu, 25 Jan 2007 07:59:48 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.freebsd.org (Postfix) with ESMTP id 4B27713C457 for ; Thu, 25 Jan 2007 07:59:48 +0000 (UTC) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.11/8.13.6) with ESMTP id l0P7xmvx066789; Wed, 24 Jan 2007 23:59:48 -0800 (PST) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.11/8.12.3/Submit) id l0P7xl2U066788; Wed, 24 Jan 2007 23:59:47 -0800 (PST) (envelope-from rizzo) Date: Wed, 24 Jan 2007 23:59:47 -0800 From: Luigi Rizzo To: Poul-Henning Kamp Message-ID: <20070124235947.A66723@xorpc.icir.org> References: <20070124072517.A57678@xorpc.icir.org> <53982.1169668296@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <53982.1169668296@critter.freebsd.dk>; from phk@phk.freebsd.dk on Wed, Jan 24, 2007 at 07:51:36PM +0000 Cc: arch@freebsd.org Subject: Re: linux compat layer for device drivers. 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, 25 Jan 2007 07:59:48 -0000 On Wed, Jan 24, 2007 at 07:51:36PM +0000, Poul-Henning Kamp wrote: > In message <20070124072517.A57678@xorpc.icir.org>, Luigi Rizzo writes: > >I have been doing some work on building a linux compatibility > >layer to help porting linux device drivers to FreeBSD. > > Please remember to deal with the licensing issue. yes, i asked the specific question to -developers 1-2 days ago. anyways this is going to be just a port so even if i am forced to use gpl for the parts that i did not write from scratch, this is not much of a concern. cheers luigi From owner-freebsd-arch@FreeBSD.ORG Thu Jan 25 15:48:43 2007 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 53A5016A400 for ; Thu, 25 Jan 2007 15:48:43 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 0DFFC13C44B for ; Thu, 25 Jan 2007 15:48:42 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id l0PFmS30028704; Thu, 25 Jan 2007 08:48:29 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 25 Jan 2007 08:48:59 -0700 (MST) Message-Id: <20070125.084859.-261386053.imp@bsdimp.com> To: grafan@gmail.com From: "M. Warner Losh" In-Reply-To: <6eb82e0701210945r686e54d5vfc7529d57cf372a6@mail.gmail.com> References: <6eb82e0701210945r686e54d5vfc7529d57cf372a6@mail.gmail.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Thu, 25 Jan 2007 08:48:29 -0700 (MST) Cc: freebsd-arch@freebsd.org Subject: Re: src/gnu 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, 25 Jan 2007 15:48:43 -0000 In message: <6eb82e0701210945r686e54d5vfc7529d57cf372a6@mail.gmail.com> "Rong-en Fan" writes: : >From hier(7), it says sources covered by GPL are placed here. : Does that mean all build glue for things covered by GPL have to : be placed in src/gnu/? : : I'm asking because I noticed there are some applications/libraries : that are covered by GPL live in outside src/gnu. src/gnu used to contain the sources for GPL programs. Now it just contains the build infrastructure for GPL programs with the actual sources living in src/contrib. There may be a few 'legacy' programs remaining in src/gnu. Warner