From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 5 00:27:50 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BACC106566C for ; Sun, 5 Jul 2009 00:27:50 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from mail-fx0-f218.google.com (mail-fx0-f218.google.com [209.85.220.218]) by mx1.freebsd.org (Postfix) with ESMTP id 8F20E8FC0C for ; Sun, 5 Jul 2009 00:27:49 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by fxm18 with SMTP id 18so2569071fxm.43 for ; Sat, 04 Jul 2009 17:27:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=LIbJ9KWBjzUcAwr0IX+7OCbGVzXgeq3HzYKZQ6h+90s=; b=YetFP5SIr5vevFLy59bjp0n4Y7PiPUosiDSKsYus8gkOzNmAdt6KYNMeThbYKXOZh/ ZODMRh+dny0fjJoru2q2I9Az6tbwxmc2/5B28f085x7hMRtP5Faiq/wO5bNcevsq/F2I Dx4f0/eXIhK6nFDbOqjF5HpttyXHhluXmPb70= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=BuX/aig+dMLsVXQvY7qSMJw1YRHpzqJucsRi+17TT0cTED5SSNsVbfYmfnVC7S5Lz5 v4hiXxL94rAZb6Mb+T+vXioFacpNaLozrUToehCSO+zgK03QtWB1F4amLbAmFc15H8+j MUPFjXBlJIIvpqBzkXJecfa7pPGjFZQt7N5ro= MIME-Version: 1.0 Received: by 10.204.71.65 with SMTP id g1mr2932542bkj.27.1246753668616; Sat, 04 Jul 2009 17:27:48 -0700 (PDT) In-Reply-To: References: Date: Sun, 5 Jul 2009 00:27:48 +0000 Message-ID: <3a142e750907041727l6fac4b67m33973ec352664c6b@mail.gmail.com> From: "Paul B. Mahol" To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: mmap/munmap with zero length X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 00:27:50 -0000 On 7/4/09, Alexander Best wrote: > i'm wondering why mmap and munmap behave differently when it comes to a > length > argument of zero. allocating memory with mmap for a zero length file returns > a > valid pointer to the mapped region. there is V flag for malloc.conf > > munmap however isn't able to remove a mapping with no length. > > wouldn't it be better to either forbid this in mmap or to allow it in > munmap? It wouldn't improve badly written program. -- Paul From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 5 01:01:09 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 582741065677 for ; Sun, 5 Jul 2009 01:01:09 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from euclid.ucsd.edu (euclid.ucsd.edu [132.239.145.52]) by mx1.freebsd.org (Postfix) with ESMTP id 0D8088FC19 for ; Sun, 5 Jul 2009 01:01:09 +0000 (UTC) (envelope-from neldredge@math.ucsd.edu) Received: from zeno.ucsd.edu (zeno.ucsd.edu [132.239.145.22]) by euclid.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id n650eKo02917; Sat, 4 Jul 2009 17:40:20 -0700 (PDT) Received: from localhost (neldredg@localhost) by zeno.ucsd.edu (8.11.7p3+Sun/8.11.7) with ESMTP id n650eJM05584; Sat, 4 Jul 2009 17:40:19 -0700 (PDT) X-Authentication-Warning: zeno.ucsd.edu: neldredg owned process doing -bs Date: Sat, 4 Jul 2009 17:40:19 -0700 (PDT) From: Nate Eldredge X-X-Sender: neldredg@zeno.ucsd.edu To: Alexander Best In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: mmap/munmap with zero length X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 01:01:10 -0000 On Sun, 5 Jul 2009, Alexander Best wrote: > i'm wondering why mmap and munmap behave differently when it comes to a length > argument of zero. allocating memory with mmap for a zero length file returns a > valid pointer to the mapped region. > > munmap however isn't able to remove a mapping with no length. > > wouldn't it be better to either forbid this in mmap or to allow it in munmap? POSIX has an opinion: http://www.opengroup.org/onlinepubs/9699919799/functions/mmap.html "If len is zero, mmap() shall fail and no mapping shall be established." http://www.opengroup.org/onlinepubs/9699919799/functions/munmap.html "The munmap() function shall fail if: ... [EINVAL] The len argument is 0." -- Nate Eldredge neldredge@math.ucsd.edu From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 5 07:32:28 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75CB51065670 for ; Sun, 5 Jul 2009 07:32:28 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out3.uni-muenster.de (ZIVM-OUT3.UNI-MUENSTER.DE [128.176.192.18]) by mx1.freebsd.org (Postfix) with ESMTP id 0BC1C8FC14 for ; Sun, 5 Jul 2009 07:32:27 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.42,351,1243807200"; d="scan'208";a="7600368" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay3.uni-muenster.de with ESMTP; 05 Jul 2009 09:32:26 +0200 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id 394201B0751; Sun, 5 Jul 2009 09:32:26 +0200 (CEST) Date: Sun, 05 Jul 2009 09:32:25 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Nate Eldredge Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: mmap/munmap with zero length X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 07:32:28 -0000 so mmap differs from the POSIX recommendation right. the malloc.conf option seems more like a workaround/hack. imo it's confusing to have mmap und munmap deal differently with len=0. being able to succesfully alocate memory which cannot be removed doesn't seem logical to me. alex Nate Eldredge schrieb am 2009-07-05: > On Sun, 5 Jul 2009, Alexander Best wrote: > >i'm wondering why mmap and munmap behave differently when it comes > >to a length > >argument of zero. allocating memory with mmap for a zero length > >file returns a > >valid pointer to the mapped region. > >munmap however isn't able to remove a mapping with no length. > >wouldn't it be better to either forbid this in mmap or to allow it > >in munmap? > POSIX has an opinion: > http://www.opengroup.org/onlinepubs/9699919799/functions/mmap.html > "If len is zero, mmap() shall fail and no mapping shall be > established." > http://www.opengroup.org/onlinepubs/9699919799/functions/munmap.html > "The munmap() function shall fail if: > ... > [EINVAL] > The len argument is 0." > -- > Nate Eldredge > neldredge@math.ucsd.edu From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 5 07:54:13 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA935106564A for ; Sun, 5 Jul 2009 07:54:13 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell.rawbw.com (shell.rawbw.com [198.144.192.42]) by mx1.freebsd.org (Postfix) with ESMTP id AF7D18FC12 for ; Sun, 5 Jul 2009 07:54:13 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from eagle.syrec.org (c-24-6-210-150.hsd1.ca.comcast.net [24.6.210.150]) (authenticated bits=0) by shell.rawbw.com (8.13.6/8.13.6) with ESMTP id n657sDps035144 for ; Sun, 5 Jul 2009 00:54:13 -0700 (PDT) Message-ID: <4A505C23.50907@rawbw.com> Date: Sun, 05 Jul 2009 00:54:11 -0700 From: Yuri User-Agent: Thunderbird 2.0.0.22 (X11/20090624) MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: 'No buffer space available' messages from ral0 device X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: yuri@rawbw.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 07:54:14 -0000 After I had 'wget' running for a while ral device became irresponsive and kept printing those messages: Jul 5 00:30:45 eagle dhcpcd[22608]: ral0: timed out Jul 5 00:30:45 eagle dhcpcd[22608]: ral0: lease expired 48949 seconds ago Jul 5 00:30:45 eagle dhcpcd[22608]: ral0: writev: No buffer space available Jul 5 00:31:03 eagle last message repeated 7 times Jul 5 00:31:05 eagle dhcpcd[22608]: ral0: timed out Jul 5 00:31:05 eagle dhcpcd[22608]: ral0: lease expired 48969 seconds ago Jul 5 00:31:05 eagle dhcpcd[22608]: ral0: writev: No buffer space available Jul 5 00:31:23 eagle last message repeated 7 times After I put it down/up and set it up again it worked fine again. Is this a known problem? Any workaround? Yuri From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 5 11:42:04 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 41806106566C for ; Sun, 5 Jul 2009 11:42:04 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out1.uni-muenster.de (ZIVM-OUT1.UNI-MUENSTER.DE [128.176.192.8]) by mx1.freebsd.org (Postfix) with ESMTP id CC8E38FC18 for ; Sun, 5 Jul 2009 11:42:03 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.42,351,1243807200"; d="scan'208";a="276335090" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay1.uni-muenster.de with ESMTP; 05 Jul 2009 13:42:02 +0200 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id 0D1391B008B; Sun, 5 Jul 2009 13:42:02 +0200 (CEST) Date: Sun, 05 Jul 2009 13:42:01 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Subject: carriage return with stdout and stderr X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 11:42:04 -0000 i'm running something similar to this pseudo-code in an app of mine: for (i=0 ....) fprintf(stdout,"TEXT %d\r", int); what's really strange is that if i print to stdout the output isn't very clean. the cursor jumps randomly within the output (being 1 line). if i print to stderr however the output looks really nice. the cursor says right at the front of the output all the time. just like in burncd e.g. what's causing this? because i'd rather print to stdout. alex From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 5 12:05:16 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F7A710656A9 for ; Sun, 5 Jul 2009 12:05:16 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 171D18FC15 for ; Sun, 5 Jul 2009 12:05:16 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 6C27735994C; Sun, 5 Jul 2009 14:05:15 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 03AA0228CC; Sun, 5 Jul 2009 14:05:15 +0200 (CEST) Date: Sun, 5 Jul 2009 14:05:14 +0200 From: Jilles Tjoelker To: Alexander Best Message-ID: <20090705120514.GA45921@stack.nl> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-hackers@FreeBSD.org Subject: Re: carriage return with stdout and stderr X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 12:05:20 -0000 On Sun, Jul 05, 2009 at 01:42:01PM +0200, Alexander Best wrote: > i'm running something similar to this pseudo-code in an app of mine: > for (i=0 ....) > fprintf(stdout,"TEXT %d\r", int); > what's really strange is that if i print to stdout the output isn't very > clean. the cursor jumps randomly within the output (being 1 line). if i print > to stderr however the output looks really nice. the cursor says right at the > front of the output all the time. just like in burncd e.g. > what's causing this? because i'd rather print to stdout. If you are writing to a terminal, stdout is line-buffered. This means that output is flushed when the buffer is full or a '\n' is written. A '\r' is not good enough. You can force a write using fflush(stdout). stderr is always unbuffered, so everything is written immediately. -- Jilles Tjoelker From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 5 12:20:40 2009 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11C541065674 for ; Sun, 5 Jul 2009 12:20:40 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.freebsd.org (Postfix) with SMTP id 584EC8FC15 for ; Sun, 5 Jul 2009 12:20:39 +0000 (UTC) (envelope-from christoph.mallon@gmx.de) Received: (qmail invoked by alias); 05 Jul 2009 11:53:56 -0000 Received: from p54A3BF85.dip.t-dialin.net (EHLO tron.homeunix.org) [84.163.191.133] by mail.gmx.net (mp003) with SMTP; 05 Jul 2009 13:53:56 +0200 X-Authenticated: #1673122 X-Provags-ID: V01U2FsdGVkX1/uL4VnQ7fuy18m/B0eAfHmPf7qX97ivycRlXnrTf 2jR4VRvEyU+pd+ Message-ID: <4A509454.3020805@gmx.de> Date: Sun, 05 Jul 2009 13:53:56 +0200 From: Christoph Mallon User-Agent: Thunderbird 2.0.0.22 (X11/20090628) MIME-Version: 1.0 To: Alexander Best References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.71 Cc: freebsd-hackers@FreeBSD.org Subject: Re: carriage return with stdout and stderr X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 12:20:40 -0000 Alexander Best schrieb: > i'm running something similar to this pseudo-code in an app of mine: > > for (i=0 ....) > fprintf(stdout,"TEXT %d\r", int); > > what's really strange is that if i print to stdout the output isn't very > clean. the cursor jumps randomly within the output (being 1 line). if i print > to stderr however the output looks really nice. the cursor says right at the > front of the output all the time. just like in burncd e.g. > > what's causing this? because i'd rather print to stdout. stdout is buffered, stderr is not. Try fflush(). Christoph From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 5 12:20:59 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CB2D106564A for ; Sun, 5 Jul 2009 12:20:59 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out3.uni-muenster.de (ZIVM-OUT3.UNI-MUENSTER.DE [128.176.192.18]) by mx1.freebsd.org (Postfix) with ESMTP id 2217D8FC0C for ; Sun, 5 Jul 2009 12:20:58 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.42,351,1243807200"; d="scan'208";a="7609342" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER03.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay3.uni-muenster.de with ESMTP; 05 Jul 2009 14:20:57 +0200 Received: by ZIVMAILUSER03.UNI-MUENSTER.DE (Postfix, from userid 149459) id 9FA521B0751; Sun, 5 Jul 2009 14:20:57 +0200 (CEST) Date: Sun, 05 Jul 2009 14:20:57 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Jilles Tjoelker Message-ID: In-Reply-To: <20090705120514.GA45921@stack.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: carriage return with stdout and stderr X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 12:20:59 -0000 thanks. i remembered fprintf being buffered, but i always thought \r would also empty the buffer. now that explains everything. ;-) alex Jilles Tjoelker schrieb am 2009-07-05: > On Sun, Jul 05, 2009 at 01:42:01PM +0200, Alexander Best wrote: > > i'm running something similar to this pseudo-code in an app of > > mine: > > for (i=0 ....) > > fprintf(stdout,"TEXT %d\r", int); > > what's really strange is that if i print to stdout the output isn't > > very > > clean. the cursor jumps randomly within the output (being 1 line). > > if i print > > to stderr however the output looks really nice. the cursor says > > right at the > > front of the output all the time. just like in burncd e.g. > > what's causing this? because i'd rather print to stdout. > If you are writing to a terminal, stdout is line-buffered. This means > that output is flushed when the buffer is full or a '\n' is written. > A > '\r' is not good enough. You can force a write using fflush(stdout). > stderr is always unbuffered, so everything is written immediately. From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 5 16:42:47 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0539D106567A for ; Sun, 5 Jul 2009 16:42:47 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay11.ispgateway.de (smtprelay11.ispgateway.de [80.67.31.34]) by mx1.freebsd.org (Postfix) with ESMTP id 887D68FC18 for ; Sun, 5 Jul 2009 16:42:46 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from [62.143.132.243] (helo=localhost) by smtprelay11.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1MNUdN-0004x6-J6 for freebsd-hackers@freebsd.org; Sun, 05 Jul 2009 18:32:09 +0200 Date: Sun, 5 Jul 2009 18:28:56 +0200 From: Fabian Keil To: freebsd-hackers@freebsd.org Message-ID: <20090705182856.799b6b07@fabiankeil.de> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.2; i386-portbld-freebsd8.0) X-PGP-KEY-URL: http://www.fabiankeil.de/gpg-keys/freebsd-listen-2008-08-18.asc Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/Q1rwH7nD2rW98mS+oZ97tZs"; protocol="application/pgp-signature" X-Df-Sender: 775067 Subject: Zero-length allocation with posix_memalign() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 16:42:47 -0000 --Sig_/Q1rwH7nD2rW98mS+oZ97tZs Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I recently submitted a patch to the vlc developers that prevents a crash on FreeBSD 8.0 by not calling posix_memalign() with a size argument of zero. A simplified test case would be: #include int main(int argc, char **argv) { void *ptr; posix_memalign(&ptr, 16, 0); return (0); } which triggers: Assertion failed: (size !=3D 0), function arena_malloc, file /usr/src/lib/l= ibc/stdlib/malloc.c, line 3349. R=E9mi Denis-Courmont, one of the vlc developers, pointed out that passing a zero size to posix_memalign() should actually work, though: | In principle, while useless, there is no reason why allocating an empty=20 | picture should not be possible. posix_memalign() does support zero-length= =20 | allocation anyway: | http://www.opengroup.org/onlinepubs/9699919799/functions/posix_memalign.h= tml | | If the size of the space requested is 0, the behavior is | | implementation-defined; the value returned in memptr shall be either a | | null pointer or a unique pointer. http://mailman.videolan.org/pipermail/vlc-devel/2009-July/062299.html I get the impression that this deviation from the standard could be easily fixed with something similar to the following, which is mostly copy and pasted from malloc(): index 5404798..a078d07 100644 --- a/malloc.c +++ b/malloc.c @@ -5303,6 +5303,15 @@ posix_memalign(void **memptr, size_t alignment, size= _t size) int ret; void *result; =20 + if (size =3D=3D 0) { + if (opt_sysv =3D=3D false) + size =3D 1; + else { + ret =3D 0; + *memptr =3D result =3D NULL; + goto RETURN; + } + } if (malloc_init()) result =3D NULL; else { I assume the "goto RETURN" isn't entirely compliant either as it skips the alignment check, but so does the malloc_init() failure branch. Fabian --Sig_/Q1rwH7nD2rW98mS+oZ97tZs Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkpQ1MwACgkQBYqIVf93VJ1G3wCgv+JfZxs0ptB4RcoqT7HT7YZ7 r7EAoJ2RofKSRVTIUYLArttbqHEI835p =djX3 -----END PGP SIGNATURE----- --Sig_/Q1rwH7nD2rW98mS+oZ97tZs-- From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 5 17:52:01 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2FE31065673 for ; Sun, 5 Jul 2009 17:52:01 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from canonware.com (canonware.com [64.183.146.166]) by mx1.freebsd.org (Postfix) with ESMTP id 96B128FC1E for ; Sun, 5 Jul 2009 17:52:01 +0000 (UTC) (envelope-from jasone@FreeBSD.org) Received: from [192.168.168.201] (unknown [192.168.168.201]) by canonware.com (Postfix) with ESMTPA id E209E5081A; Sun, 5 Jul 2009 10:33:38 -0700 (PDT) Message-ID: <4A50E3F2.8080008@FreeBSD.org> Date: Sun, 05 Jul 2009 10:33:38 -0700 From: Jason Evans User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Fabian Keil References: <20090705182856.799b6b07@fabiankeil.de> In-Reply-To: <20090705182856.799b6b07@fabiankeil.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-hackers@freebsd.org Subject: Re: Zero-length allocation with posix_memalign() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 17:52:01 -0000 Fabian Keil wrote: > Rémi Denis-Courmont, one of the vlc developers, pointed out > that passing a zero size to posix_memalign() should actually > work, though: > > | In principle, while useless, there is no reason why allocating an empty > | picture should not be possible. posix_memalign() does support zero-length > | allocation anyway: > | http://www.opengroup.org/onlinepubs/9699919799/functions/posix_memalign.html > | | If the size of the space requested is 0, the behavior is > | | implementation-defined; the value returned in memptr shall be either a > | | null pointer or a unique pointer. Standards: So many to choose from. This behavior for posix_memalign was only defined as of the 2008 standard (see the Issue 7 notes for posix_memalign): https://www.opengroup.org/austin/interps/uploads/40/14543/AI-152.txt Such requirements are unfortunate, because they induce a performance penalty for every call, just so that programs can avoid proper handling of edge cases in the rare situations for which such edge cases are a real possibility. I will add the pessimization to posix_memalign once the 8.0 freeze is over. It will be quite some time before this behavior becomes ubiquitous, so in the meanwhile it's probably a good idea to modify vlc to avoid such allocation requests. Thanks, Jason From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 5 17:56:02 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E1E3106564A for ; Sun, 5 Jul 2009 17:56:02 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from mail-bw0-f217.google.com (mail-bw0-f217.google.com [209.85.218.217]) by mx1.freebsd.org (Postfix) with ESMTP id 06F7A8FC0C for ; Sun, 5 Jul 2009 17:56:01 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by bwz17 with SMTP id 17so94138bwz.43 for ; Sun, 05 Jul 2009 10:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Jlf0nqTWsh5xfxoyelYdAurYVJZz9PAvYq2s7PjqrsI=; b=xsH+Mvfog/8maPz2OrSwz5JmEDqiXTamZds5s3rl9fnv5C0pP6NTSMdtnxrTuIV9Zt HHPGf3IuWGMyiNEWwOhvC4N73SFzRSviSH0W8899egDQhoWFuG1zeu4a35hRyoiECQXk +Zx7G7ymTmg5/WQq2ev+sDxLwE6YhzCoMdn3M= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=olZqXDFk8A8OUMwWDTie07Hf73pMhADUVhqRPQlJ+Bsvs+7fqqAeUyfplZ/JRh79MP SPojG8sJV1I8gOkxZf7ia7roFD6UdYsmv2ZetIv9dgfrOLPXKlbXwJfxx7EL9PUeXXJ9 FTv/5GPnS2RQ/7llzWdX+CnIMBCj+CTJGbHEI= MIME-Version: 1.0 Received: by 10.204.71.65 with SMTP id g1mr3710459bkj.27.1246816560869; Sun, 05 Jul 2009 10:56:00 -0700 (PDT) In-Reply-To: <20090705182856.799b6b07@fabiankeil.de> References: <20090705182856.799b6b07@fabiankeil.de> Date: Sun, 5 Jul 2009 17:56:00 +0000 Message-ID: <3a142e750907051056n2e1424erfb6ed75b0bb94ed2@mail.gmail.com> From: "Paul B. Mahol" To: Fabian Keil Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Zero-length allocation with posix_memalign() X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 17:56:02 -0000 On 7/5/09, Fabian Keil wrote: > I recently submitted a patch to the vlc developers that prevents > a crash on FreeBSD 8.0 by not calling posix_memalign() with a > size argument of zero. > > A simplified test case would be: > > #include > int main(int argc, char **argv) { > void *ptr; > posix_memalign(&ptr, 16, 0); > return (0); > } > > which triggers: > Assertion failed: (size != 0), function arena_malloc, file > /usr/src/lib/libc/stdlib/malloc.c, line 3349. Actually that assertion is triggered only if MALLOC_PRODUCTION is undefined. (when it is undefined it considerably slows thing down) 'a' flag for malloc.conf looks broken for me .... > > Remi Denis-Courmont, one of the vlc developers, pointed out > that passing a zero size to posix_memalign() should actually > work, though: > > | In principle, while useless, there is no reason why allocating an empty > | picture should not be possible. posix_memalign() does support zero-length > | allocation anyway: > | > http://www.opengroup.org/onlinepubs/9699919799/functions/posix_memalign.html > | | If the size of the space requested is 0, the behavior is > | | implementation-defined; the value returned in memptr shall be either a > | | null pointer or a unique pointer. > http://mailman.videolan.org/pipermail/vlc-devel/2009-July/062299.html > > I get the impression that this deviation from the standard could be > easily fixed with something similar to the following, which is mostly > copy and pasted from malloc(): > > index 5404798..a078d07 100644 > --- a/malloc.c > +++ b/malloc.c > @@ -5303,6 +5303,15 @@ posix_memalign(void **memptr, size_t alignment, > size_t size) > int ret; > void *result; > > + if (size == 0) { > + if (opt_sysv == false) > + size = 1; > + else { > + ret = 0; > + *memptr = result = NULL; > + goto RETURN; > + } > + } > if (malloc_init()) > result = NULL; > else { > > I assume the "goto RETURN" isn't entirely compliant either as > it skips the alignment check, but so does the malloc_init() > failure branch. > > Fabian > -- Paul From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 5 19:25:28 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3ABAA1065672 for ; Sun, 5 Jul 2009 19:25:28 +0000 (UTC) (envelope-from alan.l.cox@gmail.com) Received: from mail-vw0-f199.google.com (mail-vw0-f199.google.com [209.85.212.199]) by mx1.freebsd.org (Postfix) with ESMTP id BF8918FC0A for ; Sun, 5 Jul 2009 19:25:27 +0000 (UTC) (envelope-from alan.l.cox@gmail.com) Received: by vwj37 with SMTP id 37so637306vwj.3 for ; Sun, 05 Jul 2009 12:25:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=canGiLqIC5IvafDoSMWZg+KIYbk4WEA1dyOvTDqEaHI=; b=wrQSxYi4Ou2NThLlaFMiC+eaRfOiykXY2kSSZirYltpS5diLqKhcktNLvofkm3Wm8X rl8pEqAIWF7f1dQ1wmboakRfF9oZYtcCqNbjZj98TmWQkCfaCoLyl5JmWMzS+0GIK7hA /w1X4Tx+5FGRpDPBJ2+Mv1av53D7tbudv8pUQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=i06B9y867l5iCemiuK8xnWpsqI5YK/gxyKbrIC5E8EE4uZH5983HJmN6nXvLujfkLy +j9NelV/B5pAs4xPe/m0zSQZ2KoMJvcNFiKMgilZzidA5dR5Snq1o+QIXFGmsPtHKa5u eawAkQI8PTuRM4NAVYkXyMDrY4FKqMYvXQ6L0= MIME-Version: 1.0 Received: by 10.220.73.9 with SMTP id o9mr7694630vcj.41.1246821926886; Sun, 05 Jul 2009 12:25:26 -0700 (PDT) In-Reply-To: <6dd8736a0907030618o722d8252x59479543fef23cc4@mail.gmail.com> References: <6dd8736a0907030618o722d8252x59479543fef23cc4@mail.gmail.com> Date: Sun, 5 Jul 2009 14:25:26 -0500 Message-ID: From: Alan Cox To: c0re dumped Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Problem with vm.pmap.shpgperproc and vm.pmap.pv_entry_max X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: alc@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jul 2009 19:25:28 -0000 On Fri, Jul 3, 2009 at 8:18 AM, c0re dumped wrote: > So, I never had problem with this server, but recently it starts to > giv me the following messages *every* minute : > > Jul 3 10:04:00 squid kernel: Approaching the limit on PV entries, > consider increasing either the vm.pmap.shpgperproc or the > vm.pmap.pv_entry_max tunable. > Jul 3 10:05:00 squid kernel: Approaching the limit on PV entries, > consider increasing either the vm.pmap.shpgperproc or the > vm.pmap.pv_entry_max tunable. > Jul 3 10:06:00 squid kernel: Approaching the limit on PV entries, > consider increasing either the vm.pmap.shpgperproc or the > vm.pmap.pv_entry_max tunable. > Jul 3 10:07:01 squid kernel: Approaching the limit on PV entries, > consider increasing either the vm.pmap.shpgperproc or the > vm.pmap.pv_entry_max tunable. > Jul 3 10:08:01 squid kernel: Approaching the limit on PV entries, > consider increasing either the vm.pmap.shpgperproc or the > vm.pmap.pv_entry_max tunable. > Jul 3 10:09:01 squid kernel: Approaching the limit on PV entries, > consider increasing either the vm.pmap.shpgperproc or the > vm.pmap.pv_entry_max tunable. > Jul 3 10:10:01 squid kernel: Approaching the limit on PV entries, > consider increasing either the vm.pmap.shpgperproc or the > vm.pmap.pv_entry_max tunable. > Jul 3 10:11:01 squid kernel: Approaching the limit on PV entries, > consider increasing either the vm.pmap.shpgperproc or the > vm.pmap.pv_entry_max tunable. > > This server is running Squid + dansguardian. The users are complaining > about slow navigation and they are driving me crazy ! > > Have anyone faced this problem before ? > > Some infos: > > # uname -a > FreeBSD squid 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Fri May 1 08:49:13 > UTC 2009 root@walker.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC > i386 > > # sysctl vm > vm.vmtotal: > System wide totals computed every five seconds: (values in kilobytes) > =============================================== > Processes: (RUNQ: 1 Disk Wait: 1 Page Wait: 0 Sleep: 230) > Virtual Memory: (Total: 19174412K, Active 9902152K) > Real Memory: (Total: 1908080K Active 1715908K) > Shared Virtual Memory: (Total: 647372K Active: 10724K) > Shared Real Memory: (Total: 68092K Active: 4436K) > Free Memory Pages: 88372K > > vm.loadavg: { 0.96 0.96 1.13 } > vm.v_free_min: 4896 > vm.v_free_target: 20635 > vm.v_free_reserved: 1051 > vm.v_inactive_target: 30952 > vm.v_cache_min: 20635 > vm.v_cache_max: 41270 > vm.v_pageout_free_min: 34 > vm.pageout_algorithm: 0 > vm.swap_enabled: 1 > vm.kmem_size_scale: 3 > vm.kmem_size_max: 335544320 > vm.kmem_size_min: 0 > vm.kmem_size: 335544320 > vm.nswapdev: 1 > vm.dmmax: 32 > vm.swap_async_max: 4 > vm.zone_count: 84 > vm.swap_idle_threshold2: 10 > vm.swap_idle_threshold1: 2 > vm.exec_map_entries: 16 > vm.stats.misc.zero_page_count: 0 > vm.stats.misc.cnt_prezero: 0 > vm.stats.vm.v_kthreadpages: 0 > vm.stats.vm.v_rforkpages: 0 > vm.stats.vm.v_vforkpages: 340091 > vm.stats.vm.v_forkpages: 3604123 > vm.stats.vm.v_kthreads: 53 > vm.stats.vm.v_rforks: 0 > vm.stats.vm.v_vforks: 2251 > vm.stats.vm.v_forks: 19295 > vm.stats.vm.v_interrupt_free_min: 2 > vm.stats.vm.v_pageout_free_min: 34 > vm.stats.vm.v_cache_max: 41270 > vm.stats.vm.v_cache_min: 20635 > vm.stats.vm.v_cache_count: 5734 > vm.stats.vm.v_inactive_count: 242259 > vm.stats.vm.v_inactive_target: 30952 > vm.stats.vm.v_active_count: 445958 > vm.stats.vm.v_wire_count: 58879 > vm.stats.vm.v_free_count: 16335 > vm.stats.vm.v_free_min: 4896 > vm.stats.vm.v_free_target: 20635 > vm.stats.vm.v_free_reserved: 1051 > vm.stats.vm.v_page_count: 769244 > vm.stats.vm.v_page_size: 4096 > vm.stats.vm.v_tfree: 12442098 > vm.stats.vm.v_pfree: 1657776 > vm.stats.vm.v_dfree: 0 > vm.stats.vm.v_tcached: 253415 > vm.stats.vm.v_pdpages: 254373 > vm.stats.vm.v_pdwakeups: 14 > vm.stats.vm.v_reactivated: 414 > vm.stats.vm.v_intrans: 1912 > vm.stats.vm.v_vnodepgsout: 0 > vm.stats.vm.v_vnodepgsin: 6593 > vm.stats.vm.v_vnodeout: 0 > vm.stats.vm.v_vnodein: 891 > vm.stats.vm.v_swappgsout: 0 > vm.stats.vm.v_swappgsin: 0 > vm.stats.vm.v_swapout: 0 > vm.stats.vm.v_swapin: 0 > vm.stats.vm.v_ozfod: 56314 > vm.stats.vm.v_zfod: 2016628 > vm.stats.vm.v_cow_optim: 1959 > vm.stats.vm.v_cow_faults: 584331 > vm.stats.vm.v_vm_faults: 3661086 > vm.stats.sys.v_soft: 23280645 > vm.stats.sys.v_intr: 18528397 > vm.stats.sys.v_syscall: 1990471112 > vm.stats.sys.v_trap: 8079878 > vm.stats.sys.v_swtch: 105613021 > vm.stats.object.bypasses: 14893 > vm.stats.object.collapses: 55259 > vm.v_free_severe: 2973 > vm.max_proc_mmap: 49344 > vm.old_msync: 0 > vm.msync_flush_flags: 3 > vm.boot_pages: 48 > vm.max_wired: 255475 > vm.pageout_lock_miss: 0 > vm.disable_swapspace_pageouts: 0 > vm.defer_swapspace_pageouts: 0 > vm.swap_idle_enabled: 0 > vm.pageout_stats_interval: 5 > vm.pageout_full_stats_interval: 20 > vm.pageout_stats_max: 20635 > vm.max_launder: 32 > vm.phys_segs: > SEGMENT 0: > > start: 0x1000 > end: 0x9a000 > free list: 0xc0cca168 > > SEGMENT 1: > > start: 0x100000 > end: 0x400000 > free list: 0xc0cca168 > > SEGMENT 2: > > start: 0x1025000 > end: 0xbc968000 > free list: 0xc0cca060 > > vm.phys_free: > FREE LIST 0: > > ORDER (SIZE) | NUMBER > | POOL 0 | POOL 1 > -- -- -- -- -- -- > 10 ( 4096K) | 0 | 0 > 9 ( 2048K) | 0 | 0 > 8 ( 1024K) | 0 | 0 > 7 ( 512K) | 0 | 0 > 6 ( 256K) | 0 | 0 > 5 ( 128K) | 0 | 0 > 4 ( 64K) | 0 | 0 > 3 ( 32K) | 0 | 0 > 2 ( 16K) | 0 | 0 > 1 ( 8K) | 0 | 0 > 0 ( 4K) | 24 | 3562 > > FREE LIST 1: > > ORDER (SIZE) | NUMBER > | POOL 0 | POOL 1 > -- -- -- -- -- -- > 10 ( 4096K) | 0 | 0 > 9 ( 2048K) | 0 | 0 > 8 ( 1024K) | 0 | 0 > 7 ( 512K) | 0 | 0 > 6 ( 256K) | 0 | 0 > 5 ( 128K) | 0 | 2 > 4 ( 64K) | 0 | 3 > 3 ( 32K) | 6 | 11 > 2 ( 16K) | 6 | 21 > 1 ( 8K) | 14 | 35 > 0 ( 4K) | 20 | 70 > > vm.reserv.reclaimed: 187 > vm.reserv.partpopq: > LEVEL SIZE NUMBER > > -1: 71756K, 19 > > vm.reserv.freed: 35575 > vm.reserv.broken: 94 > vm.idlezero_enable: 0 > vm.kvm_free: 310374400 > vm.kvm_size: 1073737728 > vm.pmap.pmap_collect_active: 0 > vm.pmap.pmap_collect_inactive: 0 > vm.pmap.pv_entry_spare: 50408 > vm.pmap.pv_entry_allocs: 38854797 > vm.pmap.pv_entry_frees: 37052501 > vm.pmap.pc_chunk_tryfail: 0 > vm.pmap.pc_chunk_frees: 130705 > vm.pmap.pc_chunk_allocs: 136219 > vm.pmap.pc_chunk_count: 5514 > vm.pmap.pv_entry_count: 1802296 > vm.pmap.pde.promotions: 0 > vm.pmap.pde.p_failures: 0 > vm.pmap.pde.mappings: 0 > vm.pmap.pde.demotions: 0 > vm.pmap.shpgperproc: 200 > vm.pmap.pv_entry_max: 2002224 > vm.pmap.pg_ps_enabled: 0 > > Either pmap.shpgperproc and vm.pmap.pv_entry_max are with their > default values. I read here > (http://lists.freebsd.org/pipermail/freebsd-hackers/2003-May/000695.html) > tha its not a good ideia to increase these values arbitrarily. > There are two things that you can do: (1) Enable superpages by setting vm.pmap_pg_ps_enabled to "1" in /boot/loader.conf. A 4MB superpage mapping on i386 consumes a single PV entry instead of the 1024 entries that would be consumed by mapping 4MB of 4KB pages. Whether or not this will help depends on aspects of Squid and Dansguardian that I can't predict. (2) You shouldn't be afraid of increasing vm.pmap.pv_entry_max. However, you should watch vm.kvm_free as you do this. It will decrease in proportion to the increase in vm.pmap.pv_entry_max. Don't let vm.kvm_free drop too close to 0. I would consider too close on the order of 25-50MB. Regards, Alan From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 6 09:19:56 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65C59106566C for ; Mon, 6 Jul 2009 09:19:56 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 050C78FC08 for ; Mon, 6 Jul 2009 09:19:55 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id BA8151CD00; Mon, 6 Jul 2009 11:19:54 +0200 (CEST) Date: Mon, 6 Jul 2009 11:19:54 +0200 From: Ed Schouten To: FreeBSD Hackers Message-ID: <20090706091954.GC48776@hoeg.nl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xfKTY7H3GljOArEK" Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Subject: [Probably interesting for us] libcompiler_rt 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, 06 Jul 2009 09:19:56 -0000 --xfKTY7H3GljOArEK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi all. I think I've probably mentioned dozens of times I've been working with some other people to get FreeBSD working with Clang in the base system. The LLVM people recently announced another project that may be interesting for us, which should be usable with both GCC and Clang: http://compiler-rt.llvm.org/ libcompiler_rt is a replacement for libgcc. According to the site it has some performance improvements over libgcc. I'm personally not really interested in those (as long as it's not slower), but the license seems to be a lot better. Looking at the code, it seems to do what it should do. Maybe it would just be a lot easier if we integrated all required symbols into our C library. Maybe I'm going to take a look at this, but there are also other projects which I should work on. Yours, --=20 Ed Schouten WWW: http://80386.nl/ --xfKTY7H3GljOArEK Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkpRwboACgkQ52SDGA2eCwX/XQCcDGyME6kqfKQndzWi4S8KKjgi LYoAn0Ob347vwz8qbguoIGy0hFLiAZh4 =bxLA -----END PGP SIGNATURE----- --xfKTY7H3GljOArEK-- From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 6 12:14:58 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F95F1065670 for ; Mon, 6 Jul 2009 12:14:58 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 0FAE18FC14 for ; Mon, 6 Jul 2009 12:14:57 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 2BD976D421; Mon, 6 Jul 2009 14:14:57 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 0A947844B5; Mon, 6 Jul 2009 14:14:57 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Paul B. Mahol" References: <3a142e750907041727l6fac4b67m33973ec352664c6b@mail.gmail.com> Date: Mon, 06 Jul 2009 14:14:56 +0200 In-Reply-To: <3a142e750907041727l6fac4b67m33973ec352664c6b@mail.gmail.com> (Paul B. Mahol's message of "Sun, 5 Jul 2009 00:27:48 +0000") Message-ID: <86hbxqgg8v.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Alexander Best Subject: Re: mmap/munmap with zero length 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, 06 Jul 2009 12:14:58 -0000 "Paul B. Mahol" writes: > there is V flag for malloc.conf Irrelevant. > It wouldn't improve badly written program. Allocating or mapping a zero-length region is not necessarily a bug. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 6 13:22:25 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F63E1065676 for ; Mon, 6 Jul 2009 13:22:25 +0000 (UTC) (envelope-from rb@gid.co.uk) Received: from mx0.gid.co.uk (mx0.gid.co.uk [194.32.164.250]) by mx1.freebsd.org (Postfix) with ESMTP id 138CE8FC21 for ; Mon, 6 Jul 2009 13:22:24 +0000 (UTC) (envelope-from rb@gid.co.uk) Received: from gidgate.gid.co.uk (80-46-130-69.static.dsl.as9105.com [80.46.130.69]) by mx0.gid.co.uk (8.14.2/8.14.2) with ESMTP id n66D5SSN049919; Mon, 6 Jul 2009 14:05:28 +0100 (BST) (envelope-from rb@gid.co.uk) Received: from [192.168.2.3] (host86-150-28-49.range86-150.btcentralplus.com [86.150.28.49]) by gidgate.gid.co.uk (8.13.8/8.13.8) with ESMTP id n66D5Mmt038464; Mon, 6 Jul 2009 14:05:22 +0100 (BST) (envelope-from rb@gid.co.uk) Message-Id: From: Bob Bishop To: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= In-Reply-To: <86hbxqgg8v.fsf@ds4.des.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v935.3) Date: Mon, 6 Jul 2009 14:05:17 +0100 References: <3a142e750907041727l6fac4b67m33973ec352664c6b@mail.gmail.com> <86hbxqgg8v.fsf@ds4.des.no> X-Mailer: Apple Mail (2.935.3) Cc: freebsd-hackers@freebsd.org, Alexander Best , "Paul B. Mahol" Subject: Re: mmap/munmap with zero length 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, 06 Jul 2009 13:22:25 -0000 Hi, On 6 Jul 2009, at 13:14, Dag-Erling Sm=F8rgrav wrote: > Allocating or mapping a zero-length region is not necessarily a bug. POSIX says it is, IIRC. -- Bob Bishop rb@gid.co.uk From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 6 13:49:20 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD9641065670 for ; Mon, 6 Jul 2009 13:49:20 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 7BC6B8FC19 for ; Mon, 6 Jul 2009 13:49:20 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 22E0D6D421; Mon, 6 Jul 2009 15:49:19 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 03107844B5; Mon, 6 Jul 2009 15:49:19 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bob Bishop References: <3a142e750907041727l6fac4b67m33973ec352664c6b@mail.gmail.com> <86hbxqgg8v.fsf@ds4.des.no> Date: Mon, 06 Jul 2009 15:49:18 +0200 In-Reply-To: (Bob Bishop's message of "Mon, 6 Jul 2009 14:05:17 +0100") Message-ID: <86d48dhqg1.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Alexander Best , "Paul B. Mahol" Subject: Re: mmap/munmap with zero length 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, 06 Jul 2009 13:49:21 -0000 Bob Bishop writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Allocating or mapping a zero-length region is not necessarily a bug. > POSIX says it is, IIRC. For mmap(), yes; for malloc(), no. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 6 18:26:19 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CBBB106567A for ; Mon, 6 Jul 2009 18:26:19 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay09.ispgateway.de (smtprelay09.ispgateway.de [80.67.31.43]) by mx1.freebsd.org (Postfix) with ESMTP id D361D8FC1F for ; Mon, 6 Jul 2009 18:26:18 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from [62.143.132.243] (helo=localhost) by smtprelay09.ispgateway.de with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1MNsuV-0003qu-5f for freebsd-hackers@freebsd.org; Mon, 06 Jul 2009 20:27:28 +0200 Date: Mon, 6 Jul 2009 20:26:08 +0200 From: Fabian Keil To: freebsd-hackers@freebsd.org Message-ID: <20090706202608.45c98821@fabiankeil.de> In-Reply-To: <4A50E3F2.8080008@FreeBSD.org> References: <20090705182856.799b6b07@fabiankeil.de> <4A50E3F2.8080008@FreeBSD.org> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.2; i386-portbld-freebsd8.0) X-PGP-KEY-URL: http://www.fabiankeil.de/gpg-keys/freebsd-listen-2008-08-18.asc Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/fYmYfL1q3FDwUL+INd9DA4n"; protocol="application/pgp-signature" X-Df-Sender: 775067 Subject: Re: Zero-length allocation with posix_memalign() 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, 06 Jul 2009 18:26:19 -0000 --Sig_/fYmYfL1q3FDwUL+INd9DA4n Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Jason Evans wrote: > Fabian Keil wrote: > > R=E9mi Denis-Courmont, one of the vlc developers, pointed out > > that passing a zero size to posix_memalign() should actually > > work, though: > >=20 > > | In principle, while useless, there is no reason why allocating an emp= ty=20 > > | picture should not be possible. posix_memalign() does support zero-le= ngth=20 > > | allocation anyway: > > | http://www.opengroup.org/onlinepubs/9699919799/functions/posix_memali= gn.html > > | | If the size of the space requested is 0, the behavior is > > | | implementation-defined; the value returned in memptr shall be eithe= r a > > | | null pointer or a unique pointer. >=20 > Standards: So many to choose from. This behavior for posix_memalign was= =20 > only defined as of the 2008 standard (see the Issue 7 notes for=20 > posix_memalign): >=20 > https://www.opengroup.org/austin/interps/uploads/40/14543/AI-152.txt >=20 > Such requirements are unfortunate, because they induce a performance=20 > penalty for every call, just so that programs can avoid proper handling=20 > of edge cases in the rare situations for which such edge cases are a=20 > real possibility. >=20 > I will add the pessimization to posix_memalign once the 8.0 freeze is=20 > over. It will be quite some time before this behavior becomes=20 > ubiquitous, so in the meanwhile it's probably a good idea to modify vlc=20 > to avoid such allocation requests. Great, thanks. I agree and will forward the vlc patch to the maintainer of the FreeBSD port if getting it committed upstream fails. Fabian --Sig_/fYmYfL1q3FDwUL+INd9DA4n Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEYEARECAAYFAkpSQcYACgkQBYqIVf93VJ15jACdFF1748pnTxPqe/Yxl2qW53lk Cm8AoLn6d1kM13FsdDw+UiR7FTmLqSiq =fEG8 -----END PGP SIGNATURE----- --Sig_/fYmYfL1q3FDwUL+INd9DA4n-- From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 8 08:09:11 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1C081065673 for ; Wed, 8 Jul 2009 08:09:11 +0000 (UTC) (envelope-from jawa2502@gmail.com) Received: from mail-yx0-f181.google.com (mail-yx0-f181.google.com [209.85.210.181]) by mx1.freebsd.org (Postfix) with ESMTP id 5CD828FC17 for ; Wed, 8 Jul 2009 08:09:11 +0000 (UTC) (envelope-from jawa2502@gmail.com) Received: by yxe11 with SMTP id 11so7864096yxe.3 for ; Wed, 08 Jul 2009 01:09:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=un+F/B0RkSk2wMMPNNeDj8Tydg2G2SCv+2TcG4vR04E=; b=Bmehz9/pXj33A/1mcQHcppe6LMu3jRRmhz+O+mepCvFbxDOSCIiuVDVtRpG2ZAZgoa i6F7pXQ6AO31ivgOmKjfUHstawy3lg0OyotCg8LhTFP/Kjjvecrla++vx7I3iKPESUru 4Neup33cBQoSZifrmEXcHDT2fMw6sj3J6lnCw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=cqaA6SDTyRs6YWWkLDoNtUkVwcYhAGVdLlpXw9DEVpksiBcuGe9kj+1Aoz6UGGn4sF Nzek/mGej71QmTQEcQMLHyxzuBq367pwcrdjPawK63v1SU6NRQvTPE7eprOfGFo5TZ8l UXVm/3kqF4SFkpRP6Jr/k4aNVBfhQd5qpW8kI= MIME-Version: 1.0 Received: by 10.100.41.6 with SMTP id o6mr12072206ano.92.1247038974765; Wed, 08 Jul 2009 00:42:54 -0700 (PDT) Date: Wed, 8 Jul 2009 13:12:54 +0530 Message-ID: <995877b70907080042he7aee18m22f9d4a0e4b18bef@mail.gmail.com> From: Jawahar Tadipatri To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Jawahar Subject: Regarding IO to disk 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, 08 Jul 2009 08:09:11 -0000 Hi Folks,Can anyone please let me know the average/typical time taken for completing one IO operation (read and write) to disk? More specifically, time taken for writing a string to a file. Thanks a load, Jawahar From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 8 11:35:37 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BBCC1065673 for ; Wed, 8 Jul 2009 11:35:37 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 24BB78FC0A for ; Wed, 8 Jul 2009 11:35:36 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MOVQw-00088Y-DE for freebsd-hackers@freebsd.org; Wed, 08 Jul 2009 11:35:30 +0000 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Jul 2009 11:35:30 +0000 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Jul 2009 11:35:30 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Wed, 08 Jul 2009 13:35:18 +0200 Lines: 13 Message-ID: References: <995877b70907080042he7aee18m22f9d4a0e4b18bef@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.21 (X11/20090615) In-Reply-To: <995877b70907080042he7aee18m22f9d4a0e4b18bef@mail.gmail.com> Sender: news Subject: Re: Regarding IO to disk 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, 08 Jul 2009 11:35:37 -0000 Jawahar Tadipatri wrote: > Hi Folks,Can anyone please let me know the average/typical time taken for > completing one IO operation (read and write) to disk? > More specifically, time taken for writing a string to a file. Your question is incomplete and cannot be answered correctly. Declared average latency for desktop hard drives (see http://www.seagate.com/docs/pdf/datasheet/disc/ds_barracuda_7200_12.pdf) is about 4 ms. Real performance depends on about a dozen factors. See here: http://www.google.com/search?q=hard+drive+performance for more information. From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 8 12:02:18 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A67DF1065688 for ; Wed, 8 Jul 2009 12:02:18 +0000 (UTC) (envelope-from jawa2502@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.250]) by mx1.freebsd.org (Postfix) with ESMTP id 41FAA8FC29 for ; Wed, 8 Jul 2009 12:02:18 +0000 (UTC) (envelope-from jawa2502@gmail.com) Received: by an-out-0708.google.com with SMTP id d14so2518162and.13 for ; Wed, 08 Jul 2009 05:02:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=SyLgr2MIy6oTPxzNiSUeI8vLfn9s4rTvFVVQKj0N3+E=; b=WqSeTlUKea5fBuFxSjLX26OvXzNJATkmQLqidYS8sxODfbuWjHGzKVnNLLj9UnJv3Q tORvq02Zt/l964z73H2tUDssQajKTzYrZFkpPc0z4eMmUt3sVk6nArqd/h+H1lvQg3IP aj6R6t+3kaxvAU1FT+SzCPeM0YOcyep2e+Rmg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=iap/gFxkDcWG3tdqa/AE11NIHB5HAmYEjqlbD6jeDASi1fhb/jW/S6b6TM0cKHwc3m e1QYQEO6yohc0aRIhQlX43FKkrfY4fiWEIspuaLKYl9agIYrwbBpBl7a5RWajTsV+uoh iSVWZm2knI1vqpLz9eROi0cWdUohJGdEc6LWg= MIME-Version: 1.0 Received: by 10.100.239.16 with SMTP id m16mr12087987anh.192.1247054536723; Wed, 08 Jul 2009 05:02:16 -0700 (PDT) In-Reply-To: References: <995877b70907080042he7aee18m22f9d4a0e4b18bef@mail.gmail.com> Date: Wed, 8 Jul 2009 17:32:16 +0530 Message-ID: <995877b70907080502k64c6bf65n448cd91cb7f85d1@mail.gmail.com> From: Jawahar Tadipatri To: Ivan Voras Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-hackers@freebsd.org Subject: Re: Regarding IO to disk 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, 08 Jul 2009 12:02:24 -0000 Thanks for the info Ivan. On Wed, Jul 8, 2009 at 5:05 PM, Ivan Voras wrote: > Jawahar Tadipatri wrote: > >> Hi Folks,Can anyone please let me know the average/typical time taken for >> completing one IO operation (read and write) to disk? >> More specifically, time taken for writing a string to a file. >> > > Your question is incomplete and cannot be answered correctly. > > Declared average latency for desktop hard drives (see > http://www.seagate.com/docs/pdf/datasheet/disc/ds_barracuda_7200_12.pdf) > is about 4 ms. Real performance depends on about a dozen factors. > > See here: http://www.google.com/search?q=hard+drive+performance for more > information. > > _______________________________________________ > 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 Jul 8 15:54:39 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 655471065674; Wed, 8 Jul 2009 15:54:39 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojteks.tensor.gdynia.pl (wojteks.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 73A808FC15; Wed, 8 Jul 2009 15:54:37 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::2]) by wojteks.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n68FtBSM050761; Wed, 8 Jul 2009 17:55:11 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n68Ft8Qp001940; Wed, 8 Jul 2009 17:55:08 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id n68Ft8ak001937; Wed, 8 Jul 2009 17:55:08 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Wed, 8 Jul 2009 17:55:07 +0200 (CEST) From: Wojciech Puchar To: Ivan Voras In-Reply-To: Message-ID: References: <995877b70907080042he7aee18m22f9d4a0e4b18bef@mail.gmail.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: Regarding IO to disk 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, 08 Jul 2009 15:54:39 -0000 > > Declared average latency for desktop hard drives (see > http://www.seagate.com/docs/pdf/datasheet/disc/ds_barracuda_7200_12.pdf) is latency is average time to wait until data will be below head. it's by average half on single rotation. for 7200 rpm drive it's 120rps so half rotation takes 1/240 second=about 4ms. But to perform I/O you have to - send a request to disk (<1ms) - move head - depends of distance, up to 20-30ms, 8-10ms average on most drives - wait for latency - 4ms average. you end in 13-15ms average. in case of multiple parallel accesses - drive accept writes immediatelly, and can accept multiple reads if it can NCQ/TCQ, then it internally sort request queue to minimize required head moves and rotational waiting, so under high load you may go to 6-7ms/request which is about 150IOPS. Of course i'm talking about random/pseudorandom reads, multiple reads of sequential addresses will be optimized by drive. One more - i'm talking about raw I/O, FreeBSD of course optimizes filesystem acces internally by using lots of caching (as much as available memory) and planning requests. small writes to file usually succeed immediatelly (to cache). From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 8 15:56:19 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33442106566C for ; Wed, 8 Jul 2009 15:56:19 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojteks.tensor.gdynia.pl (wojteks.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id 7C1158FC16 for ; Wed, 8 Jul 2009 15:56:18 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::2]) by wojteks.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n68FurrF050771 for ; Wed, 8 Jul 2009 17:56:53 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [127.0.0.1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n68FuoTQ001949 for ; Wed, 8 Jul 2009 17:56:50 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id n68Fuo1q001946 for ; Wed, 8 Jul 2009 17:56:50 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Wed, 8 Jul 2009 17:56:50 +0200 (CEST) From: Wojciech Puchar To: freebsd-hackers@freebsd.org Message-ID: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Subject: What's changed between 7.1 and 7.2 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, 08 Jul 2009 15:56:19 -0000 i'm getting that crap every time i remount filesystem and on startup. GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. i'm using glabel only to avoid mess about what drive is connected to what SATA port. From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 8 16:23:35 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0651106564A for ; Wed, 8 Jul 2009 16:23:35 +0000 (UTC) (envelope-from chflags@gmail.com) Received: from mail-yx0-f181.google.com (mail-yx0-f181.google.com [209.85.210.181]) by mx1.freebsd.org (Postfix) with ESMTP id 6863F8FC12 for ; Wed, 8 Jul 2009 16:23:35 +0000 (UTC) (envelope-from chflags@gmail.com) Received: by yxe11 with SMTP id 11so8292619yxe.3 for ; Wed, 08 Jul 2009 09:23:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=n+BTiKdG71DQZIG8Mvg6qgOD3I1L7o41QMnDwbRorXk=; b=unfsu6tcS2qQU2vbxJVytQgRkaq0uOYcVCTH+lFQdCcUQsh48XinfasaIIYQRQGBZv nbVwnzimWf6OVwWtBTKx/BynikVTSTMXXdLozWkcc1Gek7uHQTZlZoGV5rZdI68H2T78 bp+Q6AjfnMJALxWnaSevywHCdyyuWq+WIZjio= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:content-type:content-transfer-encoding; b=lH04WtPNCRpcSuKzBKbYa4xkz0yuxr1FIOVgb/ipSJTEM+awfZoNnIlmdlDm9chVor IUkyfwE5Vxjp8M7lsmI4Uaf8xzoMGfC1P/ul1oQ+ExWg4X+o06c4EukylS5sb95P0Lxz 6CKgnt/zbx8SFUBpSR1E2i2WIrQz6d1d+rwP4= MIME-Version: 1.0 Received: by 10.100.105.15 with SMTP id d15mr12652158anc.140.1247069733181; Wed, 08 Jul 2009 09:15:33 -0700 (PDT) In-Reply-To: <25cb30907080911i2fb3026dq5cf980848c0cd2a8@mail.gmail.com> References: <25cb30907080911i2fb3026dq5cf980848c0cd2a8@mail.gmail.com> Date: Thu, 9 Jul 2009 00:15:33 +0800 Message-ID: <25cb30907080915l40dd3e81q9790a0b261cca143@mail.gmail.com> From: Kevin Foo To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: Regression in atkbd? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: chflags@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2009 16:23:35 -0000 On Thu, Jul 9, 2009 at 12:11 AM, Kevin Foo wrote: > Hi list, > > Did anyone experience issue with atkbd on 8.0? I encountered issue > with keyboard and touchpad on HP presario V3400 when trying to upgrade > from 7.2-RELEASE to 8.0 prior to and on BETA1.The keyboard and > touchpad are working fine on 7.2. On 8.0 prior to BETA1, I managed to > obtain dmesg via ssh despite having a non-operational keyboard. The > laptop was totally inaccessible on 8.0 BETA1 as it freezed after the > line atkbdc0. No information could be obtained. > > Any ideas? Please let me know if you require more information. Thanks. > > /boot/device.hints (default, no changes made) > hint.atkbdc.0.at="isa" > hint.atkbdc.0.port="0x060" > hint.atkbd.0.at="atkbdc" > hint.atkbd.0.irq="1" > hint.psm.0.at="atkbdc" > hint.psm.0.irq="12" > > 1) FreeBSD 8.0-BETA1 amd64 as of today with GENERIC kernel:- > <---snip---< > atkbdc0: port 0x60,0x64 irq 1 on acpi0 > system hangs...... > > > 2) FreeBSD 8.0-CURRENT amd64 prior to BETA1 custom kernel without > debug/invariant/witness:- > <---snip---< > atkbdc0: port 0x60,0x64 irq 1 on acpi0 > atkbd0: irq 1 on atkbdc0 > atkbd: the current kbd controller command byte 0047 > atkbd: unable to set the command byte. > kbd0 at atkbd0 > kbd0: atkbd0, generic (0), config:0x0, flags:0x3d0000 > ioapic0: routing intpin 1 (ISA IRQ 1) to lapic 0 vector 55 > atkbd0: [GIANT-LOCKED] > atkbd0: [ITHREAD] > psm0: unable to allocate IRQ > psmcpnp0: irq 12 on acpi0 > psm0: current command byte:0047 > psm0: unable to set the command byte. > <---snip---< > Full verbosed dmesg at http://ms.shit.la/FreeBSD/dmesg.8.txt > > > 3) FreeBSD 7.2-RELEASE-p2 amd64:- > <---snip---< > atkbdc0: port 0x60,0x64 irq 1 on acpi0 > atkbd0: irq 1 on atkbdc0 > atkbd: the current kbd controller command byte 0047 > atkbd: keyboard ID 0x41ab (2) > kbd0 at atkbd0 > kbd0: atkbd0, AT 101/102 (2), config:0x0, flags:0x3d0000 > ioapic0: routing intpin 1 (ISA IRQ 1) to vector 57 > atkbd0: [GIANT-LOCKED] > atkbd0: [ITHREAD] > psm0: unable to allocate IRQ > psmcpnp0: irq 12 on acpi0 > psm0: current command byte:0047 > psm0: irq 12 on atkbdc0 > ioapic0: routing intpin 12 (ISA IRQ 12) to vector 58 > psm0: [GIANT-LOCKED] > psm0: [ITHREAD] > psm0: model IntelliMouse, device ID 3-00, 3 buttons > psm0: config:00000000, flags:00000008, packet size:4 > psm0: syncmask:08, syncbits:00 > <---snip---< > Full verbosed dmesg at http://ms.shit.la/FreeBSD/dmesg.7.txt > > -- > Regards > Kevin Foo > Also, setting hint.atkbd.0.flags 0x01, 0x09, 0x02 on boot loader did not help. -- Regards Kevin Foo From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 8 16:31:10 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BBB11065674 for ; Wed, 8 Jul 2009 16:31:10 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id 27BA38FC18 for ; Wed, 8 Jul 2009 16:31:09 +0000 (UTC) (envelope-from olivier@gid0.org) Received: by fxm24 with SMTP id 24so26818fxm.43 for ; Wed, 08 Jul 2009 09:31:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.59.135 with SMTP id l7mr7132481bkh.13.1247068959461; Wed, 08 Jul 2009 09:02:39 -0700 (PDT) In-Reply-To: References: Date: Wed, 8 Jul 2009 18:02:39 +0200 Message-ID: <367b2c980907080902t1a5ae82by6e6d088e619bfc92@mail.gmail.com> From: Olivier SMEDTS To: Wojciech Puchar Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: What's changed between 7.1 and 7.2 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, 08 Jul 2009 16:31:10 -0000 2009/7/8 Wojciech Puchar : > i'm getting that crap every time i remount filesystem and on startup. > GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. > GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. > GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. > GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. > GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. > GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. > GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. > GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. Hello, I posted something similar few weeks ago : http://lists.freebsd.org/pipermail/freebsd-current/2009-April/005546.html > i'm using glabel only to avoid mess about what drive is connected to what > SATA port. > _______________________________________________ > 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" > -- Olivier Smedts _ ASCII ribbon campaign ( ) e-mail: olivier@gid0.org - against HTML email & vCards X www: http://www.gid0.org - against proprietary attachments / \ "Il y a seulement 10 sortes de gens dans le monde : ceux qui comprennent le binaire, et ceux qui ne le comprennent pas." From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 8 16:41:45 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FB2D106566C for ; Wed, 8 Jul 2009 16:41:45 +0000 (UTC) (envelope-from chflags@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.247]) by mx1.freebsd.org (Postfix) with ESMTP id EE5F28FC13 for ; Wed, 8 Jul 2009 16:41:44 +0000 (UTC) (envelope-from chflags@gmail.com) Received: by an-out-0708.google.com with SMTP id d14so2614198and.13 for ; Wed, 08 Jul 2009 09:41:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:date:message-id :subject:from:to:content-type:content-transfer-encoding; bh=TVRNkRBudUSnQO3yXXsJfsaN/FjZ0ZJkraoYUWwhbaM=; b=Z3wzRjtwwFtSyAQ0Q6AL3p/8PZbEPjSuB0kf75wOD6aGt7F1CtQoLj5MjnzdQMtdi6 BY8bps4qJPp68JItlQpq13Ee+zi4FKGYNs2v9gyB+wQ/DK4mVG6vx6ITI+35vKOdR+4t d0zNOBsaI0SqWqcfh/ByVPPbg6sAtHg5JjaxE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=xA/ouexme+FpZNk9w3JS5rwIC5XnjoTJxo4LnIgwHXJI91bEk3vEb6cpQXxTEP9xwv ZbZ7C3ybfP6XRhWF6MpV04MSaZqTRGx6fjxd+NNfCaCuC1CqDt8BfRGXah5jYpnH2TwM mPKVQfmImUy2gSUZqL9XAeJIqmlTJlv56Q1T0= MIME-Version: 1.0 Received: by 10.100.34.3 with SMTP id h3mr12644650anh.137.1247069490564; Wed, 08 Jul 2009 09:11:30 -0700 (PDT) Date: Thu, 9 Jul 2009 00:11:29 +0800 Message-ID: <25cb30907080911i2fb3026dq5cf980848c0cd2a8@mail.gmail.com> From: Kevin Foo To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Regression in atkbd? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: chflags@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2009 16:41:45 -0000 Hi list, Did anyone experience issue with atkbd on 8.0? I encountered issue with keyboard and touchpad on HP presario V3400 when trying to upgrade from 7.2-RELEASE to 8.0 prior to and on BETA1.The keyboard and touchpad are working fine on 7.2. On 8.0 prior to BETA1, I managed to obtain dmesg via ssh despite having a non-operational keyboard. The laptop was totally inaccessible on 8.0 BETA1 as it freezed after the line atkbdc0. No information could be obtained. Any ideas? Please let me know if you require more information. Thanks. /boot/device.hints (default, no changes made) hint.atkbdc.0.at="isa" hint.atkbdc.0.port="0x060" hint.atkbd.0.at="atkbdc" hint.atkbd.0.irq="1" hint.psm.0.at="atkbdc" hint.psm.0.irq="12" 1) FreeBSD 8.0-BETA1 amd64 as of today with GENERIC kernel:- <---snip---< atkbdc0: port 0x60,0x64 irq 1 on acpi0 system hangs...... 2) FreeBSD 8.0-CURRENT amd64 prior to BETA1 custom kernel without debug/invariant/witness:- <---snip---< atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 atkbd: the current kbd controller command byte 0047 atkbd: unable to set the command byte. kbd0 at atkbd0 kbd0: atkbd0, generic (0), config:0x0, flags:0x3d0000 ioapic0: routing intpin 1 (ISA IRQ 1) to lapic 0 vector 55 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] psm0: unable to allocate IRQ psmcpnp0: irq 12 on acpi0 psm0: current command byte:0047 psm0: unable to set the command byte. <---snip---< Full verbosed dmesg at http://ms.shit.la/FreeBSD/dmesg.8.txt 3) FreeBSD 7.2-RELEASE-p2 amd64:- <---snip---< atkbdc0: port 0x60,0x64 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 atkbd: the current kbd controller command byte 0047 atkbd: keyboard ID 0x41ab (2) kbd0 at atkbd0 kbd0: atkbd0, AT 101/102 (2), config:0x0, flags:0x3d0000 ioapic0: routing intpin 1 (ISA IRQ 1) to vector 57 atkbd0: [GIANT-LOCKED] atkbd0: [ITHREAD] psm0: unable to allocate IRQ psmcpnp0: irq 12 on acpi0 psm0: current command byte:0047 psm0: irq 12 on atkbdc0 ioapic0: routing intpin 12 (ISA IRQ 12) to vector 58 psm0: [GIANT-LOCKED] psm0: [ITHREAD] psm0: model IntelliMouse, device ID 3-00, 3 buttons psm0: config:00000000, flags:00000008, packet size:4 psm0: syncmask:08, syncbits:00 <---snip---< Full verbosed dmesg at http://ms.shit.la/FreeBSD/dmesg.7.txt -- Regards Kevin Foo From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 8 17:28:25 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58A631065676 for ; Wed, 8 Jul 2009 17:28:25 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 330D58FC19 for ; Wed, 8 Jul 2009 17:28:25 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id B3EA446B8B; Wed, 8 Jul 2009 13:28:24 -0400 (EDT) Date: Wed, 8 Jul 2009 18:28:24 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Wojciech Puchar In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: What's changed between 7.1 and 7.2 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, 08 Jul 2009 17:28:25 -0000 On Wed, 8 Jul 2009, Wojciech Puchar wrote: > i'm getting that crap every time i remount filesystem and on startup. > GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. > GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. > GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. > GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. > GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. > GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. > GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. > GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. > > i'm using glabel only to avoid mess about what drive is connected to what > SATA port. This is effectively debugging output that slipped into the release and shouldn't have. I believe it's now removed in 8.x, I'm not sure it's been MFC'd to 7.x yet. The output can be entirely ignored and does not reflect a problem, just state changes resulting from a volume becoming visible to geom, and then the label name being removed following mount. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 8 17:55:16 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0DE51065670; Wed, 8 Jul 2009 17:55:16 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 942F38FC16; Wed, 8 Jul 2009 17:55:16 +0000 (UTC) (envelope-from dimitry@andric.com) Received: from [IPv6:2001:7b8:3a7:0:d455:b5b9:39e2:d9a3] (unknown [IPv6:2001:7b8:3a7:0:d455:b5b9:39e2:d9a3]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 888285C59; Wed, 8 Jul 2009 19:55:15 +0200 (CEST) Message-ID: <4A54DD82.50900@andric.com> Date: Wed, 08 Jul 2009 19:55:14 +0200 From: Dimitry Andric User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.1pre) Gecko/20090705 Shredder/3.0b3pre MIME-Version: 1.0 To: Wojciech Puchar References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Robert Watson Subject: Re: What's changed between 7.1 and 7.2 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, 08 Jul 2009 17:55:17 -0000 On 2009-07-08 19:28, Robert Watson wrote: > This is effectively debugging output that slipped into the release and > shouldn't have. I believe it's now removed in 8.x, I'm not sure it's been > MFC'd to 7.x yet. It was indeed removed, with r193131. The diff here: http://svn.freebsd.org/viewvc/base/head/sys/geom/label/g_label.c?view=patch&r1=193131&r2=193130&pathrev=193131 should apply to 7.x without problems. From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 9 04:09:25 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19ED6106570F for ; Thu, 9 Jul 2009 04:09:25 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out3.uni-muenster.de (ZIVM-OUT3.UNI-MUENSTER.DE [128.176.192.18]) by mx1.freebsd.org (Postfix) with ESMTP id A0FC18FC19 for ; Thu, 9 Jul 2009 04:09:24 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.42,370,1243807200"; d="scan'208";a="7938388" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay3.uni-muenster.de with ESMTP; 09 Jul 2009 00:42:09 +0200 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id 570091B008B; Thu, 9 Jul 2009 00:42:09 +0200 (CEST) Date: Thu, 09 Jul 2009 00:42:09 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: Bob Bishop , Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, "Paul B. Mahol" Subject: Re: mmap/munmap with zero length 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, 09 Jul 2009 04:09:25 -0000 so. doesn't that mean that actually freebsd's mmap implementation needs to = be changed in order to return an error if one tries to allocate space with len= =3D0? alex Bob Bishop schrieb am 2009-07-06: > Hi, > On 6 Jul 2009, at 13:14, Dag-Erling Sm=F8rgrav wrote: > >Allocating or mapping a zero-length region is not necessarily a bug. > POSIX says it is, IIRC. > -- > Bob Bishop > rb@gid.co.uk From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 9 04:11:03 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 233DE1065899 for ; Thu, 9 Jul 2009 04:11:03 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) Received: from zivm-out2.uni-muenster.de (ZIVM-OUT2.UNI-MUENSTER.DE [128.176.192.9]) by mx1.freebsd.org (Postfix) with ESMTP id AB5DC8FC15 for ; Thu, 9 Jul 2009 04:11:02 +0000 (UTC) (envelope-from a_best01@uni-muenster.de) X-IronPort-AV: E=Sophos;i="4.42,370,1243807200"; d="scan'208";a="218199875" Received: from zivmaildisp2.uni-muenster.de (HELO ZIVMAILUSER04.UNI-MUENSTER.DE) ([128.176.188.143]) by zivm-relay2.uni-muenster.de with ESMTP; 09 Jul 2009 00:43:45 +0200 Received: by ZIVMAILUSER04.UNI-MUENSTER.DE (Postfix, from userid 149459) id DB0531B008B; Thu, 9 Jul 2009 00:43:45 +0200 (CEST) Date: Thu, 09 Jul 2009 00:43:45 +0200 (CEST) From: Alexander Best Sender: Organization: Westfaelische Wilhelms-Universitaet Muenster To: "Carlos A. M. dos Santos" , Dag-Erling =?iso-8859-1?Q?Sm=F8rgrav?= Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: rick-freebsd2008@kiwi-computer.com, freebsd-hackers@freebsd.org Subject: Re: c question: *printf'ing arrays 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, 09 Jul 2009 04:11:03 -0000 thx for all the great help guys. cheers, alex Carlos A. M. dos Santos schrieb am 2009-07-02: > 2009/7/2 Dag-Erling Sm=F8rgrav : > > Alexander Best writes: > >> =A0 =A0 for (i=3D0; i < sizeof(hdr->nintendo_logo); i++) > >> =A0 =A0 =A0 =A0 fprintf(stderr, "%x", hdr->nintendo_logo[i]); > > What will this print if nintendo_logo is { 0x01, 0x02, 0x03, 0x04 > > }? > Good catch. It will print "0x1234" but it should print "0x01020304". > My example has the same error. The conversion specification should be > "%02x", not just "%x". From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 9 11:50:30 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A13B61065673; Thu, 9 Jul 2009 11:50:30 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from baranao.anywi.com (baranao.anywi.com [213.207.101.176]) by mx1.freebsd.org (Postfix) with ESMTP id 3A6248FC1A; Thu, 9 Jul 2009 11:50:30 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from hind.van-laarhoven.org (ip51cfcfde.direct-adsl.nl [81.207.207.222]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by baranao.anywi.com (Postfix) with ESMTPSA id 51C233F420; Thu, 9 Jul 2009 13:33:44 +0200 (CEST) From: Nick Hibma To: freebsd-hackers@freebsd.org Date: Thu, 9 Jul 2009 13:33:34 +0200 User-Agent: KMail/1.11.4 (FreeBSD/7.2-STABLE; KDE/4.2.4; i386; ; ) References: <4A54DD82.50900@andric.com> In-Reply-To: <4A54DD82.50900@andric.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907091333.35829.nick@van-laarhoven.org> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,UNPARSEABLE_RELAY autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on baranao.anywi.com Cc: Wojciech Puchar , Dimitry Andric , Robert Watson Subject: Re: What's changed between 7.1 and 7.2 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, 09 Jul 2009 11:50:32 -0000 The debugging printf has been changed to not print anything if debuglevel is 0. Nick > On 2009-07-08 19:28, Robert Watson wrote: > > This is effectively debugging output that slipped into the release and > > shouldn't have. I believe it's now removed in 8.x, I'm not sure it's > > been MFC'd to 7.x yet. > > It was indeed removed, with r193131. The diff here: > > http://svn.freebsd.org/viewvc/base/head/sys/geom/label/g_label.c?view=pat >ch&r1=193131&r2=193130&pathrev=193131 > > should apply to 7.x without problems. > _______________________________________________ > 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 Fri Jul 10 03:27:21 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EDCF106566B for ; Fri, 10 Jul 2009 03:27:21 +0000 (UTC) (envelope-from prvs=1435d1a1eb=brian@FreeBSD.org) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id D64268FC14 for ; Fri, 10 Jul 2009 03:27:20 +0000 (UTC) (envelope-from prvs=1435d1a1eb=brian@FreeBSD.org) Received: from pd3ml2so-ssvc.prod.shaw.ca ([10.0.141.138]) by pd3mo1so-svcs.prod.shaw.ca with ESMTP; 09 Jul 2009 20:59:24 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=1 a=99AOUS-vcKkA:10 a=4Z0QP1WVBuUwHZGQKe2N1A==:17 a=MMwg4So0AAAA:8 a=6I5d2MoRAAAA:8 a=Hoh7GRYj2ynWW_LdzRgA:9 a=U7MIYQtoJae2e6hsXfIA:7 a=o0kXK6_BWJwjjGXuWURpBiGsXi0A:4 a=WJ3hkfHDukgA:10 a=SV7veod9ZcQA:10 a=949dtVRXNA7K9M0AW3kA:9 a=Igua4fBhzcqwAfiYIIC_2-nmAAMA:4 Received: from unknown (HELO store.lan.Awfulhak.org) ([174.7.23.140]) by pd3ml2so-dmz.prod.shaw.ca with ESMTP; 09 Jul 2009 20:59:24 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 9CCDFC433AC_A56AEC7B for ; Fri, 10 Jul 2009 03:00:23 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id 41184C460F7_A56AEC7F for ; Fri, 10 Jul 2009 03:00:23 +0000 (GMT) Received: from dev.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by gw.Awfulhak.org (8.14.3/8.14.3) with ESMTP id n6A2xNlP042804; Thu, 9 Jul 2009 19:59:23 -0700 (PDT) (envelope-from brian@FreeBSD.org) Date: Thu, 9 Jul 2009 19:59:15 -0700 From: Brian Somers To: hackers@FreeBSD.org Message-ID: <20090709195915.35556269@dev.lan.Awfulhak.org> X-Mailer: Claws Mail 3.7.1 (GTK+ 2.16.4; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/r7KTIQKnPquhHVBxoigDG.q"; protocol="application/pgp-signature" Cc: Subject: make {,re}installkernel{,.debug} 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, 10 Jul 2009 03:27:21 -0000 --Sig_/r7KTIQKnPquhHVBxoigDG.q Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi, I'd like to change the way ``make {,re}installkernel{,.debug}'' works. Currently we have this: - GENERIC contains ``makeoptions DEBUG=3D-g''. This puts DEBUG=3D-g into /usr/obj/usr/src/sys/GENERIC/Makefile - ``make {,re}installkernel'' installs *.ko.symbols if DEBUG is set (which it is - as per above). - ``make {,re}installkernel'' ignores *.ko.symbols if INSTALL_NODEBUG is set. - ``make {,re}installkernel.debug'' does the same as the non-.debug version but if DEBUG is defined, also installs .gdbinit and support files into /usr/obj/usr/src/sys/GENERIC/. I find this a little odd. My proposed change (see below) does this: - GENERIC contains ``makeoptions DEBUG=3D-g'' as before. - ``make {,re}installkernel'' ignores *.ko.symbols - ``make {,re}installkernel.debug'' installs *.ko.symbols and puts .gdbinit & friends into /usr/obj/usr/src/sys/GENERIC/ as before - if available (ie., if DEBUG is set). - INSTALL_NODEBUG goes away. I think this is much clearer. The net result would be that those of us who currently "make installkernel" will go back to having no symbol files (as was the case in FreeBSD-6 if INSTALL_DEBUG wasn't defined). One might argue that *not* installing .gdbinit & friends into a kernel object directory that has symbols is a mistake, but AFAIR that conversation included too many opinions last time it was discussed. Opinions? Index: tools/tools/nanobsd/gateworks/common =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- tools/tools/nanobsd/gateworks/common (revision 195527) +++ tools/tools/nanobsd/gateworks/common (working copy) @@ -156,7 +156,6 @@ install_kernel() =20 cd ${NANO_SRC} env TARGET_ARCH=3D${NANO_ARCH} ${NANO_PMAKE} installkernel \ - INSTALL_NODEBUG=3Dtrue \ DESTDIR=3D${NANO_WORLDDIR} \ __MAKE_CONF=3D${NANO_MAKE_CONF} KERNCONF=3D`basename ${NANO_KERNEL}` \ > ${MAKEOBJDIRPREFIX}/_.ik 2>&1 Index: sys/conf/kern.post.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/conf/kern.post.mk (revision 195516) +++ sys/conf/kern.post.mk (working copy) @@ -18,13 +18,13 @@ MKMODULESENV+=3D KERNBUILDDIR=3D"${.CURDIR}" SYSDIR=3D"$ .MAIN: all =20 .for target in all clean cleandepend cleandir clobber depend install \ - obj reinstall tags + install.debug obj reinstall reinstall.debug tags ${target}: kernel-${target} .if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modu= les) ${target}: modules-${target} modules-${target}: cd $S/modules; ${MKMODULESENV} ${MAKE} \ - ${target:S/^reinstall$/install/:S/^clobber$/cleandir/} + ${target:S/^reinstall$/install/:S/^reinstall.debug$/install.debug/:S/= ^clobber$/cleandir/} .endif .endfor =20 @@ -69,7 +69,6 @@ ${KERNEL_KO}: ${FULLKERNEL} ${KERNEL_KO}.symbols ${KERNEL_KO}.symbols: ${FULLKERNEL} ${OBJCOPY} --only-keep-debug ${FULLKERNEL} ${.TARGET} install.debug reinstall.debug: gdbinit - cd ${.CURDIR}; ${MAKE} ${.TARGET:R} =20 # Install gdbinit files for kernel debugging. gdbinit: @@ -197,7 +196,7 @@ kernel-tags: @[ -f .depend ] || { echo "you must make depend first"; exit 1; } sh $S/conf/systags.sh =20 -kernel-install: +kernel-install kernel-install.debug: @if [ ! -f ${KERNEL_KO} ] ; then \ echo "You must build a kernel first." ; \ exit 1 ; \ @@ -218,7 +217,7 @@ kernel-tags: .endif mkdir -p ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}$= {KODIR} -.if defined(DEBUG) && !defined(INSTALL_NODEBUG) +.if defined(DEBUG) && ${.TARGET:E} =3D=3D .debug ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${D= ESTDIR}${KODIR} .endif .if defined(KERNEL_EXTRA_INSTALL) @@ -227,10 +226,10 @@ kernel-tags: =20 =20 =20 -kernel-reinstall: +kernel-reinstall kernel-reinstall.debug: @-chflags -R noschg ${DESTDIR}${KODIR} ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}$= {KODIR} -.if defined(DEBUG) && !defined(INSTALL_NODEBUG) +.if defined(DEBUG) && ${.TARGET:E} =3D=3D .debug ${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${D= ESTDIR}${KODIR} .endif =20 Index: sys/conf/kmod.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/conf/kmod.mk (revision 195516) +++ sys/conf/kmod.mk (working copy) @@ -46,6 +46,10 @@ # # +++ targets +++ # +# install.debug: +# Depends on install, then installs the kernel module with +# symbols. +# # install: # install the kernel module; if the Makefile # does not itself define the target install, the targets @@ -269,10 +273,6 @@ realinstall: _kmodinstall _kmodinstall: ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR} -.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) - ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ - ${_INSTALLFLAGS} ${PROG}.symbols ${DESTDIR}${KMODDIR} -.endif =20 .include =20 @@ -290,6 +290,16 @@ _kldxref: =20 .endif # !target(install) =20 +.if !target(install.debug) +install.debug: +.if defined(DEBUG_FLAGS) + ${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \ + ${_INSTALLFLAGS} ${PROG}.symbols ${DESTDIR}${KMODDIR} +.endif +.endif # !target(install.debug) + +install.debug: install + .if !target(load) load: ${PROG} ${KMODLOAD} -v ${.OBJDIR}/${PROG} Index: UPDATING =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- UPDATING (revision 195527) +++ UPDATING (working copy) @@ -22,6 +22,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW: to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) =20 +20090709: + The use of INSTALL_NODEBUG has been deprecated and symbol files + are no longer installed by default. To install kernel and + module symbol files, use the {,re}installkernel.debug target. + 20090630: The NFS_LEGACYRPC option has been removed along with the old kernel RPC implementation that this option selected. Kernel Index: Makefile =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- Makefile (revision 195527) +++ Makefile (working copy) @@ -11,9 +11,9 @@ # world - buildworld + installworld, no kernel. # buildkernel - Rebuild the kernel and the kernel-modules. # installkernel - Install the kernel and the kernel-modules. -# installkernel.debug +# installkernel.debug - Also install kernel and module symbols. # reinstallkernel - Reinstall the kernel and the kernel-modules. -# reinstallkernel.debug +# reinstallkernel.debug - Also reinstall kernel and module symbols. # kernel - buildkernel + installkernel. # doxygen - Build API documentation of the kernel, needs doxyg= en. # update - Convenient way to update your source tree (cvs). Index: Makefile.inc1 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- Makefile.inc1 (revision 195527) +++ Makefile.inc1 (working copy) @@ -682,6 +682,9 @@ distrib-dirs distribution: # for building kernels and only the first of these is designated # as the one being installed. # +# If your kernel is built with DEBUG set, installkernel.debug +# will additionally install kernel and module symbols. +# # Note that we have to use TARGET instead of TARGET_ARCH when # we're in kernel-land. Since only TARGET_ARCH is (expected) to # be set to cross-build, we have to make sure TARGET is set Index: share/mk/bsd.subdir.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- share/mk/bsd.subdir.mk (revision 195516) +++ share/mk/bsd.subdir.mk (working copy) @@ -67,7 +67,7 @@ ${SUBDIR}: .PHONY =20 .for __target in all all-man checkdpadd clean cleandepend cleandir \ depend distribute lint maninstall manlint \ - obj objlink realinstall regress tags \ + obj objlink realinstall install.debug regress tags \ ${SUBDIR_TARGETS} ${__target}: _SUBDIR .endfor --=20 Brian Somers Don't _EVER_ lose your sense of humour ! --Sig_/r7KTIQKnPquhHVBxoigDG.q Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iQCVAwUBSlauig7tvOdmanQhAQLX1gP6A/w7s8+I/O4G8eg6JWz5/F615QgR2DfC 2rYwHqncxfyuq47S3uNhYpLAH0Lxir7iQI3Fis5jc5SMtmDLjeZz0AdSIOpFYGlT 3NwIcYyPbEvcF2YmXNb6izYEM27frfnGH3vmDbjfpQXGMA1GNAGFS1gcIHwG/8+X d6d6/n9k5MI= =dDYK -----END PGP SIGNATURE----- --Sig_/r7KTIQKnPquhHVBxoigDG.q-- From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 10 09:52:45 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD0D2106564A for ; Fri, 10 Jul 2009 09:52:45 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 685098FC0C for ; Fri, 10 Jul 2009 09:52:45 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MPCmZ-00074C-7T for freebsd-hackers@freebsd.org; Fri, 10 Jul 2009 09:52:43 +0000 Received: from lara.cc.fer.hr ([161.53.72.113]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Jul 2009 09:52:43 +0000 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Jul 2009 09:52:43 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Fri, 10 Jul 2009 11:52:31 +0200 Lines: 26 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Thunderbird 2.0.0.21 (X11/20090615) In-Reply-To: Sender: news Subject: Re: What's changed between 7.1 and 7.2 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, 10 Jul 2009 09:52:45 -0000 Robert Watson wrote: > > On Wed, 8 Jul 2009, Wojciech Puchar wrote: > >> i'm getting that crap every time i remount filesystem and on startup. >> GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. >> GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. >> GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. >> GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. >> GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. >> GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. >> GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. >> GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. >> >> i'm using glabel only to avoid mess about what drive is connected to >> what SATA port. > > This is effectively debugging output that slipped into the release and > shouldn't have. I believe it's now removed in 8.x, I'm not sure it's > been MFC'd to 7.x yet. The output can be entirely ignored and does not > reflect a problem, just state changes resulting from a volume becoming > visible to geom, and then the label name being removed following mount. If it's desireable to MFC it now, I'll do it. (but it will remove the above output for all glabel labels, not only ufs). From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 10 11:08:59 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00D5B106566B; Fri, 10 Jul 2009 11:08:59 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id CF9138FC0A; Fri, 10 Jul 2009 11:08:58 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id 875C746BA0; Fri, 10 Jul 2009 07:08:58 -0400 (EDT) Date: Fri, 10 Jul 2009 12:08:58 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Ivan Voras In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-hackers@freebsd.org Subject: Re: What's changed between 7.1 and 7.2 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, 10 Jul 2009 11:08:59 -0000 On Fri, 10 Jul 2009, Ivan Voras wrote: > Robert Watson wrote: >> >> On Wed, 8 Jul 2009, Wojciech Puchar wrote: >> >>> i'm getting that crap every time i remount filesystem and on startup. >>> GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. >>> GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. >>> GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. >>> GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. >>> GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. >>> GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. >>> GEOM_LABEL: Label ufsid/48dd2cbe8423dd9e removed. >>> GEOM_LABEL: Label for provider mirror/sysa is ufsid/48dd2cbe8423dd9e. >>> >>> i'm using glabel only to avoid mess about what drive is connected to what >>> SATA port. >> >> This is effectively debugging output that slipped into the release and >> shouldn't have. I believe it's now removed in 8.x, I'm not sure it's been >> MFC'd to 7.x yet. The output can be entirely ignored and does not reflect >> a problem, just state changes resulting from a volume becoming visible to >> geom, and then the label name being removed following mount. > > If it's desireable to MFC it now, I'll do it. > > (but it will remove the above output for all glabel labels, not only ufs). I think it would be widely appreciated. :-) Robert N M Watson Computer Laboratory University of Cambridge