From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 30 10:05:59 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3573216A400 for ; Mon, 30 Apr 2007 10:05:59 +0000 (UTC) (envelope-from akmathen@hotmail.com) Received: from bay0-omc2-s26.bay0.hotmail.com (bay0-omc2-s26.bay0.hotmail.com [65.54.246.162]) by mx1.freebsd.org (Postfix) with ESMTP id 23EE013C46E for ; Mon, 30 Apr 2007 10:05:59 +0000 (UTC) (envelope-from akmathen@hotmail.com) Received: from hotmail.com ([207.46.10.83]) by bay0-omc2-s26.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Mon, 30 Apr 2007 02:53:58 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 30 Apr 2007 02:53:58 -0700 Message-ID: Received: from 207.46.10.123 by by121fd.bay121.hotmail.msn.com with HTTP; Mon, 30 Apr 2007 09:53:57 GMT X-Originating-IP: [15.219.201.70] X-Originating-Email: [akmathen@hotmail.com] X-Sender: akmathen@hotmail.com From: "Abraham K. Mathen" To: freebsd-hackers@freebsd.org Date: Mon, 30 Apr 2007 09:53:57 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 30 Apr 2007 09:53:58.0916 (UTC) FILETIME=[794B4440:01C78B0D] Subject: Why can't I sendto() to 127.255.255.255 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, 30 Apr 2007 10:05:59 -0000 Hello freebsd-hackers, I wrote a short program (on FreeBSD 6.0), that attempts to call sendto() on a UDP socket, with 127.255.255.255 as the destination address. It failed - with errno 49 (EADDRNOTAVAIL). Setting SO_BROADCAST and IP_ONESBCAST did not help. After examining - various RFC's, - source code under /usr/src/sys/netinet/ and - archives of freebsd-hackers & freebsd-net, I have not been able to determine the reason. Is it possible to successfully sendto() on a UDP socket with 127.255.255.255 as the destination address? If yes, how can that be done. Specific questions : ---------------------------------------------------------- - Is it correct to understand that 127.255.255.255 is the directed network broadcast address for net 127? If yes, which RFC specifies that? - If not, is 127.255.255.255 considered to be a host address? If yes, which RFC specifies that? ---------------------------------------------------------- Could you please help me understand this? sincerely Mathen (Abraham K. Mathen) _________________________________________________________________ Mega Airfare Sale. Click here Now. http://ss1.richmedia.in/recurl.asp?pid=18 From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 30 10:32:31 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C732616A400 for ; Mon, 30 Apr 2007 10:32:31 +0000 (UTC) (envelope-from david@madole.net) Received: from d.omd3.com (mx1.omd3.com [69.90.174.41]) by mx1.freebsd.org (Postfix) with ESMTP id A775113C455 for ; Mon, 30 Apr 2007 10:32:31 +0000 (UTC) (envelope-from david@madole.net) Received: from [66.212.193.19] (helo=david) by d.omd3.com with esmtpa (Exim 4.54) id 1HiSw2-000IRC-Hx; Mon, 30 Apr 2007 06:16:46 -0400 Date: Mon, 30 Apr 2007 06:16:00 -0400 From: "David S. Madole" To: "'Abraham K. Mathen'" , "'freebsd-hackers@freebsd.org'" Message-ID: X-Priority: 3 Organization: Optimized Micro Devices X-Mailer: Bynari Insight Connector 3.1.3-0410179 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Cc: Subject: RE: Why can't I sendto() to 127.255.255.255 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, 30 Apr 2007 10:32:31 -0000 > From: Abraham K. Mathen on Monday, April 30, 2007 5:54 AM > > I wrote a short program (on FreeBSD 6.0), that attempts > to call sendto() on a UDP socket, with 127.255.255.255 as > the destination address. It failed - with errno 49 (EADDRNOTAVAIL). > Setting SO_BROADCAST and IP_ONESBCAST did not help. Perhaps because the matched route for that address points to lo0 on your sy= stem and lo0 is not a broadcast-capable interface? lo0: flags=3D8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000 Note that there is no "BROADCAST" flag. Just a guess. David From owner-freebsd-hackers@FreeBSD.ORG Mon Apr 30 21:00:40 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C29FA16A401; Mon, 30 Apr 2007 21:00:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id 65F3213C483; Mon, 30 Apr 2007 21:00:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l3UL0Xpr016564; Mon, 30 Apr 2007 17:00:35 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 30 Apr 2007 15:41:22 -0400 User-Agent: KMail/1.9.6 References: <200704262136.33196.hselasky@c2i.net> <46323A77.8010907@elischer.org> <200704272032.20664.hselasky@freebsd.org> In-Reply-To: <200704272032.20664.hselasky@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200704301541.23678.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 30 Apr 2007 17:00:35 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3184/Mon Apr 30 09:51:57 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Daniel Eischen , Attilio Rao , freebsd-arch@freebsd.org, Hans Petter Selasky , Julian Elischer Subject: Re: msleep() on recursivly locked mutexes 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, 30 Apr 2007 21:00:40 -0000 On Friday 27 April 2007 02:32:20 pm Hans Petter Selasky wrote: > > > P0 unlock(1); > > > P0 unlock(2); > > > > this looks "interesting". > > Can you give a more concrete example of this? > > what work is done in the upcall? WHo is upcalling to who? > > For example an USB device driver might be up-calling to the USB host > controller driver. Down call is when the transfer finishes. I think in this case you don't want to keep the periph locked while you ask the controller to process requests. Instead, the periph drivers should queue requests to the controller and receive replies, but they should be considered as two independent objects. For example, network drivers drop their lock when passing a packet (request) up the stack. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue May 1 19:48:26 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E922116A402 for ; Tue, 1 May 2007 19:48:26 +0000 (UTC) (envelope-from pneumann@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.237]) by mx1.freebsd.org (Postfix) with ESMTP id 91F5113C480 for ; Tue, 1 May 2007 19:48:26 +0000 (UTC) (envelope-from pneumann@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so2024572wxc for ; Tue, 01 May 2007 12:48:25 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=FLSsG4ZPhTP9A3pASVieOFzIFiG0dQxX7i6WOTjV9LPWMpRQXOSKG+7RvCavtDQvrgp6LrATKyxhgY1bMKHmI9fjqvdoCNhfogD/vtxhPexPXFX1pIsWBa6OPFNmliv3YG1msRYj/zozqBBugOfri3DWcKUP7Ge8WSwpTjgFNqQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=hD02PdvAV9q/cw3N2LJcIZgyf/ro1RVI3Zc6lu/pITOXFX2tvcC6HHAgGOAvkHNL2Ij3XNiGYjyYcrajTlpYVE7Mo14PNaPLqujC6pBikAALID1LTZnTgl6zEPmBSoacRF1iz4hcTOjITD1T0YXkWsJRiQ1KM8P1RSfUYb2uXX4= Received: by 10.90.49.19 with SMTP id w19mr6444934agw.1178047189096; Tue, 01 May 2007 12:19:49 -0700 (PDT) Received: from ?10.0.0.124? ( [201.215.221.113]) by mx.google.com with ESMTP id q57sm11920670wrq.2007.05.01.12.19.47; Tue, 01 May 2007 12:19:48 -0700 (PDT) From: "Phillip N." To: Daniel Eischen In-Reply-To: References: <46335268.2030701@helenmarks.co.uk> Content-Type: text/plain; charset=utf-8 Date: Tue, 01 May 2007 12:19:44 -0400 Message-Id: <1178036384.1277.8.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.10.0 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 01 May 2007 20:07:31 +0000 Cc: freebsd-hackers@freebsd.org, Dominic Marks Subject: Re: Mono XSP & mod_mono support on FreeBSD 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, 01 May 2007 19:48:27 -0000 El sáb, 28-04-2007 a las 10:55 -0400, Daniel Eischen escribió: > On Sat, 28 Apr 2007, Dominic Marks wrote: > > > Hackers, > > > > Currently XSP (Mono's ASP.NET implementation) does not run on FreeBSD. > > > > There is a brief post here about the reasons why from David Xu: > > > > http://lists.freebsd.org/pipermail/freebsd-threads/2005-March/002944.html > > > > Since that message is over 2 years old I hoped that it might no longer be the > > case, but when I attempted to run the application it does not work. This is > > the case if you use libc_r, libthr or libpthread. I was using 6.2-STABLE, if > > it matters. > > > > I am interested if anyone knows if this is likely to ever work. I am more > > than happy to test patches for anyone who wanted to have a go at it. It seems > > that there was a previous effort to get it ported but that seems to have run > > to this issue and stopped. > > Process shared mutexes and condition variables will never be supported > in 6.x. They may occur at some point in 7.x. mono should be fixed so > that it respects _POSIX_THREAD_PROCESS_SHARED. > Hi.. ive been running a pair of WebServices over mod_mono-1.2.4/mono-1.2.3.1 withouth much problems. But problems with threads/semps are known.. It would be very interesting if you could file a detail bug in mono's tracker about _POSIX_THREAD_PROCESS_SHARED to see the reaction over there. Maybe that way, someone do something, and make us all happy... :) cheers! From owner-freebsd-hackers@FreeBSD.ORG Tue May 1 22:16:26 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B8BBE16A400 for ; Tue, 1 May 2007 22:16:26 +0000 (UTC) (envelope-from stas.ibragimov@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.freebsd.org (Postfix) with ESMTP id 4185813C46A for ; Tue, 1 May 2007 22:16:26 +0000 (UTC) (envelope-from stas.ibragimov@gmail.com) Received: by ug-out-1314.google.com with SMTP id 71so107076ugh for ; Tue, 01 May 2007 15:16:25 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:date:to:subject:message-id:mime-version:content-type:content-disposition:user-agent:from; b=LtRu5qdgq3U5gAFFCcupQdF0HFUYdx39ratzA93SF4LrsLP22qzrWyEC1pYYGz1RdxYofvy+pV/eDajS004Gdx50ZDnJGkpcaZ/ZeRqZvt7/jRAoJDRVO3Zhp1TvFYPTqzj2PNrR5T662WgIVz82pqK2xmbogw6qwNDEeUgd4oE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:to:subject:message-id:mime-version:content-type:content-disposition:user-agent:from; b=QP/hrf95tnDhdZkEqBazRXOae3ctCHmKaV5OJjr0nWTctgPChWL5RrfxdqukP+yy+3L+ta7xKmmcUrtUUv3tJx0VQ4NWyo/GsEADAXeYlQZQz8LRlt01OsWGZ15tjH6r4phydp+lOk3nqf1N89zsI9w+FIeBip8KFe9QPZfrvHQ= Received: by 10.66.243.2 with SMTP id q2mr634255ugh.1178057784928; Tue, 01 May 2007 15:16:24 -0700 (PDT) Received: from localhost ( [213.141.154.21]) by mx.google.com with ESMTP id e23sm33901ugd.2007.05.01.15.16.23; Tue, 01 May 2007 15:16:24 -0700 (PDT) Date: Wed, 2 May 2007 02:17:48 +0400 To: freebsd-hackers@freebsd.org Message-ID: <20070501221455.GA7263@q.q> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="2B/JsCI69OhZNC5r" Content-Disposition: inline User-Agent: Mutt/1.5.15 (2007-04-06) From: stas.ibragimov@gmail.com Subject: Debug and control registers in kdb. 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, 01 May 2007 22:16:26 -0000 --2B/JsCI69OhZNC5r Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello everybody. In ddb(4) we can read/write only cs-ss,eax-edx,esp,ebp,esi,edi,eip and efl registers of CPU? Why not implemented reding/writing to the dr0-dr7 and cr0-cr4 registers? In attach there are small patch, that implements it. --2B/JsCI69OhZNC5r Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename=patch *** db_trace.c.org Wed May 2 00:12:22 2007 --- db_trace.c Wed May 2 01:04:01 2007 *************** *** 59,64 **** --- 59,69 ---- static db_varfcn_t db_esp; static db_varfcn_t db_frame; static db_varfcn_t db_ss; + static db_varfcn_t db_cr0; + static db_varfcn_t db_cr1; + static db_varfcn_t db_cr2; + static db_varfcn_t db_cr3; + static db_varfcn_t db_cr4; /* * Machine register set. *************** *** 88,95 **** { "dr5", NULL, db_dr5 }, { "dr6", NULL, db_dr6 }, { "dr7", NULL, db_dr7 }, ! #define DB_N_SHOW_REGS 23 /* Don't show registers after here. */ }; struct db_variable *db_eregs = db_regs + DB_N_SHOW_REGS; --- 93,105 ---- { "dr5", NULL, db_dr5 }, { "dr6", NULL, db_dr6 }, { "dr7", NULL, db_dr7 }, + { "cr0", NULL, db_cr0 }, + { "cr1", NULL, db_cr1 }, + { "cr2", NULL, db_cr2 }, + { "cr3", NULL, db_cr3 }, + { "cr4", NULL, db_cr4 }, ! #define DB_N_SHOW_REGS 28 /* Don't show registers after here. */ }; struct db_variable *db_eregs = db_regs + DB_N_SHOW_REGS; *************** *** 106,111 **** --- 116,122 ---- load_ ## reg (*valuep); \ return (1); \ } + DB_DRX_FUNC(dr0) DB_DRX_FUNC(dr1) DB_DRX_FUNC(dr2) *************** *** 114,119 **** --- 125,135 ---- DB_DRX_FUNC(dr5) DB_DRX_FUNC(dr6) DB_DRX_FUNC(dr7) + DB_DRX_FUNC(cr0) + DB_DRX_FUNC(cr1) + DB_DRX_FUNC(cr2) + DB_DRX_FUNC(cr3) + DB_DRX_FUNC(cr4) static __inline int get_esp(struct trapframe *tf) *** cpufunc.h.org Wed May 2 01:57:40 2007 --- cpufunc.h Wed May 2 01:18:31 2007 *************** *** 388,394 **** --- 388,414 ---- } + static __inline void + load_cr1(u_int data) + { + __asm __volatile("movl %0,%%cr1" : : "r" (data)); + } + static __inline u_int + rcr1(void) + { + u_int data; + + __asm __volatile("movl %%cr1,%0" : "=r" (data)); + return (data); + } + + static __inline void + load_cr2(u_int data) + { + + __asm __volatile("movl %0,%%cr2" : : "r" (data)); + } static __inline u_int rcr2(void) --2B/JsCI69OhZNC5r-- From owner-freebsd-hackers@FreeBSD.ORG Wed May 2 06:37:03 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EE59316A401 for ; Wed, 2 May 2007 06:37:03 +0000 (UTC) (envelope-from edy_vanisteroy@yahoo.co.id) Received: from web37110.mail.mud.yahoo.com (web37110.mail.mud.yahoo.com [209.191.85.112]) by mx1.freebsd.org (Postfix) with SMTP id 9B70513C469 for ; Wed, 2 May 2007 06:37:03 +0000 (UTC) (envelope-from edy_vanisteroy@yahoo.co.id) Received: (qmail 83725 invoked by uid 60001); 2 May 2007 06:10:22 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.id; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=FRwuJOmv6jS5IySjBAplR40HH5QVMHkxwlSAuLtR5NNn48dunCbYoX68FYDuIMdsxp+g+e0v+4QvTOvOXFaYS+VuQ8YNiHNbUrLcIoCI0wyevGO9xDGsgp0lFJsOsv/KUBdYeBbBRyQHLOALnGPqHIruN4nQTbBJ/gpWwxzNj/0=; X-YMail-OSG: TwVF6cIVM1mA_W4_hMunAihygRUiIwDtLaSx4MfgTW2i7VUPD4tR.rfGtPcZM5e2dAzSAR5by6D3.XJSQKC8qWFnIfmPSM0cdeEgM8tz.lw.IQgFUEpvJ.__y6syKQ-- Received: from [202.162.208.59] by web37110.mail.mud.yahoo.com via HTTP; Tue, 01 May 2007 23:10:22 PDT Date: Tue, 1 May 2007 23:10:22 -0700 (PDT) From: edytocho tocho To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Message-ID: <789518.83620.qm@web37110.mail.mud.yahoo.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: how to configure mail server by freebsd 4.11 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, 02 May 2007 06:37:04 -0000 how to configure mail server by freebsd 4.11 --------------------------------- Ahhh...imagining that irresistible "new car" smell? Check outnew cars at Yahoo! Autos. From owner-freebsd-hackers@FreeBSD.ORG Wed May 2 08:35:29 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 451FD16A400 for ; Wed, 2 May 2007 08:35:29 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by mx1.freebsd.org (Postfix) with ESMTP id A43B413C44C for ; Wed, 2 May 2007 08:35:28 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by ug-out-1314.google.com with SMTP id 71so161834ugh for ; Wed, 02 May 2007 01:35:26 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=A2UnbKn+OrjuCCsjrEMFsWoXTJkfq6h4oE3U/u274eFnEZYGgkpBguwbdPO8Vt2B67Tr4ObG6go3V4PLxJsqCagqjkg7pX4Y/e9FZkbiEXDsbMQ6qW2aLb2nYuZ0EDSLwGkdgVDUZzLh7kSPb+P4o6hFOP0lZqqn9SlLGrUuMKE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=tZS/N7D5phDx992/qtpuX2KGlWILGyuppotRId97esCZQT7R/yYD1ZD63sEdCiJM0HX+ORNlxeJKm19WCc0yhYDwL2104nC7+y05dhNKa2OBX29nW9zAfzUpR/W7Agtxbi26VhaEICa2jwBaH9213I9/J0npjuS9OGd6x2F8634= Received: by 10.82.173.19 with SMTP id v19mr876502bue.1178094926360; Wed, 02 May 2007 01:35:26 -0700 (PDT) Received: from ?172.31.5.21? ( [89.97.252.178]) by mx.google.com with ESMTP id b33sm1855224ika.2007.05.02.01.35.17; Wed, 02 May 2007 01:35:23 -0700 (PDT) Message-ID: <4638BE95.8070009@FreeBSD.org> Date: Wed, 02 May 2007 18:38:45 +0200 From: Attilio Rao User-Agent: Thunderbird 1.5 (X11/20060526) MIME-Version: 1.0 To: Matthew Dillon References: <200704262136.33196.hselasky@c2i.net> <46311708.5030002@elischer.org> <200704270753.05438.hselasky@c2i.net> <200704271739.l3RHdG7a009988@apollo.backplane.com> In-Reply-To: <200704271739.l3RHdG7a009988@apollo.backplane.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: Attilio Rao Cc: freebsd-hackers@freebsd.org, Julian Elischer , Hans Petter Selasky Subject: Re: msleep() on recursivly locked mutexes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 May 2007 08:35:29 -0000 Matthew Dillon wrote: > The real culprit here is passing held mutexes to unrelated procedures > in the first place because those procedures might have to block, in > order so those procedures can release and reacquire the mutex. > That's just bad coding in my view. The unrelated procedure has no > clue as to what the mutex is or why it is being held and really has no > business messing with it. > > What I did was implement spinlocks with VERY restricted capabilities, > far more restricted then the capabilities of your mutexes. Our > spinlocks are meant only to be used to lock up tiny pieces of code > (like for ref counting or structural or flag-changing operations). > Plus the kernel automatically acts as if it were in a critical section > if it takes an interrupt while the current thread is holding a spinlock. > That way mainline code can just use a spinlock to deal with small bits > of interlocked information without it costing much in the way of > overhead. Well, this is currently what our spinmutexes do too. The couplet mtx_lock_spin()/mtx_unlock_spin() simply starts/exits a critical section (disabling interrupts in the while and avoiding preemption). They are intended to be used for very small pieces of code too. > I made the decision that ANYTHING more complex then that would have to > use a real lock, like a lockmgr lock or a token, depending on the > characteristics desired. To make it even more desireable I also > stripped down the lockmgr() lock implementation, removing numerous > bits that were inherited from very old code methodologies that have no > business being in a modern operating system, like LK_DRAIN. And I > removed the passing of an interlocking spinlock to the lockmgr code, > because that methodology was being massively abused in existing code > (and I do mean massively). Well, if you add a more smart interface, you have *exactly* our sx locks implementation. Basically, sx and lockmgr in FreeBSD just differs beacause of the lockmgr's stupid API, beacause of draining and beacause of interlock. But they are basically very very similar*. > I'm not quite sure what the best way to go is for FreeBSD, because > you guys have made your mutexes just as or even more sophisticated > then your normal locks in many respects, and you have like 50 different > types of locks now (I can't keep track of them all). Not sure what you mean with 'more sophisticated'... anyways... The only one problem I currently see with our locking primitives is that they are not very well documented (or part of the documentation is stale) and this can be a problem when there are a couple of locking primitives as we have but this doesn't mean that they are complex. Really, any primitive is very simple and is thought to be used in its particular context. The restriction we have on locks just are a sort of warning for people developing wrong locking strategies. For example, there are not tecnological difficulties in allowing holding mutexes when sleeping but if this really happen, probabilly there is a problem in your locking scheme. > If I were to offer advise it would be: Just stop trying to mix water > and hot wax. Stop holding mutexes across potentially blocking procedure > calls. Stop passing mutexes into unrelated bits of code in order for > them to be released and reacquired somewhere deep in that code. Just > doing that will probably solve all of the problems being reported. I cannot understand what part of the codes you are referring with this... Thanks, Attilio * Another difference is about upgrading, but I consider FreeBSD's lockmgr upgrading a really bad choice of design, and world could be a very better place without it From owner-freebsd-hackers@FreeBSD.ORG Wed May 2 08:38:02 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3043516A400 for ; Wed, 2 May 2007 08:38:02 +0000 (UTC) (envelope-from asmrookie@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 B614613C480 for ; Wed, 2 May 2007 08:38:01 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by ug-out-1314.google.com with SMTP id 71so162098ugh for ; Wed, 02 May 2007 01:38:00 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=iVU5bC1EeIi7UF2hWl7wijA6DaVicLF/bEaH5qsI75YGkP5yjMtMWupXNGyoNOMfgHo0oq9L5HDkLUz2aPudxLt92dyFw9e7mmrwFmCW6SgtUbY1gr2kEQE6rGJjiQouVf+V2PHScVbP71HUbzuwROILt5C8g/DOt3w9GDxO5+Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=KYY2rfAxfIIFyIG/cZfir2r41yFbS/FoaBZosl15bQftoeyq5mrkfuqJjzi252u1oRAqbXndnnBp/C5fuNBI06TCZ8YmeZnv4dOHQUDzfdAXonv9iUENVUxmKMrfdcceR3yHexVx9bJlca84hLeHXAmxl74EBgt1GyEoCmvu92o= Received: by 10.82.162.14 with SMTP id k14mr903173bue.1178095080834; Wed, 02 May 2007 01:38:00 -0700 (PDT) Received: from ?172.31.5.21? ( [89.97.252.178]) by mx.google.com with ESMTP id b30sm19890ika.2007.05.02.01.37.50; Wed, 02 May 2007 01:37:56 -0700 (PDT) Message-ID: <4638BF32.5040607@FreeBSD.org> Date: Wed, 02 May 2007 18:41:22 +0200 From: Attilio Rao User-Agent: Thunderbird 1.5 (X11/20060526) MIME-Version: 1.0 To: Julian Elischer References: <200704262136.33196.hselasky@c2i.net> <200704270748.49404.hselasky@c2i.net> <200704271917.29939.hselasky@freebsd.org> <46323A77.8010907@elischer.org> In-Reply-To: <46323A77.8010907@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: Attilio Rao Cc: Daniel Eischen , freebsd-hackers@freebsd.org, Hans Petter Selasky Subject: Re: msleep() on recursivly locked mutexes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 May 2007 08:38:02 -0000 Julian Elischer wrote: > Hans Petter Selasky wrote: > >> First of all: Where is FreeBSD's locking strategy document? > It is just started.. man 9 locking. it needs a lot of work still. I'm working with rwatson@ about a document that can nicely fit in locking(9), but we are a little bit stuck in terminology. In order to not confuse even more locking consumers we are trying to find right and unique terms for kernel events linked to locks. Attilio From owner-freebsd-hackers@FreeBSD.ORG Wed May 2 09:08:02 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0AFDA16A403 for ; Wed, 2 May 2007 09:08:02 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.227]) by mx1.freebsd.org (Postfix) with ESMTP id BB8B413C483 for ; Wed, 2 May 2007 09:08:01 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: by wx-out-0506.google.com with SMTP id s18so56189wxc for ; Wed, 02 May 2007 02:08:01 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=nY9gFwUQ6Vg4Swx3kVPXDJTFRUP/gTaDu5XSOzqm6/nCB2GgRVNLeR+miRE6O5c8eYp4RGS50ZT/1Xh5OmUGhKdxJZsA6ZE5Vz2iAszURGIccgkJlWeQjVd2mg6WN5K+Ahqj1bIstOHY3iQcj/iARr141inwBWYUcagf/gWN0CE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=ZEV8zeNFrMRUEKPDVLG6Qx/+hyxtqTqYw28DsSzkdkp8f3wSvdDMWhuKFfMJzuFtunLR0egYzNRLf8CtimktBGwpUd01NG8mTBv56AaYhF40IbQA9mzjz/Fa8BYHC4grr6JzrZcB34R4lquwpclxSe9uGS28h2dt7pKlKgemcGo= Received: by 10.82.189.6 with SMTP id m6mr964004buf.1178096879960; Wed, 02 May 2007 02:07:59 -0700 (PDT) Received: from ?172.31.5.21? ( [89.97.252.178]) by mx.google.com with ESMTP id y34sm71571iky.2007.05.02.02.07.48; Wed, 02 May 2007 02:07:56 -0700 (PDT) Message-ID: <4638C639.7060407@FreeBSD.org> Date: Wed, 02 May 2007 19:11:21 +0200 From: Attilio Rao User-Agent: Thunderbird 1.5 (X11/20060526) MIME-Version: 1.0 To: babkin@users.sf.net References: <2782784.9021177711758431.JavaMail.root@vms073.mailsrvcs.net> In-Reply-To: <2782784.9021177711758431.JavaMail.root@vms073.mailsrvcs.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: Attilio Rao Cc: freebsd-hackers@freebsd.org, Julian Elischer , Hans Petter Selasky Subject: Re: msleep() on recursivly locked mutexes X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: attilio@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 May 2007 09:08:02 -0000 Sergey Babkin wrote: >> From: Julian Elischer >> Basically you shouldn't have a recursed mutex FULL STOP. We have a couple >> of instances in the kernel where we allow a mutex to recurse, but they had to be >> hard fought, and the general rule is "Don't". If you are recursing on >> a mutex you need to switch to some other method of doing things. >> e.g. reference counts, turnstiles, whatever.. use the mutex to create these > > One typical problem is when someone holds a mutex > and needs to call a function that also tried to get the mutex. > The typical solution for it is to provide two versions of > this function, one expecting the mutex being already held > by the caller, the other being a wrapper that grabs the mutex and > then calls the actual worker function. If that happens rather frequently, the better thing to do is assuming that the lock is alredy held in the function (adding an assertion for it) than acquiring/releasing before/after the function. Attilio From owner-freebsd-hackers@FreeBSD.ORG Wed May 2 09:08:37 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 89A6116A408 for ; Wed, 2 May 2007 09:08:37 +0000 (UTC) (envelope-from carl.gustavsson@bahnhofbredband.se) Received: from smtp-1.sys.kth.se (smtp-1.sys.kth.se [130.237.32.175]) by mx1.freebsd.org (Postfix) with ESMTP id 4AA5913C4C2 for ; Wed, 2 May 2007 09:08:37 +0000 (UTC) (envelope-from carl.gustavsson@bahnhofbredband.se) Received: from localhost (localhost [127.0.0.1]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 2A62815586B; Wed, 2 May 2007 10:39:09 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-1.sys.kth.se ([127.0.0.1]) by localhost (smtp-1.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id GXTJg4npshWF; Wed, 2 May 2007 10:39:07 +0200 (CEST) Received: from sleipner.home.swe (c213-100-49-190.swipnet.se [213.100.49.190]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 34AC4155869; Wed, 2 May 2007 10:39:07 +0200 (CEST) Message-ID: <46384E76.5060804@bahnhofbredband.se> Date: Wed, 02 May 2007 10:40:22 +0200 From: Carl Johan Gustavsson User-Agent: Thunderbird 2.0.0.0 (X11/20070422) MIME-Version: 1.0 To: edytocho tocho References: <789518.83620.qm@web37110.mail.mud.yahoo.com> In-Reply-To: <789518.83620.qm@web37110.mail.mud.yahoo.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: how to configure mail server by freebsd 4.11 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, 02 May 2007 09:08:37 -0000 edytocho tocho wrote: > how to configure mail server by freebsd 4.11 > This is not the correct list for such questions, questions@ is more appropriate, further, 4.11 isn't supported anymore. I suggest you to read the chapter about mail servers in the handbook (http://www.freebsd.org/handbook) / cjg > > --------------------------------- > Ahhh...imagining that irresistible "new car" smell? > Check outnew cars at Yahoo! Autos. > _______________________________________________ > 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 Wed May 2 15:05:35 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 697D016A410 for ; Wed, 2 May 2007 15:05:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.freebsd.org (Postfix) with ESMTP id 5783D13C45B for ; Wed, 2 May 2007 15:05:34 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l42F5T3e031765; Wed, 2 May 2007 11:05:32 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Wed, 2 May 2007 11:02:56 -0400 User-Agent: KMail/1.9.6 References: <20070501221455.GA7263@q.q> In-Reply-To: <20070501221455.GA7263@q.q> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200705021102.56770.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 02 May 2007 11:05:32 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/3195/Wed May 2 05:34:51 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: stas.ibragimov@gmail.com Subject: Re: Debug and control registers in kdb. 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, 02 May 2007 15:05:35 -0000 On Tuesday 01 May 2007 06:17:48 pm stas.ibragimov@gmail.com wrote: > Hello everybody. > In ddb(4) we can read/write only cs-ss,eax-edx,esp,ebp,esi,edi,eip and efl registers of CPU? > Why not implemented reding/writing to the dr0-dr7 and cr0-cr4 registers? > In attach there are small patch, that implements it. DDB already provides a 'hwatch' interface to work with the debug registers that is much easier to use than accessing drX directly. That said, it doesn't appear that your patch does anything for drX. While it might be slightly useful to read crX in DDB, I'm not sure how writing to them can really be useful. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed May 2 15:33:28 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D733516A403 for ; Wed, 2 May 2007 15:33:28 +0000 (UTC) (envelope-from stas.ibragimov@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.225]) by mx1.freebsd.org (Postfix) with ESMTP id 91B3513C4B9 for ; Wed, 2 May 2007 15:33:28 +0000 (UTC) (envelope-from stas.ibragimov@gmail.com) Received: by wr-out-0506.google.com with SMTP id 70so174460wra for ; Wed, 02 May 2007 08:33:28 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:date:to:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:user-agent:from; b=PzRGsfl8TZxBa+X9/yCNhnPhKHCn1dMFNx6d8QwA89Apcdh+Ps3JN9lR2V1gKDnYQp+E6jZevffHRFSPEeXMwTwuZwmVI+Jd5f4K8EyAn9YHlrBnpfVXFvf7R9phBNhJlcklFLnjMOrzz9UNJao7Oj5VAGJpmJJb4s+b72kJemw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:to:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:user-agent:from; b=nX4+G+Xt0AO/47/xH6VnuUCEkU66ie5qzaoOgxcp5MkleWQ43M5ZHeTeK2FNCJBrS0SxKncwfHBRY/13c//U8nVpeUTAGY3w49ujVqZyG75K3KyP0D5C9nxnm0BzohDl3lNSmce5+et+iMDfqmRGgDDwmm9iTlsN8AEre1VFeJ8= Received: by 10.78.160.2 with SMTP id i2mr313396hue.1178120007305; Wed, 02 May 2007 08:33:27 -0700 (PDT) Received: from localhost ( [213.141.154.21]) by mx.google.com with ESMTP id 27sm1506122ugp.2007.05.02.08.33.23; Wed, 02 May 2007 08:33:23 -0700 (PDT) Date: Wed, 2 May 2007 19:36:00 +0400 To: freebsd-hackers@freebsd.org Message-ID: <20070502153600.GA7519@q.q> References: <20070501221455.GA7263@q.q> <200705021102.56770.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200705021102.56770.jhb@freebsd.org> User-Agent: Mutt/1.5.15 (2007-04-06) From: stas.ibragimov@gmail.com Subject: Re: Debug and control registers in kdb. 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, 02 May 2007 15:33:28 -0000 The 'hwatch' interface can set breakepoint only to reading and writing, but not to execution. Reading from cr3 can be used to display page tables. On Wed May 02, 2007 at 11:02:56AM -0400, John Baldwin wrote: > On Tuesday 01 May 2007 06:17:48 pm stas.ibragimov@gmail.com wrote: > > Hello everybody. > > In ddb(4) we can read/write only cs-ss,eax-edx,esp,ebp,esi,edi,eip and efl > registers of CPU? > > Why not implemented reding/writing to the dr0-dr7 and cr0-cr4 registers? > > In attach there are small patch, that implements it. > > DDB already provides a 'hwatch' interface to work with the debug registers > that is much easier to use than accessing drX directly. That said, it > doesn't appear that your patch does anything for drX. While it might be > slightly useful to read crX in DDB, I'm not sure how writing to them can > really be useful. > > -- > John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Wed May 2 16:53:03 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 216D416A408 for ; Wed, 2 May 2007 16:53:03 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outM.internet-mail-service.net (outM.internet-mail-service.net [216.240.47.236]) by mx1.freebsd.org (Postfix) with ESMTP id E8C8C13C455 for ; Wed, 2 May 2007 16:53: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.32) with ESMTP; Wed, 02 May 2007 09:19:26 -0700 Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 3CAD1125B37; Wed, 2 May 2007 09:53:02 -0700 (PDT) Message-ID: <4638C1ED.5020607@elischer.org> Date: Wed, 02 May 2007 09:53:01 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.0 (Macintosh/20070326) MIME-Version: 1.0 To: attilio@FreeBSD.org References: <200704262136.33196.hselasky@c2i.net> <200704270748.49404.hselasky@c2i.net> <200704271917.29939.hselasky@freebsd.org> <46323A77.8010907@elischer.org> <4638BF32.5040607@FreeBSD.org> In-Reply-To: <4638BF32.5040607@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Daniel Eischen , freebsd-hackers@freebsd.org, Hans Petter Selasky Subject: Re: msleep() on recursivly locked mutexes 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, 02 May 2007 16:53:03 -0000 Attilio Rao wrote: > Julian Elischer wrote: >> Hans Petter Selasky wrote: >> >>> First of all: Where is FreeBSD's locking strategy document? >> It is just started.. man 9 locking. it needs a lot of work still. > > I'm working with rwatson@ about a document that can nicely fit in > locking(9), but we are a little bit stuck in terminology. > In order to not confuse even more locking consumers we are trying to > find right and unique terms for kernel events linked to locks. > > > Attilio send me what you have :-) I'll look at it too. From owner-freebsd-hackers@FreeBSD.ORG Wed May 2 22:57:19 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4072516A400 for ; Wed, 2 May 2007 22:57:19 +0000 (UTC) (envelope-from dudu.meyer@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.190]) by mx1.freebsd.org (Postfix) with ESMTP id C73CF13C459 for ; Wed, 2 May 2007 22:57:18 +0000 (UTC) (envelope-from dudu.meyer@gmail.com) Received: by mu-out-0910.google.com with SMTP id g7so308830muf for ; Wed, 02 May 2007 15:57:17 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=PfcFCUL4/WM+wPSciWKav7pW3HLJy5dHvWxcESQb1nBTf5R8w+xoUzulFaqQ62SqJtUQieIOhf86bNHIyOQJfMZgqenGz3Qe7C71doQU+/esrS1Zo3hLYKtQFvKQl/fCwA3eu16S79gGOYDvmimgcTPEjdCDH2408mugngDYQm0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=RQn2yzN2W+Vynla2+5nBV6Qjb68wuywO7KzwhnK9GH5n1awCLezuZ5DNqYSC64ulNh8ODR+bViIeI2YCRr/YUKEnFdlZ5dvXpj1wQ7FGQDvAMWddJg/gRpB5cQmycEjHyOs2C5kXR0z5vAAw7nK1dKvFPaUXtu2p6u/lM31h3x8= Received: by 10.82.123.16 with SMTP id v16mr2376232buc.1178145070639; Wed, 02 May 2007 15:31:10 -0700 (PDT) Received: by 10.82.155.15 with HTTP; Wed, 2 May 2007 15:31:10 -0700 (PDT) Message-ID: Date: Wed, 2 May 2007 19:31:10 -0300 From: "Eduardo Meyer" To: hackers@freebsd.org, questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: Apache2 Virtual Hosts and FreeBSD fd limits. 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, 02 May 2007 22:57:19 -0000 I have had a number of problems with Apache, concerning the number of virtual hosts I have. I know it is a FAQ but raising FD_SETSIZE on apache didnt help, am now trying to raise some limits with FreeBSD. I have raised maxfiles, but my openfiles do increase and the problem with Apache persists. # sysctl kern.maxfiles kern.maxfiles: 300000 # sysctl kern.openfiles kern.openfiles: 6519 What else should I tune up to have more FDs available? -- =========== Eduardo Meyer pessoal: dudu.meyer@gmail.com profissional: ddm.farmaciap@saude.gov.br From owner-freebsd-hackers@FreeBSD.ORG Thu May 3 00:40:52 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D793316A406 for ; Thu, 3 May 2007 00:40:52 +0000 (UTC) (envelope-from iaccounts@ibctech.ca) Received: from pearl.ibctech.ca (pearl.ibctech.ca [208.70.104.210]) by mx1.freebsd.org (Postfix) with ESMTP id 7B32C13C458 for ; Thu, 3 May 2007 00:40:52 +0000 (UTC) (envelope-from iaccounts@ibctech.ca) Received: (qmail 46664 invoked by uid 1002); 3 May 2007 00:14:11 -0000 Received: from iaccounts@ibctech.ca by pearl.ibctech.ca by uid 89 with qmail-scanner-1.22 (spamassassin: 2.64. Clear:RC:1(208.70.107.100):. Processed in 6.126882 secs); 03 May 2007 00:14:11 -0000 Received: from unknown (HELO ?192.168.1.210?) (steve@ibctech.ca@208.70.107.100) by pearl.ibctech.ca with (DHE-RSA-AES256-SHA encrypted) SMTP; 3 May 2007 00:14:04 -0000 Message-ID: <4639294F.7020409@ibctech.ca> Date: Wed, 02 May 2007 20:14:07 -0400 From: Steve Bertrand User-Agent: Thunderbird 2.0.0.0 (Windows/20070326) MIME-Version: 1.0 To: Eduardo Meyer References: In-Reply-To: X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Thu, 03 May 2007 01:44:49 +0000 Cc: hackers@freebsd.org, questions@freebsd.org Subject: Re: Apache2 Virtual Hosts and FreeBSD fd limits. 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, 03 May 2007 00:40:52 -0000 Eduardo Meyer wrote: > I have had a number of problems with Apache, concerning the number of > virtual hosts I have. I know it is a FAQ but raising FD_SETSIZE on > apache didnt help, am now trying to raise some limits with FreeBSD. I may have missed any previous posts, but can you inform of exactly what the problem/symptoms are? Error messages? What about: # uname -a # apachectl -v > I have raised maxfiles, but my openfiles do increase and the problem > with Apache persists. Does it only affect Apache? Steve From owner-freebsd-hackers@FreeBSD.ORG Thu May 3 13:30:45 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0785C16A400 for ; Thu, 3 May 2007 13:30:45 +0000 (UTC) (envelope-from dudu.meyer@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.188]) by mx1.freebsd.org (Postfix) with ESMTP id 8B05913C459 for ; Thu, 3 May 2007 13:30:44 +0000 (UTC) (envelope-from dudu.meyer@gmail.com) Received: by mu-out-0910.google.com with SMTP id g7so497402muf for ; Thu, 03 May 2007 06:30:43 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; 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; b=mU/wj+sL70SnC8WVqnrbqiNbw4ZJVKH3VgGtvqXvtWgXeLHupCfaEpTb2dBzEri3Tu7GBX3gciyJoKEW3rbJS88GWHBrF6KdiA8OajdlEle7IOqKzHmvpaGMermG8sVWe7ieuPnMZ/JwoLF5dX7+uLnHozM0j/v8AKizeoChSj8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nUkDi6KhDUTruHYJtaSqhO2UTisBVHyevrMpoC7XE5cBX93s+MMxUBVMtyWIgf1uJX5CQC+eUjBA9S2hKN4dqej/utslANXfJPoW5v4wmahj3b4tk9Gd6rBdCl7uSvJbVrK610pdU5BUcDH0EL731FJfHmLsLgWUgp+UvxPBrH0= Received: by 10.82.100.1 with SMTP id x1mr3955417bub.1178199043383; Thu, 03 May 2007 06:30:43 -0700 (PDT) Received: by 10.82.191.11 with HTTP; Thu, 3 May 2007 06:30:43 -0700 (PDT) Message-ID: Date: Thu, 3 May 2007 10:30:43 -0300 From: "Eduardo Meyer" To: "Steve Bertrand" In-Reply-To: <4639294F.7020409@ibctech.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4639294F.7020409@ibctech.ca> Cc: hackers@freebsd.org, questions@freebsd.org Subject: Re: Apache2 Virtual Hosts and FreeBSD fd limits. 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, 03 May 2007 13:30:45 -0000 > # uname -a 5.5-STABLE FreeBSD 5.5-STABLE #6: Wed May 2 20:19:43 BRT 2007 > # apachectl -v Server version: Apache/2.0.59 Server built: May 2 2007 18:38:18 > > > I have raised maxfiles, but my openfiles do increase and the problem > > with Apache persists. > > Does it only affect Apache? Certainly not. But my concert is Apache, and this is the only application this server runs. I have also compiled EXTRA_FLAGS=-DFD_SETSIZE=8192 (currently, it was 2048) and the results were just the same. > > Steve > -- =========== Eduardo Meyer pessoal: dudu.meyer@gmail.com profissional: ddm.farmaciap@saude.gov.br From owner-freebsd-hackers@FreeBSD.ORG Thu May 3 16:29:24 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E20BF16A400 for ; Thu, 3 May 2007 16:29:23 +0000 (UTC) (envelope-from xistence@0x58.com) Received: from mailexchange.osnn.net (1e.66.5646.static.theplanet.com [70.86.102.30]) by mx1.freebsd.org (Postfix) with SMTP id B44B213C448 for ; Thu, 3 May 2007 16:29:23 +0000 (UTC) (envelope-from xistence@0x58.com) Received: (qmail 47416 invoked by uid 0); 3 May 2007 15:58:58 -0000 Received: from unknown (HELO ?10.10.10.101?) (xistence@0x58.com@68.193.15.218) by mailexchange.osnn.net with SMTP; 3 May 2007 15:58:58 -0000 Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: References: <4639294F.7020409@ibctech.ca> Content-Type: multipart/signed; micalg=sha1; boundary=Apple-Mail-1-184977756; protocol="application/pkcs7-signature" Message-Id: From: Bert JW Regeer Date: Thu, 3 May 2007 12:02:36 -0400 To: hackers@freebsd.org, questions@freebsd.org X-Mailer: Apple Mail (2.752.3) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: Apache2 Virtual Hosts and FreeBSD fd limits. 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, 03 May 2007 16:29:24 -0000 --Apple-Mail-1-184977756 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed On May 3, 2007, at 9:30 AM, Eduardo Meyer wrote: >> # uname -a > > 5.5-STABLE FreeBSD 5.5-STABLE #6: Wed May 2 20:19:43 BRT 2007 > >> # apachectl -v > > Server version: Apache/2.0.59 > Server built: May 2 2007 18:38:18 > >> >> > I have raised maxfiles, but my openfiles do increase and the >> problem >> > with Apache persists. >> >> Does it only affect Apache? > > Certainly not. But my concert is Apache, and this is the only > application this server runs. > > I have also compiled EXTRA_FLAGS=-DFD_SETSIZE=8192 (currently, it was > 2048) and the results were just the same. > >> >> Steve >> > > > -- > =========== > Eduardo Meyer > pessoal: dudu.meyer@gmail.com > profissional: ddm.farmaciap@saude.gov.br Since this is my first post to the mailling list, top post or bottom post which one is preferred? If you have a problems with open file descriptors beccause of VirtualHosts it is my guess that you are logging separately for each vhost (both access, and error). The way I found to solve this was to put it all in one file that is then split up into the separate files using a perl script. It is called split-logfile and can be found online, I believe it was in the Apache source tree. All you need to change is instead of having seperate log files for each of them, you have one log file (which outputs the information using the vhost name as the first item on the line so that the perl script can sort it through that), thus only one FD is used to log. LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User- Agent}i\"" cvh CustomLog /usr/local/logs/everything.log cvh So you can scale out to 5000 vhosts and not run into any limit problems. For errors the splitting up is a bit more tricky, but you should be able to get it done as well. Good luck, Bert JW Regeer --Apple-Mail-1-184977756-- From owner-freebsd-hackers@FreeBSD.ORG Thu May 3 17:17:44 2007 Return-Path: X-Original-To: hackers@freebsd.org Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 08CD216A403 for ; Thu, 3 May 2007 17:17:44 +0000 (UTC) (envelope-from dudu.meyer@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.184]) by mx1.freebsd.org (Postfix) with ESMTP id 8515213C44B for ; Thu, 3 May 2007 17:17:43 +0000 (UTC) (envelope-from dudu.meyer@gmail.com) Received: by mu-out-0910.google.com with SMTP id g7so575420muf for ; Thu, 03 May 2007 10:17:42 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; 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; b=XAacRyZxaL0urLw6rULUfLjxPTwLcLXrxB9wuUyiS4qaM7wGkAStD+KLS7+K/NixtcZD2xq9cjX/2NnrPj3IzdRbE5K2JTNkQKgWkioMRapJ18WkvEPCVVFTyTxK6FOYhTpJlgmXBKpPdPghdqlXBcQvVpD73kON5/9W2Ym6CRA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WWsVebYGeo0v2O/RKp1RAjjV4mtpso7c2ATNe5mPg7192FbzGtZPPk1N0o8Yp3f9OJN2EOyG9iI6dAQdI4yVfl/FHsMfWAgdWgAO5FPgrb7bVFrl0IWrfEJRWWH8pcBY7pWNBqEuR+a2PRTaqWVdifqDQVzuCjyGhh6L8BNkwu0= Received: by 10.82.145.7 with SMTP id s7mr4374256bud.1178212662066; Thu, 03 May 2007 10:17:42 -0700 (PDT) Received: by 10.82.191.11 with HTTP; Thu, 3 May 2007 10:17:42 -0700 (PDT) Message-ID: Date: Thu, 3 May 2007 14:17:42 -0300 From: "Eduardo Meyer" To: "Bert JW Regeer" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4639294F.7020409@ibctech.ca> Cc: hackers@freebsd.org, questions@freebsd.org Subject: Re: Apache2 Virtual Hosts and FreeBSD fd limits. 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, 03 May 2007 17:17:44 -0000 On 5/3/07, Bert JW Regeer wrote: > > On May 3, 2007, at 9:30 AM, Eduardo Meyer wrote: > > >> # uname -a > > > > 5.5-STABLE FreeBSD 5.5-STABLE #6: Wed May 2 20:19:43 BRT 2007 > > > >> # apachectl -v > > > > Server version: Apache/2.0.59 > > Server built: May 2 2007 18:38:18 > > > >> > >> > I have raised maxfiles, but my openfiles do increase and the > >> problem > >> > with Apache persists. > >> > >> Does it only affect Apache? > > > > Certainly not. But my concert is Apache, and this is the only > > application this server runs. > > > > I have also compiled EXTRA_FLAGS=-DFD_SETSIZE=8192 (currently, it was > > 2048) and the results were just the same. > > > >> > >> Steve > >> > > > > > > > Since this is my first post to the mailling list, top post or bottom > post which one is preferred? > > If you have a problems with open file descriptors beccause of > VirtualHosts it is my guess that you are logging separately for each > vhost (both access, and error). The way I found to solve this was to > put it all in one file that is then split up into the separate files > using a perl script. It is called split-logfile and can be found > online, I believe it was in the Apache source tree. All you need to > change is instead of having seperate log files for each of them, you > have one log file (which outputs the information using the vhost name > as the first item on the line so that the perl script can sort it > through that), thus only one FD is used to log. > > LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User- > Agent}i\"" cvh > CustomLog /usr/local/logs/everything.log cvh > > So you can scale out to 5000 vhosts and not run into any limit > problems. For errors the splitting up is a bit more tricky, but you > should be able to get it done as well. Bert, This is an interesting approach. I will consider it. However I believe one day I will reach this limit again. So I think this is a matter that will demand some tuning in the future. Thanks for pointing this approach to avoid using too many FDs :) > > Good luck, > Bert JW Regeer -- =========== Eduardo Meyer pessoal: dudu.meyer@gmail.com profissional: ddm.farmaciap@saude.gov.br From owner-freebsd-hackers@FreeBSD.ORG Fri May 4 10:56:18 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2BA7316A403 for ; Fri, 4 May 2007 10:56:18 +0000 (UTC) (envelope-from valiy-td@mail.ru) Received: from mx28.mail.ru (mx28.mail.ru [194.67.23.67]) by mx1.freebsd.org (Postfix) with ESMTP id 4982513C46E for ; Fri, 4 May 2007 10:56:17 +0000 (UTC) (envelope-from valiy-td@mail.ru) Received: from mx27.mail.ru (mx27.mail.ru [194.67.23.64]) by mx28.mail.ru (mPOP.Fallback_MX) with ESMTP id BB17F6D5E68 for ; Fri, 4 May 2007 10:52:21 +0400 (MSD) Received: from [195.218.186.80] (port=33172 helo=[195.218.186.80]) by mx27.mail.ru with asmtp id 1HjreO-0006gO-00 for freebsd-hackers@freebsd.org; Fri, 04 May 2007 10:52:20 +0400 Message-ID: <463AD734.5090000@mail.ru> Date: Fri, 04 May 2007 10:48:20 +0400 From: valiy User-Agent: Thunderbird 1.5.0.2 (X11/20060519) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 04 May 2007 11:17:54 +0000 Subject: FreeBSD 6.1 6.2 C++ stl set.clear() very slow 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, 04 May 2007 10:56:18 -0000 test prog: #include #include #include #include timeval bgn, end; int main() { std::set s; printf("filling\n"); gettimeofday(&bgn, NULL); for (int i = 0; i < (1<<20); i++) { s.insert((rand() << 16) + rand()); } gettimeofday(&end, NULL); float t1 = float (end.tv_sec - bgn.tv_sec) + float (end.tv_usec - bgn.tv_usec) / 1000000.0f; printf("clearing\n"); gettimeofday(&bgn, NULL); s.clear(); gettimeofday(&end, NULL); float t2 = float (end.tv_sec - bgn.tv_sec) + float (end.tv_usec - bgn.tv_usec) / 1000000.0f; printf("done\n"); printf("alloc time %.3f\tclear time %.3f\n", t1, t2); } TEST1 FreeBSD idx 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #1: Wed Nov 8 18:59:20 UTC 2006 root@idx:/usr/src/sys/amd64/compile/SMP amd64 19:07:15 root@idx3 ~ $ g++ ./test_set.cpp 19:07:23 root@idx3 ~ $ ./a.out filling clearing done alloc time 1.938 clear time 15.290 dmesg: Copyright (c) 1992-2006 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.1-RELEASE-p10 #1: Wed Nov 8 18:59:20 UTC 2006 root@idx3.mail.ru:/usr/src/sys/amd64/compile/SMP ACPI APIC Table: Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Dual Core AMD Opteron(tm) Processor 275 (2200.01-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x20f12 Stepping = 2 Features=0x178bfbff Features2=0x1 AMD Features=0xe2500800 AMD Features2=0x3 Cores per package: 2 real memory = 6979321856 (6656 MB) avail memory = 6215618560 (5927 MB) FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 2 cpu3 (AP): APIC ID: 3 ioapic0 irqs 0-23 on motherboard ioapic1 irqs 24-47 on motherboard kbd1 at kbdmux0 acpi0: on motherboard acpi0: Power Button (fixed) acpi0: reservation of dfefd000, 400 (3) failed acpi0: reservation of dfefe000, 400 (3) failed acpi0: reservation of dfeff000, 1000 (3) failed Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 cpu0: on acpi0 cpu1: on acpi0 cpu2: on acpi0 cpu3: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pci0: at device 0.0 (no driver attached) isab0: at device 1.0 on pci0 isa0: on isab0 pci0: at device 1.1 (no driver attached) ohci0: mem 0xfe4fd000-0xfe4fdfff irq 20 at device 2.0 on pci0 ohci0: [GIANT-LOCKED] usb0: OHCI version 1.0, legacy support usb0: SMM does not respond, resetting usb0: on ohci0 usb0: USB revision 1.0 uhub0: nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 10 ports with 10 removable, self powered ehci0: mem 0xfe4e0000-0xfe4e00ff irq 21 at device 2.1 on pci0 ehci0: [GIANT-LOCKED] usb1: EHCI version 1.0 usb1: companion controller, 4 ports each: usb0 usb1: on ehci0 usb1: USB revision 2.0 uhub1: nVidia EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub1: 10 ports with 10 removable, self powered atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x3000-0x300f at device 6.0 on pci0 ata0: on atapci0 ata1: on atapci0 atapci1: port 0xcc00-0xcc07,0xc800-0xc803,0xc400-0xc407,0xc000-0xc003,0xbc00-0xbc0f mem 0xfe4ff000-0xfe4fffff irq 22 at device 7.0 on pci0 ata2: on atapci1 ata3: on atapci1 atapci2: port 0xb800-0xb807,0xb400-0xb403,0xb000-0xb007,0xac00-0xac03,0xa800-0xa80f mem 0xfe4fe000-0xfe4fefff irq 20 at device 8.0 on pci0 ata4: on atapci2 ata5: on atapci2 pcib1: at device 9.0 on pci0 pci5: on pcib1 pci5: at device 4.0 (no driver attached) pcib2: at device 11.0 on pci0 pci4: on pcib2 pcib3: at device 12.0 on pci0 pci2: on pcib3 bge0: mem 0xfc1f0000-0xfc1fffff irq 17 at device 0.0 on pci2 miibus0: on bge0 brgphy0: on miibus0 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, auto bge0: Ethernet address: 00:30:48:57:59:70 pcib4: at device 13.0 on pci0 pci3: on pcib4 bge1: mem 0xfc2f0000-0xfc2fffff irq 18 at device 0.0 on pci3 miibus1: on bge1 brgphy1: on miibus1 brgphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, auto bge1: Ethernet address: 00:30:48:57:59:71 pcib5: at device 14.0 on pci0 pci1: on pcib5 pcib6: on acpi0 pci128: on pcib6 pci128: at device 0.0 (no driver attached) pci128: at device 1.0 (no driver attached) atapci3: port 0xfc00-0xfc07,0xf800-0xf803,0xf400-0xf407,0xf000-0xf003,0xec00-0xec0f mem 0xfe6ff000-0xfe6fffff irq 44 at device 7.0 on pci128 ata6: on atapci3 ata7: on atapci3 atapci4: port 0xe800-0xe807,0xe400-0xe403,0xe000-0xe007,0xdc00-0xdc03,0xd800-0xd80f mem 0xfe6fe000-0xfe6fefff irq 45 at device 8.0 on pci128 ata8: on atapci4 ata9: on atapci4 pcib7: at device 13.0 on pci128 pci130: on pcib7 pcib8: at device 14.0 on pci128 pci129: on pcib8 acpi_button0: on acpi0 sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FAST] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 ppc0: port 0x378-0x37f irq 7 on acpi0 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode ppbus0: on ppc0 plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: flags 0x1 irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] orm0: at iomem 0xc0000-0xc7fff,0xc8000-0xc97ff,0xc9800-0xcafff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounters tick every 1.000 msec module_register_init: MOD_LOAD (amr_linux, 0xffffffff80622180, 0) error 6 ipfw2 (+ipv6) initialized, divert loadable, rule-based forwarding disabled, default to accept, logging disabled acd0: CDROM at ata0-master UDMA33 ad4: 76319MB at ata2-master SATA300 ad8: 381554MB at ata4-master SATA300 ad10: 381554MB at ata5-master SATA300 ad12: 381554MB at ata6-master SATA300 ad14: 381554MB at ata7-master SATA300 ad16: 381554MB at ata8-master SATA150 ad18: 381554MB at ata9-master SATA150 SMP: AP CPU #1 Launched! SMP: AP CPU #3 Launched! SMP: AP CPU #2 Launched! Trying to mount root from ufs:/dev/ad4s1a bge0: link state changed to UP TEST2 FreeBSD proton 5.5-RELEASE FreeBSD 5.5-RELEASE #0: Mon Jun 26 21:47:56 MSD 2006 root@proton:/usr/src/sys/i386/compile/PROTON i386 [root@proton ~]# g++ test_set.cpp [root@proton ~]# ./a.out filling clearing done alloc time 2.529 clear time 5.685 dmesg :kernel boot file is /boot/kernel/kernel Copyright (c) 1992-2006 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.5-RELEASE #0: Mon Jun 26 21:47:56 MSD 2006 root@proton:/usr/src/sys/i386/compile/PROTON ACPI APIC Table: Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Xeon(TM) CPU 2.80GHz (2800.12-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf43 Stepping = 3 Features=0xbfebfbff Hyperthreading: 2 logical CPUs real memory = 7516192768 (7168 MB) avail memory = 6290010112 (5998 MB) FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 6 cpu3 (AP): APIC ID: 7 ioapic0 irqs 0-23 on motherboard ioapic1 irqs 24-47 on motherboard ioapic2 irqs 48-71 on motherboard acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 cpu0: on acpi0 cpu1: on acpi0 cpu2: on acpi0 cpu3: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pci0: at device 0.1 (no driver attached) pci0: at device 1.0 (no driver attached) pcib1: irq 16 at device 2.0 on pci0 pci1: on pcib1 pcib2: irq 16 at device 3.0 on pci0 pci2: on pcib2 pcib3: at device 0.0 on pci2 pci3: on pcib3 ahd0: port 0x2000-0x20ff,0x2400-0x24ff mem 0xdd200000-0xdd201fff irq 32 at device 2.0 on pci3 aic7902: Ultra320 Wide Channel A, SCSI Id=7, PCI-X 67-100Mhz, 512 SCBs ahd1: port 0x2800-0x28ff,0x2c00-0x2cff mem 0xdd202000-0xdd203fff irq 33 at device 2.1 on pci3 aic7902: Ultra320 Wide Channel B, SCSI Id=7, PCI-X 67-100Mhz, 512 SCBs pci2: at device 0.1 (no driver attached) pcib4: at device 0.2 on pci2 pci4: on pcib4 em0: port 0x3000-0x303f mem 0xdd300000-0xdd31ffff irq 54 at device 2.0 on pci4 em0: Ethernet address: 00:30:48:2f:b0:e2 em1: port 0x3040-0x307f mem 0xdd320000-0xdd33ffff irq 55 at device 2.1 on pci4 em1: Ethernet address: 00:30:48:2f:b0:e3 pci2: at device 0.3 (no driver attached) pcib5: irq 16 at device 4.0 on pci0 pci5: on pcib5 pcib6: irq 16 at device 6.0 on pci0 pci6: on pcib6 pci0: at device 29.0 (no driver attached) pci0: at device 29.1 (no driver attached) pci0: at device 29.2 (no driver attached) pci0: at device 29.3 (no driver attached) pci0: at device 29.7 (no driver attached) pcib7: at device 30.0 on pci0 pci7: on pcib7 pci7: at device 1.0 (no driver attached) isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x14a0-0x14af,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 pci0: at device 31.3 (no driver attached) acpi_button0: on acpi0 ppc0: port 0x778-0x77f,0x378-0x37f irq 7 drq 1 on acpi0 ppc0: Generic chipset (ECP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/8 bytes threshold ppbus0: on ppc0 plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A fdc0: port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on acpi0 fd0: <1440-KB 3.5" drive> on fdc0 drive 0 npx0: on motherboard npx0: INT 16 interface orm0: at iomem 0xc9000-0xd2fff,0xc8000-0xc8fff,0xc0000-0xc7fff on isa0 pmtimer0 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounters tick every 10.000 msecda0: Fixed Direct Access SCSI-3 device da0: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Tagged Queueing Enabled da0: 70136MB (143638992 512 byte sectors: 255H 63S/T 8941C) da1 at ahd0 bus 0 target 1 lun 0 da1: Fixed Direct Access SCSI-3 device da1: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Tagged Queueing Enabled da1: 286102MB (585937500 512 byte sectors: 255H 63S/T 36472C) da2 at ahd0 bus 0 target 2 lun 0 da2: Fixed Direct Access SCSI-3 device da2: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Tagged Queueing Enabled da2: 286102MB (585937500 512 byte sectors: 255H 63S/T 36472C) da3 at ahd1 bus 0 target 0 lun 0 da3: Fixed Direct Access SCSI-3 device da3: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Tagged Queueing Enabled da3: 35074MB (71833096 512 byte sectors: 255H 63S/T 4471C) da4 at ahd1 bus 0 target 1 lun 0 da4: Fixed Direct Access SCSI-3 device da4: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Tagged Queueing Enabled da4: 286102MB (585937500 512 byte sectors: 255H 63S/T 36472C) da5 at ahd1 bus 0 target 2 lun 0 da5: Fixed Direct Access SCSI-3 device da5: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Tagged Queueing Enabled da5: 35068MB (71819496 512 byte sectors: 255H 63S/T 4470C) SMP: AP CPU #3 Launched! SMP: AP CPU #1 Launched! SMP: AP CPU #2 Launched! ipfw2 initialized, divert disabled, rule-based forwarding disabled, default to accept, logging disabled Waiting 15 seconds for SCSI devices to settle da0 at ahd0 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-3 device TEST3: FreeBSD hotdog 4.9-RELEASE FreeBSD 4.9-RELEASE #3: Fri Jul 1 19:35:10 MSD 2005 root@hotdog:/usr/src/sys/compile/HOTDOG i386 19:18 root@puma vvolodin $ ./a.out filling clearing done alloc time 4.001 clear time 0.305 pentium3 2x700MHz how to fix? From owner-freebsd-hackers@FreeBSD.ORG Fri May 4 12:30:23 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CB94D16A403; Fri, 4 May 2007 12:30:23 +0000 (UTC) (envelope-from daichi@freebsd.org) Received: from natial.ongs.co.jp (natial.ongs.co.jp [202.216.232.58]) by mx1.freebsd.org (Postfix) with ESMTP id 8CD4213C448; Fri, 4 May 2007 12:30:23 +0000 (UTC) (envelope-from daichi@freebsd.org) Received: from parancell.ongs.co.jp (dullmdaler.ongs.co.jp [202.216.232.62]) by natial.ongs.co.jp (Postfix) with ESMTP id DA58A244C2C; Fri, 4 May 2007 20:58:44 +0900 (JST) Message-ID: <463B1FF4.40508@freebsd.org> Date: Fri, 04 May 2007 20:58:44 +0900 From: Daichi GOTO User-Agent: Thunderbird 2.0.0.0 (X11/20070424) MIME-Version: 1.0 To: FreeBSD Hackers , FreeBSD Current , freebsd-fs@freebsd.org, Craig Rodrigues Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Stanislav Sedov , Ed Schouten , Daichi GOTO , Masanori OZAWA , Kris Kennaway Subject: [ANN] unionfs patchset-19-20070504 release, it is now MPSAFE and transparent mode as default 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, 04 May 2007 12:30:23 -0000 Hi Guys It is my pleasure and honor to announce the availability of the unionfs patchset-19-20070504. p19 is second patchset after its merged of FreeBSD. Our improvements works of unionfs are going step by step. p19 is milestone release. Patchset-19-20070504: For 7-current http://people.freebsd.org/~daichi/unionfs/unionfs-p19-20070504.diff For 6-stable http://people.freebsd.org/~daichi/unionfs/unionfs6-p19-20070504.diff Changes in unionfs-p19-20070504.diff - It has been became MPSAFE. - Default copy mode has been changed from traditional-mode to transparent-mode. Some folks who have reported some issues have solved with transparent mode. We guess it is time to change the default copy mode. The transparent-mode is the best in most situations. - Fixed kern/111262 issue. - Added support of vfs_cache on unionfs. As a result, you can use applications that use procfs on unionfs. - Removed unionfs internal cache mechanism because it has vfs_cache support instead. As a result, it just simplified code of unionfs. - Added whiteout behavior option. ``-o whiteout=always'' is default mode(it is established practice) and ``-o whiteout=whenneeded'' is less disk-space using mode especially for resource restricted environments like embedded environments. (Contributed by Ed Schouten. Thanks) - Fixed a mtx lock issue happened with nullfs. - Fixed lock issues around unionfs. - Added NULL check code pointed out by Coverity. (Pointed out by Stanislav Sedov. Thanks) The documents of those unionfs patches: http://people.freebsd.org/~daichi/unionfs/ (English) http://people.freebsd.org/~daichi/unionfs/index-ja.html (Japanese) Request for Test: Unionfs lovers including FreeSBIE developers, ports cluster managers, heavy memory-fs users and folks use unionfs, could you try p19 please? Merge plan: I have plan to commit unionfs-p19-20070504.diff to -current after received unionfs users responses. Thanks P.S. I am going to join BSDCan 2007. Lets meet at Ottawa, Canada :) -- Daichi GOTO, http://people.freebsd.org/~daichi From owner-freebsd-hackers@FreeBSD.ORG Fri May 4 14:07:57 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2B68516A411 for ; Fri, 4 May 2007 14:07:57 +0000 (UTC) (envelope-from valiy-td@mail.ru) Received: from mx27.mail.ru (mx27.mail.ru [194.67.23.64]) by mx1.freebsd.org (Postfix) with ESMTP id 7138213C480 for ; Fri, 4 May 2007 14:07:56 +0000 (UTC) (envelope-from valiy-td@mail.ru) Received: from [195.218.186.80] (port=41220 helo=[195.218.186.80]) by mx27.mail.ru with asmtp id 1HjyRs-0001nu-00 for freebsd-hackers@freebsd.org; Fri, 04 May 2007 18:07:52 +0400 Message-ID: <463B3D49.7090101@mail.ru> Date: Fri, 04 May 2007 18:03:53 +0400 From: valiy User-Agent: Thunderbird 1.5.0.2 (X11/20060519) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit Subject: FreeBSD 6.1 6.2 C++ stl set.clear() very slow 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, 04 May 2007 14:07:57 -0000 test prog: #include #include #include #include timeval bgn, end; int main() { std::set s; printf("filling\n"); gettimeofday(&bgn, NULL); for (int i = 0; i < (1<<20); i++) { s.insert((rand() << 16) + rand()); } gettimeofday(&end, NULL); float t1 = float (end.tv_sec - bgn.tv_sec) + float (end.tv_usec - bgn.tv_usec) / 1000000.0f; printf("clearing\n"); gettimeofday(&bgn, NULL); s.clear(); gettimeofday(&end, NULL); float t2 = float (end.tv_sec - bgn.tv_sec) + float (end.tv_usec - bgn.tv_usec) / 1000000.0f; printf("done\n"); printf("alloc time %.3f\tclear time %.3f\n", t1, t2); } TEST1 FreeBSD idx 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #1: Wed Nov 8 18:59:20 UTC 2006 root@idx:/usr/src/sys/amd64/compile/SMP amd64 19:07:15 root@idx3 ~ $ g++ ./test_set.cpp 19:07:23 root@idx3 ~ $ ./a.out filling clearing done alloc time 1.938 clear time 15.290 dmesg: Copyright (c) 1992-2006 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.1-RELEASE-p10 #1: Wed Nov 8 18:59:20 UTC 2006 root@idx3.mail.ru:/usr/src/sys/amd64/compile/SMP ACPI APIC Table: Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Dual Core AMD Opteron(tm) Processor 275 (2200.01-MHz K8-class CPU) Origin = "AuthenticAMD" Id = 0x20f12 Stepping = 2 Features=0x178bfbff Features2=0x1 AMD Features=0xe2500800 AMD Features2=0x3 Cores per package: 2 real memory = 6979321856 (6656 MB) avail memory = 6215618560 (5927 MB) FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 2 cpu3 (AP): APIC ID: 3 ioapic0 irqs 0-23 on motherboard ioapic1 irqs 24-47 on motherboard kbd1 at kbdmux0 acpi0: on motherboard acpi0: Power Button (fixed) acpi0: reservation of dfefd000, 400 (3) failed acpi0: reservation of dfefe000, 400 (3) failed acpi0: reservation of dfeff000, 1000 (3) failed Timecounter "ACPI-safe" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 cpu0: on acpi0 cpu1: on acpi0 cpu2: on acpi0 cpu3: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pci0: at device 0.0 (no driver attached) isab0: at device 1.0 on pci0 isa0: on isab0 pci0: at device 1.1 (no driver attached) ohci0: mem 0xfe4fd000-0xfe4fdfff irq 20 at device 2.0 on pci0 ohci0: [GIANT-LOCKED] usb0: OHCI version 1.0, legacy support usb0: SMM does not respond, resetting usb0: on ohci0 usb0: USB revision 1.0 uhub0: nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 uhub0: 10 ports with 10 removable, self powered ehci0: mem 0xfe4e0000-0xfe4e00ff irq 21 at device 2.1 on pci0 ehci0: [GIANT-LOCKED] usb1: EHCI version 1.0 usb1: companion controller, 4 ports each: usb0 usb1: on ehci0 usb1: USB revision 2.0 uhub1: nVidia EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 uhub1: 10 ports with 10 removable, self powered atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x3000-0x300f at device 6.0 on pci0 ata0: on atapci0 ata1: on atapci0 atapci1: port 0xcc00-0xcc07,0xc800-0xc803,0xc400-0xc407,0xc000-0xc003,0xbc00-0xbc0f mem 0xfe4ff000-0xfe4fffff irq 22 at device 7.0 on pci0 ata2: on atapci1 ata3: on atapci1 atapci2: port 0xb800-0xb807,0xb400-0xb403,0xb000-0xb007,0xac00-0xac03,0xa800-0xa80f mem 0xfe4fe000-0xfe4fefff irq 20 at device 8.0 on pci0 ata4: on atapci2 ata5: on atapci2 pcib1: at device 9.0 on pci0 pci5: on pcib1 pci5: at device 4.0 (no driver attached) pcib2: at device 11.0 on pci0 pci4: on pcib2 pcib3: at device 12.0 on pci0 pci2: on pcib3 bge0: mem 0xfc1f0000-0xfc1fffff irq 17 at device 0.0 on pci2 miibus0: on bge0 brgphy0: on miibus0 brgphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, auto bge0: Ethernet address: 00:30:48:57:59:70 pcib4: at device 13.0 on pci0 pci3: on pcib4 bge1: mem 0xfc2f0000-0xfc2fffff irq 18 at device 0.0 on pci3 miibus1: on bge1 brgphy1: on miibus1 brgphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX, 1000baseTX-FDX, auto bge1: Ethernet address: 00:30:48:57:59:71 pcib5: at device 14.0 on pci0 pci1: on pcib5 pcib6: on acpi0 pci128: on pcib6 pci128: at device 0.0 (no driver attached) pci128: at device 1.0 (no driver attached) atapci3: port 0xfc00-0xfc07,0xf800-0xf803,0xf400-0xf407,0xf000-0xf003,0xec00-0xec0f mem 0xfe6ff000-0xfe6fffff irq 44 at device 7.0 on pci128 ata6: on atapci3 ata7: on atapci3 atapci4: port 0xe800-0xe807,0xe400-0xe403,0xe000-0xe007,0xdc00-0xdc03,0xd800-0xd80f mem 0xfe6fe000-0xfe6fefff irq 45 at device 8.0 on pci128 ata8: on atapci4 ata9: on atapci4 pcib7: at device 13.0 on pci128 pci130: on pcib7 pcib8: at device 14.0 on pci128 pci129: on pcib8 acpi_button0: on acpi0 sio0: configured irq 4 not in bitmap of probed irqs 0 sio0: port may not be enabled sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio1: configured irq 3 not in bitmap of probed irqs 0 sio1: port may not be enabled sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A fdc0: port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0 fdc0: [FAST] fd0: <1440-KB 3.5" drive> on fdc0 drive 0 ppc0: port 0x378-0x37f irq 7 on acpi0 ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode ppbus0: on ppc0 plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: flags 0x1 irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] orm0: at iomem 0xc0000-0xc7fff,0xc8000-0xc97ff,0xc9800-0xcafff on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounters tick every 1.000 msec module_register_init: MOD_LOAD (amr_linux, 0xffffffff80622180, 0) error 6 ipfw2 (+ipv6) initialized, divert loadable, rule-based forwarding disabled, default to accept, logging disabled acd0: CDROM at ata0-master UDMA33 ad4: 76319MB at ata2-master SATA300 ad8: 381554MB at ata4-master SATA300 ad10: 381554MB at ata5-master SATA300 ad12: 381554MB at ata6-master SATA300 ad14: 381554MB at ata7-master SATA300 ad16: 381554MB at ata8-master SATA150 ad18: 381554MB at ata9-master SATA150 SMP: AP CPU #1 Launched! SMP: AP CPU #3 Launched! SMP: AP CPU #2 Launched! Trying to mount root from ufs:/dev/ad4s1a bge0: link state changed to UP TEST2 FreeBSD proton 5.5-RELEASE FreeBSD 5.5-RELEASE #0: Mon Jun 26 21:47:56 MSD 2006 root@proton:/usr/src/sys/i386/compile/PROTON i386 [root@proton ~]# g++ test_set.cpp [root@proton ~]# ./a.out filling clearing done alloc time 2.529 clear time 5.685 dmesg :kernel boot file is /boot/kernel/kernel Copyright (c) 1992-2006 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 5.5-RELEASE #0: Mon Jun 26 21:47:56 MSD 2006 root@proton:/usr/src/sys/i386/compile/PROTON ACPI APIC Table: Timecounter "i8254" frequency 1193182 Hz quality 0 CPU: Intel(R) Xeon(TM) CPU 2.80GHz (2800.12-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0xf43 Stepping = 3 Features=0xbfebfbff Hyperthreading: 2 logical CPUs real memory = 7516192768 (7168 MB) avail memory = 6290010112 (5998 MB) FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs cpu0 (BSP): APIC ID: 0 cpu1 (AP): APIC ID: 1 cpu2 (AP): APIC ID: 6 cpu3 (AP): APIC ID: 7 ioapic0 irqs 0-23 on motherboard ioapic1 irqs 24-47 on motherboard ioapic2 irqs 48-71 on motherboard acpi0: on motherboard acpi0: Power Button (fixed) Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 cpu0: on acpi0 cpu1: on acpi0 cpu2: on acpi0 cpu3: on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 pci0: at device 0.1 (no driver attached) pci0: at device 1.0 (no driver attached) pcib1: irq 16 at device 2.0 on pci0 pci1: on pcib1 pcib2: irq 16 at device 3.0 on pci0 pci2: on pcib2 pcib3: at device 0.0 on pci2 pci3: on pcib3 ahd0: port 0x2000-0x20ff,0x2400-0x24ff mem 0xdd200000-0xdd201fff irq 32 at device 2.0 on pci3 aic7902: Ultra320 Wide Channel A, SCSI Id=7, PCI-X 67-100Mhz, 512 SCBs ahd1: port 0x2800-0x28ff,0x2c00-0x2cff mem 0xdd202000-0xdd203fff irq 33 at device 2.1 on pci3 aic7902: Ultra320 Wide Channel B, SCSI Id=7, PCI-X 67-100Mhz, 512 SCBs pci2: at device 0.1 (no driver attached) pcib4: at device 0.2 on pci2 pci4: on pcib4 em0: port 0x3000-0x303f mem 0xdd300000-0xdd31ffff irq 54 at device 2.0 on pci4 em0: Ethernet address: 00:30:48:2f:b0:e2 em1: port 0x3040-0x307f mem 0xdd320000-0xdd33ffff irq 55 at device 2.1 on pci4 em1: Ethernet address: 00:30:48:2f:b0:e3 pci2: at device 0.3 (no driver attached) pcib5: irq 16 at device 4.0 on pci0 pci5: on pcib5 pcib6: irq 16 at device 6.0 on pci0 pci6: on pcib6 pci0: at device 29.0 (no driver attached) pci0: at device 29.1 (no driver attached) pci0: at device 29.2 (no driver attached) pci0: at device 29.3 (no driver attached) pci0: at device 29.7 (no driver attached) pcib7: at device 30.0 on pci0 pci7: on pcib7 pci7: at device 1.0 (no driver attached) isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x14a0-0x14af,0x376,0x170-0x177,0x3f6,0x1f0-0x1f7 at device 31.1 on pci0 ata0: channel #0 on atapci0 ata1: channel #1 on atapci0 pci0: at device 31.3 (no driver attached) acpi_button0: on acpi0 ppc0: port 0x778-0x77f,0x378-0x37f irq 7 drq 1 on acpi0 ppc0: Generic chipset (ECP/PS2/NIBBLE) in COMPATIBLE mode ppc0: FIFO with 16/16/8 bytes threshold ppbus0: on ppc0 plip0: on ppbus0 lpt0: on ppbus0 lpt0: Interrupt-driven port ppi0: on ppbus0 atkbdc0: port 0x64,0x60 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0 sio0: type 16550A sio1: <16550A-compatible COM port> port 0x2f8-0x2ff irq 3 on acpi0 sio1: type 16550A fdc0: port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on acpi0 fd0: <1440-KB 3.5" drive> on fdc0 drive 0 npx0: on motherboard npx0: INT 16 interface orm0: at iomem 0xc9000-0xd2fff,0xc8000-0xc8fff,0xc0000-0xc7fff on isa0 pmtimer0 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <16 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 Timecounters tick every 10.000 msecda0: Fixed Direct Access SCSI-3 device da0: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Tagged Queueing Enabled da0: 70136MB (143638992 512 byte sectors: 255H 63S/T 8941C) da1 at ahd0 bus 0 target 1 lun 0 da1: Fixed Direct Access SCSI-3 device da1: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Tagged Queueing Enabled da1: 286102MB (585937500 512 byte sectors: 255H 63S/T 36472C) da2 at ahd0 bus 0 target 2 lun 0 da2: Fixed Direct Access SCSI-3 device da2: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Tagged Queueing Enabled da2: 286102MB (585937500 512 byte sectors: 255H 63S/T 36472C) da3 at ahd1 bus 0 target 0 lun 0 da3: Fixed Direct Access SCSI-3 device da3: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Tagged Queueing Enabled da3: 35074MB (71833096 512 byte sectors: 255H 63S/T 4471C) da4 at ahd1 bus 0 target 1 lun 0 da4: Fixed Direct Access SCSI-3 device da4: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Tagged Queueing Enabled da4: 286102MB (585937500 512 byte sectors: 255H 63S/T 36472C) da5 at ahd1 bus 0 target 2 lun 0 da5: Fixed Direct Access SCSI-3 device da5: 320.000MB/s transfers (160.000MHz, offset 127, 16bit), Tagged Queueing Enabled da5: 35068MB (71819496 512 byte sectors: 255H 63S/T 4470C) SMP: AP CPU #3 Launched! SMP: AP CPU #1 Launched! SMP: AP CPU #2 Launched! ipfw2 initialized, divert disabled, rule-based forwarding disabled, default to accept, logging disabled Waiting 15 seconds for SCSI devices to settle da0 at ahd0 bus 0 target 0 lun 0 da0: Fixed Direct Access SCSI-3 device TEST3: FreeBSD hotdog 4.9-RELEASE FreeBSD 4.9-RELEASE #3: Fri Jul 1 19:35:10 MSD 2005 root@hotdog:/usr/src/sys/compile/HOTDOG i386 19:18 root@puma vvolodin $ ./a.out filling clearing done alloc time 4.001 clear time 0.305 pentium3 2x700MHz how to fix? From owner-freebsd-hackers@FreeBSD.ORG Fri May 4 15:42:22 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 613DA16A401 for ; Fri, 4 May 2007 15:42:22 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.184]) by mx1.freebsd.org (Postfix) with ESMTP id DF13513C45B for ; Fri, 4 May 2007 15:42:21 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: by mu-out-0910.google.com with SMTP id g7so882589muf for ; Fri, 04 May 2007 08:42:20 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=PaGC1LFxz9eTakcuCykOr0uoFEO5F35IyGtKtJ5FBcKmoCNUXAafAFiNisLZIMjze/W/vPoHrg/ZTKJMshlhEPxAFXPyq9tH03ZsvqcdW23ZFg5Z9bMyVlONQ7Chw/utheTYWEmBUeA/zrEtwltpaQGwQ+DmxdNOPUcGjHMsncU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=haBqv+Bz6c+6xuLFQGYLQZTYI7NAxImd9ZPS8HDUz592HXw/JtRSHwezupPOYVN+fzjsAVawu/1Ca+gDO2wBfEEyff49kMgJYSLiUPSJ0eKhreCctdMSPJ9GENl6WWEsrNayIm+gxSQaW02pinZUpN/tUBEqRExE36Mw3SMnBaA= Received: by 10.82.175.2 with SMTP id x2mr6798045bue.1178293340357; Fri, 04 May 2007 08:42:20 -0700 (PDT) Received: from ?127.0.0.1? ( [217.206.187.79]) by mx.google.com with ESMTP id c24sm166250ika.2007.05.04.08.42.17; Fri, 04 May 2007 08:42:19 -0700 (PDT) From: Tom Evans To: valiy In-Reply-To: <463B3D49.7090101@mail.ru> References: <463B3D49.7090101@mail.ru> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-UFh33aq9uiQuFTwYLuoF" Date: Fri, 04 May 2007 16:42:10 +0100 Message-Id: <1178293330.1510.10.camel@zoot.mintel.co.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.10.0 FreeBSD GNOME Team Port Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD 6.1 6.2 C++ stl set.clear() very slow 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, 04 May 2007 15:42:22 -0000 --=-UFh33aq9uiQuFTwYLuoF Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, 2007-05-04 at 18:03 +0400, valiy wrote: > TEST1 > FreeBSD idx 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #1: Wed Nov 8=20 > 18:59:20 UTC 2006 root@idx:/usr/src/sys/amd64/compile/SMP amd64 >=20 >=20 > 19:07:15 root@idx3 ~ $ g++ ./test_set.cpp > 19:07:23 root@idx3 ~ $ ./a.out > filling > clearing > done > alloc time 1.938 clear time 15.290 > TEST2 > FreeBSD proton 5.5-RELEASE FreeBSD 5.5-RELEASE #0: Mon Jun 26 21:47:56=20 > MSD 2006 root@proton:/usr/src/sys/i386/compile/PROTON i386 > [root@proton ~]# g++ test_set.cpp > [root@proton ~]# ./a.out > filling > clearing > done > alloc time 2.529 clear time 5.685 >=20 >=20 > TEST3: > FreeBSD hotdog 4.9-RELEASE FreeBSD 4.9-RELEASE #3: Fri Jul 1 19:35:10=20 > MSD 2005 root@hotdog:/usr/src/sys/compile/HOTDOG i386 >=20 > 19:18 root@puma vvolodin $ ./a.out > filling > clearing > done > alloc time 4.001 clear time 0.305 >=20 > pentium3 2x700MHz >=20 > how to fix? >=20 (Couldnt see your 6.2 result, did I snip it?) Upgrade to 6.2, or for better results, 7-CURRENT=20 $ uname -a && ./stl_test=20 FreeBSD zoot.mintel.co.uk 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Wed Mar 28 12:29:25 BST 2007 root@zoot.mintel.co.uk:/usr/obj/usr/src/sys/ZOOT i386 filling clearing done alloc time 2.252 clear time 0.441 (CURRENT with no INVARIANTS nor WITNESS, and MALLOC_PRODUCTION defined) $ uname -a && ./stl_test FreeBSD bob.mintel.co.uk 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Thu Jan 18 14:18:05 GMT 2007 root@bob.mintel.co.uk:/usr/obj/usr/src/sys/BOB i386 filling clearing done alloc time 2.705 clear time 5.691 Is your test for 4 using GCC 2.95 ? C++ in GCC 2.95 is =C2=ABinteresting=C2= =BB in the shortcuts it takes. --=-UFh33aq9uiQuFTwYLuoF 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) iD8DBQBGO1ROlcRvFfyds/cRAr5fAKCZ4xP2KJwBrNBCL9IeiPvJrrnx1ACfbCS0 uQx5W5EaAjyLWmP9ssWuGDQ= =4oL7 -----END PGP SIGNATURE----- --=-UFh33aq9uiQuFTwYLuoF-- From owner-freebsd-hackers@FreeBSD.ORG Fri May 4 16:02:04 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3A07716A476 for ; Fri, 4 May 2007 16:02:04 +0000 (UTC) (envelope-from valiy-td@mail.ru) Received: from mx3.mail.ru (mx3.mail.ru [194.67.23.149]) by mx1.freebsd.org (Postfix) with ESMTP id BB53013C4B0 for ; Fri, 4 May 2007 16:02:03 +0000 (UTC) (envelope-from valiy-td@mail.ru) Received: from [195.218.186.80] (port=18106 helo=[195.218.186.80]) by mx3.mail.ru with asmtp id 1Hk0EL-000JQT-00; Fri, 04 May 2007 20:02:01 +0400 Message-ID: <463B5809.90602@mail.ru> Date: Fri, 04 May 2007 19:58:01 +0400 From: valiy User-Agent: Thunderbird 1.5.0.2 (X11/20060519) MIME-Version: 1.0 To: Tom Evans References: <463B3D49.7090101@mail.ru> <1178293330.1510.10.camel@zoot.mintel.co.uk> In-Reply-To: <1178293330.1510.10.camel@zoot.mintel.co.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD 6.1 6.2 C++ stl set.clear() very slow 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, 04 May 2007 16:02:04 -0000 Tom Evans wrote: > On Fri, 2007-05-04 at 18:03 +0400, valiy wrote: > > >> TEST1 >> FreeBSD idx 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #1: Wed Nov 8 >> 18:59:20 UTC 2006 root@idx:/usr/src/sys/amd64/compile/SMP amd64 >> >> >> 19:07:15 root@idx3 ~ $ g++ ./test_set.cpp >> 19:07:23 root@idx3 ~ $ ./a.out >> filling >> clearing >> done >> alloc time 1.938 clear time 15.290 >> > > >> TEST2 >> FreeBSD proton 5.5-RELEASE FreeBSD 5.5-RELEASE #0: Mon Jun 26 21:47:56 >> MSD 2006 root@proton:/usr/src/sys/i386/compile/PROTON i386 >> [root@proton ~]# g++ test_set.cpp >> [root@proton ~]# ./a.out >> filling >> clearing >> done >> alloc time 2.529 clear time 5.685 >> >> > > >> TEST3: >> FreeBSD hotdog 4.9-RELEASE FreeBSD 4.9-RELEASE #3: Fri Jul 1 19:35:10 >> MSD 2005 root@hotdog:/usr/src/sys/compile/HOTDOG i386 >> >> 19:18 root@puma vvolodin $ ./a.out >> filling >> clearing >> done >> alloc time 4.001 clear time 0.305 >> >> pentium3 2x700MHz >> >> how to fix? >> >> > > (Couldnt see your 6.2 result, did I snip it?) > > Upgrade to 6.2, or for better results, 7-CURRENT > $ uname -a && ./stl_test > FreeBSD zoot.mintel.co.uk 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Wed Mar 28 > 12:29:25 BST 2007 root@zoot.mintel.co.uk:/usr/obj/usr/src/sys/ZOOT > i386 > filling > clearing > done > alloc time 2.252 clear time 0.441 > (CURRENT with no INVARIANTS nor WITNESS, and MALLOC_PRODUCTION defined) > > > $ uname -a && ./stl_test > FreeBSD bob.mintel.co.uk 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Thu Jan 18 > 14:18:05 GMT 2007 root@bob.mintel.co.uk:/usr/obj/usr/src/sys/BOB > i386 > filling > clearing > done > alloc time 2.705 clear time 5.691 > > Is your test for 4 using GCC 2.95 ? C++ in GCC 2.95 is «interesting» in > the shortcuts it takes. > We didn't include 6.2 report in mail, but we experience same probles. results are exactly as yours above (alloc time 2.7 clear time 5.6) BSD 4 test was using compiler 2.95 Is there any way to fix it without upgrading to 7.0? From owner-freebsd-hackers@FreeBSD.ORG Fri May 4 16:25:50 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E180B16A400 for ; Fri, 4 May 2007 16:25:49 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.freebsd.org (Postfix) with ESMTP id 62E0213C447 for ; Fri, 4 May 2007 16:25:49 +0000 (UTC) (envelope-from tevans.uk@googlemail.com) Received: by ug-out-1314.google.com with SMTP id 71so570053ugh for ; Fri, 04 May 2007 09:25:48 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=nIzm3PWlvVAAwgWhZoO/UeFn9+mURQaB8Qp51CQsx5yKVPG6QHNjB7Qu2Pcn8R2pkca8Axd9EtfBRxn2TmLMLNWdjbSBh1yGkW8yCgHgPujQg65t963AUg2jbXKCHAOc4VjWtaSsjCnoImDS2LtniTXwoGvxbmHv55B5sOoHljg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:subject:from:to:cc:in-reply-to:references:content-type:date:message-id:mime-version:x-mailer; b=cUD3wyISi1TlWF6/1NIihc40QLXjk0NscdGM9FhCIhprM1a1etWmsV1217paRAAVHfUgAehva2bI8BBzwxCz0MiNHT43DSRM+ZADUcYhPTuh3zQco9YTwR8AMk8x0YVse210Kp1dTBMfb68hCvqZvnu1tPUmEKMaolXODNQuuGo= Received: by 10.82.169.4 with SMTP id r4mr6817350bue.1178295947699; Fri, 04 May 2007 09:25:47 -0700 (PDT) Received: from ?127.0.0.1? ( [217.206.187.79]) by mx.google.com with ESMTP id z40sm233846ikz.2007.05.04.09.25.44; Fri, 04 May 2007 09:25:45 -0700 (PDT) From: Tom Evans To: valiy In-Reply-To: <463B5809.90602@mail.ru> References: <463B3D49.7090101@mail.ru> <1178293330.1510.10.camel@zoot.mintel.co.uk> <463B5809.90602@mail.ru> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-PoV7i2JXPd59h/tG9jbW" Date: Fri, 04 May 2007 17:25:42 +0100 Message-Id: <1178295942.1510.16.camel@zoot.mintel.co.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.10.0 FreeBSD GNOME Team Port Cc: freebsd-hackers@freebsd.org Subject: Re: FreeBSD 6.1 6.2 C++ stl set.clear() very slow 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, 04 May 2007 16:25:50 -0000 --=-PoV7i2JXPd59h/tG9jbW Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, 2007-05-04 at 19:58 +0400, valiy wrote: > Tom Evans wrote: > > On Fri, 2007-05-04 at 18:03 +0400, valiy wrote: > > > > =20 > >> TEST1 > >> FreeBSD idx 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #1: Wed Nov 8=20 > >> 18:59:20 UTC 2006 root@idx:/usr/src/sys/amd64/compile/SMP amd64 > >> > >> > >> 19:07:15 root@idx3 ~ $ g++ ./test_set.cpp > >> 19:07:23 root@idx3 ~ $ ./a.out > >> filling > >> clearing > >> done > >> alloc time 1.938 clear time 15.290 > >> =20 > > > > =20 > >> TEST2 > >> FreeBSD proton 5.5-RELEASE FreeBSD 5.5-RELEASE #0: Mon Jun 26 21:47:56= =20 > >> MSD 2006 root@proton:/usr/src/sys/i386/compile/PROTON i386 > >> [root@proton ~]# g++ test_set.cpp > >> [root@proton ~]# ./a.out > >> filling > >> clearing > >> done > >> alloc time 2.529 clear time 5.685 > >> > >> =20 > > > > =20 > >> TEST3: > >> FreeBSD hotdog 4.9-RELEASE FreeBSD 4.9-RELEASE #3: Fri Jul 1 19:35:10= =20 > >> MSD 2005 root@hotdog:/usr/src/sys/compile/HOTDOG i386 > >> > >> 19:18 root@puma vvolodin $ ./a.out > >> filling > >> clearing > >> done > >> alloc time 4.001 clear time 0.305 > >> > >> pentium3 2x700MHz > >> > >> how to fix? > >> > >> =20 > > > > (Couldnt see your 6.2 result, did I snip it?) > > > > Upgrade to 6.2, or for better results, 7-CURRENT=20 > > $ uname -a && ./stl_test=20 > > FreeBSD zoot.mintel.co.uk 7.0-CURRENT FreeBSD 7.0-CURRENT #1: Wed Mar 2= 8 > > 12:29:25 BST 2007 root@zoot.mintel.co.uk:/usr/obj/usr/src/sys/ZOOT > > i386 > > filling > > clearing > > done > > alloc time 2.252 clear time 0.441 > > (CURRENT with no INVARIANTS nor WITNESS, and MALLOC_PRODUCTION defined) > > > > > > $ uname -a && ./stl_test > > FreeBSD bob.mintel.co.uk 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Thu Jan 18 > > 14:18:05 GMT 2007 root@bob.mintel.co.uk:/usr/obj/usr/src/sys/BOB > > i386 > > filling > > clearing > > done > > alloc time 2.705 clear time 5.691 > > > > Is your test for 4 using GCC 2.95 ? C++ in GCC 2.95 is =C2=ABinterestin= g=C2=BB in > > the shortcuts it takes. > > =20 > We didn't include 6.2 report in mail, but we experience same probles.=20 > results are exactly as yours above (alloc time 2.7 clear time 5.6) >=20 > BSD 4 test was using compiler 2.95 >=20 > Is there any way to fix it without upgrading to 7.0? Not sure, I'd be interested in this as well, we do LOTS of computation using STL containers (and run 6.2 everywhere). I was advised that bob [the 6.2 box I tested on] 'was a bit s***', so I've also tested on another box: > $ uname -a && ./stl_test=20 FreeBSD roley.mintel.co.uk 6.2-RELEASE FreeBSD 6.2-RELEASE #1: Wed Jan 17 10:37:46 GMT 2007 root@roley.mintel.co.uk:/usr/obj/usr/src/sys/ROLEY amd64 filling clearing done alloc time 1.968 clear time 12.420 Seems that amd64 is even worse in this situation than i386. Very curious. I didn't mention it before, but all of my tests are done using GCC 3.4.6 Cheers Tom --=-PoV7i2JXPd59h/tG9jbW 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) iD8DBQBGO16ClcRvFfyds/cRAswRAJ9dOcH66yV7qpO+NBumx7bqmVCSXwCeJgiv i11H38cRKDdwu4wlOncrQDw= =Ihlr -----END PGP SIGNATURE----- --=-PoV7i2JXPd59h/tG9jbW-- From owner-freebsd-hackers@FreeBSD.ORG Sat May 5 18:58:38 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04A1716A404 for ; Sat, 5 May 2007 18:58:38 +0000 (UTC) (envelope-from tanarri@geri.cc.fer.hr) Received: from ls405.t-com.hr (ls405.t-com.hr [195.29.150.135]) by mx1.freebsd.org (Postfix) with ESMTP id B0CC613C448 for ; Sat, 5 May 2007 18:58:37 +0000 (UTC) (envelope-from tanarri@geri.cc.fer.hr) Received: from ls242.t-com.hr (ls242.t-com.hr [195.29.150.134]) by ls405.t-com.hr (Postfix) with ESMTP id DDA6C143D55 for ; Sat, 5 May 2007 20:34:02 +0200 (CEST) Received: from ls242.t-com.hr (ls242.t-com.hr [127.0.0.1]) by ls242.t-com.hr (Qmlai) with ESMTP id D8910B08322 for ; Sat, 5 May 2007 20:34:02 +0200 (CEST) Received: from ls242.t-com.hr (ls242.t-com.hr [127.0.0.1]) by ls242.t-com.hr (Qmlai) with ESMTP id C1BC7B0831B for ; Sat, 5 May 2007 20:34:02 +0200 (CEST) X-Envelope-Sender-Info: m+GfN8OLZW/EElzKohn46Rop8Qz1vasQeWuw+FKf83H+QvwBQrubeLtcgBvpGdRw X-Envelope-Sender: tanarri@geri.cc.fer.hr Received: from [192.168.2.102] (78-0-90-245.adsl.net.t-com.hr [78.0.90.245])by ls242.t-com.hr (Qmali) with ESMTP id 921755BC1F9for ; Sat, 5 May 2007 20:34:02 +0200 (CEST) Message-ID: <463CCE1E.1080906@geri.cc.fer.hr> Date: Sat, 05 May 2007 20:34:06 +0200 From: Sonja Milicic User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org X-Enigmail-Version: 0.94.2.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-imss-version: 2.046 X-imss-result: Passed X-imss-scanInfo: M:P L:E SM:0 X-imss-tmaseResult: TT:0 TS:0.0000 TC:00 TRN:0 TV:3.6.1039(15156.003) X-imss-scores: Clean:6.95502 C:2 M:3 S:5 R:5 X-imss-settings: Baseline:1 C:1 M:1 S:1 R:1 (0.0000 0.0000) Subject: Writing to a 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: Sat, 05 May 2007 18:58:38 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, I'm working on an IO logging utility for FreeBSD as my GSoC project, and I have some questions about writing a kernel functions that would open an existing or create a new file (with the file name as a parameter, returns a vnode * for the file) and write data to that file (with pointer to data as parameter). I've found some functions in existing code that do similar things and might help me understand how to solve my problem, but as there isn't much documentation out there I still don't understand a lot of things. So, could anyone please give me a detailed explanation of how to open a file in kernel and write to it - best data types to use, functions, what to look out for, maybe a link to tutorial or manual that deals with this (if such a thing exists), etc.? Thanks in advance, Sonja -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGPM4eLfhGYNm8UfsRAiHjAJ4rIhKj2IKpnFj50zSs3IpxymWOzACfcER5 enTeEvaD/syyRQZmtDmlDIU= =xH5D -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Sat May 5 19:50:36 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CAF3D16A401 for ; Sat, 5 May 2007 19:50:36 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from mx-out.forthnet.gr (mx-out.forthnet.gr [193.92.150.103]) by mx1.freebsd.org (Postfix) with ESMTP id 4AA3113C458 for ; Sat, 5 May 2007 19:50:35 +0000 (UTC) (envelope-from dds@aueb.gr) Received: from mx-av-04.forthnet.gr (mx-av.forthnet.gr [193.92.150.27]) by mx-out-02.forthnet.gr (8.14.0/8.14.0) with ESMTP id l45JTJb1008730; Sat, 5 May 2007 22:29:19 +0300 Received: from MX-IN-03.forthnet.gr (mx-in-03.forthnet.gr [193.92.150.26]) by mx-av-04.forthnet.gr (8.14.1/8.14.1) with ESMTP id l45JTJTF020513; Sat, 5 May 2007 22:29:19 +0300 Received: from [192.168.136.18] (ppp124-213.adsl.forthnet.gr [193.92.231.213]) by MX-IN-03.forthnet.gr (8.14.1/8.14.1) with ESMTP id l45JTCgU003885; Sat, 5 May 2007 22:29:12 +0300 Authentication-Results: MX-IN-03.forthnet.gr from=dds@aueb.gr; sender-id=neutral; spf=neutral In-Reply-To: <463CCE1E.1080906@geri.cc.fer.hr> References: <463CCE1E.1080906@geri.cc.fer.hr> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Diomidis Spinellis Date: Sat, 5 May 2007 22:29:08 +0300 To: Sonja Milicic X-Mailer: Apple Mail (2.752.2) Cc: freebsd-hackers@freebsd.org Subject: Re: Writing to a 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: Sat, 05 May 2007 19:50:36 -0000 On May 5, 2007, at 9:34 PM, Sonja Milicic wrote: > I'm working on an IO logging utility for FreeBSD as my GSoC > project, and > I have some questions about writing a kernel functions that would open > an existing or create a new file (with the file name as a parameter, > returns a vnode * for the file) and write data to that file (with > pointer to data as parameter). I've found some functions in existing > code that do similar things and might help me understand how to > solve my > problem, but as there isn't much documentation out there I still don't > understand a lot of things. So, could anyone please give me a detailed > explanation of how to open a file in kernel and write to it - best > data > types to use, functions, what to look out for, maybe a link to > tutorial > or manual that deals with this (if such a thing exists), etc.? A good strategy for dealing with such questions is to look for code that does a task similar to the one you want to implement. Two kernel subsystems that come to my mind is the kernel logging facility, which writes data to a user space process via a socket, and the process accounting facility, which writes data to an already opened file. There are reasons (performance, flexibility) why these two facilities have been designed in this way, and it would be a good idea to see whether some of their design decisions are also applicable to your problem. Diomidis Spinellis - http://www.spinellis.gr From owner-freebsd-hackers@FreeBSD.ORG Sat May 5 20:17:37 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3B96716A402 for ; Sat, 5 May 2007 20:17:37 +0000 (UTC) (envelope-from giacomo@eclypse.it) Received: from eclypse.it (host246-172-dynamic.14-87-r.retail.telecomitalia.it [87.14.172.246]) by mx1.freebsd.org (Postfix) with ESMTP id A63C513C44B for ; Sat, 5 May 2007 20:17:35 +0000 (UTC) (envelope-from giacomo@eclypse.it) Received: from eclypse.it (localhost.it [127.0.0.1]) by eclypse.it (8.13.6/8.13.4) with ESMTP id l45JoYuR033266 for ; Sat, 5 May 2007 21:50:35 +0200 (CEST) (envelope-from giacomo@eclypse.it) Received: (from giacomo@localhost) by eclypse.it (8.13.6/8.13.4/Submit) id l45JoXhg033264 for freebsd-hackers@freebsd.org; Sat, 5 May 2007 21:50:33 +0200 (CEST) (envelope-from giacomo) Date: Sat, 5 May 2007 21:50:33 +0200 From: FreeBSD User Giacomo To: freebsd-hackers@freebsd.org Message-ID: <20070505195033.GA30661@eclypse.it> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.2.1i X-Mailman-Approved-At: Sat, 05 May 2007 21:46:31 +0000 Subject: Samsung DVD writer and FreeBSD kernel. 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, 05 May 2007 20:17:37 -0000 Hi, Excuse me for a long email. I have a problem with my external USB DVD writer (model SE-S184M/EUBN). I do not succeed in to burn DVD (only CD). The system (FreeBSD eclypse.it 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 7 04:32:43 UTC 2006 root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386) recognizes masterizzatore like: ------------------------------------------------------------------------------------------------------- umass0: TSST corp USB Mass Storage Device, rev 2.00/0.00, addr 3 cd0 at umass-sim0 bus 0 target 0 lun 0 cd0: device Removable CD-ROM SCSI-0 cd0: 40.000MB/s transfers cd0: Device Attempt to query size failed: NOT READY, Medium not present - tray close If I use the comand whith a dvd+rw : dvd+rw- format /dev/cd0 I obtain * DVD±RW/-RAM format utility by , version 6.0. :-( (unable to GET CONFIGURATION: Input/output error and on the consul: umass0: Unsupported ATAPI command 0x46. ------------------------------------------------------------------------------------------------------- 1. I have asked the list "questions" , they advised me to contact the cdrecord maintainer (Jorg Schilling) for this problem. 2. He advised to me to upgrade of the program. After an upgrade the problem persisted. 3. After He says "Can you verify that FreeBSD did not again break the SCSI implementation and does not do an auto-request Sense? Please use "scgcheck" to verify the correctness of your SCSI implementation. Jörg" My verify is: ------------------------------------------------------------------------------------------------------- Scgcheck 2.01 (i386-unknown-freebsd6.1) SCSI user level transport library ABI checker. Copyright (C) 1998,2001 Jörg Schilling Checking if your implementation supports to scan the SCSI bus. Trying to open device: '(NULL POINTER)'. Using libscg version 'schily-0.9' Using libscg transport code version 'schily-scsi-bsd.c-1.44' Using kernel transport code version '' Using remote transport code version '-' Max DMA buffer size: 65536 scsibus1: 1,0,0 100) 'ATAPI ' 'CD-ROM 52X ' '172A' Removable CD-ROM 1,1,0 101) 'HL-DT-ST' 'CD-RW GCE-8481B ' '1.00' Removable CD-ROM 1,2,0 102) * 1,3,0 103) * 1,4,0 104) * 1,5,0 105) * 1,6,0 106) * 1,7,0 107) * scsibus2: 2,0,0 200) 'TSSTcorp' 'CD/DVDW SH-S182M' 'SB04' Removable CD-ROM 2,1,0 201) * 2,2,0 202) * 2,3,0 203) * 2,4,0 204) * 2,5,0 205) * 2,6,0 206) * 2,7,0 207) * ----------> SCSI scan bus test PASSED For the next test we need to open a single SCSI device. Best results will be obtained if you specify a modern CD-ROM drive. Trying to open device: '2,0,0'. Using libscg version 'schily-0.9' Using libscg transport code version 'schily-scsi-bsd.c-1.44' Using kernel transport code version '' Using remote transport code version '-' Max DMA buffer size: 65536 Device type : Removable CD-ROM Version : 0 Response Format: 2 Capabilities : Vendor_info : 'TSSTcorp' Identifikation : 'CD/DVDW SH-S182M' Revision : 'SB04' First SCSI open OK - device usable Checking for second SCSI open. Second SCSI open for same device succeeded, 1 file descriptor(s) used. Second SCSI open is usable Closing second SCSI. Checking first SCSI. First SCSI open is still usable Second SCSI open test passed. Executing 'inquiry' command on Bus 2 Target 0, Lun 0 timeout 40s CDB: 12 00 00 00 24 00 cmd finished after 0.001s timeout 40s ----------> SCSI succeeded command test PASSED **********> Testing for failed SCSI command. Inquiry did not fail. scgcheck: Input/output error. test unit ready: scsi sendcmd: retryable error CDB: 00 00 00 00 00 00 status: 0x2 (CHECK CONDITION) Sense Bytes: 70 00 02 00 00 00 00 0A 00 00 00 00 3A 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Sense Key: 0x2 Not Ready, Segment 0 Sense Code: 0x3A Qual 0x01 (medium not present - tray closed) Fru 0x0 Sense flags: Blk 0 (not valid) cmd finished after 0.002s timeout 40s ----------> SCSI Transport return != SCG_NO_ERROR (1) ----------> SCSI failed command test FAILED **********> Testing for SCSI sense data count. **********> Testing if at least CCS_SENSE_LEN (18) is supported... Sense Data: 70 00 02 00 00 00 00 0A 00 00 00 00 3A 01 00 00 00 00 Sense Data: 70 00 02 00 00 00 00 0A 00 00 00 00 3A 01 00 00 00 00 ----------> Wanted 18 sense bytes, got it. ----------> Libscg says 32 sense bytes but got (18) **********> Testing for 32 bytes of sense data... Sense Data: 70 00 02 00 00 00 00 0A 00 00 00 00 3A 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Sense Data: 70 00 02 00 00 00 00 0A 00 00 00 00 3A 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ----------> Wanted 32 sense bytes, got it. ----------> Got a maximum of 32 sense bytes ----------> SCSI sense count test FAILED ----------> SCSI status byte test NOT YET READY **********> Testing for working DMA residual count. **********> Testing for working DMA residual count == 0. ----------> Wanted 36 bytes, got it. ----------> SCSI DMA residual count == 0 test PASSED **********> Testing for working DMA residual count == DMA count. ----------> Wanted 0 bytes, got it. ----------> SCSI DMA residual count == DMA count test PASSED **********> Testing for working DMA residual count == 1. ----------> Wanted 36 bytes, got it. ----------> SCSI DMA residual count == 1 test PASSED **********> Testing for working DMA overrun test. ----------> SCSI DMA overrun test FAILED ----------> SCSI transport code test NOT YET READY ------------------------------------------------------------------------------------------------------------ 4. And I have obtained this answer: ------------------------------------------------------------------------------------------------------------ > Hi, > the result of scgcheck command is (much long): > ----------> SCSI succeeded command test PASSED > Ready to start test for failing command? Enter to continue: > Inquiry did not fail. > This may be because the firmware in your drive is buggy. > If the current drive is not a CD-ROM drive please restart > the test utility. Otherwise remove any medium from the drive. > Ready to start test for failing command? Enter to continue: > scgcheck: Input/output error. test unit ready: scsi sendcmd: retryable error > CDB: 00 00 00 00 00 00 > status: 0x2 (CHECK CONDITION) > Sense Bytes: 70 00 02 00 00 00 00 0A 00 00 00 00 3A 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > Sense Key: 0x2 Not Ready, Segment 0 > Sense Code: 0x3A Qual 0x01 (medium not present - tray closed) Fru 0x0 > Sense flags: Blk 0 (not valid) > cmd finished after 0.002s timeout 40s > ----------> SCSI Transport return != SCG_NO_ERROR (1) > ----------> SCSI failed command test FAILED It looks like I would need to see whether I could enhance the libscg adptation layer for freeBSD/CAM. But in this case you correctly receive a CHECK CONDITION. In order to check whether this layer has more problems I would need to add debug code that s currently missing. Please note that the probability that the problem is inside your kernel is much higher than a problem in libscg. This is because the SCSI status byte is directly copied from the FreeBSD Kernel. Did you try to send a bug report to the FreeBSD kernel team? Jörg ------------------------------------------------------------------------------------------------------------- Can you help me with this problem. How to send this problem to kernel maintainers. Thank for your suggestions. -- Isaia Luciano FreeBSD user