From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 2 11:36:43 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55BEE1065670 for ; Sun, 2 Mar 2008 11:36:43 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0533E8FC13 for ; Sun, 2 Mar 2008 11:36:42 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 648B946B11; Sun, 2 Mar 2008 06:36:42 -0500 (EST) Date: Sun, 2 Mar 2008 11:36:42 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Martin Laabs In-Reply-To: Message-ID: <20080302112359.M5198@fledge.watson.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: "freebsd-hackers@freebsd.org" Subject: Re: SIGPIPE propagation X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2008 11:36:43 -0000 On Sat, 1 Mar 2008, Martin Laabs wrote: > as you probably know I want to expand dump in such a way it enableds > multivolume dumps also when the output data is written to stdout/a pipe. Now > I ran into a serious problem. Dump counts the written bytes to remember > where it has to proceede after the volumen change. Now the SIGPIPE signal > does not propagate fast enought through the system. Thus dump writes some > time after the pipe has got broken data into the pipe while it doesn't exist > anymore. This short time it does not receive any error about that. (Until > the signal propagates to dump.) I wrote a small test progam to demonstrate > this effect (and get clear about it by myself). It just write data to stdout > and counts it until the pipe is broken (and the write call will return -1) > This is the output of a few successively runs: Here's how SIGPIPE works: when one endpoint of a pipe or socketpair is closed, the other endpoint will be flagged to return EPIPE for any further system calls to write to the pipe or socket. The interesting case involves what to do if there is already an in-progress system call for a thread writing to it. There are a few cases from the perspective of an application writer: (1) The write is issued "before" the close and can be fully satisfied without sleeping, in which case it returns the number of bytes written. (2) The write is issued "after" the close and returns EPIPE and/or SIGPIPE depending on signal disposition, socket options, etc. (3) The write is issued "during" the close, and in particular, in a case where the write was blocking waiting on the reader to make more space available to hold all of the written data. The kernel will return a positive integer that is potentially smaller than the requested write because it has written some bytes successfully, and the next write will return EPIPE. I think you may be tripping over case (3) if you are using blocking I/O on the pipe/socketpair -- some data was written, just not all of it, and the remote close interrupted the write, leading to a success response followed by an asynchronous failure on the next write. SIGPIPE, FYI, is generated in the writer context due to EPIPE coming back from the socket/pipe code, and not generated by the closing of the remote socket endpoint, so SIGPIPE will not be delivered until a write is attempted on a socket with no remote endpoint. Does this explain the behavior you were seeing? Robert N M Watson Computer Laboratory University of Cambridge > > > $ ./a.out |asdf > $ asdf: command not found > cought broken pipe > i: 12 could only wrote -1 bytes. total wrote: 61440 > > $ ./a.out |asdf > $ asdf: command not found > cought broken pipe > i: 1 could only wrote -1 bytes. total wrote: 5120 > > $ ./a.out |asdf > $ asdf: command not found > cought broken pipe > i: 12 could only wrote -1 bytes. total wrote: 61440 > > $ ./a.out |asdf > $ asdf: command not found > cought broken pipe > i: 0 could only wrote -1 bytes. total wrote: 0 > > > Dump encounters the same effect and I don't know how > to handle this problem. Do you have any idea how I > can manage this? > > Thank you, > Martin L. > > PS: Here's the code of the small test-program: > > -----------------:<---------------- > #include > #include > #include > #include > #include > #include > #include > #include > > #define MUL 5 > char buffer [1024 * MUL]; > > void > sigpipe(int signo __unused) > { > fprintf(stderr, "cought broken pipe\n"); > } > > main() > { > int i , w; > int wr = 0; > > signal(SIGPIPE, sigpipe); > > for (i = 0; i <= 100; i++) { > w = write(STDOUT_FILENO, buffer, MUL * 1024); > if (w > 0) > wr += w; > if (w != 1024 * MUL) { > fprintf(stderr, "i: %d could only wrote %d bytes. > total > break; > } > } > } > ------------------------:<-------------------------------- > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-hackers@FreeBSD.ORG Sun Mar 2 11:44:02 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3EF2106566B for ; Sun, 2 Mar 2008 11:44:01 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id D22EF8FC25 for ; Sun, 2 Mar 2008 11:44:01 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 09DDD46B10; Sun, 2 Mar 2008 06:44:01 -0500 (EST) Date: Sun, 2 Mar 2008 11:44:01 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Martin Laabs In-Reply-To: Message-ID: <20080302113704.B5198@fledge.watson.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: "freebsd-hackers@freebsd.org" Subject: Re: multi volume dump with gzip/crypt - solved X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Mar 2008 11:44:02 -0000 On Sat, 1 Mar 2008, Martin Laabs wrote: > I solved the dump problem in a not very clean way. First I changed dumps > behaviour to ignore the SIGPIPE signal when the -P and -a option is given. > The problem with occured than was the loss of data because of the race > condition between "write date to pipe" and "receive SIGPIPE". > > I solved that problem with a script that takes the data from the pipe of > dump, compress it and sends a dedicated SIGPIPE to the three dump processes > when the output volume is nealy full. After that it flushs the rest out of > the pipe to avoid data loss. SIGPIPE occurs when a sending process sends data that the recipient doesn't expect, as the recipient has (presumably) closed the socket because it doesn't expect further data. Stream sockets are intended to provided buffered, reliable communication only when open, so generally protocols running over stream sockets (be it TCP, UNIX domain sockets, etc) have an explicit protocol close sequence so that the two endpoints reach mutual agreement that it's time to close the sockets and avoid data loss associated with unexpected assymetric close. If the recipient closed the socket while the sender is still writing to the socket, you may "lose" up to the size of the receive socket buffer, which from the perspective of the sender may have been reported as successfully delivered. The receive socket buffer, FYI, is effectively the amount of data that the recipient has agreed can be locally buffered before causing the sender to block. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 3 01:47:43 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55D0A1065671 for ; Mon, 3 Mar 2008 01:47:43 +0000 (UTC) (envelope-from cneirabustos@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.241]) by mx1.freebsd.org (Postfix) with ESMTP id F00DC8FC19 for ; Mon, 3 Mar 2008 01:47:42 +0000 (UTC) (envelope-from cneirabustos@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so1380032anc.13 for ; Sun, 02 Mar 2008 17:47:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject:date:user-agent:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; bh=sY/MoByiJQveBh3u4inHGYlV6r3K3y+ldbY0GzX9m0o=; b=FwP/UK/a7glOQ2pHpcoLPxh5B7XSyPABp0OOBgi7IYO/KU4vbFdk+mF/BfbgizDlaWSSiy7VfoC8PIZpwCu6lB1NTRF8gLxfPpuJUOU0UJuRfo9p9lW+QAfZzqmSCcFfXURv2uf4VxW9QiMmzZBP94o2/U4TUik0FOB221LahIk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=jKwbYmJo9JRTXRLrZwExZd4og11q2xbC/Z/H4dQXOutgxTUNKuct1+fcQlqmSoR6UfekHUT4ju4/Pf4ezcmJcLSl1RvVm/qjAYRw8crHdRY1ETpSkXhlMrYTQ5PwDNACQCQIzth+l39ztHIJRAkw5wXqjpHbkpUNTBT4PK4o0YE= Received: by 10.100.172.17 with SMTP id u17mr19344579ane.2.1204507127360; Sun, 02 Mar 2008 17:18:47 -0800 (PST) Received: from ?192.168.0.175? ( [200.120.144.126]) by mx.google.com with ESMTPS id s40sm3081583hsb.10.2008.03.02.17.18.42 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 02 Mar 2008 17:18:44 -0800 (PST) From: carlos neira Organization: pcbsd.org To: "freebsd-hackers@freebsd.org" Date: Sun, 2 Mar 2008 22:18:32 -0300 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803022218.32873.cneirabustos@gmail.com> Subject: readahead(2) - Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2008 01:47:43 -0000 Greetings : is there an equivalent of readahead syscall in linux , for freebsd ?. i was looking at http://preload.sourceforge.net/ , and it needs this . From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 3 08:10:21 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAE6A1065676 for ; Mon, 3 Mar 2008 08:10:21 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id B48448FC24 for ; Mon, 3 Mar 2008 08:10:21 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 122C61CC44; Mon, 3 Mar 2008 09:10:21 +0100 (CET) Date: Mon, 3 Mar 2008 09:10:21 +0100 From: Ed Schouten To: carlos neira Message-ID: <20080303081021.GC80576@hoeg.nl> References: <200803022218.32873.cneirabustos@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="O3RTKUHj+75w1tg5" Content-Disposition: inline In-Reply-To: <200803022218.32873.cneirabustos@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Mailman-Approved-At: Mon, 03 Mar 2008 12:31:02 +0000 Cc: FreeBSD Hackers Subject: Re: readahead(2) - Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2008 08:10:22 -0000 --O3RTKUHj+75w1tg5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * carlos neira wrote: > is there an equivalent of readahead syscall in linux , for freebsd ?. > i was looking at http://preload.sourceforge.net/ , and it needs this . Maybe a mmap(), followed by a madvise()? --=20 Ed Schouten WWW: http://g-rave.nl/ --O3RTKUHj+75w1tg5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkfLsmwACgkQ52SDGA2eCwV7xQCbBxpDxAgY0/vBGK6osr4aGKUQ fGMAn1cPrliGxxHIkw5cUzAp3e4WjzVA =CnMM -----END PGP SIGNATURE----- --O3RTKUHj+75w1tg5-- From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 3 13:49:43 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 90C72106566C for ; Mon, 3 Mar 2008 13:49:43 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 541EB8FC25 for ; Mon, 3 Mar 2008 13:49:43 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1JWB2x-0006kk-79 for freebsd-hackers@freebsd.org; Mon, 03 Mar 2008 13:49:39 +0000 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Mar 2008 13:49:39 +0000 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 03 Mar 2008 13:49:39 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Mon, 03 Mar 2008 14:53:10 +0100 Lines: 33 Message-ID: References: <200803022218.32873.cneirabustos@gmail.com> <20080303081021.GC80576@hoeg.nl> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig3B672D1F0D8EEE3D23418196" X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.6 (X11/20071022) In-Reply-To: <20080303081021.GC80576@hoeg.nl> X-Enigmail-Version: 0.95.0 Sender: news Subject: Re: readahead(2) - Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2008 13:49:43 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3B672D1F0D8EEE3D23418196 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Ed Schouten wrote: > * carlos neira wrote: >> is there an equivalent of readahead syscall in linux , for freebsd ?= =2E >> i was looking at http://preload.sourceforge.net/ , and it needs this= . >=20 > Maybe a mmap(), followed by a madvise()? Or an open() followed by a read() loop? :) If the goal is to preload the files, this one is certainly going to do it :) --------------enig3B672D1F0D8EEE3D23418196 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHzALGldnAQVacBcgRAv+TAKC4fCFIvoblvjrDOnXCAEuty4dHwgCghLNN i8LydGGXnqMjoz6sRAOEWsg= =IHmO -----END PGP SIGNATURE----- --------------enig3B672D1F0D8EEE3D23418196-- From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 3 21:32:44 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DF38106566C for ; Mon, 3 Mar 2008 21:32:44 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outW.internet-mail-service.net (outW.internet-mail-service.net [216.240.47.246]) by mx1.freebsd.org (Postfix) with ESMTP id 68F348FC15 for ; Mon, 3 Mar 2008 21:32:44 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Mon, 03 Mar 2008 13:32:44 -0800 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 4653D2D601C; Mon, 3 Mar 2008 13:32:43 -0800 (PST) Message-ID: <47CC6E7D.10707@elischer.org> Date: Mon, 03 Mar 2008 13:32:45 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Ivan Voras References: <200803022218.32873.cneirabustos@gmail.com> <20080303081021.GC80576@hoeg.nl> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: readahead(2) - Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Mar 2008 21:32:44 -0000 Ivan Voras wrote: > Ed Schouten wrote: >> * carlos neira wrote: >>> is there an equivalent of readahead syscall in linux , for freebsd ?. >>> i was looking at http://preload.sourceforge.net/ , and it needs this . >> Maybe a mmap(), followed by a madvise()? > > Or an open() followed by a read() loop? :) If the goal is to preload the > files, this one is certainly going to do it :) > > the aim is to load it into system memory but not copy anything into user memory. From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 05:42:52 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BFCB8106566B for ; Tue, 4 Mar 2008 05:42: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 7F1788FC19 for ; Tue, 4 Mar 2008 05:42:52 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m245gSnG058318 for ; Mon, 3 Mar 2008 22:42:28 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 03 Mar 2008 22:42:56 -0700 (MST) Message-Id: <20080303.224256.635730757.imp@bsdimp.com> To: hackers@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 05:42:53 -0000 Greetings, here's a set of diffs that will allow FreeBSD's usr.bin/make to build on Linux. I'm sure they are gross, and I don't plan to commit them (at least not all of them), but I thought I'd post them here to see what people think. I think that the extra config.h includes, the errc -> errx patches and the Makefile.dist patches may be good for the tree. The rest may not meet FreeBSD's source tree policies. Comments? Warner diff -ur pmake.orig/config.h pmake/config.h --- pmake.orig/config.h 2005-02-01 03:50:35.000000000 -0700 +++ pmake/config.h 2008-03-03 22:24:16.745493000 -0700 @@ -108,4 +108,27 @@ # endif #endif +#ifndef TAILQ_HEAD_INITIALIZER +#define TAILQ_HEAD_INITIALIZER(head) { NULL, &(head).tqh_first } +#endif + +#ifndef TAILQ_FOREACH +#define TAILQ_FOREACH(var, head, field) \ + for ((var) = TAILQ_FIRST((head)); \ + (var); \ + (var) = TAILQ_NEXT((var), field)) +#endif + +#ifndef TAILQ_FIRST +#define TAILQ_FIRST(head) ((head)->tqh_first) +#endif + +#ifndef TAILQ_NEXT +#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) +#endif + +#ifndef TAILQ_EMPTY +#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) +#endif + #endif /* config_h_efe0765e */ diff -ur pmake.orig/dir.c pmake/dir.c --- pmake.orig/dir.c 2005-03-23 05:56:15.000000000 -0700 +++ pmake/dir.c 2008-03-03 22:22:36.072235000 -0700 @@ -93,6 +93,7 @@ #include #include "arch.h" +#include "config.h" #include "dir.h" #include "globals.h" #include "GNode.h" Only in pmake: log diff -ur pmake.orig/main.c pmake/main.c --- pmake.orig/main.c 2007-12-18 15:58:14.000000000 -0700 +++ pmake/main.c 2008-03-03 22:25:47.543349000 -0700 @@ -63,7 +63,9 @@ #include #include +#ifdef __FreeBSD__ #include +#endif #include #include #include @@ -366,7 +368,9 @@ rearg: optind = 1; /* since we're called more than once */ +#ifndef linux optreset = 1; +#endif #define OPTFLAGS "ABC:D:E:I:PSV:Xd:ef:ij:km:nqrstvx:" for (;;) { if ((optind < argc) && strcmp(argv[optind], "--") == 0) { @@ -660,11 +664,9 @@ int level = (value == NULL) ? 0 : atoi(value); if (level < 0) { - errc(2, EAGAIN, "Invalid value for recursion level (%d).", - level); + errx(2, "Invalid value for recursion level (%d).", level); } else if (level > MKLVL_MAXVAL) { - errc(2, EAGAIN, "Max recursion level (%d) exceeded.", - MKLVL_MAXVAL); + errx(2, "Max recursion level (%d) exceeded.", MKLVL_MAXVAL); } else { char new_value[32]; sprintf(new_value, "%d", level + 1); @@ -931,6 +933,7 @@ } #endif +#ifdef __FreeBSD__ /* * FreeBSD/pc98 kernel used to set the utsname.machine to * "i386", and MACHINE was defined as "i386", so it could @@ -951,6 +954,7 @@ machine = "pc98"; } } +#endif /* * Get the name of this type of MACHINE from utsname diff -ur pmake.orig/Makefile.dist pmake/Makefile.dist --- pmake.orig/Makefile.dist 2007-12-18 15:58:14.000000000 -0700 +++ pmake/Makefile.dist 2008-03-03 22:27:31.711240000 -0700 @@ -2,7 +2,7 @@ # a simple makefile to help builds on !FreeBSD systems pmake: @echo 'make started.' - cc -D__FBSDID="static const char *id=" -DDEFSHELLNAME=\"sh\" -I. -c *.c + cc -D__dead2="" -D__unused="" -Darc4random=random -D__FBSDID="static const char *id=" -DDEFSHELLNAME=\"sh\" -I. -c *.c cc *.o -o pmake @echo 'make completed.' diff -ur pmake.orig/shell.c pmake/shell.c --- pmake.orig/shell.c 2005-05-24 09:30:03.000000000 -0600 +++ pmake/shell.c 2008-03-03 22:20:08.597377000 -0700 @@ -45,6 +45,7 @@ #include #include +#include "config.h" #include "parse.h" #include "pathnames.h" #include "shell.h" From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 06:31:47 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93755106566C for ; Tue, 4 Mar 2008 06:31:47 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 36BAC8FC14 for ; Tue, 4 Mar 2008 06:31:46 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (inchoate.gsoft.com.au [203.31.81.30]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id m246VcKs053800 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Mar 2008 17:01:38 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Tue, 4 Mar 2008 17:01:28 +1030 User-Agent: KMail/1.9.7 References: <20080303.224256.635730757.imp@bsdimp.com> In-Reply-To: <20080303.224256.635730757.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1271132.v4aLMbFU4M"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200803041701.36466.doconnor@gsoft.com.au> X-Spam-Score: -3.977 () ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 06:31:47 -0000 --nextPart1271132.v4aLMbFU4M Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tue, 4 Mar 2008, M. Warner Losh wrote: > Greetings, > > here's a set of diffs that will allow FreeBSD's usr.bin/make to build > on Linux. I'm sure they are gross, and I don't plan to commit them > (at least not all of them), but I thought I'd post them here to see > what people think. > > I think that the extra config.h includes, the errc -> errx patches > and the Makefile.dist patches may be good for the tree. The rest may > not meet FreeBSD's source tree policies. > > Comments? I did this a while ago when porting some of our code to Linux because it=20 builds with pmake.. Your patches are much nicer than mine however :) The tailq stuff could be shoved into a linux.h or some such.. So it's=20 more obvious what it's for and why it's there. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart1271132.v4aLMbFU4M Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQBHzOzI5ZPcIHs/zowRAkw+AKCKfM8jXcOnVyB31gUq6+BD9Yp7WwCfR7r7 tVzXC1yfQ1baqLPORXUJfhM= =Onqc -----END PGP SIGNATURE----- --nextPart1271132.v4aLMbFU4M-- From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 06:46:05 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEBF71065674 for ; Tue, 4 Mar 2008 06:46:05 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 68F218FC22 for ; Tue, 4 Mar 2008 06:46:05 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (inchoate.gsoft.com.au [203.31.81.30]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id m246VcKs053800 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Mar 2008 17:01:38 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-hackers@freebsd.org Date: Tue, 4 Mar 2008 17:01:28 +1030 User-Agent: KMail/1.9.7 References: <20080303.224256.635730757.imp@bsdimp.com> In-Reply-To: <20080303.224256.635730757.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1271132.v4aLMbFU4M"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200803041701.36466.doconnor@gsoft.com.au> X-Spam-Score: -3.977 () ALL_TRUSTED,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 06:46:06 -0000 --nextPart1271132.v4aLMbFU4M Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tue, 4 Mar 2008, M. Warner Losh wrote: > Greetings, > > here's a set of diffs that will allow FreeBSD's usr.bin/make to build > on Linux. I'm sure they are gross, and I don't plan to commit them > (at least not all of them), but I thought I'd post them here to see > what people think. > > I think that the extra config.h includes, the errc -> errx patches > and the Makefile.dist patches may be good for the tree. The rest may > not meet FreeBSD's source tree policies. > > Comments? I did this a while ago when porting some of our code to Linux because it=20 builds with pmake.. Your patches are much nicer than mine however :) The tailq stuff could be shoved into a linux.h or some such.. So it's=20 more obvious what it's for and why it's there. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart1271132.v4aLMbFU4M Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQBHzOzI5ZPcIHs/zowRAkw+AKCKfM8jXcOnVyB31gUq6+BD9Yp7WwCfR7r7 tVzXC1yfQ1baqLPORXUJfhM= =Onqc -----END PGP SIGNATURE----- --nextPart1271132.v4aLMbFU4M-- From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 06:52:00 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 755DE1065673; Tue, 4 Mar 2008 06:52:00 +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 3FBEB8FC39; Tue, 4 Mar 2008 06:52:00 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m246pTXW058919; Mon, 3 Mar 2008 23:51:29 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 03 Mar 2008 23:51:28 -0700 (MST) Message-Id: <20080303.235128.41690803.imp@bsdimp.com> To: doconnor@gsoft.com.au From: Warner Losh In-Reply-To: <200803041701.36466.doconnor@gsoft.com.au> References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 06:52:00 -0000 From: "Daniel O'Connor" Subject: Re: Comments on pmake diffs for building on Linux Date: Tue, 4 Mar 2008 17:01:28 +1030 > On Tue, 4 Mar 2008, M. Warner Losh wrote: > > Greetings, > > > > here's a set of diffs that will allow FreeBSD's usr.bin/make to build > > on Linux. I'm sure they are gross, and I don't plan to commit them > > (at least not all of them), but I thought I'd post them here to see > > what people think. > > > > I think that the extra config.h includes, the errc -> errx patches > > and the Makefile.dist patches may be good for the tree. The rest may > > not meet FreeBSD's source tree policies. > > > > Comments? > > I did this a while ago when porting some of our code to Linux because it > builds with pmake.. > > Your patches are much nicer than mine however :) I was in a hurry, since I thought I could do it in a half hour and that was faster than explaining things... > The tailq stuff could be shoved into a linux.h or some such.. So it's > more obvious what it's for and why it's there. I resisted creating a linux.h, but we'll likely need something akin to it. When I did some Mac OS X experimentation, I had extensions to legacy to smooth over the rough edges, but it is too early here. Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 06:52:00 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 755DE1065673; Tue, 4 Mar 2008 06:52:00 +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 3FBEB8FC39; Tue, 4 Mar 2008 06:52:00 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m246pTXW058919; Mon, 3 Mar 2008 23:51:29 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 03 Mar 2008 23:51:28 -0700 (MST) Message-Id: <20080303.235128.41690803.imp@bsdimp.com> To: doconnor@gsoft.com.au From: Warner Losh In-Reply-To: <200803041701.36466.doconnor@gsoft.com.au> References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 06:52:00 -0000 From: "Daniel O'Connor" Subject: Re: Comments on pmake diffs for building on Linux Date: Tue, 4 Mar 2008 17:01:28 +1030 > On Tue, 4 Mar 2008, M. Warner Losh wrote: > > Greetings, > > > > here's a set of diffs that will allow FreeBSD's usr.bin/make to build > > on Linux. I'm sure they are gross, and I don't plan to commit them > > (at least not all of them), but I thought I'd post them here to see > > what people think. > > > > I think that the extra config.h includes, the errc -> errx patches > > and the Makefile.dist patches may be good for the tree. The rest may > > not meet FreeBSD's source tree policies. > > > > Comments? > > I did this a while ago when porting some of our code to Linux because it > builds with pmake.. > > Your patches are much nicer than mine however :) I was in a hurry, since I thought I could do it in a half hour and that was faster than explaining things... > The tailq stuff could be shoved into a linux.h or some such.. So it's > more obvious what it's for and why it's there. I resisted creating a linux.h, but we'll likely need something akin to it. When I did some Mac OS X experimentation, I had extensions to legacy to smooth over the rough edges, but it is too early here. Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 08:17:50 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBD631065674; Tue, 4 Mar 2008 08:17:50 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 2ADF68FC39; Tue, 4 Mar 2008 08:17:49 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl109-122.kln.forthnet.gr [77.49.228.122]) (authenticated bits=0) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id m248HVC2032382; Tue, 4 Mar 2008 10:17:36 +0200 Received: by kobe.laptop (Postfix, from userid 1000) id 0110B22803; Tue, 4 Mar 2008 10:17:30 +0200 (EET) Date: Tue, 4 Mar 2008 10:17:30 +0200 From: Giorgos Keramidas To: "Daniel O'Connor" Message-ID: <20080304081730.GA90914@kobe.laptop> References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200803041701.36466.doconnor@gsoft.com.au> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.109, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.29, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 08:17:50 -0000 On 2008-03-04 17:01, Daniel O'Connor wrote: > On Tue, 4 Mar 2008, M. Warner Losh wrote: > > Greetings, > > > > here's a set of diffs that will allow FreeBSD's usr.bin/make to build > > on Linux. I'm sure they are gross, and I don't plan to commit them > > (at least not all of them), but I thought I'd post them here to see > > what people think. > > > > I think that the extra config.h includes, the errc -> errx patches > > and the Makefile.dist patches may be good for the tree. The rest may > > not meet FreeBSD's source tree policies. > > > > Comments? > > I did this a while ago when porting some of our code to Linux because it > builds with pmake.. > > Your patches are much nicer than mine however :) > > The tailq stuff could be shoved into a linux.h or some such.. So it's > more obvious what it's for and why it's there. Solaris lacks TAILQ_xxx stuff too, so I would prefer something like "bsdcompat.h" or similar. From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 08:17:50 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBD631065674; Tue, 4 Mar 2008 08:17:50 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 2ADF68FC39; Tue, 4 Mar 2008 08:17:49 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (adsl109-122.kln.forthnet.gr [77.49.228.122]) (authenticated bits=0) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id m248HVC2032382; Tue, 4 Mar 2008 10:17:36 +0200 Received: by kobe.laptop (Postfix, from userid 1000) id 0110B22803; Tue, 4 Mar 2008 10:17:30 +0200 (EET) Date: Tue, 4 Mar 2008 10:17:30 +0200 From: Giorgos Keramidas To: "Daniel O'Connor" Message-ID: <20080304081730.GA90914@kobe.laptop> References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200803041701.36466.doconnor@gsoft.com.au> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.109, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.29, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 08:17:50 -0000 On 2008-03-04 17:01, Daniel O'Connor wrote: > On Tue, 4 Mar 2008, M. Warner Losh wrote: > > Greetings, > > > > here's a set of diffs that will allow FreeBSD's usr.bin/make to build > > on Linux. I'm sure they are gross, and I don't plan to commit them > > (at least not all of them), but I thought I'd post them here to see > > what people think. > > > > I think that the extra config.h includes, the errc -> errx patches > > and the Makefile.dist patches may be good for the tree. The rest may > > not meet FreeBSD's source tree policies. > > > > Comments? > > I did this a while ago when porting some of our code to Linux because it > builds with pmake.. > > Your patches are much nicer than mine however :) > > The tailq stuff could be shoved into a linux.h or some such.. So it's > more obvious what it's for and why it's there. Solaris lacks TAILQ_xxx stuff too, so I would prefer something like "bsdcompat.h" or similar. From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 08:49:15 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C6C0106566C; Tue, 4 Mar 2008 08:49:15 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:610:652::211]) by mx1.freebsd.org (Postfix) with ESMTP id DF9F28FC3A; Tue, 4 Mar 2008 08:49:14 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 0B26F1CC44; Tue, 4 Mar 2008 09:49:14 +0100 (CET) Date: Tue, 4 Mar 2008 09:49:14 +0100 From: Ed Schouten To: Julian Elischer Message-ID: <20080304084914.GK80576@hoeg.nl> References: <200803022218.32873.cneirabustos@gmail.com> <20080303081021.GC80576@hoeg.nl> <47CC6E7D.10707@elischer.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="K4LMwn8CgX2KMboP" Content-Disposition: inline In-Reply-To: <47CC6E7D.10707@elischer.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: FreeBSD Hackers , Ivan Voras Subject: Re: readahead(2) - Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 08:49:15 -0000 --K4LMwn8CgX2KMboP Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Julian Elischer wrote: > the aim is to load it into system memory but not copy anything into > user memory. madvise() should do the trick, then. The manpage is quite misleading: http://linux.die.net/man/2/readahead "readahead() populates the page cache with data from a file so that subsequent reads from that file will not block on disk I/O." This isn't guaranteed, of course. --=20 Ed Schouten WWW: http://g-rave.nl/ --K4LMwn8CgX2KMboP Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkfNDQkACgkQ52SDGA2eCwWpCQCdH9h5jPocoRJ++R+Bodlm192o dzcAnR6vn7pGiDu8VQHwMgxxltTIaSRP =leRM -----END PGP SIGNATURE----- --K4LMwn8CgX2KMboP-- From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 09:58:29 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E7041065680; Tue, 4 Mar 2008 09:58:29 +0000 (UTC) (envelope-from rink@tragedy.rink.nu) Received: from mx1.rink.nu (alastor.rink.nu [213.34.49.5]) by mx1.freebsd.org (Postfix) with ESMTP id 33BF08FC14; Tue, 4 Mar 2008 09:58:28 +0000 (UTC) (envelope-from rink@tragedy.rink.nu) Received: from localhost (alastor.rink.nu [213.34.49.5]) by mx1.rink.nu (Postfix) with ESMTP id 05083BFECC0; Tue, 4 Mar 2008 09:58:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.5]) by localhost (alastor.rink.nu [213.34.49.5]) (amavisd-new, port 10024) with ESMTP id hZJRGPS0Rpu3; Tue, 4 Mar 2008 09:58:18 +0000 (UTC) Received: from tragedy.rink.nu (tragedy.rink.nu [213.34.49.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.rink.nu (Postfix) with ESMTP id 394E8BFEB9A; Tue, 4 Mar 2008 09:58:18 +0000 (UTC) Received: from tragedy.rink.nu (tragedy.rink.nu [213.34.49.3]) by tragedy.rink.nu (8.13.8/8.13.8) with ESMTP id m249wIb4011696; Tue, 4 Mar 2008 10:58:18 +0100 (CET) (envelope-from rink@tragedy.rink.nu) Received: (from rink@localhost) by tragedy.rink.nu (8.13.8/8.13.8/Submit) id m249wFgP011695; Tue, 4 Mar 2008 10:58:15 +0100 (CET) (envelope-from rink) Date: Tue, 4 Mar 2008 10:58:15 +0100 From: Rink Springer To: Giorgos Keramidas Message-ID: <20080304095815.GD72911@rink.nu> References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> <20080304081730.GA90914@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304081730.GA90914@kobe.laptop> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: hackers@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 09:58:29 -0000 On Tue, Mar 04, 2008 at 10:17:30AM +0200, Giorgos Keramidas wrote: > Solaris lacks TAILQ_xxx stuff too, so I would prefer something like > "bsdcompat.h" or similar. Seconded - "linux.h" is far too generic. I must say I like the idea of being able to build *BSD on Linux machines! -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 09:58:29 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E7041065680; Tue, 4 Mar 2008 09:58:29 +0000 (UTC) (envelope-from rink@tragedy.rink.nu) Received: from mx1.rink.nu (alastor.rink.nu [213.34.49.5]) by mx1.freebsd.org (Postfix) with ESMTP id 33BF08FC14; Tue, 4 Mar 2008 09:58:28 +0000 (UTC) (envelope-from rink@tragedy.rink.nu) Received: from localhost (alastor.rink.nu [213.34.49.5]) by mx1.rink.nu (Postfix) with ESMTP id 05083BFECC0; Tue, 4 Mar 2008 09:58:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.5]) by localhost (alastor.rink.nu [213.34.49.5]) (amavisd-new, port 10024) with ESMTP id hZJRGPS0Rpu3; Tue, 4 Mar 2008 09:58:18 +0000 (UTC) Received: from tragedy.rink.nu (tragedy.rink.nu [213.34.49.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.rink.nu (Postfix) with ESMTP id 394E8BFEB9A; Tue, 4 Mar 2008 09:58:18 +0000 (UTC) Received: from tragedy.rink.nu (tragedy.rink.nu [213.34.49.3]) by tragedy.rink.nu (8.13.8/8.13.8) with ESMTP id m249wIb4011696; Tue, 4 Mar 2008 10:58:18 +0100 (CET) (envelope-from rink@tragedy.rink.nu) Received: (from rink@localhost) by tragedy.rink.nu (8.13.8/8.13.8/Submit) id m249wFgP011695; Tue, 4 Mar 2008 10:58:15 +0100 (CET) (envelope-from rink) Date: Tue, 4 Mar 2008 10:58:15 +0100 From: Rink Springer To: Giorgos Keramidas Message-ID: <20080304095815.GD72911@rink.nu> References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> <20080304081730.GA90914@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304081730.GA90914@kobe.laptop> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: hackers@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 09:58:29 -0000 On Tue, Mar 04, 2008 at 10:17:30AM +0200, Giorgos Keramidas wrote: > Solaris lacks TAILQ_xxx stuff too, so I would prefer something like > "bsdcompat.h" or similar. Seconded - "linux.h" is far too generic. I must say I like the idea of being able to build *BSD on Linux machines! -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 10:53:37 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 881BF1065670; Tue, 4 Mar 2008 10:53:37 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 2D0018FC13; Tue, 4 Mar 2008 10:53:36 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp121-45-156-198.lns11.adl6.internode.on.net [121.45.156.198]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id m24ArTQg061635 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Mar 2008 21:23:30 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: Giorgos Keramidas Date: Tue, 4 Mar 2008 21:23:13 +1030 User-Agent: KMail/1.9.7 References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> <20080304081730.GA90914@kobe.laptop> In-Reply-To: <20080304081730.GA90914@kobe.laptop> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3696841.lON7u9OfPf"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200803042123.22388.doconnor@gsoft.com.au> X-Spam-Score: -2.212 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 10:53:37 -0000 --nextPart3696841.lON7u9OfPf Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tue, 4 Mar 2008, Giorgos Keramidas wrote: > > The tailq stuff could be shoved into a linux.h or some such.. So > > it's more obvious what it's for and why it's there. > > Solaris lacks TAILQ_xxx stuff too, so I would prefer something like > "bsdcompat.h" or similar. Sounds good to me. notfreebsd.h :) =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart3696841.lON7u9OfPf Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQBHzSoi5ZPcIHs/zowRAsYpAKCPebbUVdrXf0RnFtXoj2TkUkkQIACgoFbm hPnzFMEh48cpxfs9IK3ZJY4= =kXk2 -----END PGP SIGNATURE----- --nextPart3696841.lON7u9OfPf-- From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 10:53:37 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 881BF1065670; Tue, 4 Mar 2008 10:53:37 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 2D0018FC13; Tue, 4 Mar 2008 10:53:36 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (ppp121-45-156-198.lns11.adl6.internode.on.net [121.45.156.198]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id m24ArTQg061635 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Mar 2008 21:23:30 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: Giorgos Keramidas Date: Tue, 4 Mar 2008 21:23:13 +1030 User-Agent: KMail/1.9.7 References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> <20080304081730.GA90914@kobe.laptop> In-Reply-To: <20080304081730.GA90914@kobe.laptop> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3696841.lON7u9OfPf"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200803042123.22388.doconnor@gsoft.com.au> X-Spam-Score: -2.212 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 10:53:37 -0000 --nextPart3696841.lON7u9OfPf Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tue, 4 Mar 2008, Giorgos Keramidas wrote: > > The tailq stuff could be shoved into a linux.h or some such.. So > > it's more obvious what it's for and why it's there. > > Solaris lacks TAILQ_xxx stuff too, so I would prefer something like > "bsdcompat.h" or similar. Sounds good to me. notfreebsd.h :) =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart3696841.lON7u9OfPf Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQBHzSoi5ZPcIHs/zowRAsYpAKCPebbUVdrXf0RnFtXoj2TkUkkQIACgoFbm hPnzFMEh48cpxfs9IK3ZJY4= =kXk2 -----END PGP SIGNATURE----- --nextPart3696841.lON7u9OfPf-- From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 11:49:59 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87AB11065677 for ; Tue, 4 Mar 2008 11:49:59 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id E1A3C8FC24 for ; Tue, 4 Mar 2008 11:49:58 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=0) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id m24Bng18015359; Tue, 4 Mar 2008 13:49:52 +0200 Received: by kobe.laptop (Postfix, from userid 1000) id B698922802; Tue, 4 Mar 2008 13:49:34 +0200 (EET) Resent-From: keramida@ceid.upatras.gr Resent-Date: Tue, 4 Mar 2008 13:49:34 +0200 Resent-Message-ID: <20080304114934.GA1983@kobe.laptop> Resent-To: "Daniel O'Connor" , freebsd-hackers@freebsd.org Date: Tue, 4 Mar 2008 10:17:30 +0200 From: Giorgos Keramidas To: "Daniel O'Connor" Message-ID: <20080304081730.GA90914@kobe.laptop> References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200803041701.36466.doconnor@gsoft.com.au> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.973, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.43, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 11:49:59 -0000 On 2008-03-04 17:01, Daniel O'Connor wrote: > On Tue, 4 Mar 2008, M. Warner Losh wrote: > > Greetings, > > > > here's a set of diffs that will allow FreeBSD's usr.bin/make to build > > on Linux. I'm sure they are gross, and I don't plan to commit them > > (at least not all of them), but I thought I'd post them here to see > > what people think. > > > > I think that the extra config.h includes, the errc -> errx patches > > and the Makefile.dist patches may be good for the tree. The rest may > > not meet FreeBSD's source tree policies. > > > > Comments? > > I did this a while ago when porting some of our code to Linux because it > builds with pmake.. > > Your patches are much nicer than mine however :) > > The tailq stuff could be shoved into a linux.h or some such.. So it's > more obvious what it's for and why it's there. Solaris lacks TAILQ_xxx stuff too, so I would prefer something like "bsdcompat.h" or similar. From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 11:50:49 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 579AE1065672 for ; Tue, 4 Mar 2008 11:50:49 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id CE2578FC2D for ; Tue, 4 Mar 2008 11:50:48 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=0) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id m24Bnwvk015380; Tue, 4 Mar 2008 13:50:10 +0200 Received: by kobe.laptop (Postfix, from userid 1000) id B548D22804; Tue, 4 Mar 2008 13:49:50 +0200 (EET) Resent-From: keramida@ceid.upatras.gr Resent-Date: Tue, 4 Mar 2008 13:49:50 +0200 Resent-Message-ID: <20080304114950.GB1983@kobe.laptop> Resent-To: "M. Warner Losh" , freebsd-hackers@freebsd.org Date: Tue, 4 Mar 2008 10:30:39 +0200 From: Giorgos Keramidas To: "M. Warner Losh" Message-ID: <20080304083038.GB90914@kobe.laptop> References: <20080303.224256.635730757.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080303.224256.635730757.imp@bsdimp.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.974, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.42, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 11:50:49 -0000 On 2008-03-03 22:42, "M. Warner Losh" wrote: > Greetings, > > here's a set of diffs that will allow FreeBSD's usr.bin/make to build > on Linux. I'm sure they are gross, and I don't plan to commit them > (at least not all of them), but I thought I'd post them here to see > what people think. > > I think that the extra config.h includes, the errc -> errx patches and > the Makefile.dist patches may be good for the tree. The rest may not > meet FreeBSD's source tree policies. > > Comments? > > Warner > > diff -ur pmake.orig/config.h pmake/config.h > --- pmake.orig/config.h 2005-02-01 03:50:35.000000000 -0700 > +++ pmake/config.h 2008-03-03 22:24:16.745493000 -0700 > @@ -108,4 +108,27 @@ > # endif > #endif > > +#ifndef TAILQ_HEAD_INITIALIZER > +#define TAILQ_HEAD_INITIALIZER(head) { NULL, &(head).tqh_first } > +#endif > + > +#ifndef TAILQ_FOREACH > +#define TAILQ_FOREACH(var, head, field) \ > + for ((var) = TAILQ_FIRST((head)); \ > + (var); \ > + (var) = TAILQ_NEXT((var), field)) > +#endif > + > +#ifndef TAILQ_FIRST > +#define TAILQ_FIRST(head) ((head)->tqh_first) > +#endif > + > +#ifndef TAILQ_NEXT > +#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) > +#endif > + > +#ifndef TAILQ_EMPTY > +#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) > +#endif > + > #endif /* config_h_efe0765e */ In a Solaris-based project I'm involved with, I used our own "queue.h" pretty much verbatim. Only STAILQ_LAST() seems to use __offsetof(), which may be a bit tricky to 'port over'. That's not to say that I don't like the above change, but I am just `thinking aloud' about the possibility of importing sys/queue.h into `http://hg.hellug.gr/bmake' to avoid the need for the #ifdef trick. The TAILQ_*() macros are pretty simple, so it's fairly easy to copy them verbatim. In the long run, they may get `stale' though, so a full import of sys/queue.h looks like a `safe' thing. It also stands a chance of working on Solaris, which doesn't have a sys/queue.h header at all. > --- pmake.orig/main.c 2007-12-18 15:58:14.000000000 -0700 > +++ pmake/main.c 2008-03-03 22:25:47.543349000 -0700 > @@ -660,11 +664,9 @@ > int level = (value == NULL) ? 0 : atoi(value); > > if (level < 0) { > - errc(2, EAGAIN, "Invalid value for recursion level (%d).", > - level); > + errx(2, "Invalid value for recursion level (%d).", level); > } else if (level > MKLVL_MAXVAL) { > - errc(2, EAGAIN, "Max recursion level (%d) exceeded.", > - MKLVL_MAXVAL); > + errx(2, "Max recursion level (%d) exceeded.", MKLVL_MAXVAL); > } else { > char new_value[32]; > sprintf(new_value, "%d", level + 1); Hohoho! I didn't realize errx() was already available on Linux. Last night, when I ran `man errx' there was no manpage, but I forgot that glibc prefers Info manuals :) Nice... From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 14:52:04 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E088106566B for ; Tue, 4 Mar 2008 14:52:04 +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 3847F8FC1D for ; Tue, 4 Mar 2008 14:52:04 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m24EnCA8070827; Tue, 4 Mar 2008 07:49:12 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 04 Mar 2008 07:49:41 -0700 (MST) Message-Id: <20080304.074941.742956878.imp@bsdimp.com> To: keramida@ceid.upatras.gr From: "M. Warner Losh" In-Reply-To: <20080304083038.GB90914@kobe.laptop> References: <20080303.224256.635730757.imp@bsdimp.com> <20080304083038.GB90914@kobe.laptop> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 14:52:04 -0000 In message: <20080304083038.GB90914@kobe.laptop> Giorgos Keramidas writes: : On 2008-03-03 22:42, "M. Warner Losh" wrote: : > Greetings, : > : > here's a set of diffs that will allow FreeBSD's usr.bin/make to build : > on Linux. I'm sure they are gross, and I don't plan to commit them : > (at least not all of them), but I thought I'd post them here to see : > what people think. : > : > I think that the extra config.h includes, the errc -> errx patches and : > the Makefile.dist patches may be good for the tree. The rest may not : > meet FreeBSD's source tree policies. : > : > Comments? : > : > Warner : > : > diff -ur pmake.orig/config.h pmake/config.h : > --- pmake.orig/config.h 2005-02-01 03:50:35.000000000 -0700 : > +++ pmake/config.h 2008-03-03 22:24:16.745493000 -0700 : > @@ -108,4 +108,27 @@ : > # endif : > #endif : > : > +#ifndef TAILQ_HEAD_INITIALIZER : > +#define TAILQ_HEAD_INITIALIZER(head) { NULL, &(head).tqh_first } : > +#endif : > + : > +#ifndef TAILQ_FOREACH : > +#define TAILQ_FOREACH(var, head, field) \ : > + for ((var) = TAILQ_FIRST((head)); \ : > + (var); \ : > + (var) = TAILQ_NEXT((var), field)) : > +#endif : > + : > +#ifndef TAILQ_FIRST : > +#define TAILQ_FIRST(head) ((head)->tqh_first) : > +#endif : > + : > +#ifndef TAILQ_NEXT : > +#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) : > +#endif : > + : > +#ifndef TAILQ_EMPTY : > +#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL) : > +#endif : > + : > #endif /* config_h_efe0765e */ : : In a Solaris-based project I'm involved with, I used our own "queue.h" : pretty much verbatim. Only STAILQ_LAST() seems to use __offsetof(), : which may be a bit tricky to 'port over'. : : That's not to say that I don't like the above change, but I am just : `thinking aloud' about the possibility of importing sys/queue.h into : `http://hg.hellug.gr/bmake' to avoid the need for the #ifdef trick. : : The TAILQ_*() macros are pretty simple, so it's fairly easy to copy them : verbatim. In the long run, they may get `stale' though, so a full : import of sys/queue.h looks like a `safe' thing. It also stands a : chance of working on Solaris, which doesn't have a sys/queue.h header : at all. Yea. I'm not sure the right way to cope with systems that have sys/queue.h, but have one that isn't sufficient for our needs. I'll fully admit that the above is a hack. Maybe there needs to be an autoconfig-like step... : > --- pmake.orig/main.c 2007-12-18 15:58:14.000000000 -0700 : > +++ pmake/main.c 2008-03-03 22:25:47.543349000 -0700 : > @@ -660,11 +664,9 @@ : > int level = (value == NULL) ? 0 : atoi(value); : > : > if (level < 0) { : > - errc(2, EAGAIN, "Invalid value for recursion level (%d).", : > - level); : > + errx(2, "Invalid value for recursion level (%d).", level); : > } else if (level > MKLVL_MAXVAL) { : > - errc(2, EAGAIN, "Max recursion level (%d) exceeded.", : > - MKLVL_MAXVAL); : > + errx(2, "Max recursion level (%d) exceeded.", MKLVL_MAXVAL); : > } else { : > char new_value[32]; : > sprintf(new_value, "%d", level + 1); : : Hohoho! I didn't realize errx() was already available on Linux. Last : night, when I ran `man errx' there was no manpage, but I forgot that : glibc prefers Info manuals :) Yea. I don't even know why we do a errc, which is fairly recent bsd invention. Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 15:12:48 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 088241065674; Tue, 4 Mar 2008 15:12:48 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id A423E8FC21; Tue, 4 Mar 2008 15:12:47 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id AA4DF46B10; Tue, 4 Mar 2008 10:12:46 -0500 (EST) Date: Tue, 4 Mar 2008 15:12:46 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Julian Elischer In-Reply-To: <47CC6E7D.10707@elischer.org> Message-ID: <20080304150904.R41184@fledge.watson.org> References: <200803022218.32873.cneirabustos@gmail.com> <20080303081021.GC80576@hoeg.nl> <47CC6E7D.10707@elischer.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org, Ivan Voras Subject: Re: readahead(2) - Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 15:12:48 -0000 On Mon, 3 Mar 2008, Julian Elischer wrote: > Ivan Voras wrote: >> Ed Schouten wrote: >>> * carlos neira wrote: >>>> is there an equivalent of readahead syscall in linux , for freebsd ?. i >>>> was looking at http://preload.sourceforge.net/ , and it needs this . >>> Maybe a mmap(), followed by a madvise()? >> >> Or an open() followed by a read() loop? :) If the goal is to preload the >> files, this one is certainly going to do it :) > > the aim is to load it into system memory but not copy anything into user > memory. In an ideal world (tm), a prefetch system call doesn't actually force the I/O to happen, it just hints that if it did happen, life would then be better. Then, in said ideal world (tm), the VM system can juggle investing pages in memory and I/O capacity in heuristic read-ahead, prefetch hints from the application, anonymously process memory, and buffer cache, based on what is most effective for particular applications or workloads. Last time I read up on I/O prefetching literature, it was considered quite difficult to place prefetch calls in applications in a useful way, and that normal heuristic read-ahead, which we already support, actually caught a high percentage of real application cases since applications do tend to order and store data usefully in files. For certain applications, though, that doesn't help much, and there isn't a way to tune "up" read-ahead prefetching, so it could be we're no longer doing as good a job. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 15:15:33 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AC71106566C for ; Tue, 4 Mar 2008 15:15:33 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 4539B8FC21 for ; Tue, 4 Mar 2008 15:15:33 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 4E77746B2A; Tue, 4 Mar 2008 10:15:32 -0500 (EST) Date: Tue, 4 Mar 2008 15:15:32 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: "M. Warner Losh" In-Reply-To: <20080303.224256.635730757.imp@bsdimp.com> Message-ID: <20080304151326.J41184@fledge.watson.org> References: <20080303.224256.635730757.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 15:15:33 -0000 On Mon, 3 Mar 2008, M. Warner Losh wrote: > --- pmake.orig/config.h 2005-02-01 03:50:35.000000000 -0700 > +++ pmake/config.h 2008-03-03 22:24:16.745493000 -0700 > @@ -108,4 +108,27 @@ > # endif > #endif > > +#ifndef TAILQ_HEAD_INITIALIZER > +#define TAILQ_HEAD_INITIALIZER(head) { NULL, &(head).tqh_first } > +#endif In most ports of FreeBSD parts to Linux that I've seen, the preferred solution has to been to bring the entire FreeBSD queue.h with you rather than relying on the native Linux queue.h. This is what we do for OpenBSM, for example; this also helps out when you get to Mac OS X, Solaris, etc, where all the queue.h's continue to vary in subtle ways. This depends a fair amount on a lack of header pollution in the OS's own include files, of course... Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 15:31:42 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E47FD1065673 for ; Tue, 4 Mar 2008 15:31:42 +0000 (UTC) (envelope-from girishvenkatachalam@gmail.com) Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.183]) by mx1.freebsd.org (Postfix) with ESMTP id 9FF138FC15 for ; Tue, 4 Mar 2008 15:31:41 +0000 (UTC) (envelope-from girishvenkatachalam@gmail.com) Received: by ik-out-1112.google.com with SMTP id b35so1200638ika.3 for ; Tue, 04 Mar 2008 07:31:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:subject:message-id:reply-to:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; bh=nz0td0yKAARi3HFbUHvUoFSyviYikckIfzoVMW84xDg=; b=WRun4m76QPOtcLoXM2/DbIAHLEacY8c/x3sei6n58vbVxMr9gnk6R+d9Av7KthHBmKPI+UinII21tyQ+gybCCCj5SXR6K/sdA+J42DBQjOg8qmxriq8QPY9ERiaBNY2wRVD8LkzP+2kbBjbGOQ9OnU4O9LtiiYFPNDrdk1KCWmo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:reply-to:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=bYanmZKAFlK/APvWpV76gJNOc4DyZYorSzpgqvF0C10Rj7JjlVEuwWAMoeImJHNgw8jNg9lic7cbtUd6wIsIuhKmUXb4N6rujNBu7ttjaxUanfAauDVgHnrwe7rR3VjG897j59UrD1UdEHgxU8Z/xixYfmRpAUg2dW7e/RfUBPI= Received: by 10.78.173.20 with SMTP id v20mr1846470hue.73.1204644696902; Tue, 04 Mar 2008 07:31:36 -0800 (PST) Received: from saraswathy.madambakam.org ( [59.92.11.201]) by mx.google.com with ESMTPS id 30sm1475901hue.8.2008.03.04.07.31.33 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Mar 2008 07:31:36 -0800 (PST) Received: by saraswathy.madambakam.org (Postfix, from userid 1002) id 3D50B3A0501; Tue, 4 Mar 2008 21:01:28 +0530 (IST) Date: Tue, 4 Mar 2008 21:01:28 +0530 From: Girish Venkatachalam To: freebsd-hackers@freebsd.org, hackers@freebsd.org Message-ID: <20080304153128.GC27540@saraswathy.madambakam.org> Mail-Followup-To: freebsd-hackers@freebsd.org, hackers@freebsd.org References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200803041701.36466.doconnor@gsoft.com.au> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: girishvenkatachalam@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 15:31:43 -0000 On 17:01:28 Mar 04, Daniel O'Connor wrote: > > I did this a while ago when porting some of our code to Linux because it > builds with pmake.. > > Your patches are much nicer than mine however :) > > The tailq stuff could be shoved into a linux.h or some such.. So it's > more obvious what it's for and why it's there. > PMI but why do I see tailq in gentoo? I was taken by surprise when I found my code compile and run beautifully few months ago. I am wondering if that is the case, then why port it? -Girish From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 15:34:35 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23758106566B; Tue, 4 Mar 2008 15:34:35 +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 D95478FC13; Tue, 4 Mar 2008 15:34:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m24FXMx6071343; Tue, 4 Mar 2008 08:33:22 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 04 Mar 2008 08:33:50 -0700 (MST) Message-Id: <20080304.083350.1661915009.imp@bsdimp.com> To: rwatson@freebsd.org From: "M. Warner Losh" In-Reply-To: <20080304151326.J41184@fledge.watson.org> References: <20080303.224256.635730757.imp@bsdimp.com> <20080304151326.J41184@fledge.watson.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 15:34:35 -0000 In message: <20080304151326.J41184@fledge.watson.org> Robert Watson writes: : : On Mon, 3 Mar 2008, M. Warner Losh wrote: : : > --- pmake.orig/config.h 2005-02-01 03:50:35.000000000 -0700 : > +++ pmake/config.h 2008-03-03 22:24:16.745493000 -0700 : > @@ -108,4 +108,27 @@ : > # endif : > #endif : > : > +#ifndef TAILQ_HEAD_INITIALIZER : > +#define TAILQ_HEAD_INITIALIZER(head) { NULL, &(head).tqh_first } : > +#endif : : In most ports of FreeBSD parts to Linux that I've seen, the preferred solution : has to been to bring the entire FreeBSD queue.h with you rather than relying : on the native Linux queue.h. This is what we do for OpenBSM, for example; : this also helps out when you get to Mac OS X, Solaris, etc, where all the : queue.h's continue to vary in subtle ways. This depends a fair amount on a : lack of header pollution in the OS's own include files, of course... I was rather hoping for something that could be used without any of that nonsense... Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 15:38:09 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CA80106566C; Tue, 4 Mar 2008 15:38:09 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id D5B298FC1A; Tue, 4 Mar 2008 15:38:08 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=128) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id m24FbZpm000367 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 4 Mar 2008 17:37:46 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m24FbUql069320; Tue, 4 Mar 2008 17:37:30 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m24FbU2q069317; Tue, 4 Mar 2008 17:37:30 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 4 Mar 2008 17:37:30 +0200 From: Giorgos Keramidas To: Robert Watson Message-ID: <20080304153730.GA61036@kobe.laptop> References: <20080303.224256.635730757.imp@bsdimp.com> <20080304151326.J41184@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304151326.J41184@fledge.watson.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.976, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.42, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 15:38:09 -0000 On 2008-03-04 15:15, Robert Watson wrote: > On Mon, 3 Mar 2008, M. Warner Losh wrote: >> --- pmake.orig/config.h 2005-02-01 03:50:35.000000000 -0700 >> +++ pmake/config.h 2008-03-03 22:24:16.745493000 -0700 >> @@ -108,4 +108,27 @@ >> # endif >> #endif >> >> +#ifndef TAILQ_HEAD_INITIALIZER >> +#define TAILQ_HEAD_INITIALIZER(head) { NULL, &(head).tqh_first } >> +#endif > > In most ports of FreeBSD parts to Linux that I've seen, the preferred > solution has to been to bring the entire FreeBSD queue.h with you rather > than relying on the native Linux queue.h. This is what we do for OpenBSM, > for example; this also helps out when you get to Mac OS X, Solaris, etc, > where all the queue.h's continue to vary in subtle ways. This depends a > fair amount on a lack of header pollution in the OS's own include files, of > course... Fortunately, in Solaris where I am testing the import of sys/cdefs.h and sys/queue.h today, things seem to be `ok'. Just importing the two headers at http://hg.hellug.gr/bmake/gker/rev/68bfc25ed443 seems to have moved things one step closer towards building everything on Solaris: Now off to the next little annoyance. Building with Sun Studio on Solaris 10, in my test machine at home, stops at: "arch.c", line 1063: undefined symbol: INT_MIN cc: acomp failed for arch.c *** Error code 2 make: Fatal error: Command failed for target `arch.o' Current working directory /home/keramida/bmake/src This is easy to fix with: diff -r 68bfc25ed443 src/arch.c --- a/src/arch.c Tue Mar 04 17:29:11 2008 +0200 +++ b/src/arch.c Tue Mar 04 17:35:08 2008 +0200 @@ -96,6 +96,7 @@ #include #include #include +#include #include #include #include The next part, about the missing errx() functions on Solaris is going to be tonight's fun. If there are too many missing functions, it may be worth adding a static `libcompat' with copies of just the functions we need to run BSD make on non-BSD hosts. From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 15:38:40 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BAE61065674 for ; Tue, 4 Mar 2008 15:38:40 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id D952F8FC1D for ; Tue, 4 Mar 2008 15:38:39 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 7473046C30; Tue, 4 Mar 2008 10:38:39 -0500 (EST) Date: Tue, 4 Mar 2008 15:38:39 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: "M. Warner Losh" In-Reply-To: <20080304.083350.1661915009.imp@bsdimp.com> Message-ID: <20080304153651.I41184@fledge.watson.org> References: <20080303.224256.635730757.imp@bsdimp.com> <20080304151326.J41184@fledge.watson.org> <20080304.083350.1661915009.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 15:38:40 -0000 On Tue, 4 Mar 2008, M. Warner Losh wrote: > : In most ports of FreeBSD parts to Linux that I've seen, the preferred solution > : has to been to bring the entire FreeBSD queue.h with you rather than relying > : on the native Linux queue.h. This is what we do for OpenBSM, for example; > : this also helps out when you get to Mac OS X, Solaris, etc, where all the > : queue.h's continue to vary in subtle ways. This depends a fair amount on a > : lack of header pollution in the OS's own include files, of course... > > I was rather hoping for something that could be used without any of that > nonsense... Sadly, nonsense seems to be the name of the game in software portability. Here's the broken autoconf garbage I use to pick out adequate queue.h's from inadequate ones: # sys/queue.h exists on most systems, but its capabilities vary a great deal. # test for LIST_FIRST and TAILQ_FOREACH_SAFE, which appears to not exist in # all of them, and are necessary for OpenBSM. AC_TRY_LINK([ #include ], [ #ifndef LIST_FIRST #error LIST_FIRST missing #endif #ifndef TAILQ_FOREACH_SAFE #error TAILQ_FOREACH_SAFE #endif ], [ AC_DEFINE(HAVE_FULL_QUEUE_H,, Define if queue.h includes LIST_FIRST) ]) Note that there are at least a couple of mostly stylistic bugs there (could use compile rather than link, definition description is poor, errors are inconsistent). :-) I found that on both Linux and Mac OS X, the queue.h's didn't have everything I wanted. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 15:40:31 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E493106567E; Tue, 4 Mar 2008 15:40:31 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 5E1A68FC2F; Tue, 4 Mar 2008 15:40:30 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=128) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id m24FdRsa000473 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 4 Mar 2008 17:39:45 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m24FdLF1072552; Tue, 4 Mar 2008 17:39:21 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m24FdLoQ072549; Tue, 4 Mar 2008 17:39:21 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 4 Mar 2008 17:39:21 +0200 From: Giorgos Keramidas To: freebsd-hackers@freebsd.org, hackers@freebsd.org Message-ID: <20080304153920.GB61036@kobe.laptop> References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> <20080304153128.GC27540@saraswathy.madambakam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304153128.GC27540@saraswathy.madambakam.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.976, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.42, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 15:40:31 -0000 On 2008-03-04 21:01, Girish Venkatachalam wrote: >On 17:01:28 Mar 04, Daniel O'Connor wrote: >> I did this a while ago when porting some of our code to Linux because it >> builds with pmake.. >> >> Your patches are much nicer than mine however :) >> >> The tailq stuff could be shoved into a linux.h or some such.. So it's >> more obvious what it's for and why it's there. >> > > PMI but why do I see tailq in gentoo? > > I was taken by surprise when I found my code compile and run beautifully > few months ago. > > I am wondering if that is the case, then why port it? Minor compatibility nits here and there, which can turn a simple TAILQ_FOREACH() call to a nightmare of nested preprocessor hells :) From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 15:40:31 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E493106567E; Tue, 4 Mar 2008 15:40:31 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 5E1A68FC2F; Tue, 4 Mar 2008 15:40:30 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=128) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id m24FdRsa000473 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 4 Mar 2008 17:39:45 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m24FdLF1072552; Tue, 4 Mar 2008 17:39:21 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m24FdLoQ072549; Tue, 4 Mar 2008 17:39:21 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 4 Mar 2008 17:39:21 +0200 From: Giorgos Keramidas To: freebsd-hackers@freebsd.org, hackers@freebsd.org Message-ID: <20080304153920.GB61036@kobe.laptop> References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> <20080304153128.GC27540@saraswathy.madambakam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304153128.GC27540@saraswathy.madambakam.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.976, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.42, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 15:40:31 -0000 On 2008-03-04 21:01, Girish Venkatachalam wrote: >On 17:01:28 Mar 04, Daniel O'Connor wrote: >> I did this a while ago when porting some of our code to Linux because it >> builds with pmake.. >> >> Your patches are much nicer than mine however :) >> >> The tailq stuff could be shoved into a linux.h or some such.. So it's >> more obvious what it's for and why it's there. >> > > PMI but why do I see tailq in gentoo? > > I was taken by surprise when I found my code compile and run beautifully > few months ago. > > I am wondering if that is the case, then why port it? Minor compatibility nits here and there, which can turn a simple TAILQ_FOREACH() call to a nightmare of nested preprocessor hells :) From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 15:45:42 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 50BD51065673 for ; Tue, 4 Mar 2008 15:45:42 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 287018FC35 for ; Tue, 4 Mar 2008 15:45:42 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id DA42C46C1F; Tue, 4 Mar 2008 10:45:41 -0500 (EST) Date: Tue, 4 Mar 2008 15:45:41 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Giorgos Keramidas In-Reply-To: <20080304153730.GA61036@kobe.laptop> Message-ID: <20080304154339.L41184@fledge.watson.org> References: <20080303.224256.635730757.imp@bsdimp.com> <20080304151326.J41184@fledge.watson.org> <20080304153730.GA61036@kobe.laptop> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 15:45:42 -0000 On Tue, 4 Mar 2008, Giorgos Keramidas wrote: >> In most ports of FreeBSD parts to Linux that I've seen, the preferred >> solution has to been to bring the entire FreeBSD queue.h with you rather >> than relying on the native Linux queue.h. This is what we do for OpenBSM, >> for example; this also helps out when you get to Mac OS X, Solaris, etc, >> where all the queue.h's continue to vary in subtle ways. This depends a >> fair amount on a lack of header pollution in the OS's own include files, of >> course... > > Fortunately, in Solaris where I am testing the import of sys/cdefs.h and > sys/queue.h today, things seem to be `ok'. Just importing the two headers > at http://hg.hellug.gr/bmake/gker/rev/68bfc25ed443 seems to have moved > things one step closer towards building everything on Solaris: > > Now off to the next little annoyance. Building with Sun Studio on Solaris > 10, in my test machine at home, stops at: > > > The next part, about the missing errx() functions on Solaris is going to be > tonight's fun. If there are too many missing functions, it may be worth > adding a static `libcompat' with copies of just the functions we need to run > BSD make on non-BSD hosts. It's beginning to sound like it would be really nice to have an autoconf'd/automake'd version of our make to drop onto Linux, Solaris, etc, etc, systems in order to bootstrap our compile. I share Warner's reluctance to add autoconf parts to our native build, but having 'bsdmake' as a starting point is useful, and would put those other platforms more at parity with Mac OS X as a starting point (probably ahead due to more accessible native build tools). I'm a bit surprised there isn't already a Linux 'bsdmake' package floating around... (When I say 'nice' above, I mean it in the normal autoconf sense of the word 'nice', so don't take that the wrong way!) Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 15:46:33 2008 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88C99106566B; Tue, 4 Mar 2008 15:46:33 +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 46D678FC25; Tue, 4 Mar 2008 15:46:33 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m24FhiAJ071514; Tue, 4 Mar 2008 08:43:44 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 04 Mar 2008 08:44:12 -0700 (MST) Message-Id: <20080304.084412.139569940.imp@bsdimp.com> To: rwatson@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <20080304153651.I41184@fledge.watson.org> References: <20080304151326.J41184@fledge.watson.org> <20080304.083350.1661915009.imp@bsdimp.com> <20080304153651.I41184@fledge.watson.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: hackers@FreeBSD.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 15:46:33 -0000 In message: <20080304153651.I41184@fledge.watson.org> Robert Watson writes: : On Tue, 4 Mar 2008, M. Warner Losh wrote: : : > : In most ports of FreeBSD parts to Linux that I've seen, the preferred solution : > : has to been to bring the entire FreeBSD queue.h with you rather than relying : > : on the native Linux queue.h. This is what we do for OpenBSM, for example; : > : this also helps out when you get to Mac OS X, Solaris, etc, where all the : > : queue.h's continue to vary in subtle ways. This depends a fair amount on a : > : lack of header pollution in the OS's own include files, of course... : > : > I was rather hoping for something that could be used without any of that : > nonsense... : : Sadly, nonsense seems to be the name of the game in software portability. : Here's the broken autoconf garbage I use to pick out adequate queue.h's from : inadequate ones: : : # sys/queue.h exists on most systems, but its capabilities vary a great deal. : # test for LIST_FIRST and TAILQ_FOREACH_SAFE, which appears to not exist in : # all of them, and are necessary for OpenBSM. : AC_TRY_LINK([ : #include : ], [ : : #ifndef LIST_FIRST : #error LIST_FIRST missing : #endif : #ifndef TAILQ_FOREACH_SAFE : #error TAILQ_FOREACH_SAFE : #endif : ], [ : AC_DEFINE(HAVE_FULL_QUEUE_H,, Define if queue.h includes LIST_FIRST) : ]) : : Note that there are at least a couple of mostly stylistic bugs there (could : use compile rather than link, definition description is poor, errors are : inconsistent). :-) I found that on both Linux and Mac OS X, the queue.h's : didn't have everything I wanted. Right. But I'm not going to use autoconf. It is totally off the table as far as I'm concerned. Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 15:47:29 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A3E551065671; Tue, 4 Mar 2008 15:47:29 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 17B438FC15; Tue, 4 Mar 2008 15:47:28 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=128) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id m24FjnAK000870 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 4 Mar 2008 17:46:06 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m24FjhBd088498; Tue, 4 Mar 2008 17:45:43 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m24Fjh30088497; Tue, 4 Mar 2008 17:45:43 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 4 Mar 2008 17:45:43 +0200 From: Giorgos Keramidas To: Robert Watson Message-ID: <20080304154542.GC61036@kobe.laptop> References: <20080303.224256.635730757.imp@bsdimp.com> <20080304151326.J41184@fledge.watson.org> <20080304.083350.1661915009.imp@bsdimp.com> <20080304153651.I41184@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304153651.I41184@fledge.watson.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.976, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.42, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 15:47:29 -0000 On 2008-03-04 15:38, Robert Watson wrote: > On Tue, 4 Mar 2008, M. Warner Losh wrote: > >> : In most ports of FreeBSD parts to Linux that I've seen, the preferred solution >> : has to been to bring the entire FreeBSD queue.h with you rather than relying >> : on the native Linux queue.h. This is what we do for OpenBSM, for example; >> : this also helps out when you get to Mac OS X, Solaris, etc, where all the >> : queue.h's continue to vary in subtle ways. This depends a fair amount on a >> : lack of header pollution in the OS's own include files, of course... >> >> I was rather hoping for something that could be used without any of that >> nonsense... > > Sadly, nonsense seems to be the name of the game in software portability. > Here's the broken autoconf garbage I use to pick out adequate queue.h's > from inadequate ones: > > # sys/queue.h exists on most systems, but its capabilities vary a great deal. > # test for LIST_FIRST and TAILQ_FOREACH_SAFE, which appears to not exist in > # all of them, and are necessary for OpenBSM. > AC_TRY_LINK([ > #include > ], [ > > #ifndef LIST_FIRST > #error LIST_FIRST missing > #endif > #ifndef TAILQ_FOREACH_SAFE > #error TAILQ_FOREACH_SAFE > #endif > ], [ > AC_DEFINE(HAVE_FULL_QUEUE_H,, Define if queue.h includes LIST_FIRST) > ]) > > Note that there are at least a couple of mostly stylistic bugs there (could > use compile rather than link, definition description is poor, errors are > inconsistent). :-) I found that on both Linux and Mac OS X, the queue.h's > didn't have everything I wanted. Nice! Thank you Robert. Can I copy parts of this and add them to the autoconf glue I'm adding now? To test just cpp(1) stuff, autoconf supports AC_PREPROC_IFELSE() too, which I used when I tried writing a check for __FBSDID(): AC_PREPROC_IFELSE( [AC_LANG_PROGRAM([[#include #ifndef __FBSDID #error No __FBSDID definition. #endif]])], [AC_DEFINE([HAVE_FBSDID_MACRO], [1], [Define to 1 if you have the __FBSDID macro.])]) I can probably improve a bit the queue.h check using what you wrote above and AC_PREPROC_IFELSE(). From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 15:49:21 2008 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 048B31065673; Tue, 4 Mar 2008 15:49:21 +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 A2ABE8FC2B; Tue, 4 Mar 2008 15:49:20 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m24Fkqde071573; Tue, 4 Mar 2008 08:46:52 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 04 Mar 2008 08:47:21 -0700 (MST) Message-Id: <20080304.084721.-1648696957.imp@bsdimp.com> To: rwatson@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <20080304154339.L41184@fledge.watson.org> References: <20080304151326.J41184@fledge.watson.org> <20080304153730.GA61036@kobe.laptop> <20080304154339.L41184@fledge.watson.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: keramida@ceid.upatras.gr, hackers@FreeBSD.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 15:49:21 -0000 In message: <20080304154339.L41184@fledge.watson.org> Robert Watson writes: : (When I say 'nice' above, I mean it in the normal autoconf sense of the word : 'nice', so don't take that the wrong way!) It would be nicer if it didn't use autoconf. I hate to be a stick in the mud, but autoconf is pure evil. Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 15:52:13 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64729106566B; Tue, 4 Mar 2008 15:52:13 +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 07FC38FC1F; Tue, 4 Mar 2008 15:52:12 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m24Fnror071596; Tue, 4 Mar 2008 08:49:53 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 04 Mar 2008 08:50:22 -0700 (MST) Message-Id: <20080304.085022.-1605837445.imp@bsdimp.com> To: keramida@ceid.upatras.gr From: "M. Warner Losh" In-Reply-To: <20080304153730.GA61036@kobe.laptop> References: <20080303.224256.635730757.imp@bsdimp.com> <20080304151326.J41184@fledge.watson.org> <20080304153730.GA61036@kobe.laptop> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org, rwatson@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 15:52:13 -0000 In message: <20080304153730.GA61036@kobe.laptop> Giorgos Keramidas writes: : On 2008-03-04 15:15, Robert Watson wrote: : > On Mon, 3 Mar 2008, M. Warner Losh wrote: : >> --- pmake.orig/config.h 2005-02-01 03:50:35.000000000 -0700 : >> +++ pmake/config.h 2008-03-03 22:24:16.745493000 -0700 : >> @@ -108,4 +108,27 @@ : >> # endif : >> #endif : >> : >> +#ifndef TAILQ_HEAD_INITIALIZER : >> +#define TAILQ_HEAD_INITIALIZER(head) { NULL, &(head).tqh_first } : >> +#endif : > : > In most ports of FreeBSD parts to Linux that I've seen, the preferred : > solution has to been to bring the entire FreeBSD queue.h with you rather : > than relying on the native Linux queue.h. This is what we do for OpenBSM, : > for example; this also helps out when you get to Mac OS X, Solaris, etc, : > where all the queue.h's continue to vary in subtle ways. This depends a : > fair amount on a lack of header pollution in the OS's own include files, of : > course... : : Fortunately, in Solaris where I am testing the import of sys/cdefs.h and : sys/queue.h today, things seem to be `ok'. Just importing the two : headers at http://hg.hellug.gr/bmake/gker/rev/68bfc25ed443 seems to have : moved things one step closer towards building everything on Solaris: : : Now off to the next little annoyance. Building with Sun Studio on : Solaris 10, in my test machine at home, stops at: : : "arch.c", line 1063: undefined symbol: INT_MIN : cc: acomp failed for arch.c : *** Error code 2 : make: Fatal error: Command failed for target `arch.o' : Current working directory /home/keramida/bmake/src : : This is easy to fix with: : : diff -r 68bfc25ed443 src/arch.c : --- a/src/arch.c Tue Mar 04 17:29:11 2008 +0200 : +++ b/src/arch.c Tue Mar 04 17:35:08 2008 +0200 : @@ -96,6 +96,7 @@ : #include : #include : #include : +#include : #include : #include : #include We likely should just commit this to FreeBSD's make, since Section 5.2.4.2.1 of the C standard says that INT_MIN is defined there. : The next part, about the missing errx() functions on Solaris is going to : be tonight's fun. If there are too many missing functions, it may be : worth adding a static `libcompat' with copies of just the functions we : need to run BSD make on non-BSD hosts. In the longer term, this likely is a good idea. In the shorter term, I'm not so sure that this is a good idea, since all you'd need would be inlines for the functions that make uses. Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 15:56:15 2008 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6926F1065670; Tue, 4 Mar 2008 15:56: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 0CAFB8FC2A; Tue, 4 Mar 2008 15:56:14 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m24FqHj2071621; Tue, 4 Mar 2008 08:52:17 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 04 Mar 2008 08:52:45 -0700 (MST) Message-Id: <20080304.085245.2040341894.imp@bsdimp.com> To: keramida@ceid.upatras.gr From: "M. Warner Losh" In-Reply-To: <20080304154542.GC61036@kobe.laptop> References: <20080304.083350.1661915009.imp@bsdimp.com> <20080304153651.I41184@fledge.watson.org> <20080304154542.GC61036@kobe.laptop> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: hackers@FreeBSD.org, rwatson@FreeBSD.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 15:56:15 -0000 In message: <20080304154542.GC61036@kobe.laptop> Giorgos Keramidas writes: : On 2008-03-04 15:38, Robert Watson wrote: : > On Tue, 4 Mar 2008, M. Warner Losh wrote: : > : >> : In most ports of FreeBSD parts to Linux that I've seen, the preferred solution : >> : has to been to bring the entire FreeBSD queue.h with you rather than relying : >> : on the native Linux queue.h. This is what we do for OpenBSM, for example; : >> : this also helps out when you get to Mac OS X, Solaris, etc, where all the : >> : queue.h's continue to vary in subtle ways. This depends a fair amount on a : >> : lack of header pollution in the OS's own include files, of course... : >> : >> I was rather hoping for something that could be used without any of that : >> nonsense... : > : > Sadly, nonsense seems to be the name of the game in software portability. : > Here's the broken autoconf garbage I use to pick out adequate queue.h's : > from inadequate ones: : > : > # sys/queue.h exists on most systems, but its capabilities vary a great deal. : > # test for LIST_FIRST and TAILQ_FOREACH_SAFE, which appears to not exist in : > # all of them, and are necessary for OpenBSM. : > AC_TRY_LINK([ : > #include : > ], [ : > : > #ifndef LIST_FIRST : > #error LIST_FIRST missing : > #endif : > #ifndef TAILQ_FOREACH_SAFE : > #error TAILQ_FOREACH_SAFE : > #endif : > ], [ : > AC_DEFINE(HAVE_FULL_QUEUE_H,, Define if queue.h includes LIST_FIRST) : > ]) : > : > Note that there are at least a couple of mostly stylistic bugs there (could : > use compile rather than link, definition description is poor, errors are : > inconsistent). :-) I found that on both Linux and Mac OS X, the queue.h's : > didn't have everything I wanted. : : Nice! Thank you Robert. Can I copy parts of this and add them to the : autoconf glue I'm adding now? : : To test just cpp(1) stuff, autoconf supports AC_PREPROC_IFELSE() too, : which I used when I tried writing a check for __FBSDID(): : : AC_PREPROC_IFELSE( : [AC_LANG_PROGRAM([[#include : #ifndef __FBSDID : #error No __FBSDID definition. : #endif]])], : [AC_DEFINE([HAVE_FBSDID_MACRO], [1], : [Define to 1 if you have the __FBSDID macro.])]) : : I can probably improve a bit the queue.h check using what you wrote : above and AC_PREPROC_IFELSE(). The alternative to uglifying the make sources with #ifdefs would be to just always use the compat includes when building... No autoconf needed, and minimal changes to the base make, if any. Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 15:59:05 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69584106566B; Tue, 4 Mar 2008 15:59:05 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id D180D8FC45; Tue, 4 Mar 2008 15:59:04 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=128) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id m24FwcwF001619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 4 Mar 2008 17:58:51 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m24FwRUj096554; Tue, 4 Mar 2008 17:58:27 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m24FwQjl096546; Tue, 4 Mar 2008 17:58:26 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 4 Mar 2008 17:58:25 +0200 From: Giorgos Keramidas To: "M. Warner Losh" Message-ID: <20080304155825.GA95950@kobe.laptop> References: <20080303.224256.635730757.imp@bsdimp.com> <20080304151326.J41184@fledge.watson.org> <20080304153730.GA61036@kobe.laptop> <20080304.085022.-1605837445.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304.085022.-1605837445.imp@bsdimp.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.976, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.42, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: hackers@freebsd.org, rwatson@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 15:59:05 -0000 On 2008-03-04 08:50, "M. Warner Losh" wrote: > In message: <20080304153730.GA61036@kobe.laptop> > Giorgos Keramidas writes: > : "arch.c", line 1063: undefined symbol: INT_MIN > : cc: acomp failed for arch.c > : *** Error code 2 > : make: Fatal error: Command failed for target `arch.o' > : Current working directory /home/keramida/bmake/src > : > : This is easy to fix with: > : > : diff -r 68bfc25ed443 src/arch.c > : --- a/src/arch.c Tue Mar 04 17:29:11 2008 +0200 > : +++ b/src/arch.c Tue Mar 04 17:35:08 2008 +0200 > : @@ -96,6 +96,7 @@ > : #include > : #include > : #include > : +#include > : #include > : #include > : #include > > We likely should just commit this to FreeBSD's make, since Section > 5.2.4.2.1 of the C standard says that INT_MIN is defined there. That's true. This is, I hope, one of the good things about the `exercise' of making BSD make build on all three of BSD, Linux and Solaris :) Should I commit the change to arch.c to HEAD? > : The next part, about the missing errx() functions on Solaris is > : going to be tonight's fun. If there are too many missing functions, > : it may be worth adding a static `libcompat' with copies of just the > : functions we need to run BSD make on non-BSD hosts. > > In the longer term, this likely is a good idea. In the shorter term, > I'm not so sure that this is a good idea, since all you'd need would > be inlines for the functions that make uses. Once everything builds I plan to keep `synchronizing' with the usr.bin/make version, so I'm willing to go the extra mile to make things more maintanable in the long run. From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 16:00:48 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E12F1065671 for ; Tue, 4 Mar 2008 16:00:48 +0000 (UTC) (envelope-from girishvenkatachalam@gmail.com) Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.176]) by mx1.freebsd.org (Postfix) with ESMTP id D88E78FC17 for ; Tue, 4 Mar 2008 16:00:47 +0000 (UTC) (envelope-from girishvenkatachalam@gmail.com) Received: by ik-out-1112.google.com with SMTP id b35so1224363ika.3 for ; Tue, 04 Mar 2008 08:00:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:subject:message-id:reply-to:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; bh=nz0td0yKAARi3HFbUHvUoFSyviYikckIfzoVMW84xDg=; b=WRun4m76QPOtcLoXM2/DbIAHLEacY8c/x3sei6n58vbVxMr9gnk6R+d9Av7KthHBmKPI+UinII21tyQ+gybCCCj5SXR6K/sdA+J42DBQjOg8qmxriq8QPY9ERiaBNY2wRVD8LkzP+2kbBjbGOQ9OnU4O9LtiiYFPNDrdk1KCWmo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:reply-to:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=bYanmZKAFlK/APvWpV76gJNOc4DyZYorSzpgqvF0C10Rj7JjlVEuwWAMoeImJHNgw8jNg9lic7cbtUd6wIsIuhKmUXb4N6rujNBu7ttjaxUanfAauDVgHnrwe7rR3VjG897j59UrD1UdEHgxU8Z/xixYfmRpAUg2dW7e/RfUBPI= Received: by 10.78.173.20 with SMTP id v20mr1846470hue.73.1204644696902; Tue, 04 Mar 2008 07:31:36 -0800 (PST) Received: from saraswathy.madambakam.org ( [59.92.11.201]) by mx.google.com with ESMTPS id 30sm1475901hue.8.2008.03.04.07.31.33 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Mar 2008 07:31:36 -0800 (PST) Received: by saraswathy.madambakam.org (Postfix, from userid 1002) id 3D50B3A0501; Tue, 4 Mar 2008 21:01:28 +0530 (IST) Date: Tue, 4 Mar 2008 21:01:28 +0530 From: Girish Venkatachalam To: freebsd-hackers@freebsd.org, hackers@freebsd.org Message-ID: <20080304153128.GC27540@saraswathy.madambakam.org> Mail-Followup-To: freebsd-hackers@freebsd.org, hackers@freebsd.org References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200803041701.36466.doconnor@gsoft.com.au> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: girishvenkatachalam@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 16:00:48 -0000 On 17:01:28 Mar 04, Daniel O'Connor wrote: > > I did this a while ago when porting some of our code to Linux because it > builds with pmake.. > > Your patches are much nicer than mine however :) > > The tailq stuff could be shoved into a linux.h or some such.. So it's > more obvious what it's for and why it's there. > PMI but why do I see tailq in gentoo? I was taken by surprise when I found my code compile and run beautifully few months ago. I am wondering if that is the case, then why port it? -Girish From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 16:00:55 2008 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEE431065716; Tue, 4 Mar 2008 16:00:55 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 4395B8FC27; Tue, 4 Mar 2008 16:00:54 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=128) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id m24G0CMk001726 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 4 Mar 2008 18:00:33 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m24G07DX096966; Tue, 4 Mar 2008 18:00:07 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m24G07Ht096965; Tue, 4 Mar 2008 18:00:07 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 4 Mar 2008 18:00:07 +0200 From: Giorgos Keramidas To: "M. Warner Losh" Message-ID: <20080304160006.GB95950@kobe.laptop> References: <20080304.083350.1661915009.imp@bsdimp.com> <20080304153651.I41184@fledge.watson.org> <20080304154542.GC61036@kobe.laptop> <20080304.085245.2040341894.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304.085245.2040341894.imp@bsdimp.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.975, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.42, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: hackers@FreeBSD.org, rwatson@FreeBSD.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 16:00:55 -0000 On 2008-03-04 08:52, "M. Warner Losh" wrote: > In message: <20080304154542.GC61036@kobe.laptop> > Giorgos Keramidas writes: > : Nice! Thank you Robert. Can I copy parts of this and add them to the > : autoconf glue I'm adding now? > : > : To test just cpp(1) stuff, autoconf supports AC_PREPROC_IFELSE() too, > : which I used when I tried writing a check for __FBSDID(): > : > : AC_PREPROC_IFELSE( > : [AC_LANG_PROGRAM([[#include > : #ifndef __FBSDID > : #error No __FBSDID definition. > : #endif]])], > : [AC_DEFINE([HAVE_FBSDID_MACRO], [1], > : [Define to 1 if you have the __FBSDID macro.])]) > : > : I can probably improve a bit the queue.h check using what you wrote > : above and AC_PREPROC_IFELSE(). > > The alternative to uglifying the make sources with #ifdefs would be to > just always use the compat includes when building... No autoconf > needed, and minimal changes to the base make, if any. True. I'll try to keep #ifdef changes down to the absolutely _minimum_ amount of changes. It will make repeated merged from usr.bin/make much easier, for example :) From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 16:08:31 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F2451065671; Tue, 4 Mar 2008 16:08:31 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 131898FC1F; Tue, 4 Mar 2008 16:08:30 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=128) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id m24G7uCW003415 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 4 Mar 2008 18:08:07 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m24G7pxL003559; Tue, 4 Mar 2008 18:07:51 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m24G7p0u003540; Tue, 4 Mar 2008 18:07:51 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 4 Mar 2008 18:07:51 +0200 From: Giorgos Keramidas To: Robert Watson Message-ID: <20080304160750.GC95950@kobe.laptop> References: <20080303.224256.635730757.imp@bsdimp.com> <20080304151326.J41184@fledge.watson.org> <20080304153730.GA61036@kobe.laptop> <20080304154339.L41184@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304154339.L41184@fledge.watson.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.975, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.42, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 16:08:31 -0000 On 2008-03-04 15:45, Robert Watson wrote: >> The next part, about the missing errx() functions on Solaris is going to >> be tonight's fun. If there are too many missing functions, it may be >> worth adding a static `libcompat' with copies of just the functions we >> need to run BSD make on non-BSD hosts. > > It's beginning to sound like it would be really nice to have an > autoconf'd/automake'd version of our make to drop onto Linux, Solaris, > etc, etc, systems in order to bootstrap our compile. Thanks :) > I share Warner's reluctance to add autoconf parts to our native build, > but having 'bsdmake' as a starting point is useful, and would put > those other platforms more at parity with Mac OS X as a starting point > (probably ahead due to more accessible native build tools). I'm a bit > surprised there isn't already a Linux 'bsdmake' package floating > around... There's always `pmake', and the `bmake' that NetBSD uses to bootstrap itself using their `build.sh' script and a POSIX shell, but there are a couple of details which may inhibit these from being useful for bootstrapping FreeBSD. The `pmake' package of Linux distributions[1] is based on NetBSD make sources. While NetBSD make is probably 90% of what we need to bootstrap FreeBSD, it's still *not* FreeBSD make :/ [1] http://packages.debian.org/etch/pmake > (When I say 'nice' above, I mean it in the normal autoconf sense of the > word 'nice', so don't take that the wrong way!) I lost you there. From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 16:19:32 2008 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0808106566B; Tue, 4 Mar 2008 16:19:32 +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 708808FC13; Tue, 4 Mar 2008 16:19:32 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m24GI6hF071895; Tue, 4 Mar 2008 09:18:06 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 04 Mar 2008 09:18:34 -0700 (MST) Message-Id: <20080304.091834.201564687.imp@bsdimp.com> To: keramida@ceid.upatras.gr From: "M. Warner Losh" In-Reply-To: <20080304160006.GB95950@kobe.laptop> References: <20080304154542.GC61036@kobe.laptop> <20080304.085245.2040341894.imp@bsdimp.com> <20080304160006.GB95950@kobe.laptop> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: hackers@FreeBSD.org, rwatson@FreeBSD.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 16:19:32 -0000 In message: <20080304160006.GB95950@kobe.laptop> Giorgos Keramidas writes: : On 2008-03-04 08:52, "M. Warner Losh" wrote: : > In message: <20080304154542.GC61036@kobe.laptop> : > Giorgos Keramidas writes: : > : Nice! Thank you Robert. Can I copy parts of this and add them to the : > : autoconf glue I'm adding now? : > : : > : To test just cpp(1) stuff, autoconf supports AC_PREPROC_IFELSE() too, : > : which I used when I tried writing a check for __FBSDID(): : > : : > : AC_PREPROC_IFELSE( : > : [AC_LANG_PROGRAM([[#include : > : #ifndef __FBSDID : > : #error No __FBSDID definition. : > : #endif]])], : > : [AC_DEFINE([HAVE_FBSDID_MACRO], [1], : > : [Define to 1 if you have the __FBSDID macro.])]) : > : : > : I can probably improve a bit the queue.h check using what you wrote : > : above and AC_PREPROC_IFELSE(). : > : > The alternative to uglifying the make sources with #ifdefs would be to : > just always use the compat includes when building... No autoconf : > needed, and minimal changes to the base make, if any. : : True. I'll try to keep #ifdef changes down to the absolutely _minimum_ : amount of changes. It will make repeated merged from usr.bin/make much : easier, for example :) Lemme put together a package for all this and see how few ifdefs I can do it with... Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 16:25:52 2008 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E25591065679 for ; Tue, 4 Mar 2008 16:25:52 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-1.dlr.de (smtp-1.dlr.de [195.37.61.185]) by mx1.freebsd.org (Postfix) with ESMTP id 76D388FC14 for ; Tue, 4 Mar 2008 16:25:52 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from knop-beagle.kn.op.dlr.de ([129.247.173.6]) by smtp-1.dlr.de over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Tue, 4 Mar 2008 17:12:32 +0100 Date: Tue, 4 Mar 2008 17:12:34 +0100 (CET) From: Harti Brandt X-X-Sender: brandt_h@knop-beagle.kn.op.dlr.de To: "M. Warner Losh" In-Reply-To: <20080304.085245.2040341894.imp@bsdimp.com> Message-ID: <20080304170934.X893@knop-beagle.kn.op.dlr.de> References: <20080304.083350.1661915009.imp@bsdimp.com> <20080304153651.I41184@fledge.watson.org> <20080304154542.GC61036@kobe.laptop> <20080304.085245.2040341894.imp@bsdimp.com> X-OpenPGP-Key: harti@freebsd.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-OriginalArrivalTime: 04 Mar 2008 16:12:32.0886 (UTC) FILETIME=[8D84C960:01C87E12] Cc: keramida@ceid.upatras.gr, hackers@FreeBSD.org, rwatson@FreeBSD.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Harti Brandt List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 16:25:53 -0000 On Tue, 4 Mar 2008, M. Warner Losh wrote: MWL>In message: <20080304154542.GC61036@kobe.laptop> MWL> Giorgos Keramidas writes: MWL>: On 2008-03-04 15:38, Robert Watson wrote: MWL>: > On Tue, 4 Mar 2008, M. Warner Losh wrote: MWL>: > MWL>: >> : In most ports of FreeBSD parts to Linux that I've seen, the preferred solution MWL>: >> : has to been to bring the entire FreeBSD queue.h with you rather than relying MWL>: >> : on the native Linux queue.h. This is what we do for OpenBSM, for example; MWL>: >> : this also helps out when you get to Mac OS X, Solaris, etc, where all the MWL>: >> : queue.h's continue to vary in subtle ways. This depends a fair amount on a MWL>: >> : lack of header pollution in the OS's own include files, of course... MWL>: >> MWL>: >> I was rather hoping for something that could be used without any of that MWL>: >> nonsense... MWL>: > MWL>: > Sadly, nonsense seems to be the name of the game in software portability. MWL>: > Here's the broken autoconf garbage I use to pick out adequate queue.h's MWL>: > from inadequate ones: MWL>: > MWL>: > # sys/queue.h exists on most systems, but its capabilities vary a great deal. MWL>: > # test for LIST_FIRST and TAILQ_FOREACH_SAFE, which appears to not exist in MWL>: > # all of them, and are necessary for OpenBSM. MWL>: > AC_TRY_LINK([ MWL>: > #include MWL>: > ], [ MWL>: > MWL>: > #ifndef LIST_FIRST MWL>: > #error LIST_FIRST missing MWL>: > #endif MWL>: > #ifndef TAILQ_FOREACH_SAFE MWL>: > #error TAILQ_FOREACH_SAFE MWL>: > #endif MWL>: > ], [ MWL>: > AC_DEFINE(HAVE_FULL_QUEUE_H,, Define if queue.h includes LIST_FIRST) MWL>: > ]) MWL>: > MWL>: > Note that there are at least a couple of mostly stylistic bugs there (could MWL>: > use compile rather than link, definition description is poor, errors are MWL>: > inconsistent). :-) I found that on both Linux and Mac OS X, the queue.h's MWL>: > didn't have everything I wanted. MWL>: MWL>: Nice! Thank you Robert. Can I copy parts of this and add them to the MWL>: autoconf glue I'm adding now? MWL>: MWL>: To test just cpp(1) stuff, autoconf supports AC_PREPROC_IFELSE() too, MWL>: which I used when I tried writing a check for __FBSDID(): MWL>: MWL>: AC_PREPROC_IFELSE( MWL>: [AC_LANG_PROGRAM([[#include MWL>: #ifndef __FBSDID MWL>: #error No __FBSDID definition. MWL>: #endif]])], MWL>: [AC_DEFINE([HAVE_FBSDID_MACRO], [1], MWL>: [Define to 1 if you have the __FBSDID macro.])]) MWL>: MWL>: I can probably improve a bit the queue.h check using what you wrote MWL>: above and AC_PREPROC_IFELSE(). MWL> MWL>The alternative to uglifying the make sources with #ifdefs would be to MWL>just always use the compat includes when building... No autoconf MWL>needed, and minimal changes to the base make, if any. Yes, please, please don't put #ifdefs into make. It took months to get rid of the cruft that was there and to make it at least somewhat readable. A single compat.h or whatever header file plus, maybe a compat.c file should be sufficient. They can, of course, contain ifdefs. Just include compat.h in all make's c-files. harti From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 16:26:35 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 638601065672; Tue, 4 Mar 2008 16:26:35 +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 1039E8FC21; Tue, 4 Mar 2008 16:26:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m24GNbaX071971; Tue, 4 Mar 2008 09:23:37 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 04 Mar 2008 09:24:05 -0700 (MST) Message-Id: <20080304.092405.-491322594.imp@bsdimp.com> To: harti@freebsd.org, hartmut.brandt@dlr.de From: "M. Warner Losh" In-Reply-To: <20080304170934.X893@knop-beagle.kn.op.dlr.de> References: <20080304154542.GC61036@kobe.laptop> <20080304.085245.2040341894.imp@bsdimp.com> <20080304170934.X893@knop-beagle.kn.op.dlr.de> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: keramida@ceid.upatras.gr, hackers@freebsd.org, rwatson@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 16:26:35 -0000 In message: <20080304170934.X893@knop-beagle.kn.op.dlr.de> Harti Brandt writes: : On Tue, 4 Mar 2008, M. Warner Losh wrote: : : MWL>In message: <20080304154542.GC61036@kobe.laptop> : MWL> Giorgos Keramidas writes: : MWL>: On 2008-03-04 15:38, Robert Watson wrote: : MWL>: > On Tue, 4 Mar 2008, M. Warner Losh wrote: : MWL>: > : MWL>: >> : In most ports of FreeBSD parts to Linux that I've seen, the preferred solution : MWL>: >> : has to been to bring the entire FreeBSD queue.h with you rather than relying : MWL>: >> : on the native Linux queue.h. This is what we do for OpenBSM, for example; : MWL>: >> : this also helps out when you get to Mac OS X, Solaris, etc, where all the : MWL>: >> : queue.h's continue to vary in subtle ways. This depends a fair amount on a : MWL>: >> : lack of header pollution in the OS's own include files, of course... : MWL>: >> : MWL>: >> I was rather hoping for something that could be used without any of that : MWL>: >> nonsense... : MWL>: > : MWL>: > Sadly, nonsense seems to be the name of the game in software portability. : MWL>: > Here's the broken autoconf garbage I use to pick out adequate queue.h's : MWL>: > from inadequate ones: : MWL>: > : MWL>: > # sys/queue.h exists on most systems, but its capabilities vary a great deal. : MWL>: > # test for LIST_FIRST and TAILQ_FOREACH_SAFE, which appears to not exist in : MWL>: > # all of them, and are necessary for OpenBSM. : MWL>: > AC_TRY_LINK([ : MWL>: > #include : MWL>: > ], [ : MWL>: > : MWL>: > #ifndef LIST_FIRST : MWL>: > #error LIST_FIRST missing : MWL>: > #endif : MWL>: > #ifndef TAILQ_FOREACH_SAFE : MWL>: > #error TAILQ_FOREACH_SAFE : MWL>: > #endif : MWL>: > ], [ : MWL>: > AC_DEFINE(HAVE_FULL_QUEUE_H,, Define if queue.h includes LIST_FIRST) : MWL>: > ]) : MWL>: > : MWL>: > Note that there are at least a couple of mostly stylistic bugs there (could : MWL>: > use compile rather than link, definition description is poor, errors are : MWL>: > inconsistent). :-) I found that on both Linux and Mac OS X, the queue.h's : MWL>: > didn't have everything I wanted. : MWL>: : MWL>: Nice! Thank you Robert. Can I copy parts of this and add them to the : MWL>: autoconf glue I'm adding now? : MWL>: : MWL>: To test just cpp(1) stuff, autoconf supports AC_PREPROC_IFELSE() too, : MWL>: which I used when I tried writing a check for __FBSDID(): : MWL>: : MWL>: AC_PREPROC_IFELSE( : MWL>: [AC_LANG_PROGRAM([[#include : MWL>: #ifndef __FBSDID : MWL>: #error No __FBSDID definition. : MWL>: #endif]])], : MWL>: [AC_DEFINE([HAVE_FBSDID_MACRO], [1], : MWL>: [Define to 1 if you have the __FBSDID macro.])]) : MWL>: : MWL>: I can probably improve a bit the queue.h check using what you wrote : MWL>: above and AC_PREPROC_IFELSE(). : MWL> : MWL>The alternative to uglifying the make sources with #ifdefs would be to : MWL>just always use the compat includes when building... No autoconf : MWL>needed, and minimal changes to the base make, if any. : : Yes, please, please don't put #ifdefs into make. It took months to get rid : of the cruft that was there and to make it at least somewhat readable. A : single compat.h or whatever header file plus, maybe a compat.c file should : be sufficient. They can, of course, contain ifdefs. Just include compat.h : in all make's c-files. So far I've seen a need only for one ifdef for the pc98 hack. The rest can be papered over with compat files. Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 17:38:19 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D362106567B for ; Tue, 4 Mar 2008 17:38:19 +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 136AE8FC16 for ; Tue, 4 Mar 2008 17:38:18 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m24HcI4S091023 for ; Tue, 4 Mar 2008 09:38:18 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.1/Submit) id m24HcIwl091022 for freebsd-hackers@freebsd.org; Tue, 4 Mar 2008 09:38:18 -0800 (PST) (envelope-from obrien) Date: Tue, 4 Mar 2008 09:38:18 -0800 From: "David O'Brien" To: freebsd-hackers@freebsd.org Message-ID: <20080304173818.GA90931@dragon.NUXI.org> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20080303.224256.635730757.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080303.224256.635730757.imp@bsdimp.com> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 17:38:19 -0000 On Mon, Mar 03, 2008 at 10:42:56PM -0700, M. Warner Losh wrote: > here's a set of diffs that will allow FreeBSD's usr.bin/make to build > on Linux. I'm sure they are gross, and I don't plan to commit them > (at least not all of them), but I thought I'd post them here to see > what people think. Take a look at ftp://ftp.netbsd.org/pub/NetBSD/misc/sjg/bmake-20080215.tar.gz (a portable NetBSD make) there are probably ideas in there for a portable fbsdmake. I dare say you could just grab the autoconf bits from there (with a little modification) and avoid having to learn autoconf/automake. -- -- David (obrien@FreeBSD.org) Q: Because it reverses the logical flow of conversation. A: Why is top-posting (putting a reply at the top of the message) frowned upon? Let's not play "Jeopardy-style quoting" From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 17:40:47 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8D29106566C for ; Tue, 4 Mar 2008 17:40:47 +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 BBAEA8FC20 for ; Tue, 4 Mar 2008 17:40:47 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m24Hej4O091062; Tue, 4 Mar 2008 09:40:45 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.1/Submit) id m24HejUk091061; Tue, 4 Mar 2008 09:40:45 -0800 (PST) (envelope-from obrien) Date: Tue, 4 Mar 2008 09:40:45 -0800 From: "David O'Brien" To: Rink Springer Message-ID: <20080304174045.GB90931@dragon.NUXI.org> Mail-Followup-To: freebsd-hackers@freebsd.org, Rink Springer , Giorgos Keramidas References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> <20080304081730.GA90914@kobe.laptop> <20080304095815.GD72911@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304095815.GD72911@rink.nu> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Giorgos Keramidas , freebsd-hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 17:40:47 -0000 On Tue, Mar 04, 2008 at 10:58:15AM +0100, Rink Springer wrote: > On Tue, Mar 04, 2008 at 10:17:30AM +0200, Giorgos Keramidas wrote: > > Solaris lacks TAILQ_xxx stuff too, so I would prefer something like > > "bsdcompat.h" or similar. > > Seconded - "linux.h" is far too generic. I must say I like the idea > of being able to build *BSD on Linux machines! Why? What are you going to do with it? Presumable install it somewhere, where? Will the differences in the end result of what is built worth the risk, vs. installing VMware player and building FreeBSD on FreeBSD on Linux? -- -- David (obrien@FreeBSD.org) Q: Because it reverses the logical flow of conversation. A: Why is top-posting (putting a reply at the top of the message) frowned upon? Let's not play "Jeopardy-style quoting" From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 17:52:45 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DD60106567A; Tue, 4 Mar 2008 17:52:45 +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 676F08FC1C; Tue, 4 Mar 2008 17:52:45 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m24HqjRi091403; Tue, 4 Mar 2008 09:52:45 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.1/Submit) id m24Hqjdq091402; Tue, 4 Mar 2008 09:52:45 -0800 (PST) (envelope-from obrien) Date: Tue, 4 Mar 2008 09:52:45 -0800 From: "David O'Brien" To: Robert Watson Message-ID: <20080304175245.GC90931@dragon.NUXI.org> Mail-Followup-To: freebsd-hackers@freebsd.org, Robert Watson References: <20080303.224256.635730757.imp@bsdimp.com> <20080304151326.J41184@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304151326.J41184@fledge.watson.org> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-hackers@FreeBSD.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 17:52:45 -0000 On Tue, Mar 04, 2008 at 03:15:32PM +0000, Robert Watson wrote: > In most ports of FreeBSD parts to Linux that I've seen, the preferred > solution has to been to bring the entire FreeBSD queue.h with you > rather than relying on the native Linux queue.h. This is what we do > for OpenBSM, for example; this also helps out when you get to Mac OS X, We should stand back and divide the goal of building FreeBSD on MacOS X, Solaris, and Linux this into two topics: 1. How to get a suitable set of build tools. This is everything FreeBSD's src/Makefile.inc calls bootstrap, build, and cross tools. This will 90% require scripts and duplicated (but portable) sources in the projects CVS repository, with distfiles on ftp.freebsd.org. These scripts and bootstrap tools should be able to depend on a checked out FreeBSD src/ tree to reach over into. We would probably need to trim less of our GNU tools in src/contrib when we import them. 2. Given a suitable set of tools (probably in the number of 20), built and installed on your MacOS X, Solaris, or Linux hosts - how do we now build FreeBSD. This is not the 'buildworld' or 'buildkernel' targets. Those targets are explicitly designed to build FreeBSD on a FreeBSD system. Those builds create bootstrap, build, and cross tools that we've covered in #1. I'm not sure how many folks know that this works (on FreeBSD): cd /usr/src make buildworld installworld make clean make that is, a simple 'make' does build everything. Why was the buildworld target created? Because if your installed system does not 100% match your sources, you're doing a "cross build". Presumably we'd have to create a suitable target (say 'nonhosted-cross') that sets up CC, AR, etc... macros to use the tools from #1. DISTDIR would also need to be set. This target would do something like: make includes # this builds and installs make libaries # I don't recall if this includes installing make installlibaries make all make install -- -- David (obrien@FreeBSD.org) Q: Because it reverses the logical flow of conversation. A: Why is top-posting (putting a reply at the top of the message) frowned upon? Let's not play "Jeopardy-style quoting" From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 17:56:34 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52B0C1065671 for ; Tue, 4 Mar 2008 17:56:34 +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 36C3E8FC22 for ; Tue, 4 Mar 2008 17:56:33 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m24HuVgs091488; Tue, 4 Mar 2008 09:56:31 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.1/Submit) id m24HuVGt091487; Tue, 4 Mar 2008 09:56:31 -0800 (PST) (envelope-from obrien) Date: Tue, 4 Mar 2008 09:56:31 -0800 From: "David O'Brien" To: Giorgos Keramidas Message-ID: <20080304175631.GD90931@dragon.NUXI.org> Mail-Followup-To: freebsd-hackers@freebsd.org, Giorgos Keramidas References: <20080303.224256.635730757.imp@bsdimp.com> <20080304151326.J41184@fledge.watson.org> <20080304.083350.1661915009.imp@bsdimp.com> <20080304153651.I41184@fledge.watson.org> <20080304154542.GC61036@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304154542.GC61036@kobe.laptop> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 17:56:34 -0000 On Tue, Mar 04, 2008 at 05:45:43PM +0200, Giorgos Keramidas wrote: > To test just cpp(1) stuff, autoconf supports AC_PREPROC_IFELSE() too, > which I used when I tried writing a check for __FBSDID(): Why are you writing a check for __FBSDID? Our sources so assume it that IMnoHO you just need to provide it. See missing/sys/cdefs.h in ftp://ftp.netbsd.org/pub/NetBSD/misc/sjg/bmake-20080215.tar.gz -- -- David (obrien@FreeBSD.org) Q: Because it reverses the logical flow of conversation. A: Why is top-posting (putting a reply at the top of the message) frowned upon? Let's not play "Jeopardy-style quoting" From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 17:58:17 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC45D1065670 for ; Tue, 4 Mar 2008 17:58:17 +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 A978C8FC2D for ; Tue, 4 Mar 2008 17:58:17 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m24HwAbk091504; Tue, 4 Mar 2008 09:58:10 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.1/Submit) id m24HwAXb091503; Tue, 4 Mar 2008 09:58:10 -0800 (PST) (envelope-from obrien) Date: Tue, 4 Mar 2008 09:58:10 -0800 From: "David O'Brien" To: "M. Warner Losh" Message-ID: <20080304175810.GE90931@dragon.NUXI.org> Mail-Followup-To: obrien@freebsd.org, "M. Warner Losh" , hackers@freebsd.org References: <20080303.224256.635730757.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080303.224256.635730757.imp@bsdimp.com> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 17:58:18 -0000 On Mon, Mar 03, 2008 at 10:42:56PM -0700, M. Warner Losh wrote: > #include "arch.h" > +#include "config.h" Are you able to use "CFLAGS+= -include config.h" instead? If so, that would mean less .[ch] changes. From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 18:01:48 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECC28106566B for ; Tue, 4 Mar 2008 18:01:48 +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 D14EF8FC20 for ; Tue, 4 Mar 2008 18:01:48 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m24I1kkg091657; Tue, 4 Mar 2008 10:01:46 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.1/Submit) id m24I1kNO091656; Tue, 4 Mar 2008 10:01:46 -0800 (PST) (envelope-from obrien) Date: Tue, 4 Mar 2008 10:01:46 -0800 From: "David O'Brien" To: Giorgos Keramidas Message-ID: <20080304180146.GF90931@dragon.NUXI.org> Mail-Followup-To: freebsd-hackers@freebsd.org, Giorgos Keramidas References: <20080303.224256.635730757.imp@bsdimp.com> <20080304151326.J41184@fledge.watson.org> <20080304153730.GA61036@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304153730.GA61036@kobe.laptop> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 18:01:49 -0000 On Tue, Mar 04, 2008 at 05:37:30PM +0200, Giorgos Keramidas wrote: > The next part, about the missing errx() functions on Solaris is going to > be tonight's fun. If there are too many missing functions, it may be > worth adding a static `libcompat' with copies of just the functions we > need to run BSD make on non-BSD hosts. fbsdmake will be just one of many tools you'll find you need. A libfbsdcompat would be useful to this endevor. If I were you, I would try to create one using FreeBSD src/ - that is assume a checked out FreeBSD is available. See some of my sed'ing and unifdef*(1) hacks I've used over the years to build GNU stuff on FreeBSD. -- -- David (obrien@FreeBSD.org) Q: Because it reverses the logical flow of conversation. A: Why is top-posting (putting a reply at the top of the message) frowned upon? Let's not play "Jeopardy-style quoting" From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 18:04:29 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BECAD106566B; Tue, 4 Mar 2008 18:04:29 +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 699128FC17; Tue, 4 Mar 2008 18:04:29 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m24I3cpm073088; Tue, 4 Mar 2008 11:03:39 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 04 Mar 2008 11:04:07 -0700 (MST) Message-Id: <20080304.110407.1655406638.imp@bsdimp.com> To: obrien@freebsd.org From: "M. Warner Losh" In-Reply-To: <20080304175810.GE90931@dragon.NUXI.org> References: <20080303.224256.635730757.imp@bsdimp.com> <20080304175810.GE90931@dragon.NUXI.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 18:04:29 -0000 In message: <20080304175810.GE90931@dragon.NUXI.org> "David O'Brien" writes: : On Mon, Mar 03, 2008 at 10:42:56PM -0700, M. Warner Losh wrote: : > #include "arch.h" : > +#include "config.h" : : Are you able to use "CFLAGS+= -include config.h" instead? : If so, that would mean less .[ch] changes. It turns out that there's an even easier way to do this. If I just package a custom err.h with the stock cdefs.h and queue.h, I can avoid almost all the other changes. I'm working on testing that scenario right now. But that is a good point... Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 18:08:54 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DCEAA106566B for ; Tue, 4 Mar 2008 18:08:54 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 535D28FC1E for ; Tue, 4 Mar 2008 18:08:54 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=128) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id m24I8XNO012647 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 4 Mar 2008 20:08:44 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m24I8Smv070596 for ; Tue, 4 Mar 2008 20:08:28 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m24I8S1w070595 for freebsd-hackers@freebsd.org; Tue, 4 Mar 2008 20:08:28 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 4 Mar 2008 20:08:27 +0200 From: Giorgos Keramidas To: freebsd-hackers@freebsd.org Message-ID: <20080304180827.GA70573@kobe.laptop> References: <20080303.224256.635730757.imp@bsdimp.com> <20080304151326.J41184@fledge.watson.org> <20080304.083350.1661915009.imp@bsdimp.com> <20080304153651.I41184@fledge.watson.org> <20080304154542.GC61036@kobe.laptop> <20080304175631.GD90931@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304175631.GD90931@dragon.NUXI.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.976, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.42, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 18:08:55 -0000 On 2008-03-04 09:56, David O'Brien wrote: > On Tue, Mar 04, 2008 at 05:45:43PM +0200, Giorgos Keramidas wrote: > > To test just cpp(1) stuff, autoconf supports AC_PREPROC_IFELSE() too, > > which I used when I tried writing a check for __FBSDID(): > > Why are you writing a check for __FBSDID? After the discussion with Warner about our cdefs.h we don't need a check. I'll revert the change tonight, and use our own sys/cdefs.h and sys/queue.h :) > Our sources so assume it that IMnoHO you just need to provide it. See > missing/sys/cdefs.h in > ftp://ftp.netbsd.org/pub/NetBSD/misc/sjg/bmake-20080215.tar.gz Thanks! That's precisely the version I had downloaded last night, and plan to study later today :) From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 18:42:57 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C73F5106566B for ; Tue, 4 Mar 2008 18:42:57 +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 AC2F18FC2A for ; Tue, 4 Mar 2008 18:42:57 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m24IgvnI092749 for ; Tue, 4 Mar 2008 10:42:57 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.1/Submit) id m24IgvT6092748 for freebsd-hackers@freebsd.org; Tue, 4 Mar 2008 10:42:57 -0800 (PST) (envelope-from obrien) Date: Tue, 4 Mar 2008 10:42:57 -0800 From: "David O'Brien" To: freebsd-hackers@freebsd.org Message-ID: <20080304184257.GA91852@dragon.NUXI.org> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20080303.224256.635730757.imp@bsdimp.com> <20080304175810.GE90931@dragon.NUXI.org> <20080304.110407.1655406638.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304.110407.1655406638.imp@bsdimp.com> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 18:42:57 -0000 On Tue, Mar 04, 2008 at 11:04:07AM -0700, M. Warner Losh wrote: > In message: <20080304175810.GE90931@dragon.NUXI.org> > "David O'Brien" writes: > : On Mon, Mar 03, 2008 at 10:42:56PM -0700, M. Warner Losh wrote: > : > #include "arch.h" > : > +#include "config.h" > : > : Are you able to use "CFLAGS+= -include config.h" instead? > : If so, that would mean less .[ch] changes. There is also -imacros Exactly like -include, except that any output produced by scanning file is thrown away. Macros it defines remain defined. This allows you to acquire all the macros from a header without also processing its declarations. that may be useful if you run into other problems. http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Preprocessor-Options.html#Preprocessor-Options lists other options that may be used for tricks in building. -- -- David (obrien@FreeBSD.org) Q: Because it reverses the logical flow of conversation. A: Why is top-posting (putting a reply at the top of the message) frowned upon? Let's not play "Jeopardy-style quoting" From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 19:46:52 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B1B9106566B for ; Tue, 4 Mar 2008 19:46:52 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id D6E628FC19 for ; Tue, 4 Mar 2008 19:46:51 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=128) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id m24Jdlno018677 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 4 Mar 2008 21:39:59 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m24Jdg3M001981 for ; Tue, 4 Mar 2008 21:39:42 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m24JdgA3001980 for freebsd-hackers@freebsd.org; Tue, 4 Mar 2008 21:39:42 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 4 Mar 2008 21:39:42 +0200 From: Giorgos Keramidas To: freebsd-hackers@freebsd.org Message-ID: <20080304193942.GB1947@kobe.laptop> References: <20080303.224256.635730757.imp@bsdimp.com> <20080304151326.J41184@fledge.watson.org> <20080304153730.GA61036@kobe.laptop> <20080304180146.GF90931@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304180146.GF90931@dragon.NUXI.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.976, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.42, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 19:46:52 -0000 On 2008-03-04 10:01, David O'Brien wrote: > On Tue, Mar 04, 2008 at 05:37:30PM +0200, Giorgos Keramidas wrote: > > The next part, about the missing errx() functions on Solaris is going to > > be tonight's fun. If there are too many missing functions, it may be > > worth adding a static `libcompat' with copies of just the functions we > > need to run BSD make on non-BSD hosts. > > fbsdmake will be just one of many tools you'll find you need. A > libfbsdcompat would be useful to this endevor. If I were you, I would > try to create one using FreeBSD src/ - that is assume a checked out > FreeBSD is available. See some of my sed'ing and unifdef*(1) hacks I've > used over the years to build GNU stuff on FreeBSD. A libfbsdcompat seems like one of the best options to keep the source code changes down to a tolerable level, indeed. Thanks for all the _very_ useful input so far, David :) From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 19:48:41 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 516B6106566B; Tue, 4 Mar 2008 19:48:41 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id A2DA78FC16; Tue, 4 Mar 2008 19:48:40 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=128) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id m24JcVHO018585 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 4 Mar 2008 21:38:42 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.2/8.14.2) with ESMTP id m24JcPgL001972; Tue, 4 Mar 2008 21:38:25 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.2/8.14.2/Submit) id m24JcPN0001971; Tue, 4 Mar 2008 21:38:25 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 4 Mar 2008 21:38:25 +0200 From: Giorgos Keramidas To: obrien@freebsd.org, "M. Warner Losh" , hackers@freebsd.org Message-ID: <20080304193825.GA1947@kobe.laptop> References: <20080303.224256.635730757.imp@bsdimp.com> <20080304175810.GE90931@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304175810.GE90931@dragon.NUXI.org> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.976, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.42, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 19:48:41 -0000 On 2008-03-04 09:58, David O'Brien wrote: >On Mon, Mar 03, 2008 at 10:42:56PM -0700, M. Warner Losh wrote: >> #include "arch.h" >> +#include "config.h" > > Are you able to use "CFLAGS+= -include config.h" instead? > If so, that would mean less .[ch] changes. Not with Sun Studio compilers on Solaris. There's a fair amount of things that can be done without _any_ source code change at all, but there's also a limit to what can be done. My $dayjob includes maintaining programs on Solaris, which built with Studio compilers, so I've already bumped against things like this :( From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 20:05:18 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B48011065674 for ; Tue, 4 Mar 2008 20:05:18 +0000 (UTC) (envelope-from SRS0+fba8d5d6a16a8717fea7+1654+infradead.org+hch@bombadil.srs.infradead.org) Received: from bombadil.infradead.org (unknown [IPv6:2001:4830:2446:ff00:214:51ff:fe65:c65c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A8178FC20 for ; Tue, 4 Mar 2008 20:05:18 +0000 (UTC) (envelope-from SRS0+fba8d5d6a16a8717fea7+1654+infradead.org+hch@bombadil.srs.infradead.org) Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1JWdNd-0004od-5p; Tue, 04 Mar 2008 20:04:53 +0000 Date: Tue, 4 Mar 2008 15:04:53 -0500 From: Christoph Hellwig To: "M. Warner Losh" Message-ID: <20080304200453.GA10987@infradead.org> References: <20080303.224256.635730757.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080303.224256.635730757.imp@bsdimp.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Cc: hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 20:05:18 -0000 On Mon, Mar 03, 2008 at 10:42:56PM -0700, M. Warner Losh wrote: > +#ifndef TAILQ_HEAD_INITIALIZER > +#define TAILQ_HEAD_INITIALIZER(head) { NULL, &(head).tqh_first } > +#endif > + > +#ifndef TAILQ_FOREACH > +#define TAILQ_FOREACH(var, head, field) \ > + for ((var) = TAILQ_FIRST((head)); \ > + (var); \ > + (var) = TAILQ_NEXT((var), field)) > +#endif ... I think you might be better off with a shadow include/ directory that provides a current sys/queue.h on Linux which is what quite a few other packages do. I've tried updating the on in glibc a few years ago but the maintainer refused to take it. From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 20:42:48 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 543D91065673 for ; Tue, 4 Mar 2008 20:42:48 +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 393B98FC25 for ; Tue, 4 Mar 2008 20:42:48 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m24KgjWw095841; Tue, 4 Mar 2008 12:42:45 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.1/Submit) id m24KgiE8095840; Tue, 4 Mar 2008 12:42:44 -0800 (PST) (envelope-from obrien) Date: Tue, 4 Mar 2008 12:42:44 -0800 From: "David O'Brien" To: Giorgos Keramidas Message-ID: <20080304204244.GA95761@dragon.NUXI.org> Mail-Followup-To: freebsd-alpha@freebsd.org, Giorgos Keramidas , freebsd-hackers@freebsd.org References: <20080303.224256.635730757.imp@bsdimp.com> <20080304175810.GE90931@dragon.NUXI.org> <20080304193825.GA1947@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304193825.GA1947@kobe.laptop> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-alpha@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 20:42:48 -0000 On Tue, Mar 04, 2008 at 09:38:25PM +0200, Giorgos Keramidas wrote: > On 2008-03-04 09:58, David O'Brien wrote: > >On Mon, Mar 03, 2008 at 10:42:56PM -0700, M. Warner Losh wrote: > >> #include "arch.h" > >> +#include "config.h" > > > > Are you able to use "CFLAGS+= -include config.h" instead? > > If so, that would mean less .[ch] changes. > > Not with Sun Studio compilers on Solaris. You know... I really don't think you're going to get very far in your overall goal of building FreeBSD on Solaris if you insist on both Solaris and Sun Studio. GCC is bundled in Solaris 10, so you know its there. I don't think the performance differences between the SUNWspro compiler and GCC will matter to your fbsdmake performance. > There's a fair amount of things that can be done without _any_ source > code change at all, but there's also a limit to what can be done. Sun bought VirtualBox - it runs on Solaris you know... -- -- David (obrien@FreeBSD.org) Q: Because it reverses the logical flow of conversation. A: Why is top-posting (putting a reply at the top of the message) frowned upon? Let's not play "Jeopardy-style quoting" From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 20:44:05 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66DB4106566C for ; Tue, 4 Mar 2008 20:44:05 +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 4CBF98FC16 for ; Tue, 4 Mar 2008 20:44:05 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m24Ki3LH095884; Tue, 4 Mar 2008 12:44:03 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.1/Submit) id m24Ki3Xn095883; Tue, 4 Mar 2008 12:44:03 -0800 (PST) (envelope-from obrien) Date: Tue, 4 Mar 2008 12:44:03 -0800 From: "David O'Brien" To: Giorgos Keramidas Message-ID: <20080304204403.GB95761@dragon.NUXI.org> Mail-Followup-To: hackers@freebsd.org, Giorgos Keramidas References: <20080303.224256.635730757.imp@bsdimp.com> <20080304175810.GE90931@dragon.NUXI.org> <20080304193825.GA1947@kobe.laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080304193825.GA1947@kobe.laptop> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: hackers@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 20:44:05 -0000 [ DO NOT REPLY TO MY PREVIOUS MESSAGE WITH THESE SAME CONTENTS I GOOFED AND SET REPLY-TO freebsd-alpha !! ] On Tue, Mar 04, 2008 at 09:38:25PM +0200, Giorgos Keramidas wrote: > On 2008-03-04 09:58, David O'Brien wrote: > >On Mon, Mar 03, 2008 at 10:42:56PM -0700, M. Warner Losh wrote: > >> #include "arch.h" > >> +#include "config.h" > > > > Are you able to use "CFLAGS+= -include config.h" instead? > > If so, that would mean less .[ch] changes. > > Not with Sun Studio compilers on Solaris. You know... I really don't think you're going to get very far in your overall goal of building FreeBSD on Solaris if you insist on both Solaris and Sun Studio. GCC is bundled in Solaris 10, so you know its there. I don't think the performance differences between the SUNWspro compiler and GCC will matter to your fbsdmake performance. > There's a fair amount of things that can be done without _any_ source > code change at all, but there's also a limit to what can be done. Sun bought VirtualBox - it runs on Solaris you know... -- -- David (obrien@FreeBSD.org) Q: Because it reverses the logical flow of conversation. A: Why is top-posting (putting a reply at the top of the message) frowned upon? Let's not play "Jeopardy-style quoting" From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 20:58:09 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7FCF1065671 for ; Tue, 4 Mar 2008 20:58:09 +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 A60428FC12 for ; Tue, 4 Mar 2008 20:58:09 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m24KuaQv075077; Tue, 4 Mar 2008 13:56:36 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 04 Mar 2008 13:57:05 -0700 (MST) Message-Id: <20080304.135705.1179136136.imp@bsdimp.com> To: hch@infradead.org From: "M. Warner Losh" In-Reply-To: <20080304200453.GA10987@infradead.org> References: <20080303.224256.635730757.imp@bsdimp.com> <20080304200453.GA10987@infradead.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 20:58:10 -0000 In message: <20080304200453.GA10987@infradead.org> Christoph Hellwig writes: : On Mon, Mar 03, 2008 at 10:42:56PM -0700, M. Warner Losh wrote: : > +#ifndef TAILQ_HEAD_INITIALIZER : > +#define TAILQ_HEAD_INITIALIZER(head) { NULL, &(head).tqh_first } : > +#endif : > + : > +#ifndef TAILQ_FOREACH : > +#define TAILQ_FOREACH(var, head, field) \ : > + for ((var) = TAILQ_FIRST((head)); \ : > + (var); \ : > + (var) = TAILQ_NEXT((var), field)) : > +#endif : : ... : : I think you might be better off with a shadow include/ directory : that provides a current sys/queue.h on Linux which is what quite a few : other packages do. I've tried updating the on in glibc a few years ago : but the maintainer refused to take it. OK. I think I'll go this route because doing so I have even fewer changes necessary. btw, did he give a reason? Warner From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 21:20:46 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE6931065672 for ; Tue, 4 Mar 2008 21:20:46 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outC.internet-mail-service.net (outC.internet-mail-service.net [216.240.47.226]) by mx1.freebsd.org (Postfix) with ESMTP id BA3EB8FC1F for ; Tue, 4 Mar 2008 21:20:46 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Tue, 04 Mar 2008 13:20:46 -0800 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id C8E1C2D6023; Tue, 4 Mar 2008 13:20:45 -0800 (PST) Message-ID: <47CDBD2D.3010103@elischer.org> Date: Tue, 04 Mar 2008 13:20:45 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Robert Watson References: <200803022218.32873.cneirabustos@gmail.com> <20080303081021.GC80576@hoeg.nl> <47CC6E7D.10707@elischer.org> <20080304150904.R41184@fledge.watson.org> In-Reply-To: <20080304150904.R41184@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Ivan Voras Subject: Re: readahead(2) - Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 21:20:46 -0000 Robert Watson wrote: > On Mon, 3 Mar 2008, Julian Elischer wrote: > >> Ivan Voras wrote: >> >> the aim is to load it into system memory but not copy anything into >> user memory. > > In an ideal world (tm), a prefetch system call doesn't actually force > the I/O to happen, it just hints that if it did happen, life would then > be better. Then, in said ideal world (tm), the VM system can juggle > investing pages in memory and I/O capacity in heuristic read-ahead, > prefetch hints from the application, anonymously process memory, and > buffer cache, based on what is most effective for particular > applications or workloads. Last time I read up on I/O prefetching > literature, it was considered quite difficult to place prefetch calls in > applications in a useful way, and that normal heuristic read-ahead, > which we already support, actually caught a high percentage of real > application cases since applications do tend to order and store data > usefully in files. For certain applications, though, that doesn't help > much, and there isn't a way to tune "up" read-ahead prefetching, so it > could be we're no longer doing as good a job. The assumption is that the application has a clue as to what it wil need in the near future and is explicitly hinting to the kernel to queue it for reading. The equivalent would be to do something like an madvise on a mmapped version of the file assuming that madvise can ask for a page to be faulted in without blocking for it.. The key is that the process must not block when issuing the request, as it doesn't want to wait for the data. From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 21:47:29 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9EB541065671 for ; Tue, 4 Mar 2008 21:47:29 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73]) by mx1.freebsd.org (Postfix) with ESMTP id 4F2928FC28 for ; Tue, 4 Mar 2008 21:47:29 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from [213.142.182.66] (helo=gahrtop.localhost) by cpanel03.rubas-s03.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1JWeyu-0000Pk-En for freebsd-hackers@freebsd.org; Tue, 04 Mar 2008 22:47:28 +0100 Message-ID: <47CDC37B.5010405@FreeBSD.org> Date: Tue, 04 Mar 2008 22:47:39 +0100 From: Pietro Cerutti Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.12 (X11/20080229) MIME-Version: 1.0 To: FreeBSD Hackers X-Enigmail-Version: 0.95.5 OpenPGP: id=9571F78E; url=http://gahr.ch/pgp/ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel03.rubas-s03.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - FreeBSD.org X-Source: X-Source-Args: X-Source-Dir: Subject: wpi -- periodic disconnections X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 21:47:29 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Hi list, I can't get my if_wpi (Intel(R) PRO/Wireless 3945ABG) stay connected to my WPA-enabled access point for more than a few hours. Moreover, when it happens, I have to unload the module, reload it and restart wpa_supplicant in order to reconnect to the network. Any ideas? This is what appears on the console just before the link dies + when I try to reconnect without unloading/reloading the module: Michael MIC failure wireless event: keyix=0 src_addr=00:1a:70:47:cc:5c Michael MIC failure detected WPA: Sending EAPOL-Key Request (error=1 pairwise=1 ptk_set=1 len=99) Michael MIC failure wireless event: keyix=0 src_addr=00:1a:70:47:cc:5c Michael MIC failure detected WPA: Sending EAPOL-Key Request (error=1 pairwise=1 ptk_set=1 len=99) TKIP countermeasures started wpa_driver_bsd_set_countermeasures: enabled=1 State: COMPLETED -> DISCONNECTED wpa_driver_bsd_deauthenticate wpa_driver_bsd_del_key: keyidx=0 wpa_driver_bsd_del_key: keyidx=1 wpa_driver_bsd_del_key: keyidx=2 wpa_driver_bsd_del_key: keyidx=3 wpa_driver_bsd_del_key: addr=00:1a:70:47:cc:5c keyidx=0 ioctl[SIOCS80211, op 20, len 7]: Can't assign requested address EAPOL: External notification - portEnabled=0 EAPOL: SUPP_PAE entering state DISCONNECTED EAPOL: SUPP_BE entering state INITIALIZE EAPOL: External notification - portValid=0 Added BSSID 00:1a:70:47:cc:5c into blacklist CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys wpa_driver_bsd_del_key: keyidx=0 wpa_driver_bsd_del_key: keyidx=1 wpa_driver_bsd_del_key: keyidx=2 wpa_driver_bsd_del_key: keyidx=3 wpa_driver_bsd_del_key: addr=00:1a:70:47:cc:5c keyidx=0 ioctl[SIOCS80211, op 20, len 7]: Can't assign requested address State: DISCONNECTED -> DISCONNECTED EAPOL: External notification - portEnabled=0 EAPOL: External notification - portValid=0 EAPOL: External notification - EAP success=0 RTM_IFINFO: Interface 'wpi0' DOWN Configured interface was removed. State: DISCONNECTED -> DISCONNECTED EAPOL: External notification - portEnabled=0 EAPOL: External notification - portValid=0 EAPOL: External notification - EAP success=0 Removing interface wpi0 State: DISCONNECTED -> DISCONNECTED No keys have been configured - skip key clearing EAPOL: External notification - portEnabled=0 EAPOL: External notification - portValid=0 wpa_driver_bsd_set_wpa: enabled=0 wpa_driver_bsd_set_wpa_internal: wpa=0 privacy=0 ioctl[SIOCS80211, op 22, len 0]: Device not configured ioctl[SIOCS80211, op 17, arg 0x0]: Device not configured ioctl[SIOCS80211, op 26, arg 0x0]: Device not configured Failed to disable WPA in the driver. wpa_driver_bsd_set_drop_unencrypted: enabled=0 ioctl[SIOCS80211, op 18, arg 0x0]: Device not configured wpa_driver_bsd_set_countermeasures: enabled=0 ioctl[SIOCS80211, op 25, arg 0x0]: Device not configured No keys have been configured - skip key clearing Removed BSSID 00:1a:70:47:cc:5c from blacklist (clear) Cancelling scan request Cancelling authentication timeout SIOCGIFFLAGS: Device not configured wpa_driver_bsd_set_wpa_internal: wpa=0 privacy=0 ioctl[SIOCS80211, op 22, len 0]: Device not configured ioctl[SIOCS80211, op 17, arg 0x0]: Device not configured ioctl[SIOCS80211, op 26, arg 0x0]: Device not configured ioctl[SIOCS80211, op 16, arg 0x1]: Device not configured wpa_driver_bsd_deinit: failed to restore roaming state Thanks! - -- Pietro Cerutti gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEAREKAAYFAkfNw3sACgkQwMJqmJVx944RGACffVjytilk4LmDVwuewrqQfV0c huMAn1foOlzNMzNSGG/RJm0/UsEdDRmN =CtSh -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 22:52:44 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D0D81065674; Tue, 4 Mar 2008 22:52:44 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from heff.fud.org.nz (203-109-251-39.static.bliink.ihug.co.nz [203.109.251.39]) by mx1.freebsd.org (Postfix) with ESMTP id CF4D48FC22; Tue, 4 Mar 2008 22:52:43 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from heff.fud.org.nz (localhost [127.0.0.1]) by heff.fud.org.nz (Postfix) with ESMTP id A7D868837; Wed, 5 Mar 2008 11:38:54 +1300 (NZDT) Received: (from thompsa@localhost) by heff.fud.org.nz (8.14.2/8.14.2/Submit) id m24Mcs9v047839; Wed, 5 Mar 2008 11:38:54 +1300 (NZDT) (envelope-from thompsa@FreeBSD.org) X-Authentication-Warning: heff.fud.org.nz: thompsa set sender to thompsa@FreeBSD.org using -f Date: Wed, 5 Mar 2008 11:38:54 +1300 From: Andrew Thompson To: Pietro Cerutti Message-ID: <20080304223854.GB34712@heff.fud.org.nz> References: <47CDC37B.5010405@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47CDC37B.5010405@FreeBSD.org> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: FreeBSD Hackers Subject: Re: wpi -- periodic disconnections X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 22:52:44 -0000 On Tue, Mar 04, 2008 at 10:47:39PM +0100, Pietro Cerutti wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Hi list, > > I can't get my if_wpi (Intel(R) PRO/Wireless 3945ABG) stay connected to > my WPA-enabled access point for more than a few hours. Moreover, when it > happens, I have to unload the module, reload it and restart > wpa_supplicant in order to reconnect to the network. Any ideas? I have a WIP patch that may help, please give this a go. http://citylink.unixathome.org/~thompsa/wpi_testing8.diff Its the combination of several peoples work and I am planning to send it out again later in the week after some more review. cheers, Andrew From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 22:54:34 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C79821065670 for ; Tue, 4 Mar 2008 22:54:34 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73]) by mx1.freebsd.org (Postfix) with ESMTP id 894838FC24 for ; Tue, 4 Mar 2008 22:54:34 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from [213.142.182.66] (helo=gahrtop.localhost) by cpanel03.rubas-s03.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1JWg1p-0004VK-O0; Tue, 04 Mar 2008 23:54:33 +0100 Message-ID: <47CDD334.7050406@FreeBSD.org> Date: Tue, 04 Mar 2008 23:54:44 +0100 From: Pietro Cerutti Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.12 (X11/20080304) MIME-Version: 1.0 To: Andrew Thompson References: <47CDC37B.5010405@FreeBSD.org> <20080304223854.GB34712@heff.fud.org.nz> In-Reply-To: <20080304223854.GB34712@heff.fud.org.nz> X-Enigmail-Version: 0.95.5 OpenPGP: id=9571F78E; url=http://gahr.ch/pgp/ Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel03.rubas-s03.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - FreeBSD.org X-Source: X-Source-Args: X-Source-Dir: Cc: FreeBSD Hackers Subject: Re: wpi -- periodic disconnections X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 22:54:34 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Andrew Thompson wrote: > On Tue, Mar 04, 2008 at 10:47:39PM +0100, Pietro Cerutti wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA512 >> >> Hi list, >> >> I can't get my if_wpi (Intel(R) PRO/Wireless 3945ABG) stay connected to >> my WPA-enabled access point for more than a few hours. Moreover, when it >> happens, I have to unload the module, reload it and restart >> wpa_supplicant in order to reconnect to the network. Any ideas? > > I have a WIP patch that may help, please give this a go. > > http://citylink.unixathome.org/~thompsa/wpi_testing8.diff > > Its the combination of several peoples work and I am planning to send it > out again later in the week after some more review. Thanks, I will test it tomorrow and let you know the results! > > > cheers, > Andrew > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" - -- Pietro Cerutti gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEAREKAAYFAkfN0zQACgkQwMJqmJVx94671wCaAj+bs44/y+ixBGbLXEtxHipf OFQAniz5VNPDyZ95ghaGMe3l8lYJAYyC =Unz6 -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 23:57:57 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7E271065673; Tue, 4 Mar 2008 23:57:57 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73]) by mx1.freebsd.org (Postfix) with ESMTP id 4DC2F8FC22; Tue, 4 Mar 2008 23:57:57 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from [213.142.182.66] (helo=gahrtop.localhost) by cpanel03.rubas-s03.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1JWh19-0006lE-Mq; Wed, 05 Mar 2008 00:57:55 +0100 Message-ID: <47CDE20E.1020100@FreeBSD.org> Date: Wed, 05 Mar 2008 00:58:06 +0100 From: Pietro Cerutti Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.12 (X11/20080304) MIME-Version: 1.0 To: Andrew Thompson References: <47CDC37B.5010405@FreeBSD.org> <20080304223854.GB34712@heff.fud.org.nz> In-Reply-To: <20080304223854.GB34712@heff.fud.org.nz> X-Enigmail-Version: 0.95.5 OpenPGP: id=9571F78E; url=http://gahr.ch/pgp/ Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel03.rubas-s03.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - FreeBSD.org X-Source: X-Source-Args: X-Source-Dir: Cc: FreeBSD Hackers Subject: Re: wpi -- periodic disconnections X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 23:57:57 -0000 Andrew Thompson wrote: > On Tue, Mar 04, 2008 at 10:47:39PM +0100, Pietro Cerutti wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA512 >> >> Hi list, >> >> I can't get my if_wpi (Intel(R) PRO/Wireless 3945ABG) stay connected to >> my WPA-enabled access point for more than a few hours. Moreover, when it >> happens, I have to unload the module, reload it and restart >> wpa_supplicant in order to reconnect to the network. Any ideas? > > I have a WIP patch that may help, please give this a go. > > http://citylink.unixathome.org/~thompsa/wpi_testing8.diff > > Its the combination of several peoples work and I am planning to send it > out again later in the week after some more review. Hello, your patch helps, partially: - I've had a disconnection after a few minutes: Michael MIC failure wireless event: keyix=0 src_addr=00:1a:70:47:cc:5c Michael MIC failure detected WPA: Sending EAPOL-Key Request (error=1 pairwise=1 ptk_set=1 len=99) TKIP countermeasures started wpa_driver_bsd_set_countermeasures: enabled=1 State: COMPLETED -> DISCONNECTED wpa_driver_bsd_deauthenticate wpa_driver_bsd_del_key: keyidx=0 wpa_driver_bsd_del_key: keyidx=1 wpa_driver_bsd_del_key: keyidx=2 wpa_driver_bsd_del_key: keyidx=3 wpa_driver_bsd_del_key: addr=00:1a:70:47:cc:5c keyidx=0 ioctl[SIOCS80211, op 20, len 7]: Can't assign requested address EAPOL: External notification - portEnabled=0 EAPOL: SUPP_PAE entering state DISCONNECTED EAPOL: SUPP_BE entering state INITIALIZE EAPOL: External notification - portValid=0 Added BSSID 00:1a:70:47:cc:5c into blacklist CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys - I've been able to reconnect without kld-reloading the module, by killing and restarting wpa_supplicant > > > cheers, > Andrew > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -- Pietro Cerutti gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 5 00:14:01 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9895F1065671 for ; Wed, 5 Mar 2008 00:14:01 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.pkgsrc-box.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id 7AF568FC25 for ; Wed, 5 Mar 2008 00:14:00 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.pkgsrc-box.org [127.0.0.1]) by www.pkgsrc-box.org (Postfix) with ESMTP id 7C3BDE7A3E0 for ; Wed, 5 Mar 2008 00:13:49 +0000 (UTC) Received: by britannica.bec.de (Postfix, from userid 1000) id C3E53175D5; Wed, 5 Mar 2008 01:13:01 +0100 (CET) Date: Wed, 5 Mar 2008 01:13:01 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20080305001301.GA941@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <47CDC37B.5010405@FreeBSD.org> <20080304223854.GB34712@heff.fud.org.nz> <47CDE20E.1020100@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47CDE20E.1020100@FreeBSD.org> User-Agent: Mutt/1.5.16 (2007-06-09) Subject: Re: wpi -- periodic disconnections X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 00:14:01 -0000 On Wed, Mar 05, 2008 at 12:58:06AM +0100, Pietro Cerutti wrote: > - I've been able to reconnect without kld-reloading the module, by > killing and restarting wpa_supplicant Try "disconnect" followed by "reconnect". I have a similiar problem in NetBSD I am tracking down currently. It happens a lot more often in WPA mode (compared to WPA2). Joerg From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 5 00:20:23 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC6971065674 for ; Wed, 5 Mar 2008 00:20:23 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73]) by mx1.freebsd.org (Postfix) with ESMTP id 6B7508FC1F for ; Wed, 5 Mar 2008 00:20:23 +0000 (UTC) (envelope-from gahr@FreeBSD.org) Received: from [213.142.182.66] (helo=gahrtop.localhost) by cpanel03.rubas-s03.net with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1JWhMr-0006d3-Lk for freebsd-hackers@freebsd.org; Wed, 05 Mar 2008 01:20:21 +0100 Message-ID: <47CDE751.9050905@FreeBSD.org> Date: Wed, 05 Mar 2008 01:20:33 +0100 From: Pietro Cerutti Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.12 (X11/20080304) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <47CDC37B.5010405@FreeBSD.org> <20080304223854.GB34712@heff.fud.org.nz> <47CDE20E.1020100@FreeBSD.org> <20080305001301.GA941@britannica.bec.de> In-Reply-To: <20080305001301.GA941@britannica.bec.de> X-Enigmail-Version: 0.95.5 OpenPGP: id=9571F78E; url=http://gahr.ch/pgp/ Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - cpanel03.rubas-s03.net X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - FreeBSD.org X-Source: X-Source-Args: X-Source-Dir: Subject: Re: wpi -- periodic disconnections X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 00:20:23 -0000 Joerg Sonnenberger wrote: > On Wed, Mar 05, 2008 at 12:58:06AM +0100, Pietro Cerutti wrote: >> - I've been able to reconnect without kld-reloading the module, by >> killing and restarting wpa_supplicant > > Try "disconnect" followed by "reconnect". Sorry, what do you mean? > > Joerg -- Pietro Cerutti gahr@FreeBSD.org PGP Public Key: http://gahr.ch/pgp From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 5 00:24:10 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1840F1065675 for ; Wed, 5 Mar 2008 00:24:10 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.pkgsrc-box.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id CCB178FC16 for ; Wed, 5 Mar 2008 00:24:08 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.pkgsrc-box.org [127.0.0.1]) by www.pkgsrc-box.org (Postfix) with ESMTP id 267D3E7A3E0 for ; Wed, 5 Mar 2008 00:23:58 +0000 (UTC) Received: by britannica.bec.de (Postfix, from userid 1000) id 85876175D5; Wed, 5 Mar 2008 01:23:10 +0100 (CET) Date: Wed, 5 Mar 2008 01:23:10 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20080305002310.GA1005@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <47CDC37B.5010405@FreeBSD.org> <20080304223854.GB34712@heff.fud.org.nz> <47CDE20E.1020100@FreeBSD.org> <20080305001301.GA941@britannica.bec.de> <47CDE751.9050905@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47CDE751.9050905@FreeBSD.org> User-Agent: Mutt/1.5.16 (2007-06-09) Subject: Re: wpi -- periodic disconnections X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 00:24:10 -0000 On Wed, Mar 05, 2008 at 01:20:33AM +0100, Pietro Cerutti wrote: > Joerg Sonnenberger wrote: > > On Wed, Mar 05, 2008 at 12:58:06AM +0100, Pietro Cerutti wrote: > >> - I've been able to reconnect without kld-reloading the module, by > >> killing and restarting wpa_supplicant > > > > Try "disconnect" followed by "reconnect". > > Sorry, what do you mean? wpa_cli. Joerg From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 4 23:30:30 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 147511065671 for ; Tue, 4 Mar 2008 23:30:30 +0000 (UTC) (envelope-from frederic.praca@freebsd-fr.org) Received: from postfix1-g20.free.fr (postfix1-g20.free.fr [212.27.60.42]) by mx1.freebsd.org (Postfix) with ESMTP id C903B8FC19 for ; Tue, 4 Mar 2008 23:30:29 +0000 (UTC) (envelope-from frederic.praca@freebsd-fr.org) Received: from smtp8-g19.free.fr (smtp8-g19.free.fr [212.27.42.65]) by postfix1-g20.free.fr (Postfix) with ESMTP id 27B37237FD6C for ; Wed, 5 Mar 2008 00:00:10 +0100 (CET) Received: from smtp8-g19.free.fr (localhost [127.0.0.1]) by smtp8-g19.free.fr (Postfix) with ESMTP id E139117F558 for ; Wed, 5 Mar 2008 00:00:07 +0100 (CET) Received: from imp6-g19.free.fr (imp6-g19.free.fr [212.27.42.6]) by smtp8-g19.free.fr (Postfix) with ESMTP id D597117F556 for ; Wed, 5 Mar 2008 00:00:07 +0100 (CET) Received: by imp6-g19.free.fr (Postfix, from userid 33) id 9836D444A; Tue, 4 Mar 2008 23:59:59 +0100 (CET) Received: from coruscant.dnsalias.net (coruscant.dnsalias.net [88.169.125.217]) by imp.free.fr (IMP) with HTTP for ; Tue, 04 Mar 2008 23:59:59 +0100 Message-ID: <1204671599.47cdd46f6b1e2@imp.free.fr> Date: Tue, 04 Mar 2008 23:59:59 +0100 From: =?iso-8859-1?b?RnLpZOlyaWM=?= PRACA To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.8 X-Originating-IP: 88.169.125.217 X-Mailman-Approved-At: Wed, 05 Mar 2008 02:44:39 +0000 Subject: Kernel crash on Asus A7N8X-X X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Mar 2008 23:30:30 -0000 Hello dear hackers, I own a Asus A7N8X-X motherboard (NForce2 chipset) with a Radeon 9600 video card. After upgrading from 6.3 to 7.0, I launched xorg which crashed the kernel. After looking in the kernel core dump, I found that the agp_nvidia_flush_tlb function of /usr/src/sys/pci/agp_nvidia.c crashed on the line 377. The loop fails from the beginning (when i==0). I commented out the two last loops and it seems to work now but as I didn't understand what is this code for, I'd like to have some explanation about it and want to know if someone got the same problem. Fred From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 5 03:14:21 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01A6C106566C; Wed, 5 Mar 2008 03:14:21 +0000 (UTC) (envelope-from sam@errno.com) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id A64018FC1D; Wed, 5 Mar 2008 03:14:20 +0000 (UTC) (envelope-from sam@errno.com) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m253EJcF076939 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 4 Mar 2008 19:14:20 -0800 (PST) (envelope-from sam@errno.com) Message-ID: <47CE100B.5090701@errno.com> Date: Tue, 04 Mar 2008 19:14:19 -0800 From: Sam Leffler User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Pietro Cerutti References: <47CDC37B.5010405@FreeBSD.org> <20080304223854.GB34712@heff.fud.org.nz> <47CDE20E.1020100@FreeBSD.org> In-Reply-To: <47CDE20E.1020100@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC--Metrics: ebb.errno.com; whitelist Cc: FreeBSD Hackers , Andrew Thompson Subject: Re: wpi -- periodic disconnections X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 03:14:21 -0000 Pietro Cerutti wrote: > Andrew Thompson wrote: > >> On Tue, Mar 04, 2008 at 10:47:39PM +0100, Pietro Cerutti wrote: >> >>> -----BEGIN PGP SIGNED MESSAGE----- >>> Hash: SHA512 >>> >>> Hi list, >>> >>> I can't get my if_wpi (Intel(R) PRO/Wireless 3945ABG) stay connected to >>> my WPA-enabled access point for more than a few hours. Moreover, when it >>> happens, I have to unload the module, reload it and restart >>> wpa_supplicant in order to reconnect to the network. Any ideas? >>> >> I have a WIP patch that may help, please give this a go. >> >> http://citylink.unixathome.org/~thompsa/wpi_testing8.diff >> >> Its the combination of several peoples work and I am planning to send it >> out again later in the week after some more review. >> > > Hello, > your patch helps, partially: > > - I've had a disconnection after a few minutes: > Michael MIC failure wireless event: keyix=0 src_addr=00:1a:70:47:cc:5c > Michael MIC failure detected > WPA: Sending EAPOL-Key Request (error=1 pairwise=1 ptk_set=1 len=99) > TKIP countermeasures started > wpa_driver_bsd_set_countermeasures: enabled=1 > State: COMPLETED -> DISCONNECTED > wpa_driver_bsd_deauthenticate > wpa_driver_bsd_del_key: keyidx=0 > wpa_driver_bsd_del_key: keyidx=1 > wpa_driver_bsd_del_key: keyidx=2 > wpa_driver_bsd_del_key: keyidx=3 > wpa_driver_bsd_del_key: addr=00:1a:70:47:cc:5c keyidx=0 > ioctl[SIOCS80211, op 20, len 7]: Can't assign requested address > EAPOL: External notification - portEnabled=0 > EAPOL: SUPP_PAE entering state DISCONNECTED > EAPOL: SUPP_BE entering state INITIALIZE > EAPOL: External notification - portValid=0 > Added BSSID 00:1a:70:47:cc:5c into blacklist > CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys > > - I've been able to reconnect without kld-reloading the module, by > killing and restarting wpa_supplicant > > Something is corrupting data on rx; it is unlikely you are getting MIC errors. Sam From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 5 04:00:34 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 630BF1065670; Wed, 5 Mar 2008 04:00:34 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from heff.fud.org.nz (203-109-251-39.static.bliink.ihug.co.nz [203.109.251.39]) by mx1.freebsd.org (Postfix) with ESMTP id F2EC68FC21; Wed, 5 Mar 2008 04:00:33 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from heff.fud.org.nz (localhost [127.0.0.1]) by heff.fud.org.nz (Postfix) with ESMTP id BEA6788CB; Wed, 5 Mar 2008 17:00:32 +1300 (NZDT) Received: (from thompsa@localhost) by heff.fud.org.nz (8.14.2/8.14.2/Submit) id m2540VLa049244; Wed, 5 Mar 2008 17:00:31 +1300 (NZDT) (envelope-from thompsa@FreeBSD.org) X-Authentication-Warning: heff.fud.org.nz: thompsa set sender to thompsa@FreeBSD.org using -f Date: Wed, 5 Mar 2008 17:00:30 +1300 From: Andrew Thompson To: Sam Leffler Message-ID: <20080305040030.GB48412@heff.fud.org.nz> References: <47CDC37B.5010405@FreeBSD.org> <20080304223854.GB34712@heff.fud.org.nz> <47CDE20E.1020100@FreeBSD.org> <47CE100B.5090701@errno.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47CE100B.5090701@errno.com> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: FreeBSD Hackers , Pietro Cerutti Subject: Re: wpi -- periodic disconnections X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 04:00:34 -0000 On Tue, Mar 04, 2008 at 07:14:19PM -0800, Sam Leffler wrote: > Pietro Cerutti wrote: >> Andrew Thompson wrote: >> >>>> >>> I have a WIP patch that may help, please give this a go. >>> >>> http://citylink.unixathome.org/~thompsa/wpi_testing8.diff >>> >>> Its the combination of several peoples work and I am planning to send it >>> out again later in the week after some more review. >>> >> >> Hello, >> your patch helps, partially: >> >> - I've had a disconnection after a few minutes: >> Michael MIC failure wireless event: keyix=0 src_addr=00:1a:70:47:cc:5c >> Michael MIC failure detected >> >> - I've been able to reconnect without kld-reloading the module, by >> killing and restarting wpa_supplicant >> >> > Something is corrupting data on rx; it is unlikely you are getting MIC > errors. I have noticed in some of my wpi tracelogs that some frames are rejected as not being to the bss with one or two octets of the mac address being incorrect. The variation suggests its not just a rouge station with a similar mac. Andrew From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 5 09:03:10 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 852201065696 for ; Wed, 5 Mar 2008 09:03:10 +0000 (UTC) (envelope-from kris@FreeBSD.org) Received: from weak.local (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D03018FC22; Wed, 5 Mar 2008 09:03:09 +0000 (UTC) (envelope-from kris@FreeBSD.org) Message-ID: <47CE61CC.3030809@FreeBSD.org> Date: Wed, 05 Mar 2008 10:03:08 +0100 From: Kris Kennaway User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: =?ISO-8859-1?Q?Fr=E9d=E9ric_PRACA?= References: <1204671599.47cdd46f6b1e2@imp.free.fr> In-Reply-To: <1204671599.47cdd46f6b1e2@imp.free.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel crash on Asus A7N8X-X X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 09:03:10 -0000 Frédéric PRACA wrote: > Hello dear hackers, > I own a Asus A7N8X-X motherboard (NForce2 chipset) with a Radeon 9600 video > card. After upgrading from 6.3 to 7.0, I launched xorg which crashed the kernel. > After looking in the kernel core dump, I found that the agp_nvidia_flush_tlb > function of /usr/src/sys/pci/agp_nvidia.c crashed on the line 377. The loop > fails from the beginning (when i==0). I commented out the two last loops and it > seems to work now but as I didn't understand what is this code for, I'd like to > have some explanation about it and want to know if someone got the same problem. Usually it's a good idea to show the data that led to your conclusions (backtraces, etc), not just your conclusions. Sometimes there is more going on than is immediately apparent. Krs From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 5 10:33:11 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CADB1065688 for ; Wed, 5 Mar 2008 10:33:11 +0000 (UTC) (envelope-from cristiano.deana@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.185]) by mx1.freebsd.org (Postfix) with ESMTP id DDDDB8FC23 for ; Wed, 5 Mar 2008 10:33:10 +0000 (UTC) (envelope-from cristiano.deana@gmail.com) Received: by nf-out-0910.google.com with SMTP id b2so1048862nfb.33 for ; Wed, 05 Mar 2008 02:33:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=a6D+8h42mWsFNNfmSpSRO+hS0FcUK94q3OBB6NDqssc=; b=uJUJ9q4LUstro98IY6DbuYxL7xQV3HgHYGDpwt9i+oYrWenZUH5HZDNOZkFwemQZbs/ZmD/xi0Bwgu6a1Josu2PDyRACaAzuYNWVEvWoxQ02DXKsbQDUvL1dxQ1LsAUCE3acwTjfCie/2nTy+QqDNfc7XFJtg2GXdIrboHE3UfI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=YQ73iprOqtksYim/BLJLYJZSQVohRLX7HUM5ffByhwKfrZJriNYmXwnUnrbyFuIOgpGOO6qeFq2RceaV88QNFMr88bc8Xt8GcpgqG5OQka5+gEEhtT2/4vYTbt2WwRmuqp9gxAJXxqhFilSv2Nu9TuibE8Ejo3pOs23zYvw4WuY= Received: by 10.78.204.20 with SMTP id b20mr5681977hug.60.1204711651715; Wed, 05 Mar 2008 02:07:31 -0800 (PST) Received: by 10.78.141.5 with HTTP; Wed, 5 Mar 2008 02:07:31 -0800 (PST) Message-ID: Date: Wed, 5 Mar 2008 11:07:31 +0100 From: "Cristiano Deana" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: mpt driver: check raid status X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 10:33:11 -0000 Hi, I'm using a 7-RELEASE on a Dell PowerEdge 1955, using a mpt driver to manage a hardware raid1. Is there any way to check the status of the raid? Now it's running on a single disk (the second one failed and has been removed), and the only thing i can see are: mpt0: mpt_cam_event: 0x16 mpt0: mpt_cam_event: 0x12 mpt0: mpt_cam_event: 0x16 mpt0: mpt_cam_event: 0x15 mpt0: mpt_cam_event: 0x21 mpt0: mpt_cam_event: 0x15 mpt0: mpt_cam_event: 0x21 mpt0: mpt_cam_event: 0x15 mpt0: mpt_cam_event: 0x21 in messages. Thanks in advance -- Cris, member of G.U.F.I Italian FreeBSD User Group http://www.gufi.org/ From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 5 10:58:35 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 49D4F1065677 for ; Wed, 5 Mar 2008 10:58:35 +0000 (UTC) (envelope-from frederic.praca@freebsd-fr.org) Received: from smtp8-g19.free.fr (smtp8-g19.free.fr [212.27.42.65]) by mx1.freebsd.org (Postfix) with ESMTP id CB1248FC2F for ; Wed, 5 Mar 2008 10:58:34 +0000 (UTC) (envelope-from frederic.praca@freebsd-fr.org) Received: from smtp8-g19.free.fr (localhost [127.0.0.1]) by smtp8-g19.free.fr (Postfix) with ESMTP id 4A4B117F544; Wed, 5 Mar 2008 11:58:33 +0100 (CET) Received: from imp6-g19.free.fr (imp6-g19.free.fr [212.27.42.6]) by smtp8-g19.free.fr (Postfix) with ESMTP id 15B0317F545; Wed, 5 Mar 2008 11:58:33 +0100 (CET) Received: by imp6-g19.free.fr (Postfix, from userid 33) id 6ABD2443E; Wed, 5 Mar 2008 11:58:30 +0100 (CET) Received: from coruscant.dnsalias.net (coruscant.dnsalias.net [88.169.125.217]) by imp.free.fr (IMP) with HTTP for ; Wed, 05 Mar 2008 11:58:30 +0100 Message-ID: <1204714710.47ce7cd612d4c@imp.free.fr> Date: Wed, 05 Mar 2008 11:58:30 +0100 From: =?iso-8859-1?b?RnLpZOlyaWM=?= PRACA To: Kris Kennaway References: <1204671599.47cdd46f6b1e2@imp.free.fr> <47CE61CC.3030809@FreeBSD.org> In-Reply-To: <47CE61CC.3030809@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.8 X-Originating-IP: 88.169.125.217 Cc: freebsd-hackers@freebsd.org, =?iso-8859-1?b?RnLpZOlyaWM=?= PRACA Subject: Re: Kernel crash on Asus A7N8X-X X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 10:58:35 -0000 Selon Kris Kennaway : > Frédéric PRACA wrote: > > Hello dear hackers, > > I own a Asus A7N8X-X motherboard (NForce2 chipset) with a Radeon 9600 video > > card. After upgrading from 6.3 to 7.0, I launched xorg which crashed the > kernel. > > After looking in the kernel core dump, I found that the > agp_nvidia_flush_tlb > > function of /usr/src/sys/pci/agp_nvidia.c crashed on the line 377. The loop > > fails from the beginning (when i==0). I commented out the two last loops > and it > > seems to work now but as I didn't understand what is this code for, I'd > like to > > have some explanation about it and want to know if someone got the same > problem. > > Usually it's a good idea to show the data that led to your conclusions > (backtraces, etc), not just your conclusions. Sometimes there is more > going on than is immediately apparent. For sure, sorry. Here's what I got from kgdb : [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: Undefined symbol "ps_pglobal_lookup"] GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-marcel-freebsd". There is no member named pathname. (kgdb) bt #0 doadump () at pcpu.h:195 #1 0xc05b49ac in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:409 #2 0xc05b4b74 in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:563 #3 0xc06f9858 in vm_fault (map=0xc1054000, vaddr=3570491392, fault_type=Variable "fault_type" is not available. ) at /usr/src/sys/vm/vm_fault.c:275 #4 0xc0765be5 in trap_pfault (frame=0xd61f1a48, usermode=0, eva=3570491392) at /usr/src/sys/i386/i386/trap.c:801 #5 0xc0766502 in trap (frame=0xd61f1a48) at /usr/src/sys/i386/i386/trap.c:490 #6 0xc07545bb in calltrap () at /usr/src/sys/i386/i386/exception.s:139 #7 0xc0776ed7 in agp_nvidia_flush_tlb (dev=0xc2a3b100, offset=-1029891720) at /usr/src/sys/pci/agp_nvidia.c:377 #8 0xc06bb9dd in agp_generic_bind_memory (dev=0xc2a3b100, mem=0xc2fe7cc0, offset=0) at agp_if.h:76 #9 0xc06bb001 in agp_bind_memory (dev=0xc2a3b100, handle=0xc2fe7cc0, offset=0) at agp_if.h:128 #10 0xc04bd1bf in drm_agp_bind_memory (handle=0xc2fe7cc0, start=0) at /usr/src/sys/dev/drm/drm_agpsupport.c:456 #11 0xc04bd4dd in drm_agp_bind (dev=0xc2aad000, request=0xd61f1b68) at /usr/src/sys/dev/drm/drm_agpsupport.c:331 #12 0xc04bd591 in drm_agp_bind_ioctl (kdev=0xc2ac3400, cmd=2148033590, data=0xc2c309d0 "À|þÂ", flags=67, p=0xc2ed7a50, filp=0x17497) at /usr/src/sys/dev/drm/drm_agpsupport.c:348 #13 0xc04c25e8 in drm_ioctl (kdev=0xc2ac3400, cmd=2148033590, data=0xc2c309d0 "À|þÂ", flags=67, p=0xc2ed7a50) ---Type to continue, or q to quit--- at /usr/src/sys/dev/drm/drm_drv.c:911 #14 0xc0585ad6 in giant_ioctl (dev=0xc2ac3400, cmd=2148033590, data=0xc2c309d0 "À|þÂ", fflag=67, td=0xc2ed7a50) at /usr/src/sys/kern/kern_conf.c:349 #15 0xc0552517 in devfs_ioctl_f (fp=0xc2c3fd38, com=2148033590, data=0xc2c309d0, cred=0xc4e62400, td=0xc2ed7a50) at /usr/src/sys/fs/devfs/devfs_vnops.c:494 #16 0xc05e9b43 in kern_ioctl (td=0xc2ed7a50, fd=8, com=2148033590, data=0xc2c309d0 "À|þÂ") at file.h:266 #17 0xc05e9ca4 in ioctl (td=0xc2ed7a50, uap=0xd61f1cfc) at /usr/src/sys/kern/sys_generic.c:570 #18 0xc0765f0a in syscall (frame=0xd61f1d38) at /usr/src/sys/i386/i386/trap.c:1035 #19 0xc0754620 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:196 #20 0x00000033 in ?? () Previous frame inner to this frame (corrupt stack?) (kgdb) frame 7 #7 0xc0776ed7 in agp_nvidia_flush_tlb (dev=0xc2a3b100, offset=-1029891720) at /usr/src/sys/pci/agp_nvidia.c:377 warning: Source file is more recent than executable. 377 temp = ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)]; (kgdb) list 372 373 ag_virtual = (volatile u_int32_t *)sc->gatt->ag_virtual; 374 375 /* Flush TLB entries. */ 376 /*for(i = 0; i < 32 + 1; i++) 377 temp = ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)]; 378 for(i = 0; i < 32 + 1; i++) 379 temp = ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)]; 380 */ 381 return (0); (kgdb) print i $1 = 0 (kgdb) print *ag_virtual $2 = 299405313 (kgdb) print ag_virtual $3 = (volatile u_int32_t *) 0xd4d05000 (kgdb) print *sc $4 = {agp = {as_aperture = 0xc2a34dc0, as_aperture_rid = 16, as_maxmem = 461373440, as_allocated = 8388608, as_state = AGP_ACQUIRE_KERNEL, as_memory = {tqh_first = 0xc2fe7cc0, tqh_last = 0xc2fe7cc0}, as_nextid = 2, as_isopen = 0, as_devnode = 0xc2a3c300, as_lock = {lock_object = { lo_name = 0xc07d15d1 "agp lock", lo_type = 0xc07d15d1 "agp lock", lo_flags = 16973824, lo_witness_data = {lod_list = {stqe_next = 0x0}, lod_witness = 0x0}}, mtx_lock = 3270343248, mtx_recurse = 0}}, initial_aperture = 67108864, gatt = 0xc2a39990, dev = 0xc2a3b100, mc1_dev = 0xc2a2ae00, mc2_dev = 0xc2a2ae80, bdev = 0xc2a3b380, wbc_mask = 2147483648, num_dirs = 1, num_active_entries = 16384, pg_offset = 0} (kgdb) print sc->gatt $5 = (struct agp_gatt *) 0xc2a39990 (kgdb) print ESC[1@* $6 = {ag_entries = 16384, ag_virtual = 0xd4d05000, ag_physical = 17563648} (kgdb) quit Code seems to be commented out because I updated my source to try. Hope it helps a little. Fred From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 5 11:34:05 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18AA0106566C for ; Wed, 5 Mar 2008 11:34:05 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id C0D808FC26 for ; Wed, 5 Mar 2008 11:34:04 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 8D45E41C7AC; Wed, 5 Mar 2008 12:15:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id 8lLepmWIUy2a; Wed, 5 Mar 2008 12:15:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 3D33F41C7A9; Wed, 5 Mar 2008 12:15:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 3E17E44487F; Wed, 5 Mar 2008 11:13:06 +0000 (UTC) Date: Wed, 5 Mar 2008 11:13:06 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Cristiano Deana In-Reply-To: Message-ID: <20080305111237.W50685@maildrop.int.zabbadoz.net> References: X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: mpt driver: check raid status X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 11:34:05 -0000 On Wed, 5 Mar 2008, Cristiano Deana wrote: > Hi, > > I'm using a 7-RELEASE on a Dell PowerEdge 1955, using a mpt driver to > manage a hardware raid1. > Is there any way to check the status of the raid? Not really. > Now it's running on a single disk (the second one failed and has been > removed), and the only thing i can see are: > mpt0: mpt_cam_event: 0x16 > mpt0: mpt_cam_event: 0x12 > mpt0: mpt_cam_event: 0x16 > mpt0: mpt_cam_event: 0x15 > mpt0: mpt_cam_event: 0x21 > mpt0: mpt_cam_event: 0x15 > mpt0: mpt_cam_event: 0x21 > mpt0: mpt_cam_event: 0x15 > mpt0: mpt_cam_event: 0x21 > > in messages. > > Thanks in advance mpt0: mpt_cam_event: 0x16 MPI_EVENT_SAS_DISCOVERY most likely started mpt0: mpt_cam_event: 0x12 MPI_EVENT_SAS_PHY_LINK_STATUS mpt0: mpt_cam_event: 0x16 MPI_EVENT_SAS_DISCOVERY most likely done mpt0: mpt_cam_event: 0x15 MPI_EVENT_IR2 that could be LD/PD/... state changed mpt0: mpt_cam_event: 0x21 MPI_EVENT_LOG_ENTRY_ADDED mpt0: mpt_cam_event: 0x15 MPI_EVENT_IR2 mpt0: mpt_cam_event: 0x21 MPI_EVENT_LOG_ENTRY_ADDED mpt0: mpt_cam_event: 0x15 MPI_EVENT_IR2 mpt0: mpt_cam_event: 0x21 MPI_EVENT_LOG_ENTRY_ADDED Giving more details would depend on a subtype which is dependend on the event. What we's really need is someone with the specs to write the code and add the printfs, etc. /bz -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT Software is harder than hardware so better get it right the first time. From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 5 12:49:41 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72A08106566B for ; Wed, 5 Mar 2008 12:49:41 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id 5BECD8FC17 for ; Wed, 5 Mar 2008 12:49:41 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 1D9E21CC033; Wed, 5 Mar 2008 04:49:41 -0800 (PST) Date: Wed, 5 Mar 2008 04:49:41 -0800 From: Jeremy Chadwick To: =?iso-8859-1?Q?Fr=E9d=E9ric?= PRACA Message-ID: <20080305124941.GA24922@eos.sc1.parodius.com> References: <1204671599.47cdd46f6b1e2@imp.free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1204671599.47cdd46f6b1e2@imp.free.fr> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel crash on Asus A7N8X-X X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 12:49:41 -0000 On Tue, Mar 04, 2008 at 11:59:59PM +0100, Frédéric PRACA wrote: > Hello dear hackers, > I own a Asus A7N8X-X motherboard (NForce2 chipset) with a Radeon 9600 video > card. After upgrading from 6.3 to 7.0, I launched xorg which crashed the kernel. > After looking in the kernel core dump, I found that the agp_nvidia_flush_tlb > function of /usr/src/sys/pci/agp_nvidia.c crashed on the line 377. The loop > fails from the beginning (when i==0). I commented out the two last loops and it > seems to work now but as I didn't understand what is this code for, I'd like to > have some explanation about it and want to know if someone got the same problem. I'm in no way familiar with X. That said: you're using an ATI Radeon card, yet the kernel crashed in agp_nvidia.c. nVidia != ATI. Is it possible that you changed video cards at one point, and you're still using the nVidia AGP driver (loaded via /boot/loader.conf)? dmesg might be useful here. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 5 13:12:28 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E691106566C for ; Wed, 5 Mar 2008 13:12:28 +0000 (UTC) (envelope-from frederic.praca@freebsd-fr.org) Received: from smtp8-g19.free.fr (smtp8-g19.free.fr [212.27.42.65]) by mx1.freebsd.org (Postfix) with ESMTP id 175278FC27 for ; Wed, 5 Mar 2008 13:12:27 +0000 (UTC) (envelope-from frederic.praca@freebsd-fr.org) Received: from smtp8-g19.free.fr (localhost [127.0.0.1]) by smtp8-g19.free.fr (Postfix) with ESMTP id E02C717F569; Wed, 5 Mar 2008 14:12:26 +0100 (CET) Received: from imp6-g19.free.fr (imp6-g19.free.fr [212.27.42.6]) by smtp8-g19.free.fr (Postfix) with ESMTP id D0AA717F59D; Wed, 5 Mar 2008 14:12:26 +0100 (CET) Received: by imp6-g19.free.fr (Postfix, from userid 33) id F330A438B; Wed, 5 Mar 2008 14:12:22 +0100 (CET) Received: from coruscant.dnsalias.net (coruscant.dnsalias.net [88.169.125.217]) by imp.free.fr (IMP) with HTTP for ; Wed, 05 Mar 2008 14:12:22 +0100 Message-ID: <1204722742.47ce9c36b779a@imp.free.fr> Date: Wed, 05 Mar 2008 14:12:22 +0100 From: =?iso-8859-1?b?RnLpZOlyaWM=?= PRACA To: Jeremy Chadwick References: <1204671599.47cdd46f6b1e2@imp.free.fr> <20080305124941.GA24922@eos.sc1.parodius.com> In-Reply-To: <20080305124941.GA24922@eos.sc1.parodius.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.8 X-Originating-IP: 88.169.125.217 Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel crash on Asus A7N8X-X X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 13:12:28 -0000 Selon Jeremy Chadwick : > On Tue, Mar 04, 2008 at 11:59:59PM +0100, Frédéric PRACA wrote: > > Hello dear hackers, > > I own a Asus A7N8X-X motherboard (NForce2 chipset) with a Radeon 9600 video > > card. After upgrading from 6.3 to 7.0, I launched xorg which crashed the > kernel. > > After looking in the kernel core dump, I found that the > agp_nvidia_flush_tlb > > function of /usr/src/sys/pci/agp_nvidia.c crashed on the line 377. The loop > > fails from the beginning (when i==0). I commented out the two last loops > and it > > seems to work now but as I didn't understand what is this code for, I'd > like to > > have some explanation about it and want to know if someone got the same > problem. > > I'm in no way familiar with X. > > That said: you're using an ATI Radeon card, yet the kernel crashed in > agp_nvidia.c. nVidia != ATI. Is it possible that you changed video > cards at one point, and you're still using the nVidia AGP driver (loaded > via /boot/loader.conf)? No, in fact, agp_nvidia.c is the driver for the AGP bus of the NForce2 motherboard chipset, not the video card. > dmesg might be useful here. Why not but I can't copy it for the moment. > -- > | Jeremy Chadwick jdc at parodius.com | > | Parodius Networking http://www.parodius.com/ | > | UNIX Systems Administrator Mountain View, CA, USA | > | Making life hard for others since 1977. PGP: 4BD6C0CB | > > From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 5 14:33:35 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F35C1065674 for ; Wed, 5 Mar 2008 14:33:35 +0000 (UTC) (envelope-from nico-freebsd-hackers@schottelius.org) Received: from mx2.schottelius.org (creme.schottelius.org [62.65.138.66]) by mx1.freebsd.org (Postfix) with ESMTP id C8BCD8FC23 for ; Wed, 5 Mar 2008 14:33:34 +0000 (UTC) (envelope-from nico-freebsd-hackers@schottelius.org) Received: from denkbrett.schottelius.org (natgw.netstream.ch [62.65.128.28]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.schottelius.org (Postfix) with ESMTPSA id D582C35C063; Wed, 5 Mar 2008 15:13:32 +0100 (CET) Received: by denkbrett.schottelius.org (Postfix, from userid 1000) id 5CBAE1109D; Wed, 5 Mar 2008 15:13:37 +0100 (CET) Date: Wed, 5 Mar 2008 15:13:37 +0100 From: Nico -telmich- Schottelius To: Cristiano Deana Message-ID: <20080305141337.GA21522@denkbrett.schottelius.org> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline In-Reply-To: User-Agent: echo $message | gpg -e $sender -s | netcat mailhost 25 X-Unix-Info: http://unix.schottelius.org/ X-Netzseite: http://nico.schottelius.org/ X-System-Info: denkbrett running Linux 2.6.24.2-denkbrett on i686 Cc: freebsd-hackers@freebsd.org Subject: Re: mpt driver: check raid status X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 14:33:35 -0000 --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Cristiano, Cristiano Deana [Wed, Mar 05, 2008 at 11:07:31AM +0100]: > I'm using a 7-RELEASE on a Dell PowerEdge 1955, using a mpt driver to > manage a hardware raid1. > Is there any way to check the status of the raid? as far as I know there is currently no support to monitor mpt on FreeBSD, as documentated on http://nico.schottelius.org/documentations/freebsd/freebsd-raid-monitoring/ If you find out more, please send an e-mail to me, so I can update the site. Sincerly Nico --=20 Think about Free and Open Source Software (FOSS). http://nico.schottelius.org/documentations/foss/the-term-foss/ PGP: BFE4 C736 ABE5 406F 8F42 F7CF B8BE F92A 9885 188C --uAKRQypu60I7Lcqm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFHzqqRuL75KpiFGIwRAnt6AKCUYwMK6dfQMtuuRb39pV+IYxmK9gCg238r lQXexaPuBpv8A3ueLQaWtUA= =bvzb -----END PGP SIGNATURE----- --uAKRQypu60I7Lcqm-- From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 5 20:04:33 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 12D611065742; Wed, 5 Mar 2008 20:04:33 +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 C7CB88FC1C; Wed, 5 Mar 2008 20:04:32 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m25K1nv9095368; Wed, 5 Mar 2008 13:01:49 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 05 Mar 2008 13:02:17 -0700 (MST) Message-Id: <20080305.130217.-957834918.imp@bsdimp.com> To: freebsd-hackers@FreeBSD.org, obrien@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <20080304174045.GB90931@dragon.NUXI.org> References: <20080304081730.GA90914@kobe.laptop> <20080304095815.GD72911@rink.nu> <20080304174045.GB90931@dragon.NUXI.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: keramida@ceid.upatras.gr, rink@FreeBSD.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 20:04:33 -0000 In message: <20080304174045.GB90931@dragon.NUXI.org> "David O'Brien" writes: : On Tue, Mar 04, 2008 at 10:58:15AM +0100, Rink Springer wrote: : > On Tue, Mar 04, 2008 at 10:17:30AM +0200, Giorgos Keramidas wrote: : > > Solaris lacks TAILQ_xxx stuff too, so I would prefer something like : > > "bsdcompat.h" or similar. : > : > Seconded - "linux.h" is far too generic. I must say I like the idea : > of being able to build *BSD on Linux machines! : : Why? What are you going to do with it? Presumable install it somewhere, : where? : : Will the differences in the end result of what is built worth the risk, : vs. installing VMware player and building FreeBSD on FreeBSD on Linux? The end result will be the ability to build FreeBSD on a Linux host. VMware players aren't an option, and will not be contemplated as an acceptable solution. The overhead is too high, especially when explaining to people what needs to be done to deploy. Warner From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 5 20:10:11 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D2FAB1065677 for ; Wed, 5 Mar 2008 20:10:11 +0000 (UTC) (envelope-from chuckr@chuckr.org) Received: from mail6.sea5.speakeasy.net (mail6.sea5.speakeasy.net [69.17.117.8]) by mx1.freebsd.org (Postfix) with ESMTP id B287E8FC15 for ; Wed, 5 Mar 2008 20:10:11 +0000 (UTC) (envelope-from chuckr@chuckr.org) Received: (qmail 22359 invoked from network); 5 Mar 2008 20:10:11 -0000 Received: from april.chuckr.org (chuckr@[66.92.151.30]) (envelope-sender ) by mail6.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 5 Mar 2008 20:10:10 -0000 Message-ID: <47CEFCA0.1060600@chuckr.org> Date: Wed, 05 Mar 2008 15:03:44 -0500 From: Chuck Robey User-Agent: Thunderbird 2.0.0.6 (X11/20071107) MIME-Version: 1.0 To: Warner Losh References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> <20080303.235128.41690803.imp@bsdimp.com> In-Reply-To: <20080303.235128.41690803.imp@bsdimp.com> X-Enigmail-Version: 0.95.5 OpenPGP: id=F3DCA0E9; url=http://pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 20:10:11 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Warner Losh wrote: > From: "Daniel O'Connor" > Subject: Re: Comments on pmake diffs for building on Linux > Date: Tue, 4 Mar 2008 17:01:28 +1030 > >> On Tue, 4 Mar 2008, M. Warner Losh wrote: >>> Greetings, >>> >>> here's a set of diffs that will allow FreeBSD's usr.bin/make to build >>> on Linux. I'm sure they are gross, and I don't plan to commit them >>> (at least not all of them), but I thought I'd post them here to see >>> what people think. >>> >>> I think that the extra config.h includes, the errc -> errx patches >>> and the Makefile.dist patches may be good for the tree. The rest may >>> not meet FreeBSD's source tree policies. >>> >>> Comments? I bet a very large portion of those among us who are professional codes have had been forced at some time to port our make, whether it was the original pmake, or the up-to-date version (I did the most up to date I could manage. Getting something like this done would be a greaat thing, it would very seriously help not just ourselves, but all programmers around the world, but i very seriously doubt you'll ever get it done, Thoe folks who thought that making it the most elegant thing on earth without allowing the least consideration towards cross-compatibility, thoes folks are going to raise political hell on every step of the way, bring in every white elephant argument as often as allowed, and most likely force this project into ports, which is a seriously bad place for it to go, because that advertisess that we, thje FreeBSD group, are committed to not giving it any continuing support, and so no one will be able to rely upon it. The politicians amongst us will kill it, which I'm very osrry to predict >> I did this a while ago when porting some of our code to Linux because it >> builds with pmake.. >> >> Your patches are much nicer than mine however :) > > I was in a hurry, since I thought I could do it in a half hour and > that was faster than explaining things... > >> The tailq stuff could be shoved into a linux.h or some such.. So it's >> more obvious what it's for and why it's there. > > I resisted creating a linux.h, but we'll likely need something akin to > it. When I did some Mac OS X experimentation, I had extensions to > legacy to smooth over the rough edges, but it is too early here. > > Warner > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHzvygz62J6PPcoOkRApqaAKCGK8FwwRswtegRjR/AQQ+m8Nx4HgCgj1mz 4yEgWsl3Z7wSx1GvTNdk+dA= =I8th -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 5 20:36:52 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 471B91065674 for ; Wed, 5 Mar 2008 20:36:52 +0000 (UTC) (envelope-from chuckr@chuckr.org) Received: from mail6.sea5.speakeasy.net (mail6.sea5.speakeasy.net [69.17.117.8]) by mx1.freebsd.org (Postfix) with ESMTP id 27F4C8FC14 for ; Wed, 5 Mar 2008 20:36:52 +0000 (UTC) (envelope-from chuckr@chuckr.org) Received: (qmail 22359 invoked from network); 5 Mar 2008 20:10:11 -0000 Received: from april.chuckr.org (chuckr@[66.92.151.30]) (envelope-sender ) by mail6.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 5 Mar 2008 20:10:10 -0000 Message-ID: <47CEFCA0.1060600@chuckr.org> Date: Wed, 05 Mar 2008 15:03:44 -0500 From: Chuck Robey User-Agent: Thunderbird 2.0.0.6 (X11/20071107) MIME-Version: 1.0 To: Warner Losh References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> <20080303.235128.41690803.imp@bsdimp.com> In-Reply-To: <20080303.235128.41690803.imp@bsdimp.com> X-Enigmail-Version: 0.95.5 OpenPGP: id=F3DCA0E9; url=http://pgp.mit.edu Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: hackers@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 20:36:52 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Warner Losh wrote: > From: "Daniel O'Connor" > Subject: Re: Comments on pmake diffs for building on Linux > Date: Tue, 4 Mar 2008 17:01:28 +1030 > >> On Tue, 4 Mar 2008, M. Warner Losh wrote: >>> Greetings, >>> >>> here's a set of diffs that will allow FreeBSD's usr.bin/make to build >>> on Linux. I'm sure they are gross, and I don't plan to commit them >>> (at least not all of them), but I thought I'd post them here to see >>> what people think. >>> >>> I think that the extra config.h includes, the errc -> errx patches >>> and the Makefile.dist patches may be good for the tree. The rest may >>> not meet FreeBSD's source tree policies. >>> >>> Comments? I bet a very large portion of those among us who are professional codes have had been forced at some time to port our make, whether it was the original pmake, or the up-to-date version (I did the most up to date I could manage. Getting something like this done would be a greaat thing, it would very seriously help not just ourselves, but all programmers around the world, but i very seriously doubt you'll ever get it done, Thoe folks who thought that making it the most elegant thing on earth without allowing the least consideration towards cross-compatibility, thoes folks are going to raise political hell on every step of the way, bring in every white elephant argument as often as allowed, and most likely force this project into ports, which is a seriously bad place for it to go, because that advertisess that we, thje FreeBSD group, are committed to not giving it any continuing support, and so no one will be able to rely upon it. The politicians amongst us will kill it, which I'm very osrry to predict >> I did this a while ago when porting some of our code to Linux because it >> builds with pmake.. >> >> Your patches are much nicer than mine however :) > > I was in a hurry, since I thought I could do it in a half hour and > that was faster than explaining things... > >> The tailq stuff could be shoved into a linux.h or some such.. So it's >> more obvious what it's for and why it's there. > > I resisted creating a linux.h, but we'll likely need something akin to > it. When I did some Mac OS X experimentation, I had extensions to > legacy to smooth over the rough edges, but it is too early here. > > Warner > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHzvygz62J6PPcoOkRApqaAKCGK8FwwRswtegRjR/AQQ+m8Nx4HgCgj1mz 4yEgWsl3Z7wSx1GvTNdk+dA= =I8th -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 5 20:56:25 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E996106566B; Wed, 5 Mar 2008 20:56:25 +0000 (UTC) (envelope-from mav@mavhome.dp.ua) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id 229648FC2D; Wed, 5 Mar 2008 20:56:23 +0000 (UTC) (envelope-from mav@mavhome.dp.ua) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona 1.7.0 Received: from [212.86.226.226] (account mav@alkar.net HELO [192.168.3.2]) by cmail.optima.ua (CommuniGate Pro SMTP 5.1.14) with ESMTPA id 86636775; Wed, 05 Mar 2008 21:56:21 +0200 Message-ID: <47CEFAE0.9000402@mavhome.dp.ua> Date: Wed, 05 Mar 2008 21:56:16 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Bruce Evans References: <1201839789.00018590.1201827602@10.7.7.3> <1201836184.00018598.1201823403@10.7.7.3> <1201868581.00018705.1201855203@10.7.7.3> <1201904582.00018976.1201893001@10.7.7.3> <1201965806.00019169.1201955401@10.7.7.3> <1201958583.00019173.1201947005@10.7.7.3> <1202001786.00019395.1201991402@10.7.7.3> <1202005381.00019409.1201992602@10.7.7.3> <1202095383.00019854.1202083801@10.7.7.3> <1202113382.00019874.1202101201@10.7.7.3> In-Reply-To: <1202113382.00019874.1202101201@10.7.7.3> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 06 Mar 2008 01:31:47 +0000 Cc: freebsd-hackers@freebsd.org, Alexander Motin , Robert Watson , Julian Elischer , freebsd-performance@freebsd.org Subject: Re: Memory allocation performance X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2008 20:56:25 -0000 Bruce Evans wrote: > Try profiling it one another type of CPU, to get different performance > counters but hopefully not very different stalls. If the other CPU doesn't > stall at all, put another black mark against P4 and delete your copies of > it :-). I have tried to profile the same system with the same load on different hardware: - was Pentium4 2.8 at ASUS MB based on i875G chipset, - now PentiumD 3.0 at Supermicro PDSMi board based on E7230 chipset. The results are completely different. The problem has gone: 0.03 0.04 538550/2154375 ip_forward [11] 0.03 0.04 538562/2154375 em_get_buf [32] 0.07 0.08 1077100/2154375 ng_package_data [26] [15]1.8 0.14 0.15 2154375 uma_zalloc_arg [15] 0.06 0.00 1077151/3232111 generic_bzero [22] 0.03 0.00 538555/538555 mb_ctor_mbuf [60] 0.03 0.00 2154375/4421407 critical_exit [63] 0.02 0.01 538554/2154376 m_freem [42] 0.02 0.01 538563/2154376 mb_free_ext [54] 0.04 0.03 1077100/2154376 ng_free_item [48] [30]0.9 0.08 0.06 2154376 uma_zfree_arg [30] 0.03 0.00 2154376/4421407 critical_exit [63] 0.00 0.01 538563/538563 mb_dtor_pack [82] 0.01 0.00 2154376/4421971 critical_enter [69] So probably it was some hardware related problem. First MB has video integrated to chipset without any dedicated memory, possibly it affected memory performance in some way. On the first system there were such messages on boot: Mar 3 23:01:20 swamp kernel: acpi0: reservation of 0, a0000 (3) failed Mar 3 23:01:20 swamp kernel: acpi0: reservation of 100000, 3fdf0000 (3) failed Mar 3 23:01:20 swamp kernel: agp0: on vgapci0 Mar 3 23:01:20 swamp kernel: agp0: detected 892k stolen memory Mar 3 23:01:20 swamp kernel: agp0: aperture size is 128M , can they be related? -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 04:24:58 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28F6E106566C; Thu, 6 Mar 2008 04:24:58 +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 E2FC38FC1A; Thu, 6 Mar 2008 04:24:57 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m264OiTR071529; Wed, 5 Mar 2008 20:24:44 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.1/Submit) id m264OhGV071527; Wed, 5 Mar 2008 20:24:43 -0800 (PST) (envelope-from obrien) Date: Wed, 5 Mar 2008 20:24:43 -0800 From: "David O'Brien" To: "M. Warner Losh" Message-ID: <20080306042443.GA71267@dragon.NUXI.org> Mail-Followup-To: obrien@freebsd.org, "M. Warner Losh" , freebsd-hackers@FreeBSD.org, rink@FreeBSD.org, keramida@ceid.upatras.gr References: <20080304081730.GA90914@kobe.laptop> <20080304095815.GD72911@rink.nu> <20080304174045.GB90931@dragon.NUXI.org> <20080305.130217.-957834918.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080305.130217.-957834918.imp@bsdimp.com> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: keramida@ceid.upatras.gr, freebsd-hackers@FreeBSD.org, rink@FreeBSD.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 04:24:58 -0000 On Wed, Mar 05, 2008 at 01:02:17PM -0700, M. Warner Losh wrote: > In message: <20080304174045.GB90931@dragon.NUXI.org> > "David O'Brien" writes: > : On Tue, Mar 04, 2008 at 10:58:15AM +0100, Rink Springer wrote: > : > On Tue, Mar 04, 2008 at 10:17:30AM +0200, Giorgos Keramidas wrote: > : > > Solaris lacks TAILQ_xxx stuff too, so I would prefer something like > : > > "bsdcompat.h" or similar. > : > > : > Seconded - "linux.h" is far too generic. I must say I like the idea > : > of being able to build *BSD on Linux machines! > : > : Why? What are you going to do with it? Presumable install it > : somewhere, where? > : > : Will the differences in the end result of what is built worth the risk, > : vs. installing VMware player and building FreeBSD on FreeBSD on Linux? > > The end result will be the ability to build FreeBSD on a Linux host. > VMware players aren't an option, and will not be contemplated as an > acceptable solution. The overhead is too high, especially when > explaining to people what needs to be done to deploy. I think you're wrong about the overhead is too high... - but the proof will be in the pudding. With installing VMware player and building FreeBSD on FreeBSD - all the 10,000's of docs explaining to users how to build will be valid. With this cross build these docs will be wrong - folks will be much more on their own. Beyond the docs - I think you underestimate the amount of work getting all the cross-tools built and installed will be. I guess we'll just have to wait and see. -- -- David (obrien@FreeBSD.org) Q: Because it reverses the logical flow of conversation. A: Why is top-posting (putting a reply at the top of the message) frowned upon? Let's not play "Jeopardy-style quoting" From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 04:34:30 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E6B51065671; Thu, 6 Mar 2008 04:34:30 +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 CF3FC8FC1A; Thu, 6 Mar 2008 04:34:29 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m264Xe5w001907; Wed, 5 Mar 2008 21:33:40 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 05 Mar 2008 21:34:09 -0700 (MST) Message-Id: <20080305.213409.1152753160.imp@bsdimp.com> To: obrien@FreeBSD.ORG From: "M. Warner Losh" In-Reply-To: <20080306042443.GA71267@dragon.NUXI.org> References: <20080304174045.GB90931@dragon.NUXI.org> <20080305.130217.-957834918.imp@bsdimp.com> <20080306042443.GA71267@dragon.NUXI.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: keramida@ceid.upatras.gr, freebsd-hackers@FreeBSD.ORG, rink@FreeBSD.ORG Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 04:34:30 -0000 In message: <20080306042443.GA71267@dragon.NUXI.org> "David O'Brien" writes: : On Wed, Mar 05, 2008 at 01:02:17PM -0700, M. Warner Losh wrote: : > In message: <20080304174045.GB90931@dragon.NUXI.org> : > "David O'Brien" writes: : > : On Tue, Mar 04, 2008 at 10:58:15AM +0100, Rink Springer wrote: : > : > On Tue, Mar 04, 2008 at 10:17:30AM +0200, Giorgos Keramidas wrote: : > : > > Solaris lacks TAILQ_xxx stuff too, so I would prefer something like : > : > > "bsdcompat.h" or similar. : > : > : > : > Seconded - "linux.h" is far too generic. I must say I like the idea : > : > of being able to build *BSD on Linux machines! : > : : > : Why? What are you going to do with it? Presumable install it : > : somewhere, where? : > : : > : Will the differences in the end result of what is built worth the risk, : > : vs. installing VMware player and building FreeBSD on FreeBSD on Linux? : > : > The end result will be the ability to build FreeBSD on a Linux host. : > VMware players aren't an option, and will not be contemplated as an : > acceptable solution. The overhead is too high, especially when : > explaining to people what needs to be done to deploy. : : I think you're wrong about the overhead is too high... - but the proof : will be in the pudding. With installing VMware player and building : FreeBSD on FreeBSD - all the 10,000's of docs explaining to users how : to build will be valid. : : With this cross build these docs will be wrong - folks will be much more : on their own. : : Beyond the docs - I think you underestimate the amount of work getting : all the cross-tools built and installed will be. : : I guess we'll just have to wait and see. Yup. The proof will be in the pudding, as they say. Warner From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 05:54:53 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B37F9106566B; Thu, 6 Mar 2008 05:54:53 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 4694C8FC17; Thu, 6 Mar 2008 05:54:53 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m265sYXM031531 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 6 Mar 2008 16:54:39 +1100 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m265sXw7067879; Thu, 6 Mar 2008 16:54:33 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m265sVjN067878; Thu, 6 Mar 2008 16:54:31 +1100 (EST) (envelope-from peter) Date: Thu, 6 Mar 2008 16:54:31 +1100 From: Peter Jeremy To: Chuck Robey Message-ID: <20080306055431.GV68971@server.vk2pj.dyndns.org> References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> <20080303.235128.41690803.imp@bsdimp.com> <47CEFCA0.1060600@chuckr.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mYYhpFXgKVw71fwr" Content-Disposition: inline In-Reply-To: <47CEFCA0.1060600@chuckr.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 05:54:53 -0000 --mYYhpFXgKVw71fwr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 05, 2008 at 03:03:44PM -0500, Chuck Robey wrote: >I bet a very large portion of those among us who are professional codes >have had been forced at some time to port our make, whether it was the >original pmake, or the up-to-date version (I did the most up to date I >could manage. I looked at porting pmake to Tru64 about 9 years ago and rapidly decided I couldn't justify the effort (I only wanted to port a couple of FreeBSD utilities) and re-wrote the relevant Makefiles. I applaud Warner's efforts here as increasing the portability of FreeBSD utilities is very worthwhile. >The politicians amongst us will kill it, which I'm very osrry to predict I hope not. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --mYYhpFXgKVw71fwr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHz4cX/opHv/APuIcRAvl7AJsGviWoyeaYOxt6CwSGxwAVEcH2GACfWLIq kV6FoWsU24q8l6NiW+Bvxqc= =jkRN -----END PGP SIGNATURE----- --mYYhpFXgKVw71fwr-- From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 05:54:53 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B37F9106566B; Thu, 6 Mar 2008 05:54:53 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 4694C8FC17; Thu, 6 Mar 2008 05:54:53 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m265sYXM031531 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 6 Mar 2008 16:54:39 +1100 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.2/8.14.1) with ESMTP id m265sXw7067879; Thu, 6 Mar 2008 16:54:33 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.2/8.14.2/Submit) id m265sVjN067878; Thu, 6 Mar 2008 16:54:31 +1100 (EST) (envelope-from peter) Date: Thu, 6 Mar 2008 16:54:31 +1100 From: Peter Jeremy To: Chuck Robey Message-ID: <20080306055431.GV68971@server.vk2pj.dyndns.org> References: <20080303.224256.635730757.imp@bsdimp.com> <200803041701.36466.doconnor@gsoft.com.au> <20080303.235128.41690803.imp@bsdimp.com> <47CEFCA0.1060600@chuckr.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="mYYhpFXgKVw71fwr" Content-Disposition: inline In-Reply-To: <47CEFCA0.1060600@chuckr.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-hackers@freebsd.org, hackers@freebsd.org Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 05:54:53 -0000 --mYYhpFXgKVw71fwr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 05, 2008 at 03:03:44PM -0500, Chuck Robey wrote: >I bet a very large portion of those among us who are professional codes >have had been forced at some time to port our make, whether it was the >original pmake, or the up-to-date version (I did the most up to date I >could manage. I looked at porting pmake to Tru64 about 9 years ago and rapidly decided I couldn't justify the effort (I only wanted to port a couple of FreeBSD utilities) and re-wrote the relevant Makefiles. I applaud Warner's efforts here as increasing the portability of FreeBSD utilities is very worthwhile. >The politicians amongst us will kill it, which I'm very osrry to predict I hope not. --=20 Peter Jeremy Please excuse any delays as the result of my ISP's inability to implement an MTA that is either RFC2821-compliant or matches their claimed behaviour. --mYYhpFXgKVw71fwr Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHz4cX/opHv/APuIcRAvl7AJsGviWoyeaYOxt6CwSGxwAVEcH2GACfWLIq kV6FoWsU24q8l6NiW+Bvxqc= =jkRN -----END PGP SIGNATURE----- --mYYhpFXgKVw71fwr-- From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 09:22:52 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56C591065670 for ; Thu, 6 Mar 2008 09:22:52 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.152]) by mx1.freebsd.org (Postfix) with ESMTP id D16228FC1F for ; Thu, 6 Mar 2008 09:22:51 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: by fg-out-1718.google.com with SMTP id 16so1781191fgg.35 for ; Thu, 06 Mar 2008 01:22:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; bh=0LsyPwo4RIQTmfAFK21DJMCQ1fcbZte3tx2DbCRVM08=; b=JxsFYcUyPio6GDp4TpCHHajP3n9HxSvUvx5/6H0kxIncjOdBayRTub9l7Rffnw7bwuc8k7tSPvH01piHfD27HGvNbjgnd6uVtrWVQ0PP7qCoWDbzMc1vjzdHTLJqWs7w/4W5aQN+CPjCy8ti53OZdxuG+VWVcWhLZHrf2Hgx9gk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=iOBx6lN5+r5DUsD7s5JWNEvLBWYn74crsPiO4fpjjBwtZ0egkMRQyxNAZRyHoHrylVC+q7kYVGxKyO5sgEHC8GNXkqyWx9SfamLRaGY1WWD7j6Cz9VJcTIWqrcAPgkIGq1RWH2vgx/jlFBsLY6XUpsRQmNsoH0eqe3nhHKfvtNk= Received: by 10.86.82.16 with SMTP id f16mr4418088fgb.60.1204795370430; Thu, 06 Mar 2008 01:22:50 -0800 (PST) Received: from ?127.0.0.1? ( [217.206.187.79]) by mx.google.com with ESMTPS id j8sm3269869gvb.7.2008.03.06.01.22.48 (version=SSLv3 cipher=RC4-MD5); Thu, 06 Mar 2008 01:22:49 -0800 (PST) From: Tom Evans To: "M. Warner Losh" In-Reply-To: <20080305.213409.1152753160.imp@bsdimp.com> References: <20080304174045.GB90931@dragon.NUXI.org> <20080305.130217.-957834918.imp@bsdimp.com> <20080306042443.GA71267@dragon.NUXI.org> <20080305.213409.1152753160.imp@bsdimp.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-TplNz1ZKQtiNBIXkXjPP" Date: Thu, 06 Mar 2008 09:22:47 +0000 Message-Id: <1204795367.2126.234.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.2 FreeBSD GNOME Team Port Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 09:22:52 -0000 --=-TplNz1ZKQtiNBIXkXjPP Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2008-03-05 at 21:34 -0700, M. Warner Losh wrote: > Yup. The proof will be in the pudding, as they say. >=20 > Warner The proof of the pudding is in the eating, actually. There's no proof actually in the pudding. --=-TplNz1ZKQtiNBIXkXjPP Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBHz7fYlcRvFfyds/cRAiT0AJ40YJRrQbRhO+2eHv5frlUXUCIGswCfV+0m KpI/xjfUiiK09ySfk9zPeYc= =dNOM -----END PGP SIGNATURE----- --=-TplNz1ZKQtiNBIXkXjPP-- From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 10:19:06 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 764EC1065673 for ; Thu, 6 Mar 2008 10:19:06 +0000 (UTC) (envelope-from walraven@terantula.com) Received: from mx.terantula.com (mx.terantula.com [212.61.39.65]) by mx1.freebsd.org (Postfix) with ESMTP id 37DD48FC18 for ; Thu, 6 Mar 2008 10:19:05 +0000 (UTC) (envelope-from walraven@terantula.com) Received: from localhost (localhost [127.0.0.1]) by mx.terantula.com (Postfix) with ESMTP id E47E9140E4 for ; Thu, 6 Mar 2008 10:52:54 +0100 (CET) X-Virus-Scanned: amavisd-new at terantula.com Received: from mx.terantula.com ([127.0.0.1]) by localhost (cotton.terantula.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 3PoNH7yP7koV for ; Thu, 6 Mar 2008 10:52:52 +0100 (CET) Received: by mx.terantula.com (Postfix, from userid 1002) id BAFED140E1; Thu, 6 Mar 2008 10:52:52 +0100 (CET) Date: Thu, 6 Mar 2008 10:52:52 +0100 From: Marco Walraven To: freebsd-hackers@freebsd.org Message-ID: <20080306095252.GP19542@cotton.terantula.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Organisation: Terantula Subject: make index during make release generates wrong INDEX file X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 10:19:06 -0000 Hi, I ran into a wrongly named INDEX file today after I did a 'make release' of RELENG_7 on a RELENG_6 system which includes the Ports Collection. The index file is named INDEX-6 instead of INDEX-7. A quick look in Mk/bsd.port.subdir.mk shows me that it will read the version from the param.h file found in either /usr/include/sys/ or /usr/src/sys/sys/ and will name the INDEX- file according to what it found. The first location holds the file from of my running system RELENG_6 (outcome of the make buildworld on which make release depends); the second location holds the RELENG_7 file, checked out during 'make release'. Shouldn't it check the param.h file that is in my chrooted environment and use the version it finds in there while doing a make release instead of the param.h from the make buildworld outcome ? Ofcourse this works fine if you are running, let's say RELENG_6 and you want to make a release for that branch as well cause then they are equal(ly). Quickfix would be to specify OSVERSION in the make.conf; however if there is already a chrooted env why should you have to specify OSVERSION since it can get the exact version from the param.h file in the chrooted env ? Thanks, Marco -- Terantula - Industrial Strength Open Source phone:+31 64 3232 400 / www: http://www.terantula.com / pgpkey: E7EE7A46 pgp fingerprint: F2EE 122D 964C DE68 7380 6F95 3710 7719 E7EE 7A46 From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 12:45:04 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 07C131065673; Thu, 6 Mar 2008 12:45:04 +0000 (UTC) (envelope-from lulf@stud.ntnu.no) Received: from bene1.itea.ntnu.no (bene1.itea.ntnu.no [IPv6:2001:700:300:3::56]) by mx1.freebsd.org (Postfix) with ESMTP id 07FBE8FC1F; Thu, 6 Mar 2008 12:45:02 +0000 (UTC) (envelope-from lulf@stud.ntnu.no) Received: from localhost (localhost [127.0.0.1]) by bene1.itea.ntnu.no (Postfix) with ESMTP id C89E116C791; Thu, 6 Mar 2008 13:45:00 +0100 (CET) Received: from carrot.studby.ntnu.no (unknown [IPv6:2001:700:300:3::185]) by bene1.itea.ntnu.no (Postfix) with ESMTP id CA27316C60F; Thu, 6 Mar 2008 13:44:59 +0100 (CET) Date: Thu, 6 Mar 2008 13:44:59 +0100 From: Ulf Lilleengen To: freebsd-current@freebsd.org Message-ID: <20080306124458.GA50277@carrot.studby.ntnu.no> Mail-Followup-To: freebsd-current@freebsd.org, freebsd-hackers@freebsd.org, mux@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) X-Virus-Scanned: Debian amavisd-new at bene1.itea.ntnu.no Cc: freebsd-hackers@freebsd.org Subject: Call for testers: CVSMode for csup X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "..."@carrot.studby.ntnu.no List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 12:45:04 -0000 Hello all, During the past few months, I've implemented CVSMode support for csup. This means one can use csup to fetch complete CVS repositories. However, first I'd like everyone who'd like to help, to try out this patch and test to find bugs and issues with it. Currently, I'm pretty sure it should behave correctly in the normal cases, but therefore needs to be tested by a wider audience. Also, there are some flaws that are noted at the bottom of this e-mail, but the important thing is to test the correctness regarding RCS. For now, I'm including the tokenizer generated by flex since the base system flex won't be good enough yet. Hopefully, it'll get updated soon. A more technical overview: The support for CVSMode is accomplished by extending the already good foundation of csup to support the commands listed in the cvsup protocol. This means that I've added support for this in the detailer (the part giving the cvsup server the client file info) and updater(the one taking orders from the server) part of csup. In addition, I've created the rcsfile-interface. The interface specifies functions to add and remove deltas, tags, attributes etc. of a RCS file. To initially read a RCS file, I've created a parser using flex as tokenizer. Since the parser and tokenizer must be reentrant (both updater and detailer uses it), a fairly new version of flex is needed. There are some known issues with this patch: - Some RCS files contains extra whitespaces due to hackery. CVSup solves this by counting them during reading. This could perhaps be solved by using a newline counter in the lexxer, but I'm not sure if this is really necessary. - Some RCSfiles such as src/share/examples/kld/firmware/fwimage/firmware.img,v differ because there are some unknown garbage I think, but this should be investigated and confirmed. - It has a quite high memory usage, and this might be due to some leaks that I've been unable to find. I'll do a much better audit of the code and run valgrind to investigate this further. - Does not support md5 of RCS stream, so it can't detect errors yet. - Statusfile file attributes might not be correct. - Some RCS parts such as newphrases (man rcsfile) is not supported yet. - Some hardcoded limits that may break it. - Things done a silly way such as sorting and comparing, which I have plans to improve later. Please consider this as a very pre-alpha patch :) Given this list, I'm not so sure unleashing this patch is so good after all :), but it's really very experimental for now. As i mentioned, the things I want to be tested right now is if it does the RCS update procedure correctly in all cases (except the points I just mentioned). I've been testing on some parts of the FreeBSD src repository (diffing the result against cvsup result), and this is a quite good testcase, but different repos is always good. The latest patches for CURRENT and RELENG_7 can be found here: http://people.freebsd.org/~lulf/patches/csup/cvsmode Also, I'll be on and off the internet during the next few weeks (in Japan until 25th of march), so I might respond a bit late. I'll come back with more improvements and new patches as soon as I can. -- Ulf Lilleengen From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 13:33:56 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89A941065675 for ; Thu, 6 Mar 2008 13:33:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 780908FC22 for ; Thu, 6 Mar 2008 13:33:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id EEE721A4D7C; Thu, 6 Mar 2008 05:33:30 -0800 (PST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 6 Mar 2008 07:52:27 -0500 User-Agent: KMail/1.9.7 References: <47B4A514.1020103@icyb.net.ua> <47B8055C.4060305@icyb.net.ua> In-Reply-To: <47B8055C.4060305@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803060752.27235.jhb@freebsd.org> Cc: Andriy Gapon Subject: Re: cpu stats and another interrupt question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 13:33:56 -0000 On Sunday 17 February 2008 04:58:52 am Andriy Gapon wrote: > Come on, guys, simple yes or no would be enough for me :-) > > on 14/02/2008 22:31 Andriy Gapon said the following: > > Dear hackers, > > I'd like to check with you if my understanding of some code is correct. > > > > If we speak about a typical older i386 system, with UP and "AT" PIC, I > > think this is how the CPU utilization stats are collected. > > RTC is configured to generate interrupts (IRQ8) 128 times per second. > > Each time interrupt is generated RTC interrupt handler (I will use > > simple non technical terms) takes a peek at what was interrupted and > > depending on the properties of that thing (kernel thread) bills a tick > > to particular category. E.g. if it sees that the "idle" thread is > > interrupted then a tick is billed to "idle", if an interrupt thread is > > interrupted (software or hardware) then a tick is billed to interrupt, > > if a thread is running user-mode code then a tick is billed to "user" or > > "nice", otherwise it's "system". > > I understand that I oversimplify, but is the above correct in general ? > > > > Another, unrelated, question. > > Considering this snippet from sys/i386/isa/atpic.c, i8259_init(): > > #ifndef PC98 > > /* OCW2_L1 sets priority order to 3-7, 0-2 (com2 first). */ > > if (!slave) > > outb(pic->at_ioaddr, OCW2_R | OCW2_SL | OCW2_L1); > > #endif > > > > Do I understand correctly the code and the comment that here we use a > > feature of 8259 PIC that can be called "cyclic shift of interrupt > > priorities" ? > > So, we really have the following order of interrupts, from higher > > priority to lower: 3-7,0,1,8-15? Considering two chained 8259s, of > > course. Yes and yes. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 13:33:57 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F3681065670 for ; Thu, 6 Mar 2008 13:33:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 6E7EB8FC25 for ; Thu, 6 Mar 2008 13:33:57 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id CE51B1A4D80; Thu, 6 Mar 2008 05:33:31 -0800 (PST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 6 Mar 2008 07:55:04 -0500 User-Agent: KMail/1.9.7 References: <47B9A359.9080502@icyb.net.ua> In-Reply-To: <47B9A359.9080502@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803060755.04607.jhb@freebsd.org> Cc: Andriy Gapon Subject: Re: sched_ule: roundrobin_callout replacement ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 13:33:57 -0000 On Monday 18 February 2008 10:25:13 am Andriy Gapon wrote: > I see that sched_4bsd has a NOP callout with a purpose of forcing a > context switch (via softclock), so that something like a preemption > could happen (e.g. for threads in a tight calculation loop). > What serves the similar purpose for sched_ule? > Or, how sched_ule deals with the issue without needing softclock's help? It's gone in newer versions of 4BSD in HEAD actually. ULE does it by checking in sched_clock() to see if the current thread has used up its quantum. If so it sets TDF_NEEDRESCHED. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 13:33:58 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BDDD106566C; Thu, 6 Mar 2008 13:33:58 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 282DF8FC1A; Thu, 6 Mar 2008 13:33:58 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id 7239B1A4D84; Thu, 6 Mar 2008 05:33:32 -0800 (PST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 6 Mar 2008 08:09:47 -0500 User-Agent: KMail/1.9.7 References: <20080228111222.GE92245@mail.irbisnet.ru> <3bbf2fe10802280604t4266c0a9uaa0075689ce67632@mail.gmail.com> In-Reply-To: <3bbf2fe10802280604t4266c0a9uaa0075689ce67632@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803060809.47288.jhb@freebsd.org> Cc: Attilio Rao , Yuri Pankov Subject: Re: pfind() in ithread handler X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 13:33:58 -0000 On Thursday 28 February 2008 09:04:55 am Attilio Rao wrote: > 2008/2/28, Yuri Pankov : > > Hi, > > > > I'm trying to understand the cause of following panic. > > > > panic: Trying sleep, but thread marked as sleeping prohibited > > cpuid = 0 > > KDB: stack backtrace: > > db_trace_self_wrapper() at db_trace_self_wrapper+0x2a > > panic() at panic+0x17d > > sleepq_add() at sleepq_add+0x2e1 > > _sx_slock_hard() at _sx_slock_hard+0x15d > > _sx_slock() at _sx_slock+0xc1 > > pfind() at pfind+0x24 > > saa_intr() at saa_intr+0x313 > > ithread_loop() at ithread_loop+0xda > > fork_exit() at fork_exit+0x12a > > fork_trampoline() at fork_trampoline+0xe > > --- trap 0, rip = 0, rsp = 0xffffffffac3c0d30, rbp = 0 --- > > > > Can someone enlighten me on what is causing the panic and is it ok to > > use pfind() in interrupt handler (I have very limited understanding of > > kernel internals)? > > > > Code in question (taken from saa driver > > http://freebsd.ricin.com/ports/distfiles/kbtv-1.92.tbz) can be found at > > http://www.pastebin.ca/921830 > > ithreads cannot perform unbound sleeps and pfind() needs to access to > allproc_lock which is a sx lock and *performs* an unbound sleep, so > there is a mismatch. > > Btw, it sounds like allproc_lock and other similar locks are just > using an sx lock for *legacy*, they should be probabilly converted to > rwlock. > It also imposes little problems in the TTY layer, for example, where I > saw you need to use a unbounded sleeping primitive because of > processes locks acquisitions. > > A nice janitor task would be to convert these sx locks into rw and see > what happens. It would break. We hold these locks across malloc and other stuff in fork, etc. They are sx because of that, not for r/w semantics. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 13:33:58 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D98CD1065670 for ; Thu, 6 Mar 2008 13:33:58 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id C7F968FC2A for ; Thu, 6 Mar 2008 13:33:58 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id 2799C1A4D84; Thu, 6 Mar 2008 05:33:33 -0800 (PST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 6 Mar 2008 08:31:26 -0500 User-Agent: KMail/1.9.7 References: <1204671599.47cdd46f6b1e2@imp.free.fr> In-Reply-To: <1204671599.47cdd46f6b1e2@imp.free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200803060831.27056.jhb@freebsd.org> Cc: =?iso-8859-1?q?Fr=E9d=E9ric_PRACA?= Subject: Re: Kernel crash on Asus A7N8X-X X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 13:33:58 -0000 On Tuesday 04 March 2008 05:59:59 pm Fr=E9d=E9ric PRACA wrote: > Hello dear hackers, > I own a Asus A7N8X-X motherboard (NForce2 chipset) with a Radeon 9600 vid= eo > card. After upgrading from 6.3 to 7.0, I launched xorg which crashed the > kernel. After looking in the kernel core dump, I found that the > agp_nvidia_flush_tlb function of /usr/src/sys/pci/agp_nvidia.c crashed on > the line 377. The loop fails from the beginning (when i=3D=3D0). I commen= ted > out the two last loops and it seems to work now but as I didn't understand > what is this code for, I'd like to have some explanation about it and want > to know if someone got the same problem. The Linux AGP driver has the same code. It appears to be forcing a read of= =20 the TLB registers to force prior writes to clear the TLB entries to flush=20 perhaps? I'm not sure why you are getting a panic. What kind of fault did= =20 you get? (The original kernel panic messages would be needed.) =2D-=20 John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 13:33:59 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CF8561065678 for ; Thu, 6 Mar 2008 13:33:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id BC5C78FC19 for ; Thu, 6 Mar 2008 13:33:59 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id 17DDC1A4D87; Thu, 6 Mar 2008 05:33:34 -0800 (PST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 6 Mar 2008 08:32:44 -0500 User-Agent: KMail/1.9.7 References: <20080305111237.W50685@maildrop.int.zabbadoz.net> In-Reply-To: <20080305111237.W50685@maildrop.int.zabbadoz.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803060832.44862.jhb@freebsd.org> Cc: "Bjoern A. Zeeb" , Cristiano Deana Subject: Re: mpt driver: check raid status X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 13:33:59 -0000 On Wednesday 05 March 2008 06:13:06 am Bjoern A. Zeeb wrote: > On Wed, 5 Mar 2008, Cristiano Deana wrote: > > Hi, > > > > I'm using a 7-RELEASE on a Dell PowerEdge 1955, using a mpt driver to > > manage a hardware raid1. > > Is there any way to check the status of the raid? > > Not really. > > > Now it's running on a single disk (the second one failed and has been > > removed), and the only thing i can see are: > > mpt0: mpt_cam_event: 0x16 > > mpt0: mpt_cam_event: 0x12 > > mpt0: mpt_cam_event: 0x16 > > mpt0: mpt_cam_event: 0x15 > > mpt0: mpt_cam_event: 0x21 > > mpt0: mpt_cam_event: 0x15 > > mpt0: mpt_cam_event: 0x21 > > mpt0: mpt_cam_event: 0x15 > > mpt0: mpt_cam_event: 0x21 > > > > in messages. > > > > Thanks in advance > > mpt0: mpt_cam_event: 0x16 MPI_EVENT_SAS_DISCOVERY > > most likely started > > mpt0: mpt_cam_event: 0x12 MPI_EVENT_SAS_PHY_LINK_STATUS > mpt0: mpt_cam_event: 0x16 MPI_EVENT_SAS_DISCOVERY > > most likely done > > mpt0: mpt_cam_event: 0x15 MPI_EVENT_IR2 > > that could be LD/PD/... state changed > > mpt0: mpt_cam_event: 0x21 MPI_EVENT_LOG_ENTRY_ADDED > mpt0: mpt_cam_event: 0x15 MPI_EVENT_IR2 > mpt0: mpt_cam_event: 0x21 MPI_EVENT_LOG_ENTRY_ADDED > mpt0: mpt_cam_event: 0x15 MPI_EVENT_IR2 > mpt0: mpt_cam_event: 0x21 MPI_EVENT_LOG_ENTRY_ADDED > > > Giving more details would depend on a subtype which is dependend > on the event. > > What we's really need is someone with the specs to write the > code and add the printfs, etc. It's there in mpt_raid.c, but on some mpt chips the mpt_raid stuff probes too early and so it doesn't see any RAID volumes. Bug scottl@ to fix mpt(4). We have a machine at work that has a newer mpt(4) part with the same feature. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 13:40:15 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F33FE106566B; Thu, 6 Mar 2008 13:40:14 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from falcon.cybervisiontech.com (falcon.cybervisiontech.com [217.20.163.9]) by mx1.freebsd.org (Postfix) with ESMTP id A44A58FC1A; Thu, 6 Mar 2008 13:40:14 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id EDE1643D027; Thu, 6 Mar 2008 15:40:12 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at falcon.cybervisiontech.com Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DF3aX7jWsO6U; Thu, 6 Mar 2008 15:40:12 +0200 (EET) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [88.81.251.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id 250E743CD35; Thu, 6 Mar 2008 15:40:12 +0200 (EET) Message-ID: <47CFF43A.9070704@icyb.net.ua> Date: Thu, 06 Mar 2008 15:40:10 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.9 (X11/20080123) MIME-Version: 1.0 To: John Baldwin References: <47B9A359.9080502@icyb.net.ua> <200803060755.04607.jhb@freebsd.org> In-Reply-To: <200803060755.04607.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: sched_ule: roundrobin_callout replacement ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 13:40:15 -0000 on 06/03/2008 14:55 John Baldwin said the following: > On Monday 18 February 2008 10:25:13 am Andriy Gapon wrote: >> I see that sched_4bsd has a NOP callout with a purpose of forcing a >> context switch (via softclock), so that something like a preemption >> could happen (e.g. for threads in a tight calculation loop). >> What serves the similar purpose for sched_ule? >> Or, how sched_ule deals with the issue without needing softclock's help? > > It's gone in newer versions of 4BSD in HEAD actually. ULE does it by checking > in sched_clock() to see if the current thread has used up its quantum. If so > it sets TDF_NEEDRESCHED. > Thank you. But where/when does actual thread switch happens? E.g. I have two userland processes that do something like "while(1);", what is the event that can switch from one to the other? -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 13:44:13 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3017E106566B for ; Thu, 6 Mar 2008 13:44:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 198B18FC20 for ; Thu, 6 Mar 2008 13:44:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id 2AC9A1A4D7C; Thu, 6 Mar 2008 05:43:47 -0800 (PST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Thu, 6 Mar 2008 08:44:10 -0500 User-Agent: KMail/1.9.7 References: <1204671599.47cdd46f6b1e2@imp.free.fr> <200803060831.27056.jhb@freebsd.org> In-Reply-To: <200803060831.27056.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200803060844.10772.jhb@freebsd.org> Cc: anholt@FreeBSD.org, =?iso-8859-1?q?Fr=E9d=E9ric_PRACA?= Subject: Re: Kernel crash on Asus A7N8X-X X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 13:44:13 -0000 On Thursday 06 March 2008 08:31:26 am John Baldwin wrote: > On Tuesday 04 March 2008 05:59:59 pm Fr=E9d=E9ric PRACA wrote: > > Hello dear hackers, > > I own a Asus A7N8X-X motherboard (NForce2 chipset) with a Radeon 9600 > > video card. After upgrading from 6.3 to 7.0, I launched xorg which > > crashed the kernel. After looking in the kernel core dump, I found that > > the > > agp_nvidia_flush_tlb function of /usr/src/sys/pci/agp_nvidia.c crashed = on > > the line 377. The loop fails from the beginning (when i=3D=3D0). I comm= ented > > out the two last loops and it seems to work now but as I didn't > > understand what is this code for, I'd like to have some explanation abo= ut > > it and want to know if someone got the same problem. > > The Linux AGP driver has the same code. It appears to be forcing a read = of > the TLB registers to force prior writes to clear the TLB entries to flush > perhaps? I'm not sure why you are getting a panic. What kind of fault d= id > you get? (The original kernel panic messages would be needed.) Actually, it looks like you have a 64MB aperture and with either a 32MB or= =20 64MB aperture this loop runs off the end of the GATT (GATT has 16384 entrie= s=20 * 4 bytes =3D=3D 64k =3D=3D 16 pages on x86) so if it dies before it starts= the next=20 loop that might explain it. The patch below makes it walk the full GATT=20 reading the first word from each page to force a flush w/o walking off the= =20 end of the GATT. Actually, this is what appears to have happened: (gdb) set $start =3D 0xd4d05000 (ag_virtual) (gdb) set $fva =3D 3570491392 (eva in trap_pfault() frame) (gdb) p ($fva - $start) / 4 $2 =3D 17408 That's well over your current ag_entries of 16384. Try this patch (note=20 Linux's in-kernel agp driver has the same bug): Index: agp_nvidia.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /host/cvs/usr/cvs/src/sys/dev/agp/agp_nvidia.c,v retrieving revision 1.13 diff -u -r1.13 agp_nvidia.c =2D-- agp_nvidia.c 12 Nov 2007 21:51:37 -0000 1.13 +++ agp_nvidia.c 6 Mar 2008 13:37:43 -0000 @@ -347,7 +347,7 @@ struct agp_nvidia_softc *sc; u_int32_t wbc_reg, temp; volatile u_int32_t *ag_virtual; =2D int i; + int i, pages; =20 sc =3D (struct agp_nvidia_softc *)device_get_softc(dev); =20 @@ -373,9 +373,10 @@ ag_virtual =3D (volatile u_int32_t *)sc->gatt->ag_virtual; =20 /* Flush TLB entries. */ =2D for(i =3D 0; i < 32 + 1; i++) + pages =3D sc->gatt->ag_entries * sizeof(u_int32_t) / PAGE_SIZE; + for(i =3D 0; i < pages; i++) temp =3D ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)]; =2D for(i =3D 0; i < 32 + 1; i++) + for(i =3D 0; i < pages; i++) temp =3D ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)]; =20 return (0); =2D-=20 John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 13:57:59 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22A89106566B for ; Thu, 6 Mar 2008 13:57:59 +0000 (UTC) (envelope-from mike@urgle.com) Received: from anchor-post-37.mail.demon.net (anchor-post-37.mail.demon.net [194.217.242.87]) by mx1.freebsd.org (Postfix) with ESMTP id DEC728FC1E for ; Thu, 6 Mar 2008 13:57:58 +0000 (UTC) (envelope-from mike@urgle.com) Received: from rocher.urgle.com ([80.177.40.50]) by anchor-post-37.mail.demon.net with esmtp (Exim 4.68) id 1JWJAg-00034B-OD; Mon, 03 Mar 2008 22:30:10 +0000 Message-ID: <47CC7BC3.3020504@urgle.com> Date: Mon, 03 Mar 2008 22:29:23 +0000 From: Mike Bristow User-Agent: Thunderbird 2.0.0.12 (X11/20080301) MIME-Version: 1.0 To: Julian Elischer References: <200803022218.32873.cneirabustos@gmail.com> <20080303081021.GC80576@hoeg.nl> <47CC6E7D.10707@elischer.org> In-Reply-To: <47CC6E7D.10707@elischer.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: readahead(2) - Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 13:57:59 -0000 Julian Elischer wrote: > Ivan Voras wrote: >> Ed Schouten wrote: >>> * carlos neira wrote: >>>> is there an equivalent of readahead syscall in linux , for freebsd ?. >>>> i was looking at http://preload.sourceforge.net/ , and it needs >>>> this . >>> Maybe a mmap(), followed by a madvise()? >> >> Or an open() followed by a read() loop? :) If the goal is to preload the >> files, this one is certainly going to do it :) >> >> > > the aim is to load it into system memory but not copy anything into > user memory. sendfile(2) to /dev/null, perhaps. From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 14:18:22 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB03A1065677 for ; Thu, 6 Mar 2008 14:18:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 994228FC2B for ; Thu, 6 Mar 2008 14:18:22 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id EE1CD1A4D7C; Thu, 6 Mar 2008 06:17:56 -0800 (PST) From: John Baldwin To: Andriy Gapon Date: Thu, 6 Mar 2008 09:17:50 -0500 User-Agent: KMail/1.9.7 References: <47B9A359.9080502@icyb.net.ua> <200803060755.04607.jhb@freebsd.org> <47CFF43A.9070704@icyb.net.ua> In-Reply-To: <47CFF43A.9070704@icyb.net.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803060917.50328.jhb@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: sched_ule: roundrobin_callout replacement ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 14:18:22 -0000 On Thursday 06 March 2008 08:40:10 am Andriy Gapon wrote: > on 06/03/2008 14:55 John Baldwin said the following: > > On Monday 18 February 2008 10:25:13 am Andriy Gapon wrote: > >> I see that sched_4bsd has a NOP callout with a purpose of forcing a > >> context switch (via softclock), so that something like a preemption > >> could happen (e.g. for threads in a tight calculation loop). > >> What serves the similar purpose for sched_ule? > >> Or, how sched_ule deals with the issue without needing softclock's help? > > > > It's gone in newer versions of 4BSD in HEAD actually. ULE does it by > > checking in sched_clock() to see if the current thread has used up its > > quantum. If so it sets TDF_NEEDRESCHED. > > Thank you. But where/when does actual thread switch happens? > E.g. I have two userland processes that do something like "while(1);", > what is the event that can switch from one to the other? TDF_NEEDRESCHED is checked on return to userland from interrupts, traps, and system calls. The clock interrupt that sets TDF_NEEDRESCHED will check for it on the way back to userland and invoke ast() (sys/kern/subr_trap.c) which will end up forcing a context switch. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 15:33:43 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA7481065671 for ; Thu, 6 Mar 2008 15:33:42 +0000 (UTC) (envelope-from cristiano.deana@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.171]) by mx1.freebsd.org (Postfix) with ESMTP id 239E08FC14 for ; Thu, 6 Mar 2008 15:33:41 +0000 (UTC) (envelope-from cristiano.deana@gmail.com) Received: by ug-out-1314.google.com with SMTP id y2so3971143uge.37 for ; Thu, 06 Mar 2008 07:33:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=y2CjMTrgLUBx3fJ3kDudhS5EwFPxg+sTjVw66tNHl84=; b=eqrn/04qi/bXjrAsP5sc1HJRdoLL3iXxXP6JpvlolzTZU0BKXz2ZImOiSkoPrzKFULcFZb3Rwjjn9utqWgIrn+9SU6gKzk0sgXY8Z58xrGIIoSkMbaoQLeXPt8smPmMKKNbbDYNpxOQJusfvSAVsPVDNTKg4/ISPFemiR9hVSis= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=RBKhQwuQcLREnA5w2Feo9KgmO5v2/kf00EXhIaMag/X1P+Z6sjkaVhBtzlQdIBolOcNHqn5omH77H4l5gSXsJnPXOv8ITMfMxzqZ1mYpyqVoKUBUAimGPVF3N1l8xUtH0bTPmgD29PbACDc0gud5BmgP7DPYNirCTZ2iUo2iZpk= Received: by 10.78.154.14 with SMTP id b14mr10473421hue.55.1204817620550; Thu, 06 Mar 2008 07:33:40 -0800 (PST) Received: by 10.78.141.5 with HTTP; Thu, 6 Mar 2008 07:33:40 -0800 (PST) Message-ID: Date: Thu, 6 Mar 2008 16:33:40 +0100 From: "Cristiano Deana" To: "John Baldwin" , Scott In-Reply-To: <200803060832.44862.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080305111237.W50685@maildrop.int.zabbadoz.net> <200803060832.44862.jhb@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: mpt driver: check raid status X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 15:33:43 -0000 Hi, first of all thanks everybody. this is the output about mpt0, can i help with some other info? mpt0@pci0:14:8:0: class=0x010000 card=0x1f081028 chip=0x00541000 rev=0x01 hdr=0x00 vendor = 'LSI Logic (Was: Symbios Logic, NCR)' device = 'SAS 3000 series, 8-port with 1068 -StorPort' class = mass storage subclass = SCSI On Thu, Mar 6, 2008 at 2:32 PM, John Baldwin wrote: > > On Wednesday 05 March 2008 06:13:06 am Bjoern A. Zeeb wrote: > > On Wed, 5 Mar 2008, Cristiano Deana wrote: > > > Hi, > > > > > > I'm using a 7-RELEASE on a Dell PowerEdge 1955, using a mpt driver to > > > manage a hardware raid1. > > > Is there any way to check the status of the raid? > > > > Not really. > > > > > Now it's running on a single disk (the second one failed and has been > > > removed), and the only thing i can see are: > > > mpt0: mpt_cam_event: 0x16 > > > mpt0: mpt_cam_event: 0x12 > > > mpt0: mpt_cam_event: 0x16 > > > mpt0: mpt_cam_event: 0x15 > > > mpt0: mpt_cam_event: 0x21 > > > mpt0: mpt_cam_event: 0x15 > > > mpt0: mpt_cam_event: 0x21 > > > mpt0: mpt_cam_event: 0x15 > > > mpt0: mpt_cam_event: 0x21 > > > > > > in messages. > > > > > > Thanks in advance > > > > mpt0: mpt_cam_event: 0x16 MPI_EVENT_SAS_DISCOVERY > > > > most likely started > > > > mpt0: mpt_cam_event: 0x12 MPI_EVENT_SAS_PHY_LINK_STATUS > > mpt0: mpt_cam_event: 0x16 MPI_EVENT_SAS_DISCOVERY > > > > most likely done > > > > mpt0: mpt_cam_event: 0x15 MPI_EVENT_IR2 > > > > that could be LD/PD/... state changed > > > > mpt0: mpt_cam_event: 0x21 MPI_EVENT_LOG_ENTRY_ADDED > > mpt0: mpt_cam_event: 0x15 MPI_EVENT_IR2 > > mpt0: mpt_cam_event: 0x21 MPI_EVENT_LOG_ENTRY_ADDED > > mpt0: mpt_cam_event: 0x15 MPI_EVENT_IR2 > > mpt0: mpt_cam_event: 0x21 MPI_EVENT_LOG_ENTRY_ADDED > > > > > > Giving more details would depend on a subtype which is dependend > > on the event. > > > > What we's really need is someone with the specs to write the > > code and add the printfs, etc. > > It's there in mpt_raid.c, but on some mpt chips the mpt_raid stuff probes too > early and so it doesn't see any RAID volumes. Bug scottl@ to fix mpt(4). We > have a machine at work that has a newer mpt(4) part with the same feature. > > -- > John Baldwin > -- Cris, member of G.U.F.I Italian FreeBSD User Group http://www.gufi.org/ From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 16:22:24 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95CA1106567C; Thu, 6 Mar 2008 16:22:24 +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 5CBA48FC2A; Thu, 6 Mar 2008 16:22:24 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m26GMOiZ089718; Thu, 6 Mar 2008 08:22:24 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.1/Submit) id m26GMORf089717; Thu, 6 Mar 2008 08:22:24 -0800 (PST) (envelope-from obrien) Date: Thu, 6 Mar 2008 08:22:24 -0800 From: "David O'Brien" To: freebsd-current@freebsd.org, freebsd-hackers@freebsd.org, mux@freebsd.org Message-ID: <20080306162224.GC89327@dragon.NUXI.org> Mail-Followup-To: obrien@freebsd.org, freebsd-current@freebsd.org, freebsd-hackers@freebsd.org, mux@freebsd.org References: <20080306124458.GA50277@carrot.studby.ntnu.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080306124458.GA50277@carrot.studby.ntnu.no> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Subject: Re: Call for testers: CVSMode for csup X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 16:22:24 -0000 On Thu, Mar 06, 2008 at 01:44:59PM +0100, Ulf Lilleengen wrote: > During the past few months, I've implemented CVSMode support for csup. This would be good to have. Have you looked at CVSync http://www.cvsync.org/ to see how he handled some of the wierdness in ,v files? From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 16:37:52 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEA641065670 for ; Thu, 6 Mar 2008 16:37:52 +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 CE49E8FC1E for ; Thu, 6 Mar 2008 16:37:52 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m26Gbqkf090233 for ; Thu, 6 Mar 2008 08:37:52 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.1/Submit) id m26GbqF2090232 for freebsd-hackers@freebsd.org; Thu, 6 Mar 2008 08:37:52 -0800 (PST) (envelope-from obrien) Date: Thu, 6 Mar 2008 08:37:52 -0800 From: "David O'Brien" To: freebsd-hackers@freebsd.org Message-ID: <20080306163752.GD89327@dragon.NUXI.org> Mail-Followup-To: obrien@freebsd.org, freebsd-hackers@freebsd.org References: <20080225154455.4822e72a@bhuda.mired.org> <47C33384.6040701@dial.pipex.com> <200802252243.m1PMhTeq016201@fire.js.berklix.net> <47C3A228.7090703@freebsd.org> <20080226202853.GA859@britannica.bec.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080226202853.GA859@britannica.bec.de> X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Subject: Re: emulate an end-of-media X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 16:37:53 -0000 On Tue, Feb 26, 2008 at 09:28:53PM +0100, Joerg Sonnenberger wrote: > On Tue, Feb 26, 2008 at 07:44:48PM +0100, Martin Laabs wrote: > > I also made a comparison between gzip and bzip2 regarding > > the compression ratio on a dump of my home directory (3.2GB) > > bzip2 took about 74min to compress, gzip only 11minutes. And > > in terms of compression ratio bzip2 was only 3% better than > > gzip. > > That's not a realistic test case. bzip2 normally takes trice the time > and compresses 10% better. I can't comment on compress. Actually I've found that it depends on which architecture you run bzip2 and gzip on. Taking a sample set of files, I found bzip2 was faster on amd64 than gzip; and gzip was faster on i386 than bzip2. [its been a while... I might have the two reversed] -- -- David (obrien@FreeBSD.org) Q: Because it reverses the logical flow of conversation. A: Why is top-posting (putting a reply at the top of the message) frowned upon? Let's not play "Jeopardy-style quoting" From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 17:49:49 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 135B71065699 for ; Thu, 6 Mar 2008 17:49:49 +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 EAF178FC29 for ; Thu, 6 Mar 2008 17:49:48 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.1/8.14.1) with ESMTP id m26Hnm9G092633 for ; Thu, 6 Mar 2008 09:49:48 -0800 (PST) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.2/8.14.1/Submit) id m26HnmDb092632 for freebsd-hackers@freebsd.org; Thu, 6 Mar 2008 09:49:48 -0800 (PST) (envelope-from obrien) Date: Thu, 6 Mar 2008 09:49:48 -0800 From: "David O'Brien" To: freebsd-hackers@freebsd.org Message-ID: <20080306174948.GA92538@dragon.NUXI.org> Mail-Followup-To: obrien@freebsd.org, freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 8.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Subject: Re: cvs commit: src/sys/nfsclient nfs_socket.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 17:49:49 -0000 On Tue, Aug 29, 2006 at 10:00:12PM +0000, Mohan Srinivasan wrote: > mohans 2006-08-29 22:00:12 UTC > FreeBSD src repository > Modified files: > sys/nfsclient nfs_socket.c > Log: > Fix for a deadlock triggered by a 'umount -f' causing a NFS request to never > retransmit (or return). Thanks to John Baldwin for helping nail this one. > Revision Changes Path > 1.144 +14 -2 src/sys/nfsclient/nfs_socket.c > http://cvsweb.freebsd.org/src/sys/nfsclient/nfs_socket.c.diff?r1=1.143&r2=1.144 How does this look for a RELENG_6 version of this fix? Index: nfsclient/nfs_socket.c =================================================================== RCS file: /home/ncvs/src/sys/nfsclient/nfs_socket.c,v retrieving revision 1.125.2.18 diff -u -p -r1.125.2.18 nfs_socket.c --- nfsclient/nfs_socket.c 17 Jan 2008 21:04:51 -0000 1.125.2.18 +++ nfsclient/nfs_socket.c 25 Feb 2008 10:26:59 -0000 @@ -1323,6 +1323,18 @@ nfs_timer(void *arg) continue; if (nfs_sigintr(nmp, rep, rep->r_td)) continue; + else { + /* + * Terminate request if force-unmount in progress. + * Note that NFS could have vfs_busy'ed the mount, + * causing the unmount to wait for the mnt_lock, making + * this bit of logic necessary. + */ + if (rep->r_nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF) { + nfs_softterm(rep); + continue; + } + } if (nmp->nm_tprintf_initial_delay != 0 && (rep->r_rexmit > 2 || (rep->r_flags & R_RESENDERR)) && rep->r_lastmsg + nmp->nm_tprintf_delay < now.tv_sec) { From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 18:08:59 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9B601065670 for ; Thu, 6 Mar 2008 18:08:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay03.kiev.sovam.com (relay03.kiev.sovam.com [62.64.120.201]) by mx1.freebsd.org (Postfix) with ESMTP id 5B0D98FC2C for ; Thu, 6 Mar 2008 18:08:59 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.226] (helo=skuns.kiev.zoral.com.ua) by relay03.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1JXKWV-0008MY-FU; Thu, 06 Mar 2008 20:08:57 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by skuns.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m26I973u008825 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 6 Mar 2008 20:09:07 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m26I8qB0049639; Thu, 6 Mar 2008 20:08:52 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m26I8pI6049638; Thu, 6 Mar 2008 20:08:51 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 6 Mar 2008 20:08:51 +0200 From: Kostik Belousov To: obrien@freebsd.org, freebsd-hackers@freebsd.org Message-ID: <20080306180851.GO57756@deviant.kiev.zoral.com.ua> References: <20080306174948.GA92538@dragon.NUXI.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TSvRAX6F0b3a4r66" Content-Disposition: inline In-Reply-To: <20080306174948.GA92538@dragon.NUXI.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on skuns.kiev.zoral.com.ua X-Scanner-Signature: 8a658898c353158d5b622bcbe36a9e12 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Header: Not Detected X-SpamTest-Info: Profiles 2366 [Mar 6 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Method: none X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0278], KAS30/Release Cc: Subject: Re: cvs commit: src/sys/nfsclient nfs_socket.c X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 18:08:59 -0000 --TSvRAX6F0b3a4r66 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Mar 06, 2008 at 09:49:48AM -0800, David O'Brien wrote: > On Tue, Aug 29, 2006 at 10:00:12PM +0000, Mohan Srinivasan wrote: > > mohans 2006-08-29 22:00:12 UTC > > FreeBSD src repository > > Modified files: > > sys/nfsclient nfs_socket.c=20 > > Log: > > Fix for a deadlock triggered by a 'umount -f' causing a NFS request t= o never > > retransmit (or return). Thanks to John Baldwin for helping nail this = one. > > Revision Changes Path > > 1.144 +14 -2 src/sys/nfsclient/nfs_socket.c > > http://cvsweb.freebsd.org/src/sys/nfsclient/nfs_socket.c.diff?r1=3D1.14= 3&r2=3D1.144 >=20 > How does this look for a RELENG_6 version of this fix? >=20 > Index: nfsclient/nfs_socket.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > RCS file: /home/ncvs/src/sys/nfsclient/nfs_socket.c,v > retrieving revision 1.125.2.18 > diff -u -p -r1.125.2.18 nfs_socket.c > --- nfsclient/nfs_socket.c 17 Jan 2008 21:04:51 -0000 1.125.2.18 > +++ nfsclient/nfs_socket.c 25 Feb 2008 10:26:59 -0000 > @@ -1323,6 +1323,18 @@ nfs_timer(void *arg) > continue; > if (nfs_sigintr(nmp, rep, rep->r_td)) > continue; > + else { > + /* > + * Terminate request if force-unmount in progress. > + * Note that NFS could have vfs_busy'ed the mount, > + * causing the unmount to wait for the mnt_lock, making > + * this bit of logic necessary. > + */ > + if (rep->r_nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF) { > + nfs_softterm(rep); > + continue; > + } > + } > if (nmp->nm_tprintf_initial_delay !=3D 0 && > (rep->r_rexmit > 2 || (rep->r_flags & R_RESENDERR)) && > rep->r_lastmsg + nmp->nm_tprintf_delay < now.tv_sec) { >=20 The reason for this change was the rev. 1.180 of the nfs_vfsops.c, that never makes into RELENG_6. NFS client in RELENG_7 is MPsafe and sufficiently reworked. I think that scenario that leads to that deadlock is: The thread A doing fstatfs() vfs_busy()ed the mountpoint, and then: - unmount (thread B) waits for the mnt_lock; - the request sent by the thread A or response to that request is lost and never retransmitted due to forced umount being performed. This ends up in the deadlock. --TSvRAX6F0b3a4r66 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkfQMzIACgkQC3+MBN1Mb4i1kgCeMd7P4MdsKp8nfY6T/YCDUMqt gDgAnimAbBjtC8XGDxb4UO/Y1rKO9dKs =9A1l -----END PGP SIGNATURE----- --TSvRAX6F0b3a4r66-- From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 18:17:26 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AF58106566C for ; Thu, 6 Mar 2008 18:17:26 +0000 (UTC) (envelope-from otaviof@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.250]) by mx1.freebsd.org (Postfix) with ESMTP id D6D878FC29 for ; Thu, 6 Mar 2008 18:17:25 +0000 (UTC) (envelope-from otaviof@gmail.com) Received: by an-out-0708.google.com with SMTP id c14so610339anc.13 for ; Thu, 06 Mar 2008 10:17:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=wEuUPnR/pNh+Oy570jAiXPIjxH7PhH9AF5En3Mg35Ps=; b=wbAS8YcMYw0Lkf81f9NXPeu2OIXs3Ho/XrFODVUrVeAelIhlBZ92kE5urniz1w64czreIVOuQ9biiXX21svcIkFlIeWfEbKfGSgMGmA9BOwTvfSYe2pn47EPuhZ1DmopfpsYHieERu0JIsTKnaKD1wrZSmmR4v5WGglfrePLNsc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=L+iYoI232QqRA9znZZWeH6cH5WN0U+XuNniqCxA1jIGRXWva8X25GHlFyWE3rAPkAACZDCqETNdX89H4BSlx+2zHAB2ati1Zx9WbKSV5l7YASS/AAefFZcIWanBs4KH4x/WG0vpJirYXabGF+h8DZJUOppr+ikBqfg9+a5m7yHk= Received: by 10.100.216.3 with SMTP id o3mr113439ang.70.1204825891430; Thu, 06 Mar 2008 09:51:31 -0800 (PST) Received: by 10.100.253.19 with HTTP; Thu, 6 Mar 2008 09:51:31 -0800 (PST) Message-ID: <8e3843570803060951w37cff540m600a40b200eb7d8@mail.gmail.com> Date: Thu, 6 Mar 2008 14:51:31 -0300 From: "=?ISO-8859-1?Q?Ot=E1vio_Fernandes?=" To: "FreeBSD Hackers" In-Reply-To: <20080304223854.GB34712@heff.fud.org.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <47CDC37B.5010405@FreeBSD.org> <20080304223854.GB34712@heff.fud.org.nz> Subject: Re: wpi -- periodic disconnections X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 18:17:26 -0000 On Tue, Mar 4, 2008 at 7:38 PM, Andrew Thompson wrote= : > On Tue, Mar 04, 2008 at 10:47:39PM +0100, Pietro Cerutti wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA512 > > > > Hi list, > > > > I can't get my if_wpi (Intel(R) PRO/Wireless 3945ABG) stay connected t= o > > my WPA-enabled access point for more than a few hours. Moreover, when = it > > happens, I have to unload the module, reload it and restart > > wpa_supplicant in order to reconnect to the network. Any ideas? > > I have a WIP patch that may help, please give this a go. > > http://citylink.unixathome.org/~thompsa/wpi_testing8.diff > > Its the combination of several peoples work and I am planning to send it > out again later in the week after some more review. > > > cheers, > Andrew > > > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.or= g" > Andrew, This patch works like a charm for me. I had the same problems with WPI, in a couple months ago. thank you indeed, --=20 | -- | Ot=E1vio Fernandes < otaviof | gmail | com > | FreeBSD 7.0-STABLE && GNU/Linux User: 283.396 | (( Especial Programa=E7=E3o )) http://geekbr.podcastbrasil.com/ -- 0.15 | -- From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 20:38:33 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D99031065670 for ; Thu, 6 Mar 2008 20:38:33 +0000 (UTC) (envelope-from frederic.praca@freebsd-fr.org) Received: from smtp8-g19.free.fr (smtp8-g19.free.fr [212.27.42.65]) by mx1.freebsd.org (Postfix) with ESMTP id 6BD5E8FC12 for ; Thu, 6 Mar 2008 20:38:32 +0000 (UTC) (envelope-from frederic.praca@freebsd-fr.org) Received: from smtp8-g19.free.fr (localhost [127.0.0.1]) by smtp8-g19.free.fr (Postfix) with ESMTP id 92B8017F567; Thu, 6 Mar 2008 21:38:31 +0100 (CET) Received: from imp6-g19.free.fr (imp6-g19.free.fr [212.27.42.6]) by smtp8-g19.free.fr (Postfix) with ESMTP id 8EF1417F538; Thu, 6 Mar 2008 21:38:31 +0100 (CET) Received: by imp6-g19.free.fr (Postfix, from userid 33) id 43AD34360; Thu, 6 Mar 2008 21:38:24 +0100 (CET) Received: from coruscant.dnsalias.net (coruscant.dnsalias.net [88.169.125.217]) by imp.free.fr (IMP) with HTTP for ; Thu, 06 Mar 2008 21:38:23 +0100 Message-ID: <1204835903.47d0563ff0717@imp.free.fr> Date: Thu, 06 Mar 2008 21:38:23 +0100 From: =?iso-8859-1?b?RnLpZOlyaWM=?= PRACA To: John Baldwin References: <1204671599.47cdd46f6b1e2@imp.free.fr> <200803060831.27056.jhb@freebsd.org> <200803060844.10772.jhb@freebsd.org> In-Reply-To: <200803060844.10772.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.8 X-Originating-IP: 88.169.125.217 Cc: freebsd-hackers@freebsd.org, anholt@FreeBSD.org Subject: Re: Kernel crash on Asus A7N8X-X X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 20:38:34 -0000 Selon John Baldwin : > On Thursday 06 March 2008 08:31:26 am John Baldwin wrote: > > The Linux AGP driver has the same code. It appears to be forcing a read of > > the TLB registers to force prior writes to clear the TLB entries to flush > > perhaps? I'm not sure why you are getting a panic. What kind of fault did > > you get? (The original kernel panic messages would be needed.) > > Actually, it looks like you have a 64MB aperture and with either a 32MB or > 64MB aperture this loop runs off the end of the GATT (GATT has 16384 entries > * 4 bytes == 64k == 16 pages on x86) so if it dies before it starts the next > loop that might explain it. The patch below makes it walk the full GATT > reading the first word from each page to force a flush w/o walking off the > end of the GATT. > > Actually, this is what appears to have happened: > > (gdb) set $start = 0xd4d05000 (ag_virtual) > (gdb) set $fva = 3570491392 (eva in trap_pfault() frame) > (gdb) p ($fva - $start) / 4 > $2 = 17408 > > That's well over your current ag_entries of 16384. Try this patch (note > Linux's in-kernel agp driver has the same bug): > > Index: agp_nvidia.c > =================================================================== > RCS file: /host/cvs/usr/cvs/src/sys/dev/agp/agp_nvidia.c,v > retrieving revision 1.13 > diff -u -r1.13 agp_nvidia.c > --- agp_nvidia.c 12 Nov 2007 21:51:37 -0000 1.13 > +++ agp_nvidia.c 6 Mar 2008 13:37:43 -0000 > @@ -347,7 +347,7 @@ > struct agp_nvidia_softc *sc; > u_int32_t wbc_reg, temp; > volatile u_int32_t *ag_virtual; > - int i; > + int i, pages; > > sc = (struct agp_nvidia_softc *)device_get_softc(dev); > > @@ -373,9 +373,10 @@ > ag_virtual = (volatile u_int32_t *)sc->gatt->ag_virtual; > > /* Flush TLB entries. */ > - for(i = 0; i < 32 + 1; i++) > + pages = sc->gatt->ag_entries * sizeof(u_int32_t) / PAGE_SIZE; > + for(i = 0; i < pages; i++) > temp = ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)]; > - for(i = 0; i < 32 + 1; i++) > + for(i = 0; i < pages; i++) > temp = ag_virtual[i * PAGE_SIZE / sizeof(u_int32_t)]; > > return (0); > > -- > John Baldwin Thanks a lot John, this code works. I have been able to launch X w/o crashing the kernel. Fred From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 21:46:24 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F2261065671 for ; Thu, 6 Mar 2008 21:46:24 +0000 (UTC) (envelope-from marinosi@ceid.upatras.gr) Received: from poseidon.ceid.upatras.gr (poseidon.ceid.upatras.gr [150.140.141.169]) by mx1.freebsd.org (Postfix) with ESMTP id 3F85A8FC1D for ; Thu, 6 Mar 2008 21:46:24 +0000 (UTC) (envelope-from marinosi@ceid.upatras.gr) Received: from mail.ceid.upatras.gr (unknown [10.1.0.143]) by poseidon.ceid.upatras.gr (Postfix) with ESMTP id 0E447EB4D22 for ; Thu, 6 Mar 2008 23:20:46 +0200 (EET) Received: from localhost (europa.ceid.upatras.gr [127.0.0.1]) by mail.ceid.upatras.gr (Postfix) with ESMTP id E38D11588C9 for ; Thu, 6 Mar 2008 23:20:45 +0200 (EET) X-Virus-Scanned: amavisd-new at ceid.upatras.gr Received: from mail.ceid.upatras.gr ([127.0.0.1]) by localhost (europa.ceid.upatras.gr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bnQTwENw5Nne for ; Thu, 6 Mar 2008 23:20:45 +0200 (EET) Received: from marinos.ceid.upatras.gr (marinos.ceid.upatras.gr [150.140.140.17]) by mail.ceid.upatras.gr (Postfix) with ESMTP id B2ED1157FDB for ; Thu, 6 Mar 2008 23:20:45 +0200 (EET) Received: by marinos.ceid.upatras.gr (Postfix, from userid 1001) id 05B48228BC; Thu, 6 Mar 2008 23:20:44 +0200 (EET) Date: Thu, 6 Mar 2008 23:20:44 +0200 From: Ilias Marinos To: freebsd-hackers@freebsd.org Message-ID: <20080306212044.GA72211@marinos.ceid.upatras.gr> Mail-Followup-To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=big5 Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Network Throughput between jail and base system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 21:46:24 -0000 Hello all, I have a jail to my FreeBSD-STABLE, in which I run some services.I have configured and setup this jail using ezjail-admin. marinosi@marinos:~$ jls JID IP Address Hostname Path 1 192.168.1.100 ws /usr/jails/ws /usr/jails/ws #Jails ezjail_enable="YES" ifconfig_lo1="192.168.1.100 netmask 0xffffffff" # Jail iface I use lo1 as jail interface and I nat internet traffic to it with pf: nat on $ext_if from $ws to any -> ($ext_if) Today I 've tried to scp a big directory inside the jail and I've noticed that I was secure copying with 2-3MB/s .That sounds too weird for me and I would like to hear some opinions , for what it may be the problem. Thanks a lot, Ilias Marinos -- echo "Sysadmin know better bash than english." | sed s/min/mins/ \ | sed 's/better bash/bash better/' From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 22:13:09 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B33801065673 for ; Thu, 6 Mar 2008 22:13:09 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: from blah.sun-fish.com (blah.sun-fish.com [217.18.249.150]) by mx1.freebsd.org (Postfix) with ESMTP id 6C2CA8FC24 for ; Thu, 6 Mar 2008 22:13:09 +0000 (UTC) (envelope-from stefan.lambrev@moneybookers.com) Received: by blah.sun-fish.com (Postfix, from userid 1002) id D06891B10EBB; Thu, 6 Mar 2008 23:13:07 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on blah.cmotd.com X-Spam-Level: X-Spam-Status: No, score=-10.6 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.3 Received: from [10.1.1.2] (unknown [192.168.25.10]) by blah.sun-fish.com (Postfix) with ESMTP id 4D4571B10E4E for ; Thu, 6 Mar 2008 23:13:05 +0100 (CET) Message-ID: <47D06C70.50400@moneybookers.com> Date: Fri, 07 Mar 2008 00:13:04 +0200 From: Stefan Lambrev User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <20080306212044.GA72211@marinos.ceid.upatras.gr> In-Reply-To: <20080306212044.GA72211@marinos.ceid.upatras.gr> Content-Type: text/plain; charset=Big5 Content-Transfer-Encoding: 7bit Subject: Re: Network Throughput between jail and base system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 22:13:09 -0000 Greetings, Ilias Marinos wrote: > Hello all, > I have a jail to my FreeBSD-STABLE, in which I run some > uname -a will be more helpful then "FreeBSD-STABLE". > services.I have configured and setup this jail using ezjail-admin. > marinosi@marinos:~$ jls > JID IP Address Hostname Path > 1 192.168.1.100 ws /usr/jails/ws > /usr/jails/ws > > #Jails > ezjail_enable="YES" > ifconfig_lo1="192.168.1.100 netmask 0xffffffff" # Jail iface > > I use lo1 as jail interface and I nat internet traffic to it with pf: > nat on $ext_if from $ws to any -> ($ext_if) > > Today I 've tried to scp a big directory inside the jail and > I've noticed that I was secure copying with 2-3MB/s .That sounds too > weird for me and I would like to hear some opinions , for what it may be > the problem. > > You should investigate where the bottle-neck is. It's probably not in the network protocol. Most probably it is limitation of your CPU or your HDD(s). I think (not sure) jail have default limit to % of the CPU resources, so if you encrypt the stream most probably the limitation is in the CPU. You can check http://wiki.freebsd.org/JailResourceLimits for more information. > Thanks a lot, > Ilias Marinos > > > -- > echo "Sysadmin know better bash than english." | sed s/min/mins/ \ > | sed 's/better bash/bash better/' > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 23:22:54 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56CDB106566C for ; Thu, 6 Mar 2008 23:22:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id CD7728FC24 for ; Thu, 6 Mar 2008 23:22:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona 1.7.0 Received: from [212.86.226.226] (account mav@alkar.net HELO [192.168.3.2]) by cmail.optima.ua (CommuniGate Pro SMTP 5.1.14) with ESMTPA id 87383326 for freebsd-hackers@freebsd.org; Fri, 07 Mar 2008 01:22:52 +0200 Message-ID: <47D07CC6.5060007@FreeBSD.org> Date: Fri, 07 Mar 2008 01:22:46 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: soclose() & so->so_upcall() = race? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 23:22:54 -0000 Hi. As I can see so_upcall() callback is called with SOCKBUF_MTX unlocked. It means that SB_UPCALL flag can be removed during call and socket can be closed and deallocated with soclose() while callback is running. Am I right or I have missed something? How in that situation socket pointer protected from being used after free? -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 23:52:42 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F33E21065672; Thu, 6 Mar 2008 23:52:41 +0000 (UTC) (envelope-from lulf@stud.ntnu.no) Received: from bene2.itea.ntnu.no (bene2.itea.ntnu.no [IPv6:2001:700:300:3::57]) by mx1.freebsd.org (Postfix) with ESMTP id AB7918FC1D; Thu, 6 Mar 2008 23:52:41 +0000 (UTC) (envelope-from lulf@stud.ntnu.no) Received: from localhost (localhost [127.0.0.1]) by bene2.itea.ntnu.no (Postfix) with ESMTP id A7367161003; Fri, 7 Mar 2008 00:52:40 +0100 (CET) Received: from carrot.studby.ntnu.no (unknown [IPv6:2001:700:300:3::185]) by bene2.itea.ntnu.no (Postfix) with ESMTP id D0EA2160FFF; Fri, 7 Mar 2008 00:52:39 +0100 (CET) Date: Fri, 7 Mar 2008 00:52:38 +0100 From: Ulf Lilleengen To: freebsd-current@freebsd.org, freebsd-hackers@freebsd.org Message-ID: <20080306235238.GB1181@carrot.studby.ntnu.no> Mail-Followup-To: freebsd-current@freebsd.org, freebsd-hackers@freebsd.org References: <20080306124458.GA50277@carrot.studby.ntnu.no> <20080306162224.GC89327@dragon.NUXI.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080306162224.GC89327@dragon.NUXI.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Virus-Scanned: Debian amavisd-new at bene2.itea.ntnu.no Cc: Subject: Re: Call for testers: CVSMode for csup X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 23:52:42 -0000 On Thu, Mar 06, 2008 at 08:22:24AM -0800, David O'Brien wrote: > On Thu, Mar 06, 2008 at 01:44:59PM +0100, Ulf Lilleengen wrote: > > During the past few months, I've implemented CVSMode support for csup. > > This would be good to have. > Have you looked at CVSync http://www.cvsync.org/ to see how he handled > some of the wierdness in ,v files? > No, but I've looked at cvsup. Most of the wierdness is handled, only two issues listed in my e-mail remains, and they should not be too hard to fix. However, I'm not sure how important they are either, since it's actually a matter of different amounts of newlines which doesn't have anything to do with the RCS file structure itself. But thanks for the tip anyway. I'll take a look at cvssync. -- Ulf Lilleengen From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 6 19:04:55 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 663AE1065671; Thu, 6 Mar 2008 19:04:55 +0000 (UTC) (envelope-from SRS0=e92ae6ee1d1b4312ccc04ce07bff831dede8e197=632=es.net=oberman@es.net) Received: from postal1.es.net (postal3.es.net [IPv6:2001:400:14:3::8]) by mx1.freebsd.org (Postfix) with ESMTP id B71D98FC18; Thu, 6 Mar 2008 19:04:54 +0000 (UTC) (envelope-from SRS0=e92ae6ee1d1b4312ccc04ce07bff831dede8e197=632=es.net=oberman@es.net) Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by postal3.es.net (Postal Node 3) with ESMTP (SSL) id MWK59252; Thu, 06 Mar 2008 11:04:52 -0800 Received: from ptavv.es.net (ptavv.es.net [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id A219445047; Thu, 6 Mar 2008 11:04:52 -0800 (PST) To: "..."@carrot.studby.ntnu.no In-Reply-To: Your message of "Thu, 06 Mar 2008 13:44:59 +0100." <20080306124458.GA50277@carrot.studby.ntnu.no> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==_Exmh_1204830292_26551P"; micalg=pgp-sha1; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit Date: Thu, 06 Mar 2008 11:04:52 -0800 From: "Kevin Oberman" Message-Id: <20080306190452.A219445047@ptavv.es.net> X-Sender-IP: 198.128.4.29 X-Sender-Domain: es.net X-Recipent: <"..."@carrot.studby.ntnu.no>; ; ; X-Sender: X-To_Name: X-To_Domain: carrot.studby.ntnu.no X-To: "..."@carrot.studby.ntnu.no X-To_Email: "..."@carrot.studby.ntnu.no X-To_Alias: "..." X-Mailman-Approved-At: Fri, 07 Mar 2008 00:13:17 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Subject: Re: Call for testers: CVSMode for csup X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Mar 2008 19:04:55 -0000 --==_Exmh_1204830292_26551P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > Date: Thu, 6 Mar 2008 13:44:59 +0100 > From: Ulf Lilleengen > Sender: owner-freebsd-current@freebsd.org > > Hello all, > > During the past few months, I've implemented CVSMode support for csup. This > means one can use csup to fetch complete CVS repositories. However, first I'd > like everyone who'd like to help, to try out this patch and test to find bugs > and issues with it. Currently, I'm pretty sure it should behave correctly in the > normal cases, but therefore needs to be tested by a wider audience. Also, > there are some flaws that are noted at the bottom of this e-mail, but the > important thing is to test the correctness regarding RCS. > > For now, I'm including the tokenizer generated by flex since the base system > flex won't be good enough yet. Hopefully, it'll get updated soon. Many thanks for working on this! While I greatly appreciate all of the work John Polstra did to create and maintain cvsup over the years, it will be very nice to be able to bid it goodbye. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 Key fingerprint:059B 2DDF 031C 9BA3 14A4 EADA 927D EBB3 987B 3751 --==_Exmh_1204830292_26551P Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) Comment: Exmh version 2.5 06/03/2002 iD8DBQFH0EBUkn3rs5h7N1ERAs8LAKCudTrmPsqEPgQQBVjdo37NvQKr9wCguDel sZWqDV7Y9qAql9GEBJ1CwTw= =fxIz -----END PGP SIGNATURE----- --==_Exmh_1204830292_26551P-- From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 02:42:59 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36CB3106566C for ; Fri, 7 Mar 2008 02:42:59 +0000 (UTC) (envelope-from adrianosf@uol.com.br) Received: from smtp.uol.com.br (smtps.uol.com.br [200.221.4.131]) by mx1.freebsd.org (Postfix) with ESMTP id EC51A8FC13 for ; Fri, 7 Mar 2008 02:42:58 +0000 (UTC) (envelope-from adrianosf@uol.com.br) Received: from localhost (localhost [127.0.0.1]) by socom6.uol.com.br (Postfix) with ESMTP id 0996FE00063D for ; Thu, 6 Mar 2008 23:30:22 -0300 (BRT) Received: from [201.26.40.20] (201-26-40-20.dsl.telesp.net.br [201.26.40.20]) by socom6.uol.com.br (Postfix) with ESMTP id 91E60E000516 for ; Thu, 6 Mar 2008 23:30:21 -0300 (BRT) Message-ID: <47D0A857.7080803@uol.com.br> Date: Thu, 06 Mar 2008 23:28:39 -0300 From: Adriano dos Santos Fernandes User-Agent: Thunderbird 2.0.0.12 (X11/20080227) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SIG5: 6d0a26c28d92c7d79d32db916ac7c2b8 Subject: Versioned symbols X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 02:42:59 -0000 Hi! First, sorry if this shouldn't belong to this list. If this is the case, please point me to the appropriate list. I want to make versioned symbols as they work in Linux, but I had no success with FreeBSD. Let me say, I've app, lib1 and lib2. lib1 and lib2 have two different functions, and I link app with both. They use the following version scripts: lib1.vers ---------- lib1 { *; }; lib2.vers ---------- lib2 { *; }; Then, I rebuild lib2 to have the same lib1 function, and when app calls that function (that nows exists in lib1 and lib2) the call go to lib2. I suppose the app should call the lib1 function, as the imported function is defined with lib1 "namespace". If you want, I can post a small test case. Do exists any different on Linux and FreeBSD re. versioned symbols? Is there a way to achieve what I want? Thanks, Adriano From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 02:45:50 2008 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C648A106566B; Fri, 7 Mar 2008 02:45:50 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from smtp8.server.rpi.edu (smtp8.server.rpi.edu [128.113.2.228]) by mx1.freebsd.org (Postfix) with ESMTP id 6DA688FC12; Fri, 7 Mar 2008 02:45:50 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp8.server.rpi.edu (8.13.1/8.13.1) with ESMTP id m271gBKU029017; Thu, 6 Mar 2008 20:42:12 -0500 Mime-Version: 1.0 Message-Id: In-Reply-To: <20080306235238.GB1181@carrot.studby.ntnu.no> References: <20080306124458.GA50277@carrot.studby.ntnu.no> <20080306162224.GC89327@dragon.NUXI.org> <20080306235238.GB1181@carrot.studby.ntnu.no> Date: Thu, 6 Mar 2008 20:42:10 -0500 To: Ulf Lilleengen , freebsd-current@FreeBSD.org, freebsd-hackers@FreeBSD.org From: Garance A Drosehn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-RPI-SA-Score: undef - spam scanning disabled X-CanItPRO-Stream: default X-Canit-Stats-ID: Bayes signature not available X-Scanned-By: CanIt (www . roaringpenguin . com) on 128.113.2.228 Cc: Subject: Re: Call for testers: CVSMode for csup X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 02:45:51 -0000 At 12:52 AM +0100 3/7/08, Ulf Lilleengen wrote: >On Thu, Mar 06, 2008 at 08:22:24AM -0800, David O'Brien wrote: >> On Thu, Mar 06, 2008 at 01:44:59PM +0100, Ulf Lilleengen wrote: > > > During the past few months, I've implemented CVSMode support > > > for csup. > > >> This would be good to have. > > Have you looked at CVSync http://www.cvsync.org/ to see how he > > handled some of the wierdness in ,v files? > >No, but I've looked at cvsup. Most ... Hmm, somehow I have not received the earlier messages in this thread, but it would be great to have cvsmode for csup. -- Garance Alistair Drosehn = drosehn@rpi.edu Senior Systems Programmer or gad@FreeBSD.org Rensselaer Polytechnic Institute; Troy, NY; USA From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 02:53:55 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEE771065675 for ; Fri, 7 Mar 2008 02:53:55 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id DFC328FC1C for ; Fri, 7 Mar 2008 02:53:55 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 944CF1CC033; Thu, 6 Mar 2008 18:53:55 -0800 (PST) Date: Thu, 6 Mar 2008 18:53:55 -0800 From: Jeremy Chadwick To: Adriano dos Santos Fernandes Message-ID: <20080307025355.GA9876@eos.sc1.parodius.com> References: <47D0A857.7080803@uol.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47D0A857.7080803@uol.com.br> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-hackers@freebsd.org Subject: Re: Versioned symbols X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 02:53:56 -0000 On Thu, Mar 06, 2008 at 11:28:39PM -0300, Adriano dos Santos Fernandes wrote: > I want to make versioned symbols as they work in Linux, but I had no > success with FreeBSD. This seems quite relevant, specific to RELENG_7. (Said feature isn't available in earlier releases): http://www.freebsd.org/releases/7.0R/relnotes.html The rtld(1) runtime linker now supports ELF symbol versioning using GNU semantics. This implementation aims to be compatible with symbol versioning support as implemented by GNU libc and documented in http://people.redhat.com/~drepper/symbol-versioning and LSB 3.0. Also, dlvsym() function has been added to allow lookups for a specific version of a given symbol. -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB | From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 09:20:10 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EF8B106566B; Fri, 7 Mar 2008 09:20:10 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 08D088FC1E; Fri, 7 Mar 2008 09:20:09 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 5B5D146BA3; Fri, 7 Mar 2008 04:20:09 -0500 (EST) Date: Fri, 7 Mar 2008 09:20:09 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Alexander Motin In-Reply-To: <47D07CC6.5060007@FreeBSD.org> Message-ID: <20080307091547.M23519@fledge.watson.org> References: <47D07CC6.5060007@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: soclose() & so->so_upcall() = race? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 09:20:10 -0000 On Fri, 7 Mar 2008, Alexander Motin wrote: > As I can see so_upcall() callback is called with SOCKBUF_MTX unlocked. It > means that SB_UPCALL flag can be removed during call and socket can be > closed and deallocated with soclose() while callback is running. Am I right > or I have missed something? How in that situation socket pointer protected > from being used after free? There are known problems with so_upcall and locking, including this one. The other problems include: - The locking condition on entering the upcall depends on the invocation point and is inconsistent. - The protection of the upcall field and flag are inconsistent. - Consumers of so_upcall, such as socket accept filters, don't properly respect the locking environment they run in. - Some (all) accept filters produce nastily convoluted stack traces involving recursion across really odd combinations of sockets and protocols. For example, you can see soisdisconnected() calling soisconnected(). Some of this is inherent to the design of accept filters and so_upcall and follows from using a single function pointer for many different cases. I have an 8.x todo list item to try and figure out how to make so_upcall and accept filters rational in the context of fine-grained locking, but I've not yet reached that point on my todo list. I think we can continue to incrementally hack so_upcall and accept filters to fix many races, but the reality is that we need a more coherent model for dealing with accept filters. One idea that Colin Percival (I think) suggested is that we separate socket upcalls from accept filters, and that accept filters consistent of a predicate for completion rather than directly invoking socket state transitions. I've not explored the implications, but think it might well be a good idea to avoid the weird stack traces. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 10:33:27 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C70C71065673 for ; Fri, 7 Mar 2008 10:33:27 +0000 (UTC) (envelope-from dumbbell@freebsd.org) Received: from mail.ilius.net (mail.ilius.net [62.23.30.92]) by mx1.freebsd.org (Postfix) with ESMTP id 329538FC2D for ; Fri, 7 Mar 2008 10:33:26 +0000 (UTC) (envelope-from dumbbell@freebsd.org) Received: from viking.ilius.fr [192.168.192.55] by mail.ilius.net with ESMTP (SMTPD-9.22) id A4C32B1C; Fri, 07 Mar 2008 11:11:15 +0100 Message-ID: <47D114C5.2000108@freebsd.org> Date: Fri, 07 Mar 2008 11:11:17 +0100 From: =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= User-Agent: Thunderbird 2.0.0.12 (X11/20080229) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: sysctl: good practices and how to deprecate a node X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 10:33:27 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I'm currently working again on the Synaptics Touchpad support[1] in psm(4). The enable_synaptics() probe function adds a subtree to "hw.psm"; I didn't changed its behaviour for now. This subtree is created only if: o "hw.psm.synaptics_support" is true o no previous probe function "took" the device. If the function doesn't find a Synaptics touchpad, the tree is left created. First, is enable_synaptics() the right place to add this subtree (compared to a "globally" created tree, like "hw.psm")? If enable_synaptics() is the way to go, should it be always created if "hw.psm.synaptics_support" is true, even if no touchpad is found? Or only when the touchpad is detected? In psmsoftintr(), the code in FreeBSD doesn't check for bad sysctl values. My patch doesn't do it either for now. But wrong values could cause division by zero for example. Is there a way to check sysctls only when they are modified, instead of before every use? Last question: I expanded the Synaptics subtree with my own nodes but there are three nodes which are not used anymore. How should I handle deprecation of these nodes? Thanks :) [1] See the wiki: http://wiki.freebsd.org/SynapticsTouchpad - -- Jean-Sébastien Pédron http://www.dumbbell.fr/ PGP Key: http://www.dumbbell.fr/pgp/pubkey.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfRFMUACgkQa+xGJsFYOlOrZwCfbtAZw1nZ6xImO+azyprKfl+1 kGcAnjifjCtz3BvXkuj9sEWuCUakKvp1 =oLs1 -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 04:46:34 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83CD11065670 for ; Fri, 7 Mar 2008 04:46:34 +0000 (UTC) (envelope-from Shaun.Marko@lodgenet.com) Received: from garbo.lodgenet.com (garbo.lodgenet.com [204.124.121.250]) by mx1.freebsd.org (Postfix) with ESMTP id 420658FC17 for ; Fri, 7 Mar 2008 04:46:34 +0000 (UTC) (envelope-from Shaun.Marko@lodgenet.com) Received: from hardy.lodgenet.com (hardy.lodgenet.com [10.16.101.109]) by garbo.lodgenet.com (8.12.11.20060308/8.12.11) with ESMTP id m273jIhg031344 for ; Thu, 6 Mar 2008 21:45:39 -0600 Received: from cheney.lodgenet.com (Not Verified[10.16.101.108]) by hardy.lodgenet.com with MailMarshal (v6, 1, 6, 1172) id ; Thu, 06 Mar 2008 21:45:18 -0600 Received: from host.lodgenet.com ([host.lodgenet.com]) by host.lodgenet.com with Microsoft SMTPSVC(5.0.2195.5329); Thu, 6 Mar 2008 21:45:17 -0600 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C88005.A893C9B5" Date: Thu, 6 Mar 2008 21:45:15 -0600 Message-ID: <87D91DEDB1111C44BBFB9E3E90FF1E6E9553E0@host.lodgenet.com> X-MS-Has-Attach: yes X-MS-TNEF-Correlator: Thread-Topic: libpthread/fork issue Thread-Index: AciABafEbLIbebCpR/ST46Z5eA1MQQ== From: "Marko, Shaun" To: "FreeBSD Hackers" X-OriginalArrivalTime: 07 Mar 2008 03:45:17.0747 (UTC) FILETIME=[A8EEC030:01C88005] X-Mailman-Approved-At: Fri, 07 Mar 2008 12:12:13 +0000 Subject: libpthread/fork issue X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 04:46:34 -0000 This is a multi-part message in MIME format. ------_=_NextPart_001_01C88005.A893C9B5 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable I'm working on FreeBSD 6.2 and I'm wondering if anybody can help with an issue I've found using fork and threads. The attached program demonstrates the problem. In short, if a process creates a thread, joins the thread, then forks a child process which creates a thread, the child's attempt to create a thread will cause the program to dump core with the following error message: Fatal error 'mutex is on list' at line 540 in file /usr/src/lib/libpthread/thread/thr_mutex.c (errno =3D 0). This seems to be true using an SMP or UP kernel. If you run the attached program with no arguments, the parent process will not create and join a thread and will not crash. Here is the output: [Sherlock]$ ./threadTest child: born child: thread created child: thread joined parent: child died If you run the attached program with "-crash", the parent process creates and joins a thread, causing the error: [Sherlock]$ ./threadTest -crash parent: thread created parent: thread joined child: born Fatal error 'mutex is on list' at line 540 in file /usr/src/lib/libpthread/thread/thr_mutex.c (errno =3D 0) parent: child died Here is the backtrace of the resulting core: #0 0x28097537 in pthread_testcancel () from /lib/libpthread.so.2 [New Thread 0x8053200 (LWP 100163)] [New Thread 0x8053000 (LWP 100201)] (gdb) where #0 0x28097537 in pthread_testcancel () from /lib/libpthread.so.2 #1 0x2808689a in sigaction () from /lib/libpthread.so.2 #2 0x2808088d in pthread_kill () from /lib/libpthread.so.2 #3 0x28080256 in raise () from /lib/libpthread.so.2 #4 0x28159b78 in abort () from /lib/libc.so.6 #5 0x28097c6f in pthread_testcancel () from /lib/libpthread.so.2 #6 0x2808c85f in _pthread_mutex_trylock () from /lib/libpthread.so.2 #7 0x2808d590 in _pthread_mutex_lock () from /lib/libpthread.so.2 #8 0x28083361 in _spinlock () from /lib/libpthread.so.2 #9 0x280f7ddb in _UTF8_init () from /lib/libc.so.6 #10 0x28172940 in _thread_autoinit_dummy_decl_stub () from /lib/libc.so.6 #11 0x28074200 in ?? () #12 0x2804f405 in symlook_obj () from /libexec/ld-elf.so.1 #13 0x280883ff in pthread_attr_init () from /lib/libpthread.so.2 #14 0x280848fd in sigaction () from /lib/libpthread.so.2 #15 0x2808e915 in pthread_mutexattr_init () from /lib/libpthread.so.2 #16 0x28088116 in pthread_create () from /lib/libpthread.so.2 #17 0x08048795 in spawnThread (caller=3D0x80489f0 "child") at threadTest.c:21 #18 0x08048879 in main (argc=3D2, argv=3D0x17e) at threadTest.c:62 Any help would be greatly appreciated.=20 -Shaun ------_=_NextPart_001_01C88005.A893C9B5 Content-Type: application/octet-stream; name="Makefile" Content-Transfer-Encoding: base64 Content-Description: Makefile Content-Disposition: attachment; filename="Makefile" UFJPRz10aHJlYWRUZXN0ClNSQ1M9dGhyZWFkVGVzdC5jCk5PX01BTj10Ck5PX09CSj10CkxEQURE PS1scHRocmVhZAouaW5jbHVkZTxic2QucHJvZy5taz4K ------_=_NextPart_001_01C88005.A893C9B5 Content-Type: application/octet-stream; name="threadTest.c" Content-Transfer-Encoding: base64 Content-Description: threadTest.c Content-Disposition: attachment; filename="threadTest.c" I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KI2luY2x1ZGUgPGVycm5vLmg+ CiNpbmNsdWRlIDxwdGhyZWFkLmg+CgpzdGF0aWMgdm9pZCB1c2FnZSh2b2lkKQp7CiAgICBmcHJp bnRmKHN0ZGVyciwgInVzYWdlOiB0aHJlYWRUZXN0IFstY3Jhc2hdXG4iKTsKICAgIGV4aXQoMSk7 Cn0Kdm9pZCogdGhyZWFkRnVuYyh2b2lkKiBhcmdzKQp7CiAgICBjaGFyICpjYWxsZXIgPSAoY2hh ciopYXJnczsKICAgIHByaW50ZigiJXM6IHRocmVhZCBjcmVhdGVkXG4iLCBjYWxsZXIpOwogICAg cmV0dXJuIDA7Cn0KCmludCBzcGF3blRocmVhZChjaGFyICpjYWxsZXIpCnsKICAgIHB0aHJlYWRf dCB0OwogICAgaW50IGVyciA9IHB0aHJlYWRfY3JlYXRlKCZ0LCAwLCB0aHJlYWRGdW5jLCBjYWxs ZXIpOwogICAgaWYgKGVycikKICAgIHsKCWZwcmludGYoc3RkZXJyLCAiJXM6IHVuYWJsZSB0byBj cmVhdGUgdGhyZWFkOiAlc1xuIiwgY2FsbGVyLCBzdHJlcnJvcihlcnIpKTsKCXJldHVybiAxOwog ICAgfQogICAgZXJyID0gcHRocmVhZF9qb2luKHQsIDApOwogICAgaWYgKGVycikKICAgIHsKCWZw cmludGYoc3RkZXJyLCAiJXM6IHVuYWJsZSB0byBqb2luIHRocmVhZDogJXNcbiIsIGNhbGxlciwg c3RyZXJyb3IoZXJyKSk7CglyZXR1cm4gMTsKICAgIH0KICAgIHByaW50ZigiJXM6IHRocmVhZCBq b2luZWRcbiIsIGNhbGxlcik7CiAgICByZXR1cm4gMDsKfQoKaW50IG1haW4oaW50IGFyZ2MsIGNo YXIgKiphcmd2KQp7CiAgICBpZiAoYXJnYyA9PSAyKQogICAgewoJaWYgKHN0cmNtcChhcmd2WzFd LCAiLWNyYXNoIikgPT0gMCkKCXsKCSAgICBpZiAoc3Bhd25UaHJlYWQoInBhcmVudCIpKQoJICAg IHsKCQlyZXR1cm4gMTsKCSAgICB9Cgl9CgllbHNlCgl7CgkgICAgdXNhZ2UoKTsKCX0KICAgIH0K ICAgIHBpZF90IHBpZCA9IGZvcmsoKTsKICAgIGlmIChwaWQgPT0gLTEpCiAgICB7CglmcHJpbnRm KHN0ZGVyciwgInVuYWJsZSB0byBmb3JrOiAlc1xuIiwgc3RyZXJyb3IoZXJybm8pKTsKCXJldHVy biAxOwogICAgfQogICAgZWxzZSBpZiAocGlkID09IDApCiAgICB7CglwcmludGYoImNoaWxkOiBi b3JuXG4iKTsKCXJldHVybiBzcGF3blRocmVhZCgiY2hpbGQiKTsKICAgIH0KICAgIGVsc2UKICAg IHsKCWludCBzdGF0dXM7CglwaWRfdCBwaWQgPSB3YWl0KCZzdGF0dXMpOwoJaWYgKHBpZCA9PSAt MSkKCXsKCSAgIGZwcmludGYoc3RkZXJyLCAicGFyZW50OiB3YWl0OiAlc1xuIiwgc3RyZXJyb3Io ZXJybm8pKTsKCSAgIHJldHVybiAxOwoJfQoJcHJpbnRmKCJwYXJlbnQ6IGNoaWxkIGRpZWRcbiIp OwogICAgfQogICAgcmV0dXJuIDA7Cn0K ------_=_NextPart_001_01C88005.A893C9B5-- From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 12:20:01 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 803931065675 for ; Fri, 7 Mar 2008 12:20:01 +0000 (UTC) (envelope-from adrianosf@uol.com.br) Received: from smtp.uol.com.br (smtps.uol.com.br [200.221.4.131]) by mx1.freebsd.org (Postfix) with ESMTP id 382228FC26 for ; Fri, 7 Mar 2008 12:20:00 +0000 (UTC) (envelope-from adrianosf@uol.com.br) Received: from localhost (localhost [127.0.0.1]) by socom8.uol.com.br (Postfix) with ESMTP id AFFDD1C000C41; Fri, 7 Mar 2008 09:19:59 -0300 (BRT) Received: from [192.200.1.46] (mail.mococa.com [200.153.112.18]) by socom8.uol.com.br (Postfix) with ESMTP id 413B71C00007F; Fri, 7 Mar 2008 09:19:58 -0300 (BRT) Message-ID: <47D1330B.3030509@uol.com.br> Date: Fri, 07 Mar 2008 09:20:27 -0300 From: Adriano dos Santos Fernandes User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Jeremy Chadwick References: <47D0A857.7080803@uol.com.br> <20080307025355.GA9876@eos.sc1.parodius.com> In-Reply-To: <20080307025355.GA9876@eos.sc1.parodius.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SIG5: afa3fe21027bc8b777786d2701e65ea3 Cc: freebsd-hackers@freebsd.org Subject: Re: Versioned symbols X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 12:20:01 -0000 Jeremy Chadwick escreveu: > On Thu, Mar 06, 2008 at 11:28:39PM -0300, Adriano dos Santos Fernandes wrote: > >> I want to make versioned symbols as they work in Linux, but I had no >> success with FreeBSD. >> > > This seems quite relevant, specific to RELENG_7. (Said feature isn't > available in earlier releases): Thanks Jeremy... My usage for versioned symbols would be to have multiple shared libraries implementing the same entrypoints... For dlopen'ed libraries, I suppose there is no problem with unversioned symbols, correct? But I want a kind of Windows DLL semantics... If my app dynamic loads lib1 and lib2, that implements the same functions and latter it loads lib3, a different library linked against lib2 (-l2). I want that calls from lib3 always go to lib2. Are versioned symbols the only way to achieve that or there is another way? Thanks, Adriano From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 13:36:13 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D13BC106566C for ; Fri, 7 Mar 2008 13:36:13 +0000 (UTC) (envelope-from roberthuff@rcn.com) Received: from smtp02.lnh.mail.rcn.net (smtp02.lnh.mail.rcn.net [207.172.157.102]) by mx1.freebsd.org (Postfix) with ESMTP id 8701A8FC20 for ; Fri, 7 Mar 2008 13:36:13 +0000 (UTC) (envelope-from roberthuff@rcn.com) Received: from mr02.lnh.mail.rcn.net ([207.172.157.22]) by smtp02.lnh.mail.rcn.net with ESMTP; 07 Mar 2008 08:26:02 -0500 Received: from smtp01.lnh.mail.rcn.net (smtp01.lnh.mail.rcn.net [207.172.4.11]) by mr02.lnh.mail.rcn.net (MOS 3.8.6-GA) with ESMTP id OMH94414; Fri, 7 Mar 2008 08:26:01 -0500 (EST) Received: from 209-6-22-188.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com (HELO jerusalem.litteratus.org.litteratus.org) ([209.6.22.188]) by smtp01.lnh.mail.rcn.net with ESMTP; 07 Mar 2008 08:25:02 -0500 From: Robert Huff MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18385.17023.868604.874247@jerusalem.litteratus.org> Date: Fri, 7 Mar 2008 08:26:23 -0500 To: Tom Evans In-Reply-To: <1204795367.2126.234.camel@localhost> References: <1204795367.2126.234.camel@localhost> X-Mailer: VM 7.17 under 21.5 (beta28) "fuki" XEmacs Lucid X-Junkmail-Whitelist: YES (by domain whitelist at mr02.lnh.mail.rcn.net) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Comments on pmake diffs for building on Linux X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 13:36:13 -0000 Tom Evans writes: > > Yup. The proof will be in the pudding, as they say. > > The proof of the pudding is in the eating, actually. There's no proof > actually in the pudding. > > Add some brandy, or maybe rum .... :-) Makes the coding more fun. Maybe not faster or more accurate, but more fun. Robert Huff From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 14:07:48 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 772771065677 for ; Fri, 7 Mar 2008 14:07:48 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from www.pkgsrc-box.org (www.ostsee-abc.de [62.206.222.50]) by mx1.freebsd.org (Postfix) with ESMTP id 330FD8FC28 for ; Fri, 7 Mar 2008 14:07:47 +0000 (UTC) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (www.pkgsrc-box.org [127.0.0.1]) by www.pkgsrc-box.org (Postfix) with ESMTP id 29FB84B67E3 for ; Fri, 7 Mar 2008 14:07:46 +0000 (UTC) Received: by britannica.bec.de (Postfix, from userid 1000) id 4E7A8175D5; Fri, 7 Mar 2008 15:07:02 +0100 (CET) Date: Fri, 7 Mar 2008 15:07:02 +0100 From: Joerg Sonnenberger To: freebsd-hackers@freebsd.org Message-ID: <20080307140702.GE2032@britannica.bec.de> Mail-Followup-To: freebsd-hackers@freebsd.org References: <87D91DEDB1111C44BBFB9E3E90FF1E6E9553E0@host.lodgenet.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87D91DEDB1111C44BBFB9E3E90FF1E6E9553E0@host.lodgenet.com> User-Agent: Mutt/1.5.16 (2007-06-09) Subject: Re: libpthread/fork issue X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 14:07:48 -0000 On Thu, Mar 06, 2008 at 09:45:15PM -0600, Marko, Shaun wrote: > In short, if a process creates a thread, joins > the thread, then forks a child process which creates a thread, the > child's attempt to create a thread will cause the program to dump core > with the following error message. fork and pthread should not be mixed. You can and normally should only assume that the current thread is present in the child. Joerg From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 14:19:07 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E1151065679 for ; Fri, 7 Mar 2008 14:19:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 4A4398FC15 for ; Fri, 7 Mar 2008 14:19:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id 158D61A4D87; Fri, 7 Mar 2008 06:18:37 -0800 (PST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 7 Mar 2008 08:24:55 -0500 User-Agent: KMail/1.9.7 References: <47D114C5.2000108@freebsd.org> In-Reply-To: <47D114C5.2000108@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200803070824.55826.jhb@freebsd.org> Cc: =?utf-8?q?Jean-S=C3=A9bastien_P=C3=A9dron?= Subject: Re: sysctl: good practices and how to deprecate a node X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 14:19:07 -0000 On Friday 07 March 2008 05:11:17 am Jean-S=C3=A9bastien P=C3=A9dron wrote: > Hello, > > I'm currently working again on the Synaptics Touchpad support[1] in psm(4= ). > > The enable_synaptics() probe function adds a subtree to "hw.psm"; I > didn't changed its behaviour for now. This subtree is created only if: > o "hw.psm.synaptics_support" is true > o no previous probe function "took" the device. > If the function doesn't find a Synaptics touchpad, the tree is left > created. > > First, is enable_synaptics() the right place to add this subtree > (compared to a "globally" created tree, like "hw.psm")? Sure. > If enable_synaptics() is the way to go, should it be always created if > "hw.psm.synaptics_support" is true, even if no touchpad is found? Or > only when the touchpad is detected?=20 Probably only if you have an actual touchpad. > In psmsoftintr(), the code in FreeBSD doesn't check for bad sysctl > values. My patch doesn't do it either for now. But wrong values could > cause division by zero for example. Is there a way to check sysctls only > when they are modified, instead of before every use? Yes, use a SYSCTL_PROC() for those nodes. > Last question: I expanded the Synaptics subtree with my own nodes but > there are three nodes which are not used anymore. How should I handle > deprecation of these nodes? Just remove them. =2D-=20 John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 14:19:09 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD4EB1065754 for ; Fri, 7 Mar 2008 14:19:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 92B1F8FC28 for ; Fri, 7 Mar 2008 14:19:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id E29651A4D89; Fri, 7 Mar 2008 06:18:37 -0800 (PST) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Fri, 7 Mar 2008 08:26:14 -0500 User-Agent: KMail/1.9.7 References: <87D91DEDB1111C44BBFB9E3E90FF1E6E9553E0@host.lodgenet.com> In-Reply-To: <87D91DEDB1111C44BBFB9E3E90FF1E6E9553E0@host.lodgenet.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803070826.14877.jhb@freebsd.org> Cc: "Marko, Shaun" Subject: Re: libpthread/fork issue X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 14:19:09 -0000 On Thursday 06 March 2008 10:45:15 pm Marko, Shaun wrote: > I'm working on FreeBSD 6.2 and I'm wondering if anybody can help with an > issue I've found using fork and threads. The attached program > demonstrates the problem. In short, if a process creates a thread, joins > the thread, then forks a child process which creates a thread, the > child's attempt to create a thread will cause the program to dump core > with the following error message: > Fatal error 'mutex is on list' at line 540 in file > /usr/src/lib/libpthread/thread/thr_mutex.c (errno = 0). > > This seems to be true using an SMP or UP kernel. > > If you run the attached program with no arguments, the parent process > will not create and join a thread and will not crash. Here is the > output: > [Sherlock]$ ./threadTest > child: born > child: thread created > child: thread joined > parent: child died > > If you run the attached program with "-crash", the parent process > creates and joins a thread, causing the error: > [Sherlock]$ ./threadTest -crash > parent: thread created > parent: thread joined > child: born > Fatal error 'mutex is on list' at line 540 in file > /usr/src/lib/libpthread/thread/thr_mutex.c (errno = 0) > parent: child died > > Here is the backtrace of the resulting core: > #0 0x28097537 in pthread_testcancel () from /lib/libpthread.so.2 > [New Thread 0x8053200 (LWP 100163)] > [New Thread 0x8053000 (LWP 100201)] > (gdb) where > #0 0x28097537 in pthread_testcancel () from /lib/libpthread.so.2 > #1 0x2808689a in sigaction () from /lib/libpthread.so.2 > #2 0x2808088d in pthread_kill () from /lib/libpthread.so.2 > #3 0x28080256 in raise () from /lib/libpthread.so.2 > #4 0x28159b78 in abort () from /lib/libc.so.6 > #5 0x28097c6f in pthread_testcancel () from /lib/libpthread.so.2 > #6 0x2808c85f in _pthread_mutex_trylock () from /lib/libpthread.so.2 > #7 0x2808d590 in _pthread_mutex_lock () from /lib/libpthread.so.2 > #8 0x28083361 in _spinlock () from /lib/libpthread.so.2 > #9 0x280f7ddb in _UTF8_init () from /lib/libc.so.6 > #10 0x28172940 in _thread_autoinit_dummy_decl_stub () from > /lib/libc.so.6 > #11 0x28074200 in ?? () > #12 0x2804f405 in symlook_obj () from /libexec/ld-elf.so.1 > #13 0x280883ff in pthread_attr_init () from /lib/libpthread.so.2 > #14 0x280848fd in sigaction () from /lib/libpthread.so.2 > #15 0x2808e915 in pthread_mutexattr_init () from /lib/libpthread.so.2 > #16 0x28088116 in pthread_create () from /lib/libpthread.so.2 > #17 0x08048795 in spawnThread (caller=0x80489f0 "child") at > threadTest.c:21 > #18 0x08048879 in main (argc=2, argv=0x17e) at threadTest.c:62 > > Any help would be greatly appreciated. POSIX only lets you call exec() from a child process of a multithreaded app. Either fork before creating threads or just create more threads rather than forking. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 14:36:59 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DC8D1065673 for ; Fri, 7 Mar 2008 14:36:59 +0000 (UTC) (envelope-from ady@ady.ro) Received: from rn-out-0910.google.com (rn-out-0910.google.com [64.233.170.188]) by mx1.freebsd.org (Postfix) with ESMTP id D45338FC1D for ; Fri, 7 Mar 2008 14:36:58 +0000 (UTC) (envelope-from ady@ady.ro) Received: by rn-out-0910.google.com with SMTP id e11so824167rng.7 for ; Fri, 07 Mar 2008 06:36:58 -0800 (PST) Received: by 10.142.79.15 with SMTP id c15mr586525wfb.105.1204900616842; Fri, 07 Mar 2008 06:36:56 -0800 (PST) Received: by 10.143.37.8 with HTTP; Fri, 7 Mar 2008 06:36:56 -0800 (PST) Message-ID: <78cb3d3f0803070636l38ca7683t24235efd8f989c67@mail.gmail.com> Date: Fri, 7 Mar 2008 16:36:56 +0200 From: "Adrian Penisoara" Sender: ady@ady.ro To: freebsd-database@freebsd.org, freebsd-ports@freebsd.org, freebsd-emulation@freebsd.org MIME-Version: 1.0 X-Google-Sender-Auth: fd713219ff5180ce Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-isp@freebsd.org, freebsd-hackers@freebsd.org Subject: Preparing an Oracle Database XE port/package -- any tips ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 14:36:59 -0000 Hi, After having to deploy an Oracle Database XE [1] installation (with Linux 32bit binaries from the official RPM package) on a production FreeBSD 6.2machine I realized it would be very much feasible to produce a FreeBSD port/package for it. I would like to know whether similar efforts have been undergoing and whether people came up with some tips & tricks on this. The goal is not only to add the port into FreeBSD's ports tree but also to eventually convince Oracle (I work for them) to post the package on their official download page. [1] http://www.oracle.com/technology/products/database/xe/index.html Thank you for your time and help, Adrian Penisoara ROFUG / EnterpriseBSD From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 14:40:01 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE8B11065674 for ; Fri, 7 Mar 2008 14:40:01 +0000 (UTC) (envelope-from rink@tragedy.rink.nu) Received: from mx1.rink.nu (alastor.rink.nu [213.34.49.5]) by mx1.freebsd.org (Postfix) with ESMTP id 7E6D68FC2B for ; Fri, 7 Mar 2008 14:40:01 +0000 (UTC) (envelope-from rink@tragedy.rink.nu) Received: from localhost (alastor.rink.nu [213.34.49.5]) by mx1.rink.nu (Postfix) with ESMTP id 19C76BFECB7; Fri, 7 Mar 2008 14:39:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.5]) by localhost (alastor.rink.nu [213.34.49.5]) (amavisd-new, port 10024) with ESMTP id wuoX3rsvJzTA; Fri, 7 Mar 2008 14:39:46 +0000 (UTC) Received: from tragedy.rink.nu (tragedy.rink.nu [213.34.49.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.rink.nu (Postfix) with ESMTP id C8CADBFEB79; Fri, 7 Mar 2008 14:39:46 +0000 (UTC) Received: from tragedy.rink.nu (tragedy.rink.nu [213.34.49.3]) by tragedy.rink.nu (8.13.8/8.13.8) with ESMTP id m27EdkUV038500; Fri, 7 Mar 2008 15:39:46 +0100 (CET) (envelope-from rink@tragedy.rink.nu) Received: (from rink@localhost) by tragedy.rink.nu (8.13.8/8.13.8/Submit) id m27EdkCO038499; Fri, 7 Mar 2008 15:39:46 +0100 (CET) (envelope-from rink) Date: Fri, 7 Mar 2008 15:39:46 +0100 From: Rink Springer To: Adrian Penisoara Message-ID: <20080307143946.GI90443@rink.nu> References: <78cb3d3f0803070636l38ca7683t24235efd8f989c67@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <78cb3d3f0803070636l38ca7683t24235efd8f989c67@mail.gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: freebsd-database@freebsd.org, freebsd-isp@freebsd.org, freebsd-emulation@freebsd.org, freebsd-ports@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Preparing an Oracle Database XE port/package -- any tips ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 14:40:01 -0000 Hi, On Fri, Mar 07, 2008 at 04:36:56PM +0200, Adrian Penisoara wrote: > After having to deploy an Oracle Database XE [1] installation (with Linux > 32bit binaries from the official RPM package) on a production FreeBSD > 6.2machine I realized it would be very much feasible to produce a > FreeBSD > port/package for it. > I would like to know whether similar efforts have been undergoing and > whether people came up with some tips & tricks on this. We run Oracle XE on two FreeBSD 6.3 machines at work - we've just manually set it up, but are very interested in a port of it. We did the same as you basically - just uncompress it and move the files in place. Regards, -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 15:07:19 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 036F91065675 for ; Fri, 7 Mar 2008 15:07:19 +0000 (UTC) (envelope-from wxs@atarininja.org) Received: from syn.atarininja.org (syn.csh.rit.edu [129.21.60.158]) by mx1.freebsd.org (Postfix) with ESMTP id D6E168FC1E for ; Fri, 7 Mar 2008 15:07:18 +0000 (UTC) (envelope-from wxs@atarininja.org) Received: by syn.atarininja.org (Postfix, from userid 1001) id 5501C5C34; Fri, 7 Mar 2008 09:55:02 -0500 (EST) Date: Fri, 7 Mar 2008 09:55:02 -0500 From: Wesley Shields To: freebsd-hackers@freebsd.org Message-ID: <20080307145502.GC97539@atarininja.org> References: <20080306212044.GA72211@marinos.ceid.upatras.gr> <47D06C70.50400@moneybookers.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47D06C70.50400@moneybookers.com> User-Agent: Mutt/1.5.17 (2007-11-01) Subject: Re: Network Throughput between jail and base system X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 15:07:19 -0000 On Fri, Mar 07, 2008 at 12:13:04AM +0200, Stefan Lambrev wrote: > Greetings, > > > Ilias Marinos wrote: > > Hello all, > > I have a jail to my FreeBSD-STABLE, in which I run some > > > uname -a will be more helpful then "FreeBSD-STABLE". > > services.I have configured and setup this jail using ezjail-admin. > > marinosi@marinos:~$ jls > > JID IP Address Hostname Path > > 1 192.168.1.100 ws /usr/jails/ws > > /usr/jails/ws > > > > #Jails > > ezjail_enable="YES" > > ifconfig_lo1="192.168.1.100 netmask 0xffffffff" # Jail iface > > > > I use lo1 as jail interface and I nat internet traffic to it with pf: > > nat on $ext_if from $ws to any -> ($ext_if) > > > > Today I 've tried to scp a big directory inside the jail and > > I've noticed that I was secure copying with 2-3MB/s .That sounds too > > weird for me and I would like to hear some opinions , for what it may be > > the problem. > > > > > You should investigate where the bottle-neck is. It's probably not in > the network protocol. > Most probably it is limitation of your CPU or your HDD(s). > I think (not sure) jail have default limit to % of the CPU resources, so > if you encrypt the stream > most probably the limitation is in the CPU. > You can check http://wiki.freebsd.org/JailResourceLimits for more > information. Based upon that wiki page I'm led to believe that this is not in any branch of FreeBSD yet. That is, it's not in CVS. -- WXS From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 16:32:36 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40A2A1065681 for ; Fri, 7 Mar 2008 16:32:36 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id DF5068FC14 for ; Fri, 7 Mar 2008 16:32:35 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.2/8.14.2/NETPLEX) with ESMTP id m27G8otF013328; Fri, 7 Mar 2008 11:08:50 -0500 (EST) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-4.0 (mail.netplex.net [204.213.176.10]); Fri, 07 Mar 2008 11:08:51 -0500 (EST) Date: Fri, 7 Mar 2008 11:08:50 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: "Marko, Shaun" In-Reply-To: <87D91DEDB1111C44BBFB9E3E90FF1E6E9553E0@host.lodgenet.com> Message-ID: References: <87D91DEDB1111C44BBFB9E3E90FF1E6E9553E0@host.lodgenet.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Content-ID: Cc: FreeBSD Hackers Subject: Re: libpthread/fork issue X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 16:32:36 -0000 On Thu, 6 Mar 2008, Marko, Shaun wrote: > I'm working on FreeBSD 6.2 and I'm wondering if anybody can help with an > issue I've found using fork and threads. The attached program > demonstrates the problem. In short, if a process creates a thread, joins > the thread, then forks a child process which creates a thread, the > child's attempt to create a thread will cause the program to dump core > with the following error message: > Fatal error 'mutex is on list' at line 540 in file > /usr/src/lib/libpthread/thread/thr_mutex.c (errno = 0). You are not allowed by POSIX to call any non-async-signal-safe function from a child of a threaded program. There's words or rationale to the effect that the only purpose for forking from a threaded program should be to call one of the exec* functions. Trying to create a thread from a child (like you are trying to do) is definitely not supported. -- DE From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 16:48:04 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03B59106566B for ; Fri, 7 Mar 2008 16:48:04 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.190]) by mx1.freebsd.org (Postfix) with ESMTP id 957ED8FC1D for ; Fri, 7 Mar 2008 16:48:03 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: by fk-out-0910.google.com with SMTP id b27so464058fka.11 for ; Fri, 07 Mar 2008 08:48:02 -0800 (PST) Received: by 10.82.171.16 with SMTP id t16mr3573664bue.25.1204908481536; Fri, 07 Mar 2008 08:48:01 -0800 (PST) Received: by 10.82.185.8 with HTTP; Fri, 7 Mar 2008 08:47:56 -0800 (PST) Message-ID: Date: Fri, 7 Mar 2008 18:47:56 +0200 From: "Vlad GALU" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: A (perhaps silly) kqueue question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 16:48:04 -0000 I see an unusual symptom with one of our in-house applications. The main I/O loop calls kevent(), which in turn returns two events with EV_EOF error set, always for the same descriptors (they're both socket descriptors). As the man page is not pretty clear about it and I don't have my UNP copy at hand, I would like to ask the list whether the error events are supposed to be one-shot or not. Thanks for your kind input. -- Mahnahmahnah! From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 17:04:12 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF1871065683; Fri, 7 Mar 2008 17:04:12 +0000 (UTC) (envelope-from itetcu@FreeBSD.org) Received: from it.buh.tecnik93.com (it.buh.tecnik93.com [81.196.204.98]) by mx1.freebsd.org (Postfix) with ESMTP id 5FAFE8FC32; Fri, 7 Mar 2008 17:04:12 +0000 (UTC) (envelope-from itetcu@FreeBSD.org) Received: from it.buh.tecnik93.com (localhost [127.0.0.1]) by it.buh.tecnik93.com (Postfix) with ESMTP id 300FF2C50CCC; Fri, 7 Mar 2008 18:44:34 +0200 (EET) Date: Fri, 7 Mar 2008 18:44:27 +0200 From: Ion-Mihai Tetcu To: Alexander Leidinger Message-ID: <20080307184427.5a005ef9@it.buh.tecnik93.com> In-Reply-To: <20080307161415.g9vgql0xcscgkkco@webmail.leidinger.net> References: <78cb3d3f0803070636l38ca7683t24235efd8f989c67@mail.gmail.com> <20080307161415.g9vgql0xcscgkkco@webmail.leidinger.net> X-Mailer: Claws Mail 3.3.1 (GTK+ 2.12.8; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/ZyD0r.hWfV2U7/CEsk/JMe+"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-hackers@freebsd.org, freebsd-isp@freebsd.org, freebsd-emulation@freebsd.org, Adrian Penisoara , freebsd-ports@freebsd.org, freebsd-database@freebsd.org Subject: Re: Preparing an Oracle Database XE port/package -- any tips ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 17:04:13 -0000 --Sig_/ZyD0r.hWfV2U7/CEsk/JMe+ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Fri, 07 Mar 2008 16:14:15 +0100 Alexander Leidinger wrote: > Quoting Adrian Penisoara (from Fri, 7 Mar 2008 =20 > 16:36:56 +0200): >=20 > > Hi, > > > > After having to deploy an Oracle Database XE [1] installation > > (with Linux 32bit binaries from the official RPM package) on a > > production FreeBSD 6.2machine I realized it would be very much > > feasible to produce a FreeBSD > > port/package for it. > > I would like to know whether similar efforts have been undergoing > > and whether people came up with some tips & tricks on this. > > > > The goal is not only to add the port into FreeBSD's ports tree but > > also to eventually convince Oracle (I work for them) to post the > > package on their official download page. >=20 > I'm not aware of something like this. Feel free to ask questions =20 > regarding the linuxulator and our linux infrastructure in the ports > on emulation@. Also feel free to ask for review of the port on > emulation@. I've worked on such a port (probably that's what ady is referring to) but kinda' lost my interest in it ($REALLIFE got in the way). I'll try to find it (it was about 80% done) but I'm not sure it survived the clean-up sessions of my tmp/work dir (I don't know why I didn't ci it in our cvs ...). I'll work with Ady if he need help. Ady, BTW, after we have the port and, with some test cases provided by people that run it, can we hope for any kind of (semi-)official support ? --=20 IOnut - Un^d^dregistered ;) FreeBSD "user" "Intellectual Property" is nowhere near as valuable as "Intellect" --Sig_/ZyD0r.hWfV2U7/CEsk/JMe+ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.8 (FreeBSD) iEYEARECAAYFAkfRcPEACgkQBX6fi0k6KXtK5ACaA7FcplMFzmCvkvJ6uEgJ1Uqi 3zoAoIfK1AB1UDIbBWj+/MSI6xuQRXUk =wMEl -----END PGP SIGNATURE----- --Sig_/ZyD0r.hWfV2U7/CEsk/JMe+-- From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 19:08:01 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BF2A1065677 for ; Fri, 7 Mar 2008 19:08:01 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id E829B8FC17 for ; Fri, 7 Mar 2008 19:08:00 +0000 (UTC) (envelope-from andre@freebsd.org) Received: (qmail 1779 invoked from network); 7 Mar 2008 17:54:29 -0000 Received: from dotat.atdotat.at (HELO [62.48.0.47]) ([62.48.0.47]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 7 Mar 2008 17:54:29 -0000 Message-ID: <47D18C4D.20309@freebsd.org> Date: Fri, 07 Mar 2008 19:41:17 +0100 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050217 MIME-Version: 1.0 To: Robert Watson References: <47D07CC6.5060007@FreeBSD.org> <20080307091547.M23519@fledge.watson.org> In-Reply-To: <20080307091547.M23519@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Alexander Motin Subject: Re: soclose() & so->so_upcall() = race? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 19:08:01 -0000 Robert Watson wrote: > > On Fri, 7 Mar 2008, Alexander Motin wrote: > >> As I can see so_upcall() callback is called with SOCKBUF_MTX unlocked. >> It means that SB_UPCALL flag can be removed during call and socket can >> be closed and deallocated with soclose() while callback is running. Am >> I right or I have missed something? How in that situation socket >> pointer protected from being used after free? > > > There are known problems with so_upcall and locking, including this > one. The other problems include: > > - The locking condition on entering the upcall depends on the invocation > point > and is inconsistent. > > - The protection of the upcall field and flag are inconsistent. > > - Consumers of so_upcall, such as socket accept filters, don't properly > respect the locking environment they run in. > > - Some (all) accept filters produce nastily convoluted stack traces > involving > recursion across really odd combinations of sockets and protocols. For > example, you can see soisdisconnected() calling soisconnected(). > > Some of this is inherent to the design of accept filters and so_upcall > and follows from using a single function pointer for many different > cases. I have an 8.x todo list item to try and figure out how to make > so_upcall and accept filters rational in the context of fine-grained > locking, but I've not yet reached that point on my todo list. I think > we can continue to incrementally hack so_upcall and accept filters to > fix many races, but the reality is that we need a more coherent model > for dealing with accept filters. One idea that Colin Percival (I think) > suggested is that we separate socket upcalls from accept filters, and > that accept filters consistent of a predicate for completion rather than > directly invoking socket state transitions. I've not explored the > implications, but think it might well be a good idea to avoid the weird > stack traces. I've experimented with some changes to sowakeup() to better formalize it. Code diff below. Observations noted in the comments. -- Andre Index: uipc_sockbuf.c =================================================================== RCS file: /home/ncvs/src/sys/kern/uipc_sockbuf.c,v retrieving revision 1.165 diff -u -p -r1.165 uipc_sockbuf.c --- uipc_sockbuf.c 6 Sep 2006 21:59:36 -0000 1.165 +++ uipc_sockbuf.c 25 Feb 2007 15:22:32 -0000 @@ -173,11 +173,12 @@ sowakeup(struct socket *so, struct sockb SOCKBUF_LOCK_ASSERT(sb); - selwakeuppri(&sb->sb_sel, PSOCK); +#if 1 + selwakeuppri(&sb->sb_sel, PSOCK); /* removes thread from sleepq */ sb->sb_flags &= ~SB_SEL; if (sb->sb_flags & SB_WAIT) { sb->sb_flags &= ~SB_WAIT; - wakeup(&sb->sb_cc); + wakeup(&sb->sb_cc); /* removes thread from sleepq too!? */ } KNOTE_LOCKED(&sb->sb_sel.si_note, 0); SOCKBUF_UNLOCK(sb); @@ -188,6 +189,46 @@ sowakeup(struct socket *so, struct sockb if (sb->sb_flags & SB_AIO) aio_swake(so, sb); mtx_assert(SOCKBUF_MTX(sb), MA_NOTOWNED); +#else + /* Only wakeup if above low water mark. */ + if (so->so_error == 0 && sb->sb_lowat < sbspace(sb)) + return; + /* First run any upcalls which may process or modify the data. */ + if (sb->sb_flags & SB_UPCALL) { + /* + * Upcall tells us whether to do a wakeup or not. + * Need a flag on the socket to tell select/poll and kqueue + * to ignore socket buffer until cleared. + * Maybe we should defer the upcall to a worker thread using + * task queue? + */ + if ((*so->so_upcall)(so, sb, so->so_upcallarg, M_DONTWAIT)) { + sb->sb_flags |= SB_IGNORE; + SOCKBUF_UNLOCK(sb); + return; /* don't wakeup, more work! */ + } + } + /* KQueue notifications. */ + KNOTE_LOCKED(&sb->sb_sel.si_note, 0); /* issues wakeup */ + /* Someone doing select/poll? */ + if (sb->sb_flags & SB_SEL) { + selwakeuppri(&sb->sb_sel, PSOCK); /* removes thread from sleepq */ + sb->sb_flags &= ~SB_SEL; + } + /* Someone waiting blocked on socket buffer. */ + if (sb->sb_flags & SB_WAIT) { + wakeup(&sb->sb_cc); /* removes thread from sleepq */ + sb->sb_flags &= ~SB_WAIT; + } + /* Async IO notificatins. */ + if (sb->sb_flags & SB_AIO) + aio_swake(so, sb); + /* Socket buffer won't be accessed anymore. */ + SOCKBUF_UNLOCK(sb); + /* Send SIGIO or SIGURG to thread. XXX: Is this still needed? */ + if ((so->so_state & SS_ASYNC) && so->so_sigio != NULL) + pgsigio(&so->so_sigio, SIGIO, 0); +#endif } /* From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 19:11:28 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25E151065679 for ; Fri, 7 Mar 2008 19:11:28 +0000 (UTC) (envelope-from prvs=195299e56f=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id A77858FC1D for ; Fri, 7 Mar 2008 19:11:27 +0000 (UTC) (envelope-from prvs=195299e56f=killing@multiplay.co.uk) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=multiplay.co.uk; s=Multiplay; t=1204916291; x=1205521091; q=dns/txt; h=Received: Message-ID:From:To:Subject:Date:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=SWpKHyLGA7HMJTFsuUEGuc77A7J0nd2/2d yIL+BAIEA=; b=FeXeoi1dtqkw7gF8PdpX6ya+JdwKeOGtUE9s/dLOiAR8Mb9ezX 6dQGhFqEF7OjK89uEOOyAIFkGruyzQgETD2hF9tn3N4HT2eLzHrUAkjJLhouHTa4 gA7KshLst+AaVFx1lLY4db/8uOddZEYI3fPAaG0iVn7ujZU72ZrgkKGao= X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-14.7 required=6.0 tests=BAYES_00, USER_IN_WHITELIST, USER_IN_WHITELIST_TO autolearn=ham version=3.1.8 Received: from r2d2 by mail1.multiplay.co.uk (MDaemon PRO v9.6.3) with ESMTP id md50005236286.msg for ; Fri, 07 Mar 2008 18:58:09 +0000 Message-ID: <034601c88085$2dc3c6f0$b6db87d4@multiplay.co.uk> From: "Steven Hartland" To: Date: Fri, 7 Mar 2008 18:58:06 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Authenticated-Sender: Killing@multiplay.co.uk X-MDRemoteIP: 212.135.219.182 X-Return-Path: prvs=195299e56f=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org X-Spam-Processed: mail1.multiplay.co.uk, Fri, 07 Mar 2008 18:58:10 +0000 X-MDAV-Processed: mail1.multiplay.co.uk, Fri, 07 Mar 2008 18:58:11 +0000 Subject: pkg_add -r doesn't process sub dependencies? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 19:11:28 -0000 Seems if you have package X which depends on package Y which depends on package Z then pkg_add -r X will always fail unless you first :- 1. pkg_add -r Y 2. pkg_add -r Z The failure will be:- pkg_add: could not find package Z ! This happens even though Z exists in the remote source package directory. Surely I've missed something very basic here and pkg_add isn't that broken? Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 20:58:08 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D3D6106566B for ; Fri, 7 Mar 2008 20:58:08 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outZ.internet-mail-service.net (outZ.internet-mail-service.net [216.240.47.249]) by mx1.freebsd.org (Postfix) with ESMTP id 285FE8FC15 for ; Fri, 7 Mar 2008 20:58:08 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Fri, 07 Mar 2008 12:58:32 -0800 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 49C752D6006; Fri, 7 Mar 2008 12:58:06 -0800 (PST) Message-ID: <47D1AC63.3040701@elischer.org> Date: Fri, 07 Mar 2008 12:58:11 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Vlad GALU References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: A (perhaps silly) kqueue question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 20:58:08 -0000 Vlad GALU wrote: > I see an unusual symptom with one of our in-house applications. The > main I/O loop calls kevent(), which in turn returns two events with > EV_EOF error set, always for the same descriptors (they're both socket > descriptors). As the man page is not pretty clear about it and I don't > have my UNP copy at hand, I would like to ask the list whether the > error events are supposed to be one-shot or not. > Thanks for your kind input. > You don't specify which version you are running Interstingly I may have seen a similar thing myself, but fixed it elsewhere. the question is a valid one.. From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 20:59:00 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40BAC106567A for ; Fri, 7 Mar 2008 20:59:00 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.190]) by mx1.freebsd.org (Postfix) with ESMTP id CCE4C8FC2E for ; Fri, 7 Mar 2008 20:58:59 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: by fk-out-0910.google.com with SMTP id b27so548614fka.11 for ; Fri, 07 Mar 2008 12:58:58 -0800 (PST) Received: by 10.82.182.1 with SMTP id e1mr4071405buf.21.1204923538187; Fri, 07 Mar 2008 12:58:58 -0800 (PST) Received: by 10.82.185.8 with HTTP; Fri, 7 Mar 2008 12:58:58 -0800 (PST) Message-ID: Date: Fri, 7 Mar 2008 22:58:58 +0200 From: "Vlad GALU" To: "Julian Elischer" In-Reply-To: <47D1AC63.3040701@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47D1AC63.3040701@elischer.org> Cc: freebsd-hackers@freebsd.org Subject: Re: A (perhaps silly) kqueue question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 20:59:00 -0000 On 3/7/08, Julian Elischer wrote: > Vlad GALU wrote: > > I see an unusual symptom with one of our in-house applications. The > > main I/O loop calls kevent(), which in turn returns two events with > > EV_EOF error set, always for the same descriptors (they're both socket > > descriptors). As the man page is not pretty clear about it and I don't > > have my UNP copy at hand, I would like to ask the list whether the > > error events are supposed to be one-shot or not. > > Thanks for your kind input. > > > > > You don't specify which version you are running Ah, yes, sorry. Fresh RELENG_7. > > Interstingly I may have seen a similar thing myself, > but fixed it elsewhere. > > the question is a valid one.. > > > -- Mahnahmahnah! From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 21:24:02 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56F811065671 for ; Fri, 7 Mar 2008 21:24:02 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outE.internet-mail-service.net (outE.internet-mail-service.net [216.240.47.228]) by mx1.freebsd.org (Postfix) with ESMTP id 3103C8FC1D for ; Fri, 7 Mar 2008 21:24:02 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Fri, 07 Mar 2008 13:24:50 -0800 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 03C592D6013; Fri, 7 Mar 2008 13:23:58 -0800 (PST) Message-ID: <47D1B274.6000907@elischer.org> Date: Fri, 07 Mar 2008 13:24:04 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Vlad GALU References: <47D1AC63.3040701@elischer.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: A (perhaps silly) kqueue question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 21:24:02 -0000 Vlad GALU wrote: > On 3/7/08, Julian Elischer wrote: >> Vlad GALU wrote: >> > I see an unusual symptom with one of our in-house applications. The >> > main I/O loop calls kevent(), which in turn returns two events with >> > EV_EOF error set, always for the same descriptors (they're both socket >> > descriptors). As the man page is not pretty clear about it and I don't >> > have my UNP copy at hand, I would like to ask the list whether the >> > error events are supposed to be one-shot or not. >> > Thanks for your kind input. >> > >> >> >> You don't specify which version you are running > > Ah, yes, sorry. Fresh RELENG_7. > >> Interstingly I may have seen a similar thing myself, >> but fixed it elsewhere. >> >> the question is a valid one.. >> >> >> > > Is this reproducable? Can you make this happen at will? From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 21:26:02 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A622C1065670 for ; Fri, 7 Mar 2008 21:26:02 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.189]) by mx1.freebsd.org (Postfix) with ESMTP id 3D07E8FC14 for ; Fri, 7 Mar 2008 21:26:02 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: by mu-out-0910.google.com with SMTP id w9so622936mue.6 for ; Fri, 07 Mar 2008 13:26:00 -0800 (PST) Received: by 10.82.116.15 with SMTP id o15mr4254088buc.11.1204925160561; Fri, 07 Mar 2008 13:26:00 -0800 (PST) Received: by 10.82.185.8 with HTTP; Fri, 7 Mar 2008 13:26:00 -0800 (PST) Message-ID: Date: Fri, 7 Mar 2008 23:26:00 +0200 From: "Vlad GALU" To: "Julian Elischer" In-Reply-To: <47D1B274.6000907@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <47D1AC63.3040701@elischer.org> <47D1B274.6000907@elischer.org> Cc: freebsd-hackers@freebsd.org Subject: Re: A (perhaps silly) kqueue question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 21:26:02 -0000 On 3/7/08, Julian Elischer wrote: > Vlad GALU wrote: > > On 3/7/08, Julian Elischer wrote: > >> Vlad GALU wrote: > >> > I see an unusual symptom with one of our in-house applications. The > >> > main I/O loop calls kevent(), which in turn returns two events with > >> > EV_EOF error set, always for the same descriptors (they're both socket > >> > descriptors). As the man page is not pretty clear about it and I don't > >> > have my UNP copy at hand, I would like to ask the list whether the > >> > error events are supposed to be one-shot or not. > >> > Thanks for your kind input. > >> > > >> > >> > >> You don't specify which version you are running > > > > Ah, yes, sorry. Fresh RELENG_7. > > > >> Interstingly I may have seen a similar thing myself, > >> but fixed it elsewhere. > >> > >> the question is a valid one.. > >> > >> > >> > > > > > > > Is this reproducable? Can you make this happen at will? I'll try. So far we haven't been able to trigger it at will, unfortunately :( It just pops out once in a while.. > -- Mahnahmahnah! From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 22:38:17 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D27F61065688 for ; Fri, 7 Mar 2008 22:38:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id AC1128FC32 for ; Fri, 7 Mar 2008 22:38:17 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 1540A46C1C; Fri, 7 Mar 2008 17:38:17 -0500 (EST) Date: Fri, 7 Mar 2008 22:38:17 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Vlad GALU In-Reply-To: Message-ID: <20080307223723.X42870@fledge.watson.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: A (perhaps silly) kqueue question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 22:38:17 -0000 On Fri, 7 Mar 2008, Vlad GALU wrote: > I see an unusual symptom with one of our in-house applications. The main I/O > loop calls kevent(), which in turn returns two events with EV_EOF error set, > always for the same descriptors (they're both socket descriptors). As the > man page is not pretty clear about it and I don't have my UNP copy at hand, > I would like to ask the list whether the error events are supposed to be > one-shot or not. I wonder if it's returning one event for the read socket buffer, and one event for the write socket buffer, since there are really two event sources for each socket? Not that this is desirable behavior, but it might explain it. If you shutdown() only read, do you get back one EOF kevent and one writable kevent? Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 15:14:45 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBE47106566B; Fri, 7 Mar 2008 15:14:45 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 92E828FC16; Fri, 7 Mar 2008 15:14:45 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A56687.dip.t-dialin.net [84.165.102.135]) by redbull.bpaserver.net (Postfix) with ESMTP id 67A8C2E28D; Fri, 7 Mar 2008 16:14:38 +0100 (CET) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 2DBCB8C65A; Fri, 7 Mar 2008 16:14:16 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.14.2/8.13.8/Submit) id m27FEFnZ009858; Fri, 7 Mar 2008 16:14:15 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Fri, 07 Mar 2008 16:14:15 +0100 Message-ID: <20080307161415.g9vgql0xcscgkkco@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Fri, 07 Mar 2008 16:14:15 +0100 From: Alexander Leidinger To: Adrian Penisoara References: <78cb3d3f0803070636l38ca7683t24235efd8f989c67@mail.gmail.com> In-Reply-To: <78cb3d3f0803070636l38ca7683t24235efd8f989c67@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.5) / FreeBSD-8.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-10.592, required 6, BAYES_00 -15.00, MIME_QP_LONG_LINE 1.40, RDNS_DYNAMIC 0.10, SUSPICIOUS_RECIPS 2.91) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No X-Mailman-Approved-At: Fri, 07 Mar 2008 23:39:17 +0000 Cc: freebsd-database@freebsd.org, freebsd-isp@freebsd.org, freebsd-emulation@freebsd.org, freebsd-ports@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Preparing an Oracle Database XE port/package -- any tips ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 15:14:46 -0000 Quoting Adrian Penisoara (from Fri, 7 Mar 2008 =20 16:36:56 +0200): > Hi, > > After having to deploy an Oracle Database XE [1] installation (with Linu= x > 32bit binaries from the official RPM package) on a production FreeBSD > 6.2machine I realized it would be very much feasible to produce a > FreeBSD > port/package for it. > I would like to know whether similar efforts have been undergoing and > whether people came up with some tips & tricks on this. > > The goal is not only to add the port into FreeBSD's ports tree but also t= o > eventually convince Oracle (I work for them) to post the package on their > official download page. I'm not aware of something like this. Feel free to ask questions =20 regarding the linuxulator and our linux infrastructure in the ports on =20 emulation@. Also feel free to ask for review of the port on emulation@. Bye, Alexander. --=20 Security isn't. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137 From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 16:27:55 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA8591065676 for ; Fri, 7 Mar 2008 16:27:55 +0000 (UTC) (envelope-from keirre.adams@gmail.com) Received: from hu-out-0506.google.com (hu-out-0506.google.com [72.14.214.228]) by mx1.freebsd.org (Postfix) with ESMTP id 3C64F8FC1E for ; Fri, 7 Mar 2008 16:27:55 +0000 (UTC) (envelope-from keirre.adams@gmail.com) Received: by hu-out-0506.google.com with SMTP id 28so333096hub.8 for ; Fri, 07 Mar 2008 08:27:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received: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; bh=sMcWQt3snmp+Dkwx2XP0fVEZTJTK9BwsmXhV7j62S60=; b=IW8yfzwKgIC+rWUb6qIfT9nfQUVzyq/AmNILzs/MRjhs05rd7yutfYUwgtawjgUaCbEtAuIYOcxncdz5Zg4NZvjfCUN7UfUp1zwaa+Wm3AaB8z6+wKl73w/2AaXRyO6G1q/BccxoymaRXW5L+wgfA+OG45d6lddRa7nstHaeVOM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=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=hSrjK1td0XVep2qnHow2vMi/e8YqDPmWFUlALtRZfwSAjLo1f6FgvpTQ4oOx/JfRI8NmJ+juwlCFts/3mwKMdDZS35HDbJJL3hdb6XpOw9mIjoPqbvSOaFLf4PnWoCuwhwXtD+yYLN4W18qx6ADpYtsG67kRz6XV5nvYbnOAq8U= Received: by 10.78.182.17 with SMTP id e17mr4314385huf.26.1204906368655; Fri, 07 Mar 2008 08:12:48 -0800 (PST) Received: by 10.78.120.5 with HTTP; Fri, 7 Mar 2008 08:12:48 -0800 (PST) Message-ID: <36b1573d0803070812m527c6b7y2d37441cdbd344e5@mail.gmail.com> Date: Fri, 7 Mar 2008 11:12:48 -0500 From: "Jonathan Adams" Sender: keirre.adams@gmail.com To: "Rink Springer" In-Reply-To: <20080307143946.GI90443@rink.nu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <78cb3d3f0803070636l38ca7683t24235efd8f989c67@mail.gmail.com> <20080307143946.GI90443@rink.nu> X-Google-Sender-Auth: be06977adab6e9fa X-Mailman-Approved-At: Fri, 07 Mar 2008 23:39:34 +0000 Cc: freebsd-hackers@freebsd.org, freebsd-isp@freebsd.org, freebsd-emulation@freebsd.org, Adrian Penisoara , freebsd-ports@freebsd.org, freebsd-database@freebsd.org Subject: Re: Preparing an Oracle Database XE port/package -- any tips ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 16:27:55 -0000 I am defnitely interested in helping in this area if needed. A couple of years ago, I struggled mightily trying to get Oracle running on 5.1 On Fri, Mar 7, 2008 at 9:39 AM, Rink Springer wrote: > Hi, > > > On Fri, Mar 07, 2008 at 04:36:56PM +0200, Adrian Penisoara wrote: > > After having to deploy an Oracle Database XE [1] installation (with Linux > > 32bit binaries from the official RPM package) on a production FreeBSD > > 6.2machine I realized it would be very much feasible to produce a > > FreeBSD > > port/package for it. > > I would like to know whether similar efforts have been undergoing and > > whether people came up with some tips & tricks on this. > > We run Oracle XE on two FreeBSD 6.3 machines at work - we've just > manually set it up, but are very interested in a port of it. We did > the same as you basically - just uncompress it and move the files in > place. > > Regards, > > -- > Rink P.W. Springer - http://rink.nu > "Anyway boys, this is America. Just because you get more votes doesn't > mean you win." - Fox Mulder > > > _______________________________________________ > freebsd-database@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-database > To unsubscribe, send any mail to "freebsd-database-unsubscribe@freebsd.org" > -- ___________________________ Jon Adams web: http://www.scis.nova.edu/~jonaadam mail: keirre.adams@gmail.com --------------------------------------------- "Strength does not come from physical capacity. It comes from an indomitable will." - Mohandas Gandhi From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 7 21:15:06 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42D02106566C for ; Fri, 7 Mar 2008 21:15:06 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id F03A48FC1D for ; Fri, 7 Mar 2008 21:15:05 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from root by ciao.gmane.org with local (Exim 4.43) id 1JXjuA-0002Yh-Id for freebsd-hackers@freebsd.org; Fri, 07 Mar 2008 21:15:02 +0000 Received: from adsl-69-234-219-102.dsl.irvnca.pacbell.net ([69.234.219.102]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Mar 2008 21:15:02 +0000 Received: from w41ter by adsl-69-234-219-102.dsl.irvnca.pacbell.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Mar 2008 21:15:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: walt Date: Fri, 07 Mar 2008 13:15:01 -0800 Lines: 17 Message-ID: References: <034601c88085$2dc3c6f0$b6db87d4@multiplay.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: adsl-69-234-219-102.dsl.irvnca.pacbell.net User-Agent: Thunderbird 3.0a1pre (X11/2008030707) In-Reply-To: <034601c88085$2dc3c6f0$b6db87d4@multiplay.co.uk> Sender: news X-Mailman-Approved-At: Fri, 07 Mar 2008 23:39:51 +0000 Subject: Re: pkg_add -r doesn't process sub dependencies? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 21:15:06 -0000 Steven Hartland wrote: > Seems if you have package X which depends on package Y which > depends on package Z then pkg_add -r X will always fail unless > you first :- > 1. pkg_add -r Y > 2. pkg_add -r Z > > The failure will be:- > pkg_add: could not find package Z ! > > This happens even though Z exists in the remote source package > directory... If you are using RELENG_7, pkg_add is looking in the wrong place on the remote server for packages. I just submitted a patch on the -STABLE list for this problem. From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 8 01:02:50 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B29CB106566B for ; Sat, 8 Mar 2008 01:02:50 +0000 (UTC) (envelope-from prvs=1953f8e807=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (core6.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id 2FA658FC1A for ; Sat, 8 Mar 2008 01:02:49 +0000 (UTC) (envelope-from prvs=1953f8e807=killing@multiplay.co.uk) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=multiplay.co.uk; s=Multiplay; t=1204937495; x=1205542295; q=dns/txt; h=Received: Message-ID:From:To:References:Subject:Date:MIME-Version: Content-Type:Content-Transfer-Encoding; bh=BUdn3i2GVsQTiIH0wM67L kzLff+xuzEhBlE0g+UoV5g=; b=maykSNHjxwDgt9Kkb1qTriefknrCF3vs+yaBf V5Zzv5b6kMLZo5WXO7A4ILGsB15bdhqy9fjZ1muk1+0xCoDBEIyhlafVAb2ktFG3 BHsTZ/P/agdnFYI7jpYdZe7qgNYOpCZNzkWC2AIQ2OMnG2PMC3xi6hX9UuoobZFa 1TlKBQ= X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on mail1.multiplay.co.uk X-Spam-Level: X-Spam-Status: No, score=-14.7 required=6.0 tests=BAYES_00, USER_IN_WHITELIST, USER_IN_WHITELIST_TO autolearn=ham version=3.1.8 Received: from r2d2 by mail1.multiplay.co.uk (MDaemon PRO v9.6.3) with ESMTP id md50005237997.msg for ; Sat, 08 Mar 2008 00:51:34 +0000 Message-ID: <044701c880b6$8d81db00$b6db87d4@multiplay.co.uk> From: "Steven Hartland" To: , "walt" References: <034601c88085$2dc3c6f0$b6db87d4@multiplay.co.uk> Date: Sat, 8 Mar 2008 00:51:32 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-Authenticated-Sender: Killing@multiplay.co.uk X-MDRemoteIP: 212.135.219.182 X-Return-Path: prvs=1953f8e807=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk X-MDaemon-Deliver-To: freebsd-hackers@freebsd.org X-Spam-Processed: mail1.multiplay.co.uk, Sat, 08 Mar 2008 00:51:35 +0000 X-MDAV-Processed: mail1.multiplay.co.uk, Sat, 08 Mar 2008 00:51:35 +0000 Cc: Subject: Re: pkg_add -r doesn't process sub dependencies? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 01:02:50 -0000 ----- Original Message ----- From: "walt" > If you are using RELENG_7, pkg_add is looking in the wrong place > on the remote server for packages. I just submitted a patch on > the -STABLE list for this problem. I'm actually using PACKAGESITE which is meant to bypass all path calculations but it simply doesn't. I've now found PKG_ADD_BASE which seems to fix this issue but is not documented anywhere. I had to dig around in the code to find it, where its commented as:- /* Special tip that sysinstall left for us */ It seems really strange that the default behaviour of pkg_add -r can't deal with sub dependencies properly without this undocumented feature. Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 8 07:19:21 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7478106566B for ; Sat, 8 Mar 2008 07:19:21 +0000 (UTC) (envelope-from dmantipov@yandex.ru) Received: from webmail21.yandex.ru (webmail21.yandex.ru [213.180.223.144]) by mx1.freebsd.org (Postfix) with ESMTP id 3BB258FC1B for ; Sat, 8 Mar 2008 07:19:21 +0000 (UTC) (envelope-from dmantipov@yandex.ru) Received: from YAMAIL (webmail21) by mail.yandex.ru id S114724AbYCHFgd for ; Sat, 8 Mar 2008 08:36:33 +0300 X-Yandex-Spam: 0 Received: from [213.148.29.37] ([213.148.29.37]) by mail.yandex.ru with HTTP; Sat, 08 Mar 2008 08:36:33 +0300 From: Antipov Dmitry To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Message-Id: <713411204954593@webmail21.yandex.ru> Date: Sat, 08 Mar 2008 08:36:33 +0300 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain Subject: [kern/sys_pipe.c] PIPE_NODIRECT and pipe throughput X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 07:19:21 -0000 [originally posted to freebsd-stable@] Hello all, recently I've tried a few benchmarks around pipe throughput on Linux vs. FreeBSD. Everyone interesting can see my stuff at http://213.148.29.37/PipeBench, and initial post to Linux kernel developers mailing list at http://www.uwsg.iu.edu/hypermail/linux/kernel/0803.0/1837.html 1) It was noticed (http://www.uwsg.iu.edu/hypermail/linux/kernel/0803.0/1842.html) that the page flipping may be a reason of FreeBSD advantage. I've looked at kern/sys_pipe.c and found that defining PIPE_NODIRECT should disable it. Is that correct ? 2) When I've tried to run the kernel (7.0-STABLE) with PIPE_NODIRECT defined, I didn't see any slowdown (note 30% is promised in kern/sys_pipe.c comments) even for I/O buffer sizes >= PIPE_MINDIRECT. So, what should be done with a pipe to see a difference between PIPE_NODIRECT enabled and disabled ? Thanks, Dmitry From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 8 08:09:52 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3C87106573B for ; Sat, 8 Mar 2008 08:09:52 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.157]) by mx1.freebsd.org (Postfix) with ESMTP id 610178FC16 for ; Sat, 8 Mar 2008 08:09:51 +0000 (UTC) (envelope-from dudu@dudu.ro) Received: by fg-out-1718.google.com with SMTP id 16so736598fgg.35 for ; Sat, 08 Mar 2008 00:09:51 -0800 (PST) Received: by 10.82.161.19 with SMTP id j19mr5739989bue.9.1204963787987; Sat, 08 Mar 2008 00:09:47 -0800 (PST) Received: by 10.82.185.8 with HTTP; Sat, 8 Mar 2008 00:09:47 -0800 (PST) Message-ID: Date: Sat, 8 Mar 2008 10:09:47 +0200 From: "Vlad GALU" To: "Robert Watson" In-Reply-To: <20080307223723.X42870@fledge.watson.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080307223723.X42870@fledge.watson.org> Cc: freebsd-hackers@freebsd.org Subject: Re: A (perhaps silly) kqueue question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 08:09:52 -0000 On 3/8/08, Robert Watson wrote: > On Fri, 7 Mar 2008, Vlad GALU wrote: > > > > I see an unusual symptom with one of our in-house applications. The main I/O > > loop calls kevent(), which in turn returns two events with EV_EOF error set, > > always for the same descriptors (they're both socket descriptors). As the > > man page is not pretty clear about it and I don't have my UNP copy at hand, > > I would like to ask the list whether the error events are supposed to be > > one-shot or not. > > > I wonder if it's returning one event for the read socket buffer, and one event > for the write socket buffer, since there are really two event sources for each > socket? Not that this is desirable behavior, but it might explain it. If you > shutdown() only read, do you get back one EOF kevent and one writable kevent? I'll try that and see. The only issue being the low frequency this symptom appears at. I'll get back to the list once I have more info. > > Robert N M Watson > Computer Laboratory > University of Cambridge > -- Mahnahmahnah! From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 8 08:48:31 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3C22106566C for ; Sat, 8 Mar 2008 08:48:31 +0000 (UTC) (envelope-from silby@silby.com) Received: from relay00.pair.com (relay00.pair.com [209.68.5.9]) by mx1.freebsd.org (Postfix) with SMTP id 572068FC13 for ; Sat, 8 Mar 2008 08:48:31 +0000 (UTC) (envelope-from silby@silby.com) Received: (qmail 702 invoked from network); 8 Mar 2008 08:21:49 -0000 Received: from unknown (HELO localhost) (unknown) by unknown with SMTP; 8 Mar 2008 08:21:49 -0000 X-pair-Authenticated: 209.68.2.70 Date: Sat, 8 Mar 2008 02:21:46 -0600 (CST) From: Mike Silbersack To: Antipov Dmitry In-Reply-To: <713411204954593@webmail21.yandex.ru> Message-ID: <20080308021506.L11630@odysseus.silby.com> References: <713411204954593@webmail21.yandex.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: [kern/sys_pipe.c] PIPE_NODIRECT and pipe throughput X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 08:48:31 -0000 On Sat, 8 Mar 2008, Antipov Dmitry wrote: > [originally posted to freebsd-stable@] > > Hello all, > > recently I've tried a few benchmarks around pipe throughput on Linux vs. FreeBSD. > Everyone interesting can see my stuff at http://213.148.29.37/PipeBench, and > initial post to Linux kernel developers mailing list at > http://www.uwsg.iu.edu/hypermail/linux/kernel/0803.0/1837.html > > 1) It was noticed (http://www.uwsg.iu.edu/hypermail/linux/kernel/0803.0/1842.html) that > the page flipping may be a reason of FreeBSD advantage. I've looked at kern/sys_pipe.c > and found that defining PIPE_NODIRECT should disable it. Is that correct ? Yes, that is correct. > 2) When I've tried to run the kernel (7.0-STABLE) with PIPE_NODIRECT defined, > I didn't see any slowdown (note 30% is promised in kern/sys_pipe.c comments) > even for I/O buffer sizes >= PIPE_MINDIRECT. So, what should be done with a pipe > to see a difference between PIPE_NODIRECT enabled and disabled ? > > Thanks, > Dmitry Why don't you add another sysctl that is incremented every time page flipping is used? That would prove how much it is being used during your tests. Just add: static int page_flips; SYSCTL_INT(_kern_ipc, OID_AUTO, page_flips, CTLFLAG_RD, &page_flips, 0, "Pipe page flips"); and then put page_flips++ at the appropriate points in the code. You should really use gnuplot or some other tool to graph your results. That will make them much easier to understand. -Mike From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 8 10:32:05 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4127E1065670 for ; Sat, 8 Mar 2008 10:32:05 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe03.swip.net [212.247.154.65]) by mx1.freebsd.org (Postfix) with ESMTP id CD60E8FC17 for ; Sat, 8 Mar 2008 10:32:04 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [62.113.132.89] (account mc467741@c2i.net [62.113.132.89] verified) by mailfe03.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 846860892 for freebsd-hackers@freebsd.org; Sat, 08 Mar 2008 11:32:02 +0100 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Sat, 8 Mar 2008 11:33:02 +0100 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803081133.02575.hselasky@c2i.net> Subject: Documentation on writing a custom socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 10:32:05 -0000 Hi, I'm planning to create a new socket type in FreeBSD called AF_Q921, which is to be used for ISDN telephony. Where do I find documentation on how to implement a new socket in the kernel ? --HPS From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 8 10:50:00 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FAEF1065670 for ; Sat, 8 Mar 2008 10:50:00 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.183]) by mx1.freebsd.org (Postfix) with ESMTP id B8CF08FC1A for ; Sat, 8 Mar 2008 10:49:59 +0000 (UTC) (envelope-from max@love2party.net) Received: from vampire.homelinux.org (dslb-088-066-008-185.pools.arcor-ip.net [88.66.8.185]) by mrelayeu.kundenserver.de (node=mrelayeu8) with ESMTP (Nemesis) id 0ML31I-1JXwco1MQd-00036P; Sat, 08 Mar 2008 11:49:58 +0100 Received: (qmail 50337 invoked by uid 80); 8 Mar 2008 10:49:25 -0000 Received: from 192.168.4.151 (SquirrelMail authenticated user mlaier) by router.laiers.local with HTTP; Sat, 8 Mar 2008 11:49:25 +0100 (CET) Message-ID: <49726.192.168.4.151.1204973365.squirrel@router.laiers.local> In-Reply-To: <200803081133.02575.hselasky@c2i.net> References: <200803081133.02575.hselasky@c2i.net> Date: Sat, 8 Mar 2008 11:49:25 +0100 (CET) From: "Max Laier" To: "Hans Petter Selasky" User-Agent: SquirrelMail/1.4.13 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Provags-ID: V01U2FsdGVkX1+HwvmT6E23RKbtFDSzCoZxZ6BgYsHbIS2kGqc HnxHHU6uP9bBp987N2HydZONkarv9NpokAm4nMOA+gwnEcInBR iZF0LyaWnPHruLSRNXb8Q== Cc: freebsd-hackers@freebsd.org Subject: Re: Documentation on writing a custom socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 10:50:00 -0000 Am Sa, 8.03.2008, 11:33, schrieb Hans Petter Selasky: > I'm planning to create a new socket type in FreeBSD called AF_Q921, which > is > to be used for ISDN telephony. Where do I find documentation on how to interesting ... can you share more information on this project? > implement a new socket in the kernel ? src/sys/netgraph/bluetooth/socket/ng_btsocket.c (and the rest of the .c files in there) are a good reference. Depeding on your needs netgraph might even be the right place for the whole project. -- /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 8 17:19:42 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22D74106566B for ; Sat, 8 Mar 2008 17:19:42 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id F05DC8FC1B for ; Sat, 8 Mar 2008 17:19:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 9167246C21; Sat, 8 Mar 2008 12:19:41 -0500 (EST) Date: Sat, 8 Mar 2008 17:19:41 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Hans Petter Selasky In-Reply-To: <200803081133.02575.hselasky@c2i.net> Message-ID: <20080308171435.J88526@fledge.watson.org> References: <200803081133.02575.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Documentation on writing a custom socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 17:19:42 -0000 On Sat, 8 Mar 2008, Hans Petter Selasky wrote: > I'm planning to create a new socket type in FreeBSD called AF_Q921, which is > to be used for ISDN telephony. Where do I find documentation on how to > implement a new socket in the kernel ? I'd start with a copy of the Design and Implementation of FreeBSD, which contains a structural overview of how the protocol parts fit together. The Stevens TCP/IP implementation book is extremely out-of-date, but useful reading nontheless. The first thing to think about, BTW, is whether or not a new protocol is in fact what you want to do. Protocol families bring a lot of useful infrastructure to the table: an IPC model, a routing infrastructure, abstractions for "interfaces", etc. However, they may or may not be what you're looking for -- before going down this path I'd want to think very carefully about whether the requirements you have are best met in this way, or possibly better met by creating a new device abstraction that isn't connected to the protocol stack, or by using a device stack tied to Netgraph nodes. Could you tell us a bit more about what you're trying to do, and perhaps we can provide some useful pointers? For example, do you anticipate using or even needing the routing facilities, and how might you map ISDN telephony parts into the normal network stack infrastructure of addresses, routing, interfaces, etc? Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 8 19:22:50 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38F3F1065679 for ; Sat, 8 Mar 2008 19:22:50 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from smtp-1.dlr.de (smtp-1.dlr.de [195.37.61.185]) by mx1.freebsd.org (Postfix) with ESMTP id C35BB8FC2C for ; Sat, 8 Mar 2008 19:22:49 +0000 (UTC) (envelope-from Hartmut.Brandt@dlr.de) Received: from [192.168.2.100] ([172.21.151.1]) by smtp-1.dlr.de with Microsoft SMTPSVC(6.0.3790.1830); Sat, 8 Mar 2008 20:09:31 +0100 Message-ID: <47D2E469.9030507@dlr.de> Date: Sat, 08 Mar 2008 20:09:29 +0100 From: Hartmut Brandt Organization: German Aerospace Center User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Robert Watson References: <200803081133.02575.hselasky@c2i.net> <20080308171435.J88526@fledge.watson.org> In-Reply-To: <20080308171435.J88526@fledge.watson.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 08 Mar 2008 19:09:31.0137 (UTC) FILETIME=[F0244F10:01C8814F] Cc: freebsd-hackers@freebsd.org, Hans Petter Selasky Subject: Re: Documentation on writing a custom socket X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "harti@freebsd.org >> Hartmut Brandt" List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 19:22:50 -0000 Robert Watson wrote: > > On Sat, 8 Mar 2008, Hans Petter Selasky wrote: > >> I'm planning to create a new socket type in FreeBSD called AF_Q921, >> which is to be used for ISDN telephony. Where do I find documentation >> on how to implement a new socket in the kernel ? > [SNIP] > that isn't connected to the protocol stack, or by using a device stack > tied to Netgraph nodes. Could you tell us a bit more about what you're > trying to do, and perhaps we can provide some useful pointers? For I want to jump in here about the netgraph stuff (this was the second time a response talked about using netgraph). While developing the ATM signaling stack (this is Q.2931) it turned out, that the netgraph notion of sending message around very rapidly became a nightmare if you want correct error handling. The number of states in Q.2931 (12 states) and the API node exploded to something like 30 or 40 because of the asynchronuous nature of the communication between stack layers and error handling. One example: To setup a connection you invoke a SETUP request. Then you wait for something like CALL_PROCEEDING, RELEASE_ACK or CONNECT_ACK. Unfortunately you also want to return an error in the case something is wrong with the request itself (no memory, bad parameters). So you add an extra message that just ACKs that the SETUP is going to be handled by the stack or rejected because of some error in it. With a normal function call based interface you would just make the setup-request function return an error code. With netgraph however you need to invent a new message, have additional states in the consumer and the protocol. Not to talk about error handling when you want to correctly handle errors like not beeing able to allocate that same response message. Netgraph is very nice for data-flow oriented stuff. It is not so useful to stack complicated protocol layers. If I'd write the signaling stack from scratch, I'd probably collaps all the signalling into a single netgraph node with a socket interface on the upper end. But then one may as well just implement that as a 'normal' protocol, probably... harti From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 8 19:53:47 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAC2F106566B for ; Sat, 8 Mar 2008 19:53:47 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.179]) by mx1.freebsd.org (Postfix) with ESMTP id 5E2FC8FC1D for ; Sat, 8 Mar 2008 19:53:46 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: by py-out-1112.google.com with SMTP id u52so1719780pyb.10 for ; Sat, 08 Mar 2008 11:53:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=qaXt5G4fXgSYIbithlDc8hgl71zqwe9A4B4558DE//I=; b=CbzrOh3Eb3gbP1pfuEYAakW6+4rd7lJDl7nkna9W4mxvTALn6S1Vqm8YsfOF1STA9q/Di/nIRufcjLFgrd4N26JJPa113MfCcjTsco9HadL1o9r4Fne16IdjVVbs9pE0aYBCwXcqylYThEYos6qyy1SFuCGAg8GittlX1jpPTyQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=U2nuf2/ZTP74aInd4L1Vdx9m42hj3IIYvch+t+30RjmDBkoXlLR4N3Z31L/arfCivshOhtkCoVw2E2iyE9eRLCZmCE6P4u/iwU5AdRyQSrvvjX+2VI5YZWRLcc+UHqAEy6DwPpYGGHrl6mvL5GoY01vaAaX5iwK/T/r3sQ4UNIg= Received: by 10.65.126.16 with SMTP id d16mr5104277qbn.84.1205006025265; Sat, 08 Mar 2008 11:53:45 -0800 (PST) Received: by 10.64.148.4 with HTTP; Sat, 8 Mar 2008 11:53:45 -0800 (PST) Message-ID: <5f67a8c40803081153k2c286a81p7b0bba6c1126c568@mail.gmail.com> Date: Sat, 8 Mar 2008 14:53:45 -0500 From: "Zaphod Beeblebrox" To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: On ZFS and 64/32 dual-booting. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 19:53:48 -0000 Since there are still reasons to dual boot between i386 and amd64 on FreeBSD (kernel modules like the nvidia driver only exist for i386, 4G memory only usable in amd64), I set a simple goal for myself: find a good way to dual boot with zfs. Some traditional things (like sharing /usr/share and /usr/ports) hardly matter anymore --- but they're easy. I didn't share /usr/local/share as the installed set of packages on each platform was not necessarily the same. Besides, with dual 320 Gig drives in a laptop, does that kind of space even really matter any more. I briefly considered making a zfs root, but there are several reasons not: 1) root hardly changes anyways (not a lot of benifit), 2) backing up root is easy (not much benift) and 3) we need to point to separate /usr and /var partitions when booted in each mode. So I have two root partitions ad8s1a and ad8s2a. I've labeled the filesystems so they show up as /dev/ufs/root32 and /dev/ufs/root64 For further reference my zfs pool is 'canoe' (workstations at one company were classes of warships, a canoe is a portable warship --- and I kept the name) === Sorting out the Symlinks === I've always followed the tradition of mounting foreign filesystems as /d// such that /d/myself is a symlink to /. Meaning that symlinks work on other machines because you create a link to /d/myself/usr/foo rather than /usr/foo. Same here. On the root32, create /d/64 (where root64 mounts) and create /d/32 as a symlink to /. Now... on root32, usr is /canoe/32/usr and var is /canoe/32/var Similarly, on root64, usr is /canoe/64/usr and var is /canoe/64/var === Things the same only different === For /usr/ports and /usr/src, it seems find to set the zfs mountpoint to /usr/ports and /usr/src. They seem to mount there through all the symlinks just fine. In hindisght, I could have done that for /usr/share, but currently, /canoe/32/usr/share links to /canoe/64/usr/share --- so you can use either approach for shared data. There are mild arguments for having at least /usr/ports as a separate zfs filesystem --- not the least of which is the keeping of snapshot backups (or not). Interestingly, the zfs guide recomends creating /usr/ports and then /usr/ports/distfiles as separate filesystems and then setting compression on /usr/ports and not on /usr/ports/distfiles. Besides the nasty pauses in interactivity that zfs compression causes, compressing /usr/ports as a filesystem is futile. A stock copy of /usr/ports (with no ports built) recieves a compression ratio of 1.06 from zfs using gzip-9 compression. On the other hand, /usr/src compresses about 3.5 times. This again if you even care about disk space in general Another small thing you might think about sharing is /usr/sup. If you use cvsup, this little directory contains the data pertaining to what you have checked out in your tree. I'm not positive of the consequences of moving back and forth between two installs sharing /usr/src and /usr/ports while changing the /usr/sup in use --- but it seems like a good idea to share it. On concession to all this is that fetchmail checks /d/32/var/mail and /d/64/var/mail. I suppose I could have create a zfs /var/mail as well, but the simple workaround was in place before I moved var onto zfs. === On to Userland === Another standard from long in the dark days of my history is to put users on /u rather tha /usr/home --- less typing, etc. This used to lead to /u1, /u2, ... On our dual-boot machine I create /u and /u/user. I'm a little nervous about software keeping non-architecture clean data in your home directory. I use spamproble (multi-word baysian filter) which stores a berkley DB in ~/.spamprobe. Obviously you _want_ to share this data. Currently the problem is a moot point as spamprobe didn't build in 64 bit and I ended up copying the 32 bit binary to the 64 bit side --- so I don't yet know if this DB is safe. Someone told me that it would compile 64 bit now --- but I havn't tried. Inertia. The large aps in my day --- emacs, firefox, thunderbird, xchat --- all seem to keep their data architecture independantly. At least, I havn't had a problem with an app that I can remember. I have also found it handy to create a few sub-user zfs filesystems --- for .wine and "emu" so far. .wine holds the obvious windoze things and "emu" holds disk images for qemu emulations that I run to test some new kernel modules I'm working on --- both of these would generate significant churn on my snapshot size. I'm also considering a sub-filesystem for my mp3's --- but I'm a little undecided as to how to effectively share them with the copy that is on the fileserver for when the laptop is not in either BSD mode. === What doesn't work OOTB === The startup scripts for ZFS are still a little green. One issue is that the startup script 'requires' mountcritlocal --- I assume because it figures it requires it so that it's own filesystems will mount on top of other local UFS ones. At least in my case, this is backwards. I need zfs to run BEFORE mountcritlocal and BEFORE mdconfig. I have changed my require line to 'root hostid' ... since it's good to have the hostid already set and having root r/w is also good. I don't think I've solved the "BEFORE" problem, but the my requirements might make it into the CVS tree. This dependancy issue is an interesting one. I assume that the fstab code make sure that filesystems are mounted in a sane order ... or maybe it's just the order in the file itself --- I've never had a problem, so I don't know. However, having this information in two places poses the immediate problem... one person might have a ufs /usr and a zfs /usr/ports and another might have a zfs /usr and a ufs or nfs /usr/home. Calling zfs mount -a either before or after mountcritlocal isn't going to make everyone happy. Maybe it needs to be called both times? I dunno. I dunno if zfs can fail gracefully when things it needs arn't mounted yet. Now... the "hostid" for my machine is the same on both 32 and 64 bit. This might not be the default if your machine ran uuidgen, but my laptop does have a uuid in it's bios env --- so I got off easy there. However, I've found I still needed to add the "zpool import -f canoe" to the start function because somthing about the zfs cache file (or something) isn't entirely happy about the dual-boot process. I could have tried sharing the zpool cache --- but I didn't have any idea what the consequences would be and the zpool import -f worked. It might be an idea to add an rc.confvariable along the lines of "zfs_zpool_force="canoe"" (which ends up calling "zpool import -f canoe" === YMMV === What I havn't detailed here is how you bootstrap this all. In my case, I used partition magic to shrink and move around the windoze partition (the laptop is in fact qudriple booted xp/vista/FreeBSD-32/FreeBSD-64). There also obviously isn't a good solution for zfs in XP/Vista. Sharing files with those OSs requires that I use fuse and it's ntfs and/or SMB mounted filesystems from other computers on the network. This is imperfect at best. It's mitigated by the fact that I generally only play games there --- it would be much worse if I were trying to get work done. Anyways... the bootstrap of the FreeBSD world is much like the bootstrap for root-on-gmirror (see the handbook). In my case, I had two regular FreeBSD installs with a zfs for /u for awhile and then I backed up the /usr, /var (both 32 and 64) and the zfs pool (using zfs send) and then I made a much larger zfs pool and repopulated it. Another method to approach this would be to run an regular minimal install onto a 1G root (it fits). I also have my swap outside of zfs --- so in my case, I have 4 fdisk partitions on each disk disk 1: 80M, 99G, , 205G (dell diagnostics, Windows XP, No partition, ZFS + swap) disk 2: 9G, 1G, 99G, 197G (root64 + swap, root32, Vista, ZFS) The swap partitions (ad4s4b and ad8s1b) are shared by both FreeBSD systems. I used glabel to make this easy --- calling them /dev/label/swap[12] If you run a minimal install to each root, then move the usr and var onto zfs, you can then run a "make world" to fill out all the missing files. === In praise of ZFS === So why do all of this? My shortlist: 1. Regardless of the filesystem involved, I like to use at least RAID1. Disks are cheap and disks fail. 2. The ability to hand-off snapshots to another running system is very cool. It allows me to browse a filesystem that's (mostly) up-to-date when my laptop is not online 3. Conceptually, I like having many filesystems and filesystem divisions. /, /usr, /var, /u (a minimal set), but I dislike having to waste space in one filesystem when I might need it in another. === Forward Thinking === 1. While my laptop may be one of the few to have two drives, it would be cool to have a ZFS plugin that would shutdown both drives. Then, when it came time to write a blob, wake only one drive, write the blob, and stop the drive again. Then, when it comes to the next point, wake the other drive, write the first blob, the new second blob, and then shutdown. And so forth. Similarly, it might be an idea to preferentially trigger a flush of the blob at the end of a read --- since one or more of the drives would have spun up for that. 2. Dependencies of /etc/rc.d/zfs need rethinking 3. Potentially, you could now have Solaris, OpenSolaris and FreeBSD 32/64 --- 4 OSs that support ZFS on the same computer. While there may be reasons to boot multiple OSs on the system, it's also possible through installing the same packages and mounting a common (zfs) filesystem that the services on that computer remain the same. ZFS mounting on multiple OSs on the same computer needs thought. 4. (non-zfs related) It seems to me that most of the 64 bit systems have depended heavily on 32 bit binaries for many things. "ls" doesn't need a 64 bit address space, for instance. We havn't really looked at this much in FreeBSD, but it could cut the size of a 64 bit system down a peg if it commonly ran 32 bit binaries (rather than that beeing the exception) === Data === Just in case you need to visualize, here's some slightly sanitized output from my system: [2:2:302]sam@canoe:~> zfs list NAME USED AVAIL REFER MOUNTPOINT canoe 45.0G 144G 21K /canoe canoe/32 4.52G 144G 21K /canoe/32 canoe/32@20080307-1541 16K - 21K - canoe/32/usr 4.46G 144G 4.43G /canoe/32/usr canoe/32/usr@20080307-1541 30.6M - 4.45G - canoe/32/usr/obj 18K 144G 18K /canoe/32/usr/obj canoe/32/var 63.7M 144G 63.2M /canoe/32/var canoe/32/var@20080307-1644 557K - 63.2M - canoe/64 6.30G 144G 21K /canoe/64 canoe/64/usr 4.96G 144G 4.69G /canoe/64/usr canoe/64/usr@20080307-1541 268M - 4.76G - canoe/64/usr/obj 18K 144G 18K /canoe/64/usr/obj canoe/64/var 1.34G 144G 95.8M /canoe/64/var canoe/64/var@20080307-1541 1.25G - 1.33G - canoe/ports 2.31G 144G 2.29G /usr/ports canoe/ports@20080307-1541 18.9M - 2.29G - canoe/ports/distfiles 18K 144G 18K /usr/ports/distfiles canoe/src 2.16G 144G 2.15G /usr/src canoe/src@20080307-1541 8.93M - 2.15G - canoe/sup 28.7M 144G 28.7M /usr/sup canoe/u 29.6G 144G 19K /u canoe/u/sam 29.6G 144G 26.1G /u/sam canoe/u/sam@20080307-1643 17.0M - 26.1G - canoe/u/sam/.wine 2.95G 144G 2.95G /u/sam/.wine canoe/u/sam/.wine@20080307-1541 32K - 2.95G - canoe/u/sam/emu 593M 144G 593M /u/sam/emu canoe/u/sam/emu@20080307-1541 0 - 593M - [2:3:303]sam@canoe:~> df -h Filesystem Size Used Avail Capacity Mounted on /dev/ufs/root32 993M 226M 687M 25% / devfs 1.0K 1.0K 0B 100% /dev canoe 144G 0B 144G 0% /canoe canoe/32 144G 0B 144G 0% /canoe/32 canoe/32/usr 148G 4.4G 144G 3% /canoe/32/usr canoe/32/usr/obj 144G 0B 144G 0% /canoe/32/usr/obj canoe/32/var 144G 63M 144G 0% /canoe/32/var canoe/64 144G 0B 144G 0% /canoe/64 canoe/64/usr 149G 4.7G 144G 3% /canoe/64/usr canoe/64/usr/obj 144G 0B 144G 0% /canoe/64/usr/obj canoe/64/var 144G 96M 144G 0% /canoe/64/var canoe/u 144G 0B 144G 0% /u canoe/u/sam 170G 26G 144G 15% /u/sam canoe/u/sam/.wine 147G 2.9G 144G 2% /u/sam/.wine canoe/u/sam/emu 145G 593M 144G 0% /u/sam/emu canoe/ports 146G 2.3G 144G 2% /usr/ports canoe/ports/distfiles 144G 0B 144G 0% /usr/ports/distfiles canoe/src 146G 2.2G 144G 1% /usr/src canoe/sup 144G 29M 144G 0% /usr/sup /dev/ufs/root64 989M 347M 563M 38% /d/64 /dev/md0 1.9G 28K 1.8G 0% /tmp [2:4:304]sam@canoe:~> zpool status pool: canoe state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM canoe ONLINE 0 0 0 mirror ONLINE 0 0 0 ad4s4d ONLINE 0 0 0 ad8s4d ONLINE 0 0 0 errors: No known data errors [2:5:305]sam@canoe:~> zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT canoe 192G 45.0G 147G 23% ONLINE - [2:6:306]sam@canoe:~> pstat -s Device 1K-blocks Used Avail Capacity /dev/label/swap1 7994896 0 7994896 0% /dev/label/swap2 8388604 0 8388604 0% Total 16383500 0 16383500 0% From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 8 20:04:42 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AC091065677 for ; Sat, 8 Mar 2008 20:04:42 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from mail.asahi-net.or.jp (mail2.asahi-net.or.jp [202.224.39.198]) by mx1.freebsd.org (Postfix) with ESMTP id 2C23F8FC1D for ; Sat, 8 Mar 2008 20:04:42 +0000 (UTC) (envelope-from ota@j.email.ne.jp) Received: from localhost (unknown [151.197.184.224]) by mail.asahi-net.or.jp (Postfix) with ESMTP id D2C055836B for ; Sun, 9 Mar 2008 04:45:13 +0900 (JST) Date: Sat, 8 Mar 2008 14:45:05 -0500 From: Yoshihiro Ota To: freebsd-hackers@freebsd.org Message-Id: <20080308144505.9c72e484.ota@j.email.ne.jp> X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.8; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Remote Kernel Debugging over QEMU? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 20:04:42 -0000 Hello, folks, Has anyone tried to remote-debugging of a system running on Qemu? I thought if I could attach kgdb from Qemu host to a guest FreeBSD running on Qemu, it would be very helpful for many reasons, i.e. no hardware requirements, avoid fscking all disks, and so on. Has anyone ever attempted? I spent a half day but due to lack of remote debugging experience and some other knowledge, it wasn't successful. Thanks, Hiro From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 8 20:18:50 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2460106567D for ; Sat, 8 Mar 2008 20:18:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay03.kiev.sovam.com (relay03.kiev.sovam.com [62.64.120.201]) by mx1.freebsd.org (Postfix) with ESMTP id 49A888FC22 for ; Sat, 8 Mar 2008 20:18:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.226] (helo=skuns.kiev.zoral.com.ua) by relay03.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1JY5VA-000PGu-IJ for freebsd-hackers@freebsd.org; Sat, 08 Mar 2008 22:18:48 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by skuns.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m28KIleq002419 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 8 Mar 2008 22:18:47 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m28KIXNh027472; Sat, 8 Mar 2008 22:18:33 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m28KIWsq027467; Sat, 8 Mar 2008 22:18:32 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 8 Mar 2008 22:18:32 +0200 From: Kostik Belousov To: Yoshihiro Ota Message-ID: <20080308201832.GA10374@deviant.kiev.zoral.com.ua> References: <20080308144505.9c72e484.ota@j.email.ne.jp> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="fUYQa+Pmc3FrFX/N" Content-Disposition: inline In-Reply-To: <20080308144505.9c72e484.ota@j.email.ne.jp> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on skuns.kiev.zoral.com.ua X-Scanner-Signature: f216f799903dddc2f9accd11d8a1fded X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 2372 [Mar 7 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: freebsd-hackers@freebsd.org Subject: Re: Remote Kernel Debugging over QEMU? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 20:18:50 -0000 --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Mar 08, 2008 at 02:45:05PM -0500, Yoshihiro Ota wrote: > Hello, folks, >=20 > Has anyone tried to remote-debugging of a system running on Qemu? >=20 > I thought if I could attach kgdb from Qemu host to a guest FreeBSD > running on Qemu, it would be very helpful for many reasons, i.e. > no hardware requirements, avoid fscking all disks, and so on. >=20 > Has anyone ever attempted? I spent a half day but due to lack of > remote debugging experience and some other knowledge, it wasn't > successful. I do it often, with the stock gdb built from FSF sources. Simply run the qemu with the "-s" switch, then start gdb with kernel.debug argument, and, in the gdb, do "target remote localhost:1234". I use latest gdb since it much better handles debugging information generated by the 4.2 gcc. Also, this setup allows me to use both convenience of ddb specific commands (inside QEMU) and gdb data inspection facilities (almost) simultaneously. --fUYQa+Pmc3FrFX/N Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkfS9JgACgkQC3+MBN1Mb4iHNQCbBubdFeHFsSqyyZHKNAnrWJ81 5toAoM9dWG4+oP90qgidR6uTZKvnUwPR =mySC -----END PGP SIGNATURE----- --fUYQa+Pmc3FrFX/N-- From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 8 20:53:16 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D52251065670 for ; Sat, 8 Mar 2008 20:53:16 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from webmail9.yandex.ru (webmail9.yandex.ru [213.180.223.99]) by mx1.freebsd.org (Postfix) with ESMTP id 40EE98FC19 for ; Sat, 8 Mar 2008 20:53:16 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from YAMAIL (webmail9) by mail.yandex.ru id S4310145AbYCHUQf for ; Sat, 8 Mar 2008 23:16:35 +0300 X-Yandex-Spam: 0 Received: from [77.72.136.70] ([77.72.136.70]) by mail.yandex.ru with HTTP; Sat, 08 Mar 2008 23:16:34 +0300 From: "Andrey V. Elsukov" To: ota@j.email.ne.jp In-Reply-To: 9060000000179207832 References: 9060000000179207832 MIME-Version: 1.0 Message-Id: <1786341205007395@webmail9.yandex.ru> Date: Sat, 08 Mar 2008 23:16:35 +0300 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain Cc: freebsd-hackers@freebsd.org Subject: Re: Remote Kernel Debugging over QEMU? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 20:53:16 -0000 08.03.08, 22:45, "Yoshihiro Ota" : > Has anyone tried to remote-debugging of a system running on Qemu? > I thought if I could attach kgdb from Qemu host to a guest FreeBSD > running on Qemu, it would be very helpful for many reasons, i.e. > no hardware requirements, avoid fscking all disks, and so on. > Has anyone ever attempted? I spent a half day but due to lack of > remote debugging experience and some other knowledge, it wasn't > successful. I tried debugging via serial console 2 years ago. It was workable. -- WBR, Andrey V. Elsukov From owner-freebsd-hackers@FreeBSD.ORG Sat Mar 8 22:32:32 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C26401065673 for ; Sat, 8 Mar 2008 22:32:32 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9D0EA8FC14 for ; Sat, 8 Mar 2008 22:32:32 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 58A2646BAF; Sat, 8 Mar 2008 17:32:32 -0500 (EST) Date: Sat, 8 Mar 2008 22:32:32 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Yoshihiro Ota In-Reply-To: <20080308144505.9c72e484.ota@j.email.ne.jp> Message-ID: <20080308223118.E11432@fledge.watson.org> References: <20080308144505.9c72e484.ota@j.email.ne.jp> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Remote Kernel Debugging over QEMU? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Mar 2008 22:32:32 -0000 On Sat, 8 Mar 2008, Yoshihiro Ota wrote: > Has anyone tried to remote-debugging of a system running on Qemu? > > I thought if I could attach kgdb from Qemu host to a guest FreeBSD running > on Qemu, it would be very helpful for many reasons, i.e. no hardware > requirements, avoid fscking all disks, and so on. > > Has anyone ever attempted? I spent a half day but due to lack of remote > debugging experience and some other knowledge, it wasn't successful. I don't use Qemu, but if it has an option to expose a host serial port as a guest serial port and FreeBSD works with the guest serial port emulation, you might take a look at nmdm(4), which creates two ttys set up as a "null modem". You can then attach kgdb to one end, and qemu to the other, which is a tricky used by our VMware users to do much the same thing. Robert N M Watson Computer Laboratory University of Cambridge