From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 29 13:10:09 2010 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 0D8991065697; Sun, 29 Aug 2010 13:10:09 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 652248FC16; Sun, 29 Aug 2010 13:10:08 +0000 (UTC) Received: by fxm4 with SMTP id 4so3260857fxm.13 for ; Sun, 29 Aug 2010 06:10:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:x-enigmail-version:content-type :content-transfer-encoding; bh=VJBM3LNnn+8sZAn5z0gPqGKFyWdakafvfONZW5uz35g=; b=i8hFCTuTyEiWV9ad3D/y7n+B5IOCtcXM19/8hY6nHpf8iYjiKYE6Jd33vliP9pJhp6 Xz6J9hCf4RxcsiSN4mv7CzYxK1PNtHZ6tQIp76COZH5dp4BbAgc4GQqvCtubdF0DAdeF mZW4Ov6Ako15TdCuyYAvp3eg+KSbnf+pWCvTc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :x-enigmail-version:content-type:content-transfer-encoding; b=ALW2DigD8uCa8UfODwvXtiEENdL+mxzkfjXYNfJeLQZBx+q7q/RcOlILAr+Avb4/nd Av5JnTdrehN1JUelYn0FVp07ZcRQ+B99CVrhGlIQXvAAVE1VRJnDkAxBe6FDZ7/vm1Rl 4iR22xwZ4jxBrc34ltWKZdqmy4XKpQOSk98VI= Received: by 10.223.110.79 with SMTP id m15mr1838858fap.22.1283087407207; Sun, 29 Aug 2010 06:10:07 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id f28sm2856209faa.24.2010.08.29.06.10.05 (version=SSLv3 cipher=RC4-MD5); Sun, 29 Aug 2010 06:10:06 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C7A5C28.1090904@FreeBSD.org> Date: Sun, 29 Aug 2010 16:10:00 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: FreeBSD-Current , freebsd-hackers@freebsd.org X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: Subject: One-shot-oriented event timers management 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, 29 Aug 2010 13:10:09 -0000 Hi. I would like to present my new work on timers management code. In my previous work I was mostly orienting on reimplementing existing functionality in better way. The result seemed not bad, but after looking on perspectives of using event timers in one-shot (aperiodic) mode I've understood that implemented code complexity made it hardly possible. So I had to significantly cut it down and rewrite from the new approach, which is instead primarily oriented on using timers in one-shot mode. As soon as some systems have only periodic timers I have left that functionality, though it was slightly limited. New management code implements two modes of operation: one-shot and periodic. Specific mode to be used depends on hardware capabilities and can be controlled. In one-shot mode hardware timers programmed to generate single interrupt precisely at the time of next wanted event. It is done by comparing current binuptime with next scheduled times of system events (hard-/stat-/profclock). This approach has several benefits: event timer precision is now irrelevant for system timekeeping, hard- and statclocks are not aliased, while only one timer used for it, and the most important -- it allows us to define which events and when exactly we really want to handle, without strict dependence on fixed hz, stathz, profhz periods. Sure, our callout system is highly depends on hz value, but now at least we can skip interrupts when we have no callouts to handle at the time. Later we can go further. Periodic mode now also uses alike principals of scheduling events. But timer running in periodic mode just unable to handle arbitrary events and as soon as event timers may not be synchronized to system timecounter and may drift from it, causing jitter effects. So I've used for time source of scheduling the timer events themselves. As result, periodic timer runs on fixed frequency multiply to hz rate, while statclock and profclock generated by dividing it respectively. (If somebody would tell me that hardclock jitter is not really a big problem, I would happily rip that artificial timekeeping out of there to simplify code.) Unluckily this approach makes impossible to use two events timers to completely separate hard- and statclocks any more, but as I have said, this mode is required only for limited set of systems without one-shot capable timers. Looking on my recent experience with different platforms, it is not a big fraction. Management code is still handles both per-CPU and global timers. Per-CPU timers usage is obvious. Global timer is programmed to handle all CPUs needs. In periodic mode global timer generates periodic interrupts to some one CPU, while management code then redistributes them to CPUs that really need it, using IPI. In one-shot mode timer is always programmed to handle first scheduled event throughout the system. When that interrupt arrives, it is also getting redistributed to wanting CPUs with IPI. To demonstrate features that could be obtained from so high flexibility I have incorporated the idea and some parts of dynamic ticks patches of Tsuyoshi Ozawa. Now, when some CPU goes down into C2/C3 ACPI sleep state, that CPU stops scheduling of hard-/stat-/profclock events until the next registered callout event. If CPU wakes up before that time by some unrelated interrupt, missed ticks are called artificially (it is needed now to keep realistic system stats). After system is up to date, interrupt is handled. Now it is implemented only for ACPI systems with C2/C3 states support, because ACPI resumes CPU with interrupts disabled, that allows to keep up missed time before interrupt handler or some other process (in case of unexpected task switch) may need it. As I can see, Linux does alike things in the beginning of every interrupt handler. I have actively tested this code for a few days on my amd64 Core2Duo laptop and i386 Core-i5 desktop system. With C2/C3 states enabled systems experience only about 100-150 interrupts per second, having HZ set to 1000. These events mostly caused by several event-greedy processes in our tree. I have traced and hacked several most aggressive ones in this patch: http://people.freebsd.org/~mav/tm6292_idle.patch . It allowed me to reduce down to as low as 50 interrupts per system, including IPIs! Here is the output of `systat -vm 1` from my test system: http://people.freebsd.org/~mav/systat_w_oneshot.txt . Obviously that with additional tuning the results can be improved even more. My latest patch against 9-CURRENT can be found here: http://people.freebsd.org/~mav/timers_oneshot4.patch Comments, ideas, propositions -- welcome! Thanks to all who read this. ;) -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 29 14:41:54 2010 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 CE157106566C for ; Sun, 29 Aug 2010 14:41:54 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 8728A8FC08 for ; Sun, 29 Aug 2010 14:41:54 +0000 (UTC) Received: by qyk8 with SMTP id 8so2325231qyk.13 for ; Sun, 29 Aug 2010 07:41:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=VzE7hrlJ8g3p47xiLfsE2ZmujAZf9b7LrfEoat6TLJA=; b=NzGJpT0z6yfwBtYRwJ+XAovCZETT5ujTyA3LpljE3uloHoQsQ9kXbJGDso8aD323P0 T0LkhRfJARMa1xJ8RsxxFMOdHG+JZ7tnQEBGbPpFHnntXqR3XU13zzD78OPMRPZ9kfRQ P87SwQlLoPw1oQVH8VIIzMwEnuthREIQfJUrk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Koqqw0vrmCR1veCH4Xk6KbpqBwgB9MhhJuXuoY/m+le6Ko9I0cft+otrENKtB3TGQ2 CI8UV58r6OL7ivhwZTz3olqgVBjOa3YNpFNV5x7Vgl8qcQN2h3V3QC5k9JTQV5D7jwSG qq/GeeUyL9g5e2bQIKUwtdcXvAUK2doXtJlxI= MIME-Version: 1.0 Received: by 10.229.215.19 with SMTP id hc19mr2217072qcb.107.1283091529295; Sun, 29 Aug 2010 07:18:49 -0700 (PDT) Received: by 10.229.246.68 with HTTP; Sun, 29 Aug 2010 07:18:48 -0700 (PDT) Date: Sun, 29 Aug 2010 16:18:48 +0200 Message-ID: From: Davide Italiano To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: System freezes unexpectly 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, 29 Aug 2010 14:41:54 -0000 Hi. I'm running 8.1 on my Sony Vaio laptop, with dwm as window manager on lastest Xorg on ports. When I'm trying to run firefox3, the system "freezes" unexpectly. I know that "freezes" is a bit generic but I can't find a more specific term to describe the situation. Dmesg doesn't give useful infos. I installed firefox using pkg_add -r , the only add-on/plugin installed is Xmarks. I'm ready to eventually debug, any suggestion is apprectiated. Thanks Davide From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 29 16:27:07 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id F1B791065675; Sun, 29 Aug 2010 16:27:07 +0000 (UTC) Date: Sun, 29 Aug 2010 16:27:07 +0000 From: Alexander Best To: freebsd-hackers@freebsd.org Message-ID: <20100829162707.GA98059@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="KsGdsel6WgEHnImy" Content-Disposition: inline Subject: hexdump(1)/od(1) skip function off-by-one when offset == file 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, 29 Aug 2010 16:27:08 -0000 --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline just discovered this issue while going through some linux mailinglists: otaku% dd if=/dev/urandom of=testfile bs=1 count=42 42+0 records in 42+0 records out 42 bytes transferred in 0.000393 secs (106894 bytes/sec) otaku% hexdump -s 42 testfile 000002a 134d b7b9 e085 da16 63b0 554a 1603 ead0 000003a 4bd1 fbfd c329 b606 e592 1377 6e10 4b9d 000004a c018 0fc9 ebf4 9ae2 9f1a 0000054 otaku% hexdump -s 43 testfile 000002a otaku% hexdump -s 41 testfile 0000029 009f 000002a the attached patch fixes this issue for HEAD. i also checked out any license issues which could pop up. this fix comes from the util-linux-ng repository [1] which seems entirely GPLv2'ed. :) cheers. alex [1] http://git.kernel.org/?p=utils/util-linux-ng/util-linux-ng.git;a=tree;hb=HEAD ps: no fix for od(1) necessary since it's simply a hardlink to hexdump(1). ;) -- a13x --KsGdsel6WgEHnImy Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="display.c.patch" diff --git a/usr.bin/hexdump/display.c b/usr.bin/hexdump/display.c index db04c49..3e3d903 100644 --- a/usr.bin/hexdump/display.c +++ b/usr.bin/hexdump/display.c @@ -378,7 +378,7 @@ doskip(const char *fname, int statok) if (statok) { if (fstat(fileno(stdin), &sb)) err(1, "%s", fname); - if (S_ISREG(sb.st_mode) && skip >= sb.st_size) { + if (S_ISREG(sb.st_mode) && skip > sb.st_size) { address += sb.st_size; skip -= sb.st_size; return; --KsGdsel6WgEHnImy-- From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 29 16:33:45 2010 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 E28601065670 for ; Sun, 29 Aug 2010 16:33:45 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 9EF358FC0C for ; Sun, 29 Aug 2010 16:33:45 +0000 (UTC) Received: by qyk8 with SMTP id 8so2376423qyk.13 for ; Sun, 29 Aug 2010 09:33:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=kUmdH34V0AIr4u/yLa2M0TsX6RzdGX/pGTZnKZK9SE4=; b=HEC9Tjr74sEoQO2z6Lekrh9H3MnS+CrdZqrlG42Q+eCcxTuBwLvbtrV1+sqkzxwgfg PCxXkaTY5D2cy17Iq+6I7FQId8cEARBIGb/qClYl1CqF/2ENO8bY0RePyg9PKftCNcdX UMod/zqeEgX/liDZen77vkr11qlWxKx50BmBY= 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=Y22Hg0yNTrKK/cms2ioGii5/krpylcCF+3TO2mNuZdmjayG+4wsCw5lO0S23ksru45 nYeAafdRdSQJtEHgQiWomJzj4VshJybV0B6Y153jcWpW4eXdl/JwX/sZpLq2RoncXGMi nBA8EB6OwsK32kEpLwgOlkTvL7CeJt3LxfZ4k= MIME-Version: 1.0 Received: by 10.224.105.199 with SMTP id u7mr2208039qao.131.1283099624591; Sun, 29 Aug 2010 09:33:44 -0700 (PDT) Received: by 10.229.246.68 with HTTP; Sun, 29 Aug 2010 09:33:44 -0700 (PDT) In-Reply-To: <4C7A8ACD.9020201@gmail.com> References: <4C7A8ACD.9020201@gmail.com> Date: Sun, 29 Aug 2010 18:33:44 +0200 Message-ID: From: Davide Italiano To: Glen Barber Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: System freezes unexpectly 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, 29 Aug 2010 16:33:46 -0000 On Sun, Aug 29, 2010 at 6:29 PM, Glen Barber wrote: > On 8/29/10 10:18 AM, Davide Italiano wrote: >> Hi. >> I'm running 8.1 on my Sony Vaio laptop, with dwm as window manager on >> lastest Xorg on ports. >> When I'm trying to run firefox3, the system "freezes" unexpectly. I >> know that "freezes" is a bit generic but I can't find a more specific >> term to describe the situation. Dmesg doesn't give useful infos. >> >> I installed firefox using pkg_add -r , the only add-on/plugin >> installed is Xmarks. >> >> I'm ready to eventually debug, any suggestion is apprectiated. >> > > Hi Davide, > > Can you run firefox from xterm and check for any errors that might be > generated? > > Cheers, > > -- > Glen Barber > Tried doing this. But no output. From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 29 16:55:22 2010 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 384821065695 for ; Sun, 29 Aug 2010 16:55:22 +0000 (UTC) (envelope-from glen.j.barber@gmail.com) Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id DA0348FC19 for ; Sun, 29 Aug 2010 16:55:21 +0000 (UTC) Received: by qyk4 with SMTP id 4so4923122qyk.13 for ; Sun, 29 Aug 2010 09:55:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=8UCSO2H1W0/QJ7dz2lqWadonjoGVGtrcXNu9z/OU0ew=; b=JuB8mNacN3Jcb982zWWo3bRexAs3vKAL4iNxgBsAsczeGqnqIuoRFEnq/k7/raDPzt y2yk1mdgS0F5F4bVbDwz7mHHCVs0tKhCAM18MLjwfGDSL+lkTHm4nfbq2BSkMSIpIxvK oWtX+69GrlDN/bg4MtXLADbM94xh2kihWmbk0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=angT5C/M5+C6o1iZCLy/ug7XNpSb5qbCnbMOELwBioQMXF8l1yRP9aICZfhZQeZVnN nBEk9k6ZC7+kdZtQ21UI8yXruMQ7RGIKoI96o0PKf5dmUgrXQjUXT3GSxfUiAomDQW++ CfzK3iciBNxz9IBVQdn4JUHuKneagKjmqvrTc= Received: by 10.229.224.137 with SMTP id io9mr2309852qcb.206.1283099344850; Sun, 29 Aug 2010 09:29:04 -0700 (PDT) Received: from schism.local (75.97.128.170.res-cmts.sewb.ptd.net [75.97.128.170]) by mx.google.com with ESMTPS id r1sm7184644qcq.34.2010.08.29.09.29.02 (version=SSLv3 cipher=RC4-MD5); Sun, 29 Aug 2010 09:29:03 -0700 (PDT) Message-ID: <4C7A8ACD.9020201@gmail.com> Date: Sun, 29 Aug 2010 12:29:01 -0400 From: Glen Barber User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: Davide Italiano References: In-Reply-To: X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: System freezes unexpectly 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, 29 Aug 2010 16:55:22 -0000 On 8/29/10 10:18 AM, Davide Italiano wrote: > Hi. > I'm running 8.1 on my Sony Vaio laptop, with dwm as window manager on > lastest Xorg on ports. > When I'm trying to run firefox3, the system "freezes" unexpectly. I > know that "freezes" is a bit generic but I can't find a more specific > term to describe the situation. Dmesg doesn't give useful infos. > > I installed firefox using pkg_add -r , the only add-on/plugin > installed is Xmarks. > > I'm ready to eventually debug, any suggestion is apprectiated. > Hi Davide, Can you run firefox from xterm and check for any errors that might be generated? Cheers, -- Glen Barber From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 29 20:04:18 2010 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 2AC6410656A8 for ; Sun, 29 Aug 2010 20:04:18 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 83C468FC0C for ; Sun, 29 Aug 2010 20:04:17 +0000 (UTC) Received: by bwz20 with SMTP id 20so3866298bwz.13 for ; Sun, 29 Aug 2010 13:04:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=ALOROuIMF6zv0GmIvejXUZY7sqUfGrDieqbaR+fc/FQ=; b=bWHmlFpQhq6VLga6hPHc6bd3Gh/IG8+amaU3u5HQSZ0HS0j0j3+k5Mf5lkgjPJXVoQ /6hvqnwAq4+Rv7izb0ELxzvrbWlZ3IotzFNmXThLChaWfR77iq4p/CuwFWFvQ+gH3mOY y3uGVeDF6lZ1x6H9pMJEIFlDp7VTfgn9t+ZkM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=DOHMOyzFDkRL4dulHB4YnZLWeiy8qHq/+kVFhAiykMj5+aUiFiWg+ZOna0anq2neiv aIzWbR+EOAtoDVe0GgxycpgYLhmwgTxGsw7/e8K0E68j+aPlD01PoF2LFRMbGI0jhTDY bG3D2sOlQxDKLMmDVuHpyEoPKvWoHbyd3Byfw= MIME-Version: 1.0 Received: by 10.204.57.9 with SMTP id a9mr2531819bkh.104.1283112256396; Sun, 29 Aug 2010 13:04:16 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.204.113.79 with HTTP; Sun, 29 Aug 2010 13:04:16 -0700 (PDT) In-Reply-To: <20100829162707.GA98059@freebsd.org> References: <20100829162707.GA98059@freebsd.org> Date: Sun, 29 Aug 2010 13:04:16 -0700 X-Google-Sender-Auth: UORUF1Pemj4m1E8qe91aiZJf9w0 Message-ID: From: Garrett Cooper To: Alexander Best Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: hexdump(1)/od(1) skip function off-by-one when offset == file 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, 29 Aug 2010 20:04:18 -0000 On Sun, Aug 29, 2010 at 9:27 AM, Alexander Best wrote: > just discovered this issue while going through some linux mailinglists: > > otaku% dd if=/dev/urandom of=testfile bs=1 count=42 > 42+0 records in > 42+0 records out > 42 bytes transferred in 0.000393 secs (106894 bytes/sec) > > otaku% hexdump -s 42 testfile > 000002a 134d b7b9 e085 da16 63b0 554a 1603 ead0 > 000003a 4bd1 fbfd c329 b606 e592 1377 6e10 4b9d > 000004a c018 0fc9 ebf4 9ae2 9f1a > 0000054 > > otaku% hexdump -s 43 testfile > 000002a > > otaku% hexdump -s 41 testfile > 0000029 009f > 000002a > > the attached patch fixes this issue for HEAD. i also checked out any license > issues which could pop up. this fix comes from the util-linux-ng repository [1] > which seems entirely GPLv2'ed. :) Lest they forget that they code was originally BSD licensed, not GPLv2 (except for new source I suppose)... According to the manpage... -s offset Skip offset bytes from the beginning of the input. By default, offset is interpreted as a decimal number. With a leading 0x or 0X, offset is interpreted as a hexadecimal number, otherwise, with a leading 0, offset is interpreted as an octal number. Appending the character b, k, or m to offset causes it to be interpreted as a multiple of 512, 1024, or 1048576, respectively. ... I would expect the following output: 1. -s 41 -> one byte displayed. 2. -s 42 -> no bytes displayed. 2. -s 43 -> no bytes displayed. This is the case with your patch alone, but with the another patch I posted (see bin/118723), it's completely broken, so there might be an issue with the proposed change on either end. The logic in hexdump is in serious need of fixing because there are tons of cornercases like this in the code. Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 29 20:07:01 2010 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 5DDE71065672 for ; Sun, 29 Aug 2010 20:07:01 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id DDA458FC18 for ; Sun, 29 Aug 2010 20:07:00 +0000 (UTC) Received: by bwz20 with SMTP id 20so3867451bwz.13 for ; Sun, 29 Aug 2010 13:06:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=xkWzoLe5o08lpU/3sVSsre2Muyox3Dh1K08m0rRrMp4=; b=m0Cf+6js1cJVckK51+LQ7M7Fg+21xsjLmYwdcuB1w51y/RoJtGF3fpME0H4kzElz2F 3L5bY9coyjUW+hVal5ofHN6XNBVpS4GPCcuvakATyk0EDd2x4pWqovndefVkVleBRvUV ugIsbVJkLCp4zbLtuo1h9RttbEISbkcBc5q84= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=lyQzYkgeSyPYZyhbL4WFixPVp75FI6PpWIvQG52kW4V5Vu+ZIVl5tY51FAht6wYCp3 dSMfrbRXEp/9ZCiYxzlgwHUgbkjFfvBs+csI+hlnfLIlUqwmknckMzKJJpDCJiWoOFZK LTPbSDTUBijFAnB5HCxtQjsKdXQBy5g+F5QB0= MIME-Version: 1.0 Received: by 10.204.63.9 with SMTP id z9mr2555348bkh.66.1283112419552; Sun, 29 Aug 2010 13:06:59 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.204.113.79 with HTTP; Sun, 29 Aug 2010 13:06:59 -0700 (PDT) In-Reply-To: References: <4C7A8ACD.9020201@gmail.com> Date: Sun, 29 Aug 2010 13:06:59 -0700 X-Google-Sender-Auth: WO9HGSbitSxO7fFms2Xe2Xsrdc4 Message-ID: From: Garrett Cooper To: Davide Italiano Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, Glen Barber Subject: Re: System freezes unexpectly 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, 29 Aug 2010 20:07:01 -0000 On Sun, Aug 29, 2010 at 9:33 AM, Davide Italiano wrote: > On Sun, Aug 29, 2010 at 6:29 PM, Glen Barber wrote: >> On 8/29/10 10:18 AM, Davide Italiano wrote: >>> Hi. >>> I'm running 8.1 on my Sony Vaio laptop, with dwm as window manager on >>> lastest Xorg on ports. >>> When I'm trying to run firefox3, the system "freezes" unexpectly. I >>> know that "freezes" is a bit generic but I can't find a more specific >>> term to describe the situation. Dmesg doesn't give useful infos. >>> >>> I installed firefox using pkg_add -r , the only add-on/plugin >>> installed is Xmarks. >>> >>> I'm ready to eventually debug, any suggestion is apprectiated. >>> >> >> Hi Davide, >> >> Can you run firefox from xterm and check for any errors that might be >> generated? What video driver are you using, can you stimulate this issue with other applications in X11, etc? -Garrett From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 29 20:10:52 2010 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 EE78A106566B; Sun, 29 Aug 2010 20:10:52 +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 B15D78FC17; Sun, 29 Aug 2010 20:10:52 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 6FCC335A883; Sun, 29 Aug 2010 22:10:50 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id 5B44E172CC; Sun, 29 Aug 2010 22:10:50 +0200 (CEST) Date: Sun, 29 Aug 2010 22:10:50 +0200 From: Jilles Tjoelker To: Benjamin Kaduk Message-ID: <20100829201050.GA60715@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.20 (2009-06-14) Cc: freebsd-hackers@freebsd.org, kientzle@freebsd.org, kaiw@freebsd.org Subject: Re: ar(1) format_decimal failure is fatal? 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, 29 Aug 2010 20:10:53 -0000 On Sat, Aug 28, 2010 at 07:08:34PM -0400, Benjamin Kaduk wrote: > I've been working on fixing the OpenAFS network filesystem client for > FreeBSD, and it's at the point where I want to use the lazy man's > filesystem stress test: buildworld. > However, quite early in the process, I get the following error: > >>> stage 1.1: legacy release compatibility shims > [...] > ===> tools/build (obj,includes,depend,all,install) > [...] > building static egacy library > ar: fatal: Numeric user ID too large > *** Error code 70 > This error appears to be coming from > lib/libarchive/archive_write_set_format_ar.c , which seems to only have > provisions for outputting a user ID in AR_uid_size = 6 columns. > Now, AFS user IDs are not tied to unix IDs; there is a separate protection > server whose "pts" IDs are used for access control; these pts IDs are tied > to kerberos authentication. In this case, I was authenticated as > daemon/freebuild.mit.edu@ATHENA.MIT.EDU, with pts ID 33554737, which needs > 8 columns to display. > It looks like this macro was so defined in version 1.1 of that file, with > commit message "'ar' format support for libarchive, contributed by Kai > Wang.". This doesn't make it terribly clear whether the 'ar' format > mandates this length, or if it is an implementation decision, so I get to > ask: what reasoning (if any) was behind this choice? Would anything break > if it was bumped up to a larger size? Are there other options for a > workaround in my AFS environment? I wonder if the uid/gid fields are useful at all for ar archives. Ar archives are usually not extracted, and when they are, the current user's values seem good enough. The uid/gid also prevent exactly reproducible builds (together with the timestamp). -- Jilles Tjoelker From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 29 20:54:49 2010 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 11FC01065696; Sun, 29 Aug 2010 20:54:49 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 94BEC8FC08; Sun, 29 Aug 2010 20:54:48 +0000 (UTC) Received: by gxk24 with SMTP id 24so2044888gxk.13 for ; Sun, 29 Aug 2010 13:54:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=vDtuy9lSvo7qKwCOCRl1NL1ml4rdosvTcPya3zLVBpc=; b=FVBujEugRdybB/M8xbuHApj/gWlaQsnAC/jvtiaJVoJwO8vWLzxGIEdDUabiDarFJA wxvqc25bFYi1GzgIeV44Wpk/ZNmPnRmLQnPI40jBnid1tTrOTJm4p328bfBLzL1XUv+S /dPLeumLevpzIOMLlHg7FW2K2BFl1m8ZVhNmA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=ItXBYoxx3kegX6THKzuxmrwPtVp6/u/IYpBQFZDKDF/qjX3LxhAgWdw7t3rQKOZCFL SHCERisKz1JB6/ngiwVMQ8RVIr6QvESOGp9y5GAiNlndEv4SNwdQV0pQ6d8jAbss6lQq ZuuBst56mIzocKtAqED4OLa9PDjtbsyN1ckzI= Received: by 10.90.98.4 with SMTP id v4mr3124572agb.58.1283115287175; Sun, 29 Aug 2010 13:54:47 -0700 (PDT) Received: from centel.dataix.local ([99.181.137.20]) by mx.google.com with ESMTPS id e8sm6572965ibb.8.2010.08.29.13.54.45 (version=SSLv3 cipher=RC4-MD5); Sun, 29 Aug 2010 13:54:46 -0700 (PDT) Sender: "J. Hellenthal" Message-ID: <4C7AC914.1080804@DataIX.net> Date: Sun, 29 Aug 2010 16:54:44 -0400 From: jhell User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.8) Gecko/20100806 Lightning/1.0b1 Thunderbird MIME-Version: 1.0 To: Alexander Best References: <20100828141625.GA69240@freebsd.org> <86aao694tm.fsf@gmail.com> <20100828160129.GA88842@freebsd.org> In-Reply-To: <20100828160129.GA88842@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Anonymous , freebsd-hackers@freebsd.org Subject: Re: tiny patch to prevent head from closing pipes 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, 29 Aug 2010 20:54:49 -0000 On 08/28/2010 12:01, Alexander Best wrote: > On Sat Aug 28 10, Anonymous wrote: >> Alexander Best writes: >> >>> hi there, >>> >>> i just had subversion complain about a broken pipe while piping its output >>> through awk straight to head [1]. i decided to add a switch to head which will >>> tell it to never close a pipe unless the input has stopped [2]. >> >> You can do same with sh(1), e.g. >> >> $ svn log | (IFS=; while read li; do [ $((i+=1)) -le 10 ] && echo "$li"; done) >> >> versus >> >> $ svn log | (IFS=; while read li && [ $((i+=1)) -le 10 ]; do echo "$li"; done) >> ... >> svn: Write error: Broken pipe >> >> >> But I think subversion should >> >>> there's probably a much more efficient way of discarding the input without >>> closing the pipe unless the input ceased. it's just a 5 minute hack in order to >>> see if people find the idea useful or not. ;) >> >> Can you give an example of usefulness that does not involve subversion? > > no, but this should be valid for all applications which return an error if the > pipe gets closed by the receiving end. > > of course it's possible to implement the features to head i added in form of a > sh(1) script. i understand that your point is, that there is already a way of > keeping the pipe open and that the unix philosophy states that no two programs > should share the same functionality. > > on the other hand you don't really need head and tail at all then, because > their functionality could also be implemented in form of a script. ;) i hope > you get my point. > > cheers. > alex > No offense but patching this would be honoring bad scripting and encouraging such things to happen more often. If you catch my drift. Regards, -- jhell,v From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 29 21:00:45 2010 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 6FA5E1065670; Sun, 29 Aug 2010 21:00:45 +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 383058FC1B; Sun, 29 Aug 2010 21:00:45 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id A1C1F35A884; Sun, 29 Aug 2010 23:00:44 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id 8CB4A172CC; Sun, 29 Aug 2010 23:00:44 +0200 (CEST) Date: Sun, 29 Aug 2010 23:00:44 +0200 From: Jilles Tjoelker To: Anonymous Message-ID: <20100829210044.GB60715@stack.nl> References: <20100828141625.GA69240@freebsd.org> <86aao694tm.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86aao694tm.fsf@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Alexander Best , freebsd-hackers@freebsd.org Subject: Re: tiny patch to prevent head from closing pipes 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, 29 Aug 2010 21:00:45 -0000 On Sat, Aug 28, 2010 at 06:42:29PM +0400, Anonymous wrote: > Alexander Best writes: > > i just had subversion complain about a broken pipe while piping its > > output through awk straight to head [1]. i decided to add a switch > > to head which will tell it to never close a pipe unless the input > > has stopped [2]. > You can do same with sh(1), e.g. > $ svn log | (IFS=; while read li; do [ $((i+=1)) -le 10 ] && echo "$li"; done) > versus > $ svn log | (IFS=; while read li && [ $((i+=1)) -le 10 ]; do echo "$li"; done) > ... > svn: Write error: Broken pipe Even easier (and avoiding mangling through read) is svn log | { head; cat >/dev/null; } Beware that the cat command will not necessarily get all of the input. head may buffer reads and it is unable to push the extra data back onto the pipe. > But I think subversion should I think Subversion should not print an error message for broken pipe on its stdout. > > there's probably a much more efficient way of discarding the input > > without closing the pipe unless the input ceased. it's just a 5 > > minute hack in order to see if people find the idea useful or not. > > ;) > Can you give an example of usefulness that does not involve subversion? -- Jilles Tjoelker From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 29 21:12:28 2010 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 BB239106564A for ; Sun, 29 Aug 2010 21:12:28 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 53E328FC1C for ; Sun, 29 Aug 2010 21:12:28 +0000 (UTC) Received: by qwg5 with SMTP id 5so4805517qwg.13 for ; Sun, 29 Aug 2010 14:12:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=gEdi7xGtMR7GZ/QC/abtSRwSCIOgPtdKUv/4w7czFj0=; b=dduQChdJ3smtjKv4zqXUbkEvRhoak5MeOZ6p0MxQWB+Z98cqBNoRYoVAlppiYZP2bz iyR06cArzD7IiNGEyoaTPT3emoX+sVt7noyJEzrhCnBDzpPCBD1IJua9CBjEZdOYtfdJ YMuAxuBsgWqvDcPI98HkK9cKrxPYcFWJ0PRs8= 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=AplwFIOPwxlhF1Ici091/Pw1y0WeU7yxqTYi2R7z5xvf61zOIgJlHMxL0DUhSW8gh6 4gUrYvIuCFldhuQjllwnShq4Gby2555ZACyGfPCdAYHT3rExvKd7SU/CfTzi7Meyqn45 +sJn8G+qkGehLlmDoQo/DeteVxWKv9li7Y56o= MIME-Version: 1.0 Received: by 10.229.11.27 with SMTP id r27mr2351506qcr.294.1283116289379; Sun, 29 Aug 2010 14:11:29 -0700 (PDT) Received: by 10.229.246.68 with HTTP; Sun, 29 Aug 2010 14:11:29 -0700 (PDT) In-Reply-To: References: <4C7A8ACD.9020201@gmail.com> Date: Sun, 29 Aug 2010 23:11:29 +0200 Message-ID: From: Davide Italiano To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, Glen Barber Subject: Re: System freezes unexpectly 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, 29 Aug 2010 21:12:28 -0000 On Sun, Aug 29, 2010 at 10:06 PM, Garrett Cooper wrote: > On Sun, Aug 29, 2010 at 9:33 AM, Davide Italiano > wrote: >> On Sun, Aug 29, 2010 at 6:29 PM, Glen Barber wrote: >>> On 8/29/10 10:18 AM, Davide Italiano wrote: >>>> Hi. >>>> I'm running 8.1 on my Sony Vaio laptop, with dwm as window manager on >>>> lastest Xorg on ports. >>>> When I'm trying to run firefox3, the system "freezes" unexpectly. I >>>> know that "freezes" is a bit generic but I can't find a more specific >>>> term to describe the situation. Dmesg doesn't give useful infos. >>>> >>>> I installed firefox using pkg_add -r , the only add-on/plugin >>>> installed is Xmarks. >>>> >>>> I'm ready to eventually debug, any suggestion is apprectiated. >>>> >>> >>> Hi Davide, >>> >>> Can you run firefox from xterm and check for any errors that might be >>> generated? > > What video driver are you using, can you stimulate this issue with > other applications in X11, etc? > -Garrett > I tried to stimulate issue w/ other applications and other window managers, but I didn't obtain anythin' ( I also tried w/ epiphany, that uses the same rendering engine of firefox) . Firefox "freezes" the system (again, I don't know if it's the right term). The driver I'm using is radeon. Regards. Davide Italiano From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 29 21:13:30 2010 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 5D67110656A3 for ; Sun, 29 Aug 2010 21:13:30 +0000 (UTC) (envelope-from dougb@freebsd.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id DECDA8FC17 for ; Sun, 29 Aug 2010 21:13:29 +0000 (UTC) Received: (qmail 28857 invoked by uid 399); 29 Aug 2010 21:13:28 -0000 Received: from localhost (HELO ?192.168.0.142?) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 29 Aug 2010 21:13:28 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4C7ACD77.7040608@freebsd.org> Date: Sun, 29 Aug 2010 14:13:27 -0700 From: dougb@freebsd.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: Davide Italiano References: <4C7A8ACD.9020201@gmail.com> In-Reply-To: X-Enigmail-Version: 1.1.1 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Glen Barber Subject: Re: System freezes unexpectly 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, 29 Aug 2010 21:13:30 -0000 On 08/29/2010 09:33 AM, Davide Italiano wrote: >> Can you run firefox from xterm and check for any errors that might be >> > generated? >> > >> > Cheers, >> > >> > -- >> > Glen Barber >> > > Tried doing this. But no output. Try recompiling the port with the option for debug enabled. That'll get you some output. :) Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-freebsd-hackers@FreeBSD.ORG Sun Aug 29 21:36:46 2010 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 605E710656AD for ; Sun, 29 Aug 2010 21:36:46 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id DE53B8FC14 for ; Sun, 29 Aug 2010 21:36:44 +0000 (UTC) Received: by bwz20 with SMTP id 20so3902951bwz.13 for ; Sun, 29 Aug 2010 14:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=jSbqG8L1l4VbQUtyinI7DL3ABwLEwMWJWYeBdEhamPA=; b=xJeEq+SP0bU02Bm0dLv9ZzslIxUqMLG0iXvq/1RCoJsfcI5g4xZnir+eiJqkjbwSZq OkadyajarkkgrUw13bASqxJvUZkJNjkfx7ak/x3EuxpEjD6vWGQvWOPwAQHJV799JVID 13/GFqCUfj9ExiJQg99eqrQRY5Ya6SsUB+kOs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=Fc1pQf4dKpQccfBrvaPebWqlVNk4Jqeol0wntzP0sLdUqKTe94oqWR/uoaOHZpLNSM Xvt3mZJHUK1hVoxmDPchUrMx56LaAoUR2RKByS3kG0X6KZh9swJlFLYfsf7cl1dnJWuR CZO5LDHK4GgFhDExvTpcfXGGGrsQTpQ1liwyI= MIME-Version: 1.0 Received: by 10.204.100.12 with SMTP id w12mr2539549bkn.90.1283117803875; Sun, 29 Aug 2010 14:36:43 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.204.113.79 with HTTP; Sun, 29 Aug 2010 14:36:43 -0700 (PDT) In-Reply-To: References: <4C7A8ACD.9020201@gmail.com> Date: Sun, 29 Aug 2010 14:36:43 -0700 X-Google-Sender-Auth: GpeBFHXY4gKJ2j8ZlsNGJFbbNGA Message-ID: From: Garrett Cooper To: Davide Italiano Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, Glen Barber Subject: Re: System freezes unexpectly 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, 29 Aug 2010 21:36:46 -0000 On Sun, Aug 29, 2010 at 2:11 PM, Davide Italiano wrote: > On Sun, Aug 29, 2010 at 10:06 PM, Garrett Cooper wrote: >> On Sun, Aug 29, 2010 at 9:33 AM, Davide Italiano >> wrote: >>> On Sun, Aug 29, 2010 at 6:29 PM, Glen Barber wrote: >>>> On 8/29/10 10:18 AM, Davide Italiano wrote: >>>>> Hi. >>>>> I'm running 8.1 on my Sony Vaio laptop, with dwm as window manager on >>>>> lastest Xorg on ports. >>>>> When I'm trying to run firefox3, the system "freezes" unexpectly. I >>>>> know that "freezes" is a bit generic but I can't find a more specific >>>>> term to describe the situation. Dmesg doesn't give useful infos. >>>>> >>>>> I installed firefox using pkg_add -r , the only add-on/plugin >>>>> installed is Xmarks. >>>>> >>>>> I'm ready to eventually debug, any suggestion is apprectiated. >>>>> >>>> >>>> Hi Davide, >>>> >>>> Can you run firefox from xterm and check for any errors that might be >>>> generated? >> >> What video driver are you using, can you stimulate this issue with >> other applications in X11, etc? >> -Garrett >> > > I tried to stimulate issue w/ other applications and other window > managers, but I didn't obtain anythin' ( I also tried w/ epiphany, > that uses the same rendering engine of firefox) . Firefox "freezes" > the system (again, I don't know if it's the right term). The driver > I'm using is radeon. Ok. How about this? Firefox items: 1. What version of Firefox are you using? 2. Are you using any Firefox plugins? 3. When you try to bring up Firefox, does it start to render the GTK window and then freeze, or does it freeze without rendering the GTK window? 4. Are you starting from `scratch' with Firefox, or are you restoring your last session? 5. If you compiled from ports, what do your CPUTYPE/CC/CXX/CFLAGS/CXXFLAGS look like? Radeon items: 1. What Radeon card do you have? 2. Are you using the drm code in the kernel, or not? 3. Have you tried with the vesa driver instead of the radeon driver? I would focus on the Firefox items for now because they're easier to track down, but definitely try one spin with the vesa driver instead of the radeon driver because it's quick and dirty. Thanks! -Garrett From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 01:39:58 2010 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 88EF010656B9; Mon, 30 Aug 2010 01:39:58 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2A2CD8FC17; Mon, 30 Aug 2010 01:39:57 +0000 (UTC) Received: by qwg5 with SMTP id 5so4914167qwg.13 for ; Sun, 29 Aug 2010 18:39:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=fzRQP7obFTVdX+HG7/LYtjR38TAymrJo9r9aw0xeeqQ=; b=NXmWEdF30AjnsQyjhI5ATyenQ2c3ckV+qMoqIbY3uLA5E/SokoblB8skbf9ABoqxyj pwpW85ES5p6/lluU+BzNOB/LOrnwp/e+P8unHWKOL81Ktc9kyxJoPxudExzLtVzDRhsv sNpD/ipGohiRvAHn1+n4SjDFNE8JqKgFXIwQs= 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=dJqEsp4CKhs9snd8QoK8Pxt2eI1RZSbiVZ2RVoo3tIByY4taun4zRytjjYK5YG1Rdy wYqgV4X0uN1TzNmihJh4MwQ2Kr4WLf2C1oa2b/MG6x0MtxrVmRPiqwFj6ZjmYI3XAj8/ JfeBRlYMy+OW9ZtDLJ8E5q7jJ4J1fHhEXyLVE= MIME-Version: 1.0 Received: by 10.229.222.65 with SMTP id if1mr1806587qcb.135.1283132378008; Sun, 29 Aug 2010 18:39:38 -0700 (PDT) Received: by 10.229.246.68 with HTTP; Sun, 29 Aug 2010 18:39:37 -0700 (PDT) In-Reply-To: References: <4C7A8ACD.9020201@gmail.com> Date: Mon, 30 Aug 2010 03:39:37 +0200 Message-ID: From: Davide Italiano To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, Glen Barber Subject: Re: System freezes unexpectly X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 01:39:58 -0000 > > Ok. How about this? > > Firefox items: > 1. What version of Firefox are you using? Firefox 3.6.4. Lastest from ports, compiled now. > 2. Are you using any Firefox plugins? Yes, Xmarks. > 3. When you try to bring up Firefox, does it start to render the GTK > window and then freeze, or does it freeze without rendering the GTK > window? It starts to render the gtk window. > 4. Are you starting from `scratch' with Firefox, or are you restoring > your last session? I'm restoring my last session > 5. If you compiled from ports, what do your > CPUTYPE/CC/CXX/CFLAGS/CXXFLAGS look like? > Default one from a fresh install. > Radeon items: > 1. What Radeon card do you have? Ati mobility radeon 9700 > 2. Are you using the drm code in the kernel, or not? > 3. Have you tried with the vesa driver instead of the radeon driver? > Yeah, same behavior. > I would focus on the Firefox items for now because they're easier to > track down, but definitely try one spin with the vesa driver instead > of the radeon driver because it's quick and dirty. > > Thanks! > -Garrett > From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 05:54:17 2010 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 798AD10656B1 for ; Mon, 30 Aug 2010 05:54:17 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id 069A38FC08 for ; Mon, 30 Aug 2010 05:54:16 +0000 (UTC) Received: by wwj40 with SMTP id 40so1960679wwj.1 for ; Sun, 29 Aug 2010 22:54:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=PP6PC+Lu/jWzC9tusfbBPoxLR69bZXpofzoP6c07GWQ=; b=b9kiKRq4GFvE6E9jqGG8mS8O5UHl2znO0bEKCxuxGdWFIORliZ3KMBV3LRa7LffqpI As0EWqfmVqh9R+3RmQMVmxgRqatBByU620JdXoSB7RjOJ5xzFJJy6fSs7/oIhBfqkd2D 1ZBB5CXk8kjpSCsaWgVpwzNka+cUz5QrNi+bg= 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=a4AtXaHI2QGR/RbO69pQJ/2DFwi9Pnu3r8NVvq4RK6LR/xCDb1OPfBD1t/Kj0YDKBI GrUDvIMJjzDHIw9QK0emuIvZYaUbbm5vSZ6pKEqCtscCKEHq+J9wrvXR7he7B4N1QbWG 0PbEi7Jv+67ZaEcelveKMwz3WNbUm7I8PLlTk= MIME-Version: 1.0 Received: by 10.216.17.211 with SMTP id j61mr4465600wej.14.1283145898757; Sun, 29 Aug 2010 22:24:58 -0700 (PDT) Received: by 10.216.133.2 with HTTP; Sun, 29 Aug 2010 22:24:58 -0700 (PDT) In-Reply-To: <4C7A5C28.1090904@FreeBSD.org> References: <4C7A5C28.1090904@FreeBSD.org> Date: Mon, 30 Aug 2010 00:24:58 -0500 Message-ID: From: Brandon Gooch To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 05:54:17 -0000 2010/8/29 Alexander Motin : > Hi. > > I would like to present my new work on timers management code. > > In my previous work I was mostly orienting on reimplementing existing > functionality in better way. The result seemed not bad, but after > looking on perspectives of using event timers in one-shot (aperiodic) > mode I've understood that implemented code complexity made it hardly > possible. So I had to significantly cut it down and rewrite from the new > approach, which is instead primarily oriented on using timers in > one-shot mode. As soon as some systems have only periodic timers I have > left that functionality, though it was slightly limited. > > New management code implements two modes of operation: one-shot and > periodic. Specific mode to be used depends on hardware capabilities and > can be controlled. > > In one-shot mode hardware timers programmed to generate single interrupt > precisely at the time of next wanted event. It is done by comparing > current binuptime with next scheduled times of system events > (hard-/stat-/profclock). This approach has several benefits: event timer > precision is now irrelevant for system timekeeping, hard- and statclocks > are not aliased, while only one timer used for it, and the most > important -- it allows us to define which events and when exactly we > really want to handle, without strict dependence on fixed hz, stathz, > profhz periods. Sure, our callout system is highly depends on hz value, > but now at least we can skip interrupts when we have no callouts to > handle at the time. Later we can go further. > > Periodic mode now also uses alike principals of scheduling events. But > timer running in periodic mode just unable to handle arbitrary events > and as soon as event timers may not be synchronized to system > timecounter and may drift from it, causing jitter effects. So I've used > for time source of scheduling the timer events themselves. As result, > periodic timer runs on fixed frequency multiply to hz rate, while > statclock and profclock generated by dividing it respectively. (If > somebody would tell me that hardclock jitter is not really a big > problem, I would happily rip that artificial timekeeping out of there to > simplify code.) Unluckily this approach makes impossible to use two > events timers to completely separate hard- and statclocks any more, but > as I have said, this mode is required only for limited set of systems > without one-shot capable timers. Looking on my recent experience with > different platforms, it is not a big fraction. > > Management code is still handles both per-CPU and global timers. Per-CPU > timers usage is obvious. Global timer is programmed to handle all CPUs > needs. In periodic mode global timer generates periodic interrupts to > some one CPU, while management code then redistributes them to CPUs that > really need it, using IPI. In one-shot mode timer is always programmed > to handle first scheduled event throughout the system. When that > interrupt arrives, it is also getting redistributed to wanting CPUs with > IPI. > > To demonstrate features that could be obtained from so high flexibility > I have incorporated the idea and some parts of dynamic ticks patches of > Tsuyoshi Ozawa. Now, when some CPU goes down into C2/C3 ACPI sleep > state, that CPU stops scheduling of hard-/stat-/profclock events until > the next registered callout event. If CPU wakes up before that time by > some unrelated interrupt, missed ticks are called artificially (it is > needed now to keep realistic system stats). After system is up to date, > interrupt is handled. Now it is implemented only for ACPI systems with > C2/C3 states support, because ACPI resumes CPU with interrupts disabled, > that allows to keep up missed time before interrupt handler or some > other process (in case of unexpected task switch) may need it. As I can > see, Linux does alike things in the beginning of every interrupt handler. > > I have actively tested this code for a few days on my amd64 Core2Duo > laptop and i386 Core-i5 desktop system. With C2/C3 states enabled > systems experience only about 100-150 interrupts per second, having HZ > set to 1000. These events mostly caused by several event-greedy > processes in our tree. I have traced and hacked several most aggressive > ones in this patch: http://people.freebsd.org/~mav/tm6292_idle.patch . > It allowed me to reduce down to as low as 50 interrupts per system, > including IPIs! Here is the output of `systat -vm 1` from my test > system: http://people.freebsd.org/~mav/systat_w_oneshot.txt . Obviously > that with additional tuning the results can be improved even more. > > My latest patch against 9-CURRENT can be found here: > http://people.freebsd.org/~mav/timers_oneshot4.patch > > Comments, ideas, propositions -- welcome! > > Thanks to all who read this. ;) Totally awesome work mav@! One thing I see: Where is *frame pointing to? It isn't initialized in the function, so... +static int +handleevents(struct bintime *now, int fake) { + struct trapframe *frame; + struct pcpu_state *state; + uintfptr_t pc; + int usermode; + int done; - if (doconfigtimer(0)) - return (FILTER_HANDLED); - return (hardclockhandler(frame)); + done = 0; +#ifdef KDTRACE_HOOKS + /* + * If the DTrace hooks are configured and a callback function + * has been registered, then call it to process the high speed + * timers. + */ + if (cyclic_clock_func[curcpu] != NULL) + (*cyclic_clock_func[curcpu])(frame); +#endif Also, for those of us testing, should we "reset" our timer settings back to defaults and work from there[1] (meaning, should we be futzing around with timer event sources, kern.hz, etc...)? Thanks again for tackling these tough, but important issues. I'm looking very forward to testing this out! -Brandon [1] http://wiki.freebsd.org/TuningPowerConsumption From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 06:16:47 2010 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 F24AA1065698; Mon, 30 Aug 2010 06:16:47 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 640E98FC1F; Mon, 30 Aug 2010 06:16:46 +0000 (UTC) Received: by iwn36 with SMTP id 36so5270640iwn.13 for ; Sun, 29 Aug 2010 23:16:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=HS+fzwDZmLD1+OMbyqbgM0xkz7W4B4dwVMg2CvfES8I=; b=u1ThqBIuCb8zxLsPU8fNAntbRkJArLsdMBsJsBZaK+XSdftin7Px/B3JR8umAGSw9R g/jv77F6VXmeJ7EsrKWbTrI0iIQpQw6ZaQ+iZgMqAFSZL/+ClBTyKFKASydMDfsD0PaN hWlcyQUOnikaXXNcu2UBAcRAIIKUePeHS0jLo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=s5OByAJNzbAZMHFL9rQSuZzyz/+tWcWwYt/dnbTemFf47to9Y8ULnsjPsKYbt3PDY5 PYlh8HSvO5SJ0Ged5CgZjYFXmdNfxstQNeHVp2fXW2kk+Rxe2EksaW+sKtz8AUVwOJ39 MUW0zq1XkeDUqudkSUzELJ8smOFhGjhjhqcMc= Received: by 10.231.14.5 with SMTP id e5mr3942544iba.175.1283149006366; Sun, 29 Aug 2010 23:16:46 -0700 (PDT) Received: from centel.dataix.local (adsl-99-181-137-20.dsl.klmzmi.sbcglobal.net [99.181.137.20]) by mx.google.com with ESMTPS id z6sm5354901ibc.18.2010.08.29.23.16.43 (version=SSLv3 cipher=RC4-MD5); Sun, 29 Aug 2010 23:16:44 -0700 (PDT) Sender: "J. Hellenthal" Message-ID: <4C7B4CCA.4080007@DataIX.net> Date: Mon, 30 Aug 2010 02:16:42 -0400 From: jhell User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.8) Gecko/20100806 Lightning/1.0b1 Thunderbird MIME-Version: 1.0 To: Davide Italiano References: <4C7A8ACD.9020201@gmail.com> In-Reply-To: X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Glen Barber , Garrett Cooper Subject: Re: System freezes unexpectly X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 06:16:48 -0000 On 08/29/2010 21:39, Davide Italiano wrote: > > Firefox 3.6.4. Lastest from ports, compiled now. > FYI: firefox-3.6.8,1 is the latest in ports. -- jhell,v From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 07:53:16 2010 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 23ADB1065696; Mon, 30 Aug 2010 07:53:16 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7AD818FC12; Mon, 30 Aug 2010 07:53:14 +0000 (UTC) Received: by fxm4 with SMTP id 4so3542441fxm.13 for ; Mon, 30 Aug 2010 00:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=RoKt67ftKkZ8vAyfU5NbY9HGWotdbpFdnplfCuRSNI8=; b=fkorUifU544qNb8VJHPVApUTMg6WJBnFtmHvwEVHz+Lmdg9oMD6awY4rRWwZrwM2me i/Rkd+v7bIC1Fn2qkZE7NQO+QcAT6HgEJ3tbdm2iBeNhtoy5iOYDFCHie+XOYmkzJg0d qCC9Nt/4OHfsFd9xjDWdu+JukWtDn259u9OZk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=CntQuII6te25DKZdBecIp0AYtKXYQlM63LyVoRrvhF5KSHS3VZLJWdS3u74IHEoIWI grS7C6t7B8NKiLo0Z8M9am/v7i9TajxXLFbnCy7aI8P356IHVVFzzn5K8ZtmlfrIobI2 hWVdsKQtSQHEnrH1UvHQHpq6/c/y+FQ5int30= Received: by 10.223.123.145 with SMTP id p17mr3279705far.90.1283154793949; Mon, 30 Aug 2010 00:53:13 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id r4sm3182600faa.19.2010.08.30.00.53.12 (version=SSLv3 cipher=RC4-MD5); Mon, 30 Aug 2010 00:53:13 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C7B6364.8090908@FreeBSD.org> Date: Mon, 30 Aug 2010 10:53:08 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Brandon Gooch References: <4C7A5C28.1090904@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 07:53:16 -0000 Brandon Gooch wrote: > One thing I see: > > Where is *frame pointing to? It isn't initialized in the function, so... Thanks! Fixed. Patch updated. > Also, for those of us testing, should we "reset" our timer settings > back to defaults and work from there[1] (meaning, should we be futzing > around with timer event sources, kern.hz, etc...)? The general logic is still applicable. Reducing HZ is less important now, but lower value allows system slightly aggregate close events by the cost of precision. Unluckily we have no better mechanism to do it now. What's about event source - there is only one timer supported now and sysctl/tunable name changed to kern.eventtimer.timer, so previous options just won't work. Also with support for one-shot mode, use of RTC and i8254 timers is not recommended any more - they do not support it. Use LAPIC or HPET. If you have Core-iX class CPU - you may use any of them, they are very close in functionality. If you use Core2 or earlier - prefer HPET, as LAPIC is dying in C3 state. If you use HPET on Core2-class CPU (actually on ICHX class south bridges, which do not support MSI-like interrupts for HPET) - you may like to set such tunables: hint.atrtc.0.clock=0 hint.attimer.0.clock=0 hint.hpet.0.legacy_route=1 It will disable RTC and i8254 timers, but grant their interrupts to HPET, allowing it to work as per-CPU for dual-CPU systems. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 09:09:37 2010 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 40FDC10656A5; Mon, 30 Aug 2010 09:09:37 +0000 (UTC) (envelope-from gljennjohn@googlemail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 323888FC12; Mon, 30 Aug 2010 09:09:36 +0000 (UTC) Received: by bwz20 with SMTP id 20so4182011bwz.13 for ; Mon, 30 Aug 2010 02:09:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:reply-to:x-mailer:mime-version :content-type:content-transfer-encoding; bh=P1cR1NoL6yhtI+A+tYH+HFnxtINVAqOqo1OdvjYTzl8=; b=oGizXyCs8UQk+BSmKQF0zlCu+2Hg3S/jx+BHYwQcp/Ncg8PVMo8nltcUYG/SNZkfD8 JiJq89h1NHCUCGDg1x3R+YFQn9GPmX19UWu9eAWLQ6ryvw6qQTUUZ2v5dkPL09mXmBhk 7UJPjkxTBFwcbBqCuNRj7pl16Ra+/nqyHujBY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; b=fipuzUIsUs/K7mxdD6O+39QIR+tPiPwz3qb58ormisGTadQhkZMMUraie7Z7BymDTy h7QXsItocveO56LtLO3MD0Mj1U8G28CuneNfjBz9cbDqI60Dsqquc8QjdpFiwFKarff3 VoKPZT0qoOu96aowcQxtymkheaXn5C5BpVyvs= Received: by 10.204.39.203 with SMTP id h11mr3022078bke.8.1283159375085; Mon, 30 Aug 2010 02:09:35 -0700 (PDT) Received: from ernst.jennejohn.org (p578E3A7B.dip.t-dialin.net [87.142.58.123]) by mx.google.com with ESMTPS id g12sm5031326bkb.2.2010.08.30.02.09.33 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 30 Aug 2010 02:09:34 -0700 (PDT) Date: Mon, 30 Aug 2010 11:09:32 +0200 From: Gary Jennejohn To: Alexander Motin Message-ID: <20100830110932.23425932@ernst.jennejohn.org> In-Reply-To: <4C7A5C28.1090904@FreeBSD.org> References: <4C7A5C28.1090904@FreeBSD.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.7; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gljennjohn@googlemail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 09:09:37 -0000 On Sun, 29 Aug 2010 16:10:00 +0300 Alexander Motin wrote: > I have actively tested this code for a few days on my amd64 Core2Duo > laptop and i386 Core-i5 desktop system. With C2/C3 states enabled > systems experience only about 100-150 interrupts per second, having HZ > set to 1000. These events mostly caused by several event-greedy > processes in our tree. I have traced and hacked several most aggressive > ones in this patch: http://people.freebsd.org/~mav/tm6292_idle.patch . > It allowed me to reduce down to as low as 50 interrupts per system, > including IPIs! Here is the output of `systat -vm 1` from my test > system: http://people.freebsd.org/~mav/systat_w_oneshot.txt . Obviously > that with additional tuning the results can be improved even more. > Hmm. I applied your patches and am now running the new kernel. But I only installed the new kernel and didn't do make buildworld installworld. Mu systat -vm 1 doesn't look anything like yours. I'm seeing about 2300 interrupts per second and most of those are coming from the hpet timers: 1122 hpet0:t0 1124 hpet0:t1 So, what else did you do to reduce interrupts so much? Ah, I think I see it now. My desktop has only C1 enabled. Is that it? Unfortunately, it appears that only C1 is supported :( -- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 09:55:16 2010 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 A18951065673 for ; Mon, 30 Aug 2010 09:55:16 +0000 (UTC) (envelope-from glen.j.barber@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id 4BD338FC18 for ; Mon, 30 Aug 2010 09:55:15 +0000 (UTC) Received: by qwg5 with SMTP id 5so5161390qwg.13 for ; Mon, 30 Aug 2010 02:55:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=WEp28pHys7hsjB8feGqFmJ0DzZC8TNijK8AKeUaJ19k=; b=Do03sMjQuUFEn76/rBhxFana327++S6PC1JliS/hjgJC2xUE2XtPqLjeCnbHJVwUph FfQ24uLKFpaXanfvcPU1n33aU+lDJM+6MUfIKUHxyIuIOorjUFSIJjXa8R37JjPw7yAu XDHa8TjGg7a82vZf2dJBq6u/k+teCg0Dz3WvE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=UEFzRMkAidp2yCAtC6gOcGAT2kd6pXSMPlQXCRpWVoYu177aVMwt8xNKkkJtDLopCZ Rt2QP/ifZ8wAUEehG+QR96rxEd5/CkwneQ8p8SbVD6r9uLubD+fEwDoBvF3zph5buloF o0roASq8mI0Y3EXpQHsE6mG3VoZyjPcPmTE4w= Received: by 10.224.28.77 with SMTP id l13mr2649074qac.320.1283162115444; Mon, 30 Aug 2010 02:55:15 -0700 (PDT) Received: from schism.local (75.97.128.170.res-cmts.sewb.ptd.net [75.97.128.170]) by mx.google.com with ESMTPS id l8sm8123496qck.6.2010.08.30.02.55.12 (version=SSLv3 cipher=RC4-MD5); Mon, 30 Aug 2010 02:55:13 -0700 (PDT) Message-ID: <4C7B7FFF.20202@gmail.com> Date: Mon, 30 Aug 2010 05:55:11 -0400 From: Glen Barber User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: Davide Italiano References: <4C7A8ACD.9020201@gmail.com> In-Reply-To: X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Garrett Cooper Subject: Re: System freezes unexpectly X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 09:55:16 -0000 On 8/29/10 9:39 PM, Davide Italiano wrote: >> >> Ok. How about this? >> >> Firefox items: >> 1. What version of Firefox are you using? > > Firefox 3.6.4. Lastest from ports, compiled now. > New install, or did you update firefox from a previous version? If the latter (may be worth trying regardless), try mv-ing $HOME/.mozilla/firefox to $HOME/.mozilla/firefox-old. Perhaps it's getting hung up on a configuration it doesn't like. Regards, -- Glen Barber From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 10:07:47 2010 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 C5B1310656AE; Mon, 30 Aug 2010 10:07:47 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 2B7088FC0C; Mon, 30 Aug 2010 10:07:46 +0000 (UTC) Received: by fxm4 with SMTP id 4so3593441fxm.13 for ; Mon, 30 Aug 2010 03:07:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=BOGXsMVtSkp0fvjHRoYYAXjKVzZQpzwHRn8KCsMcP3k=; b=HW/sfED3EZzik+RbAFWZxV3ewJx73UHQZ25dCMDZz1TozYdcOYoYqhZIfMmNRglB10 9ARlEa6uz6iojQKH1Iha73m+8ZYulPqZJCQGlY7fMeHritOJ3UrUB7jkTQ+V5KZO1VqD GW4av+DAGMNUhiTM1THvFeHQqnWtPcMWAW3IA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=SWeJU+CPJ/QxQ8O8Noz/V3f5SfKawpqobHWkAK/c8a2VKAfL4j3kDyjaD3hTU1V3A3 vgyYHlDL59ZAob2AY0Ch7Gp8knO1fIbt2EaRLHbpaJ9MSE+fJvgZOnHnsyySRFqHrVcy XWlkyMKPdrj1vNUMeWhsCyELEngk5hSTQ5Ebs= Received: by 10.223.124.145 with SMTP id u17mr3482601far.92.1283162865379; Mon, 30 Aug 2010 03:07:45 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id r4sm3229458faa.19.2010.08.30.03.07.43 (version=SSLv3 cipher=RC4-MD5); Mon, 30 Aug 2010 03:07:44 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C7B82EA.2040104@FreeBSD.org> Date: Mon, 30 Aug 2010 13:07:38 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: gljennjohn@googlemail.com References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> In-Reply-To: <20100830110932.23425932@ernst.jennejohn.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 10:07:47 -0000 Gary Jennejohn wrote: > Hmm. I applied your patches and am now running the new kernel. But I > only installed the new kernel and didn't do make buildworld installworld. > > Mu systat -vm 1 doesn't look anything like yours. I'm seeing about 2300 > interrupts per second and most of those are coming from the hpet timers: > > 1122 hpet0:t0 > 1124 hpet0:t1 It means 1000Hz of hardclock (hz) events mixed with 127Hz of statclock (stathz) events. HPET timer here works in one-shot mode handling it. > So, what else did you do to reduce interrupts so much? > > Ah, I think I see it now. My desktop has only C1 enabled. Is that it? > Unfortunately, it appears that only C1 is supported :( Yes, as I have said, at this moment empty ticks skipped only while CPU is in C2/C3 states. In C1 state there is no way to handle lost events on wake up. While it may be not very dangerous, it is not very good. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 10:11:52 2010 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 A847A1065693; Mon, 30 Aug 2010 10:11:52 +0000 (UTC) (envelope-from gljennjohn@googlemail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9E2888FC14; Mon, 30 Aug 2010 10:11:51 +0000 (UTC) Received: by bwz20 with SMTP id 20so4213977bwz.13 for ; Mon, 30 Aug 2010 03:11:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:reply-to:x-mailer:mime-version :content-type:content-transfer-encoding; bh=j4hpdxucCCnYKG3ESWmHXIYc1ufCpuSU6nmeRcfb6bY=; b=JOnplvpeYofJwkU44zSnTYzQCBo2nqVIYwprOSHlGdjJyriITyoAjrnOas9l6zxPPY FFgChqMIjIhekh1U0lpH6xJ6Gf3FgVvGvC3gMNPF+9irrKZnh5A9hXSa8PAO3H4NzZOJ MEp4mr2HmDLDq8emjeZlWjNrIyE/h6CZMe+OI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; b=FiFmRiLRRboVVZsqfFrQFoU2OzBNMbYg09xvTMefHmAq3uwzNQTHijKVF8NVNueZfJ tANIsTCRd0hrp3qbj0c/2xxY2vEMJFzS4CkAEJdUvdwEnY4iMIiAW+tEIpoca+zuW8HD vOKDY24r9HBVqCdq3aTAU82Jz1iB+UzJOpeuU= Received: by 10.204.63.14 with SMTP id z14mr3034927bkh.174.1283163110779; Mon, 30 Aug 2010 03:11:50 -0700 (PDT) Received: from ernst.jennejohn.org (p578E3A7B.dip.t-dialin.net [87.142.58.123]) by mx.google.com with ESMTPS id y2sm5073393bkx.20.2010.08.30.03.11.49 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 30 Aug 2010 03:11:50 -0700 (PDT) Date: Mon, 30 Aug 2010 12:11:48 +0200 From: Gary Jennejohn To: Alexander Motin Message-ID: <20100830121148.11926306@ernst.jennejohn.org> In-Reply-To: <4C7B82EA.2040104@FreeBSD.org> References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.7; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gljennjohn@googlemail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 10:11:52 -0000 On Mon, 30 Aug 2010 13:07:38 +0300 Alexander Motin wrote: > Gary Jennejohn wrote: > > Hmm. I applied your patches and am now running the new kernel. But I > > only installed the new kernel and didn't do make buildworld installworld. > > > > Mu systat -vm 1 doesn't look anything like yours. I'm seeing about 2300 > > interrupts per second and most of those are coming from the hpet timers: > > > > 1122 hpet0:t0 > > 1124 hpet0:t1 > > It means 1000Hz of hardclock (hz) events mixed with 127Hz of statclock > (stathz) events. HPET timer here works in one-shot mode handling it. > > > So, what else did you do to reduce interrupts so much? > > > > Ah, I think I see it now. My desktop has only C1 enabled. Is that it? > > Unfortunately, it appears that only C1 is supported :( > > Yes, as I have said, at this moment empty ticks skipped only while CPU > is in C2/C3 states. In C1 state there is no way to handle lost events on > wake up. While it may be not very dangerous, it is not very good. > Too bad. I'd say that systems which are limited to C1 don't benefit much (or not at all) from your changes. -- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 10:21:25 2010 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 E45C41065673; Mon, 30 Aug 2010 10:21:25 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 46AC98FC14; Mon, 30 Aug 2010 10:21:24 +0000 (UTC) Received: by fxm4 with SMTP id 4so3599562fxm.13 for ; Mon, 30 Aug 2010 03:21:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=828KnruxyHb9lw34XQxOUZnwvWiT7/GdosKhV6xUxyo=; b=tj36hg7Jdf7lYNS7hqlPECE16cB8HQd549nvbF1dTlsEJVA8E69TOEJGqnk4fqG+B1 ymrt86NsXr5qb5hgA5fHo6W/rhdEil+mqlB2aWtTVatxU1aBi7Z/m/E2jA0N5TZ98Nwn 1Pn35jHDKblwHMY7Tleq2wSAdyy4xiDn7P4HI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=DjFML9cJP03R0botZpzeUzERJ7zNa1fOubV33sXmBc1JtF1CgoFI6SSjt3lkSf4oEt tAcJas6bv+cPajrPJ+4V/yAOdQrJZYFCF9dD94lzisGYB47EVg9kmxP6yh1f5J0j0iG3 jrHbWarl4YNdFEFZnJsjdiNYdbrjnq6TGTPBY= Received: by 10.223.119.203 with SMTP id a11mr3569856far.42.1283163684102; Mon, 30 Aug 2010 03:21:24 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id b9sm3234577faq.7.2010.08.30.03.21.22 (version=SSLv3 cipher=RC4-MD5); Mon, 30 Aug 2010 03:21:23 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C7B861D.2050304@FreeBSD.org> Date: Mon, 30 Aug 2010 13:21:17 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: gljennjohn@googlemail.com References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830121148.11926306@ernst.jennejohn.org> In-Reply-To: <20100830121148.11926306@ernst.jennejohn.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 10:21:26 -0000 Gary Jennejohn wrote: > On Mon, 30 Aug 2010 13:07:38 +0300 > Alexander Motin wrote: >> Gary Jennejohn wrote: >>> Ah, I think I see it now. My desktop has only C1 enabled. Is that it? >>> Unfortunately, it appears that only C1 is supported :( >> Yes, as I have said, at this moment empty ticks skipped only while CPU >> is in C2/C3 states. In C1 state there is no way to handle lost events on >> wake up. While it may be not very dangerous, it is not very good. > > Too bad. I'd say that systems which are limited to C1 don't benefit > much (or not at all) from your changes. For this moment - indeed not much. As I have said, feature with skipping ticks is on early development stage. I've just implemented it in most straightforward way, abusing feature provided by ACPI. To benefit other systems and platforms, more tight integration with interrupt, callout and possibly scheduler subsystem will be needed. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 10:38:59 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id AFBD610656AE; Mon, 30 Aug 2010 10:38:59 +0000 (UTC) Date: Mon, 30 Aug 2010 10:38:59 +0000 From: Alexander Best To: Garrett Cooper Message-ID: <20100830103859.GA27716@freebsd.org> References: <20100829162707.GA98059@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-hackers@freebsd.org Subject: Re: hexdump(1)/od(1) skip function off-by-one when offset == file 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, 30 Aug 2010 10:38:59 -0000 On Sun Aug 29 10, Garrett Cooper wrote: > On Sun, Aug 29, 2010 at 9:27 AM, Alexander Best wrote: > > just discovered this issue while going through some linux mailinglists: > > > > otaku% dd if=/dev/urandom of=testfile bs=1 count=42 > > 42+0 records in > > 42+0 records out > > 42 bytes transferred in 0.000393 secs (106894 bytes/sec) > > > > otaku% hexdump -s 42 testfile > > 000002a 134d b7b9 e085 da16 63b0 554a 1603 ead0 > > 000003a 4bd1 fbfd c329 b606 e592 1377 6e10 4b9d > > 000004a c018 0fc9 ebf4 9ae2 9f1a > > 0000054 > > > > otaku% hexdump -s 43 testfile > > 000002a > > > > otaku% hexdump -s 41 testfile > > 0000029 009f > > 000002a > > > > the attached patch fixes this issue for HEAD. i also checked out any license > > issues which could pop up. this fix comes from the util-linux-ng repository [1] > > which seems entirely GPLv2'ed. :) > > Lest they forget that they code was originally BSD licensed, not > GPLv2 (except for new source I suppose)... *hehehe* that might be true. maybe they've bought the src from AT&T? anyway i don't think the BSD license restricts you releasing code under a new license. so what they did seems fine to me. > According to the manpage... > > -s offset > Skip offset bytes from the beginning of the input. By default, > offset is interpreted as a decimal number. With a leading 0x or > 0X, offset is interpreted as a hexadecimal number, otherwise, > with a leading 0, offset is interpreted as an octal number. > Appending the character b, k, or m to offset causes it to be > interpreted as a multiple of 512, 1024, or 1048576, respectively. > > ... I would expect the following output: > > 1. -s 41 -> one byte displayed. > 2. -s 42 -> no bytes displayed. > 2. -s 43 -> no bytes displayed. > > This is the case with your patch alone, but with the another patch > I posted (see bin/118723), it's completely broken, so there might be > an issue with the proposed change on either end. The logic in hexdump > is in serious need of fixing because there are tons of cornercases > like this in the code. i saw that you're working on fixing some hexdump bugs. after looking at the code i decided that this fix will be my only contribution. the code is a huge mess and way too complicated. i've started to rewrite the code (pretty much from scratch). not only is the code ugly it's slow and inefficient. just one random example: hexdump asumes that if a file isn't regular this means it's non-seekable. that's just plain wrong. it took me half an hour to hack in a few changes to make hexdump skip over a couple of hundred megabytes of my harddrive's device node withoutout any delays. using the current versin of hexdump for that took about 10 minutes!!! the point is that i don't think fixing hexdump is worth anyone's time, because it really needs to be rewritten from scratch. cheers. alex > Thanks, > -Garrett -- a13x From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 11:05:39 2010 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 096A61065673; Mon, 30 Aug 2010 11:05:39 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id BFA278FC1B; Mon, 30 Aug 2010 11:05:38 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id D6B7A1FFC33; Mon, 30 Aug 2010 11:05:37 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id A421084507; Mon, 30 Aug 2010 13:05:37 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ilya Bakulin References: <86wrry1hwv.fsf@ds4.des.no> <20100828130912.48205a47@kibab.com> <20100828195024.3d671a76@kibab.com> <20100828204415.6875b4ec@kibab.com> Date: Mon, 30 Aug 2010 13:05:37 +0200 In-Reply-To: <20100828204415.6875b4ec@kibab.com> (Ilya Bakulin's message of "Sat, 28 Aug 2010 20:44:15 +0400") Message-ID: <86bp8kjr7i.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: geom@freebsd.org, hackers@freebsd.org Subject: Re: Support for WD Advanced Format disks X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 11:05:39 -0000 Ilya Bakulin writes: > So, ad7p1.nop is shifted by 512 bytes and resides right on the > beginning of the physical sector. And it has 4096 "sector" size. Why did you shift the gnop? Did you short jumper 7-8? > For some reason, phybs begins with sector size 8192... I expected it > to begin with 4096... It starts at 2 x reported sector size, because it is designed primarily to test alignment, not performance. > Perfomance is excellent! No, performance blows. See here: http://maycontaintracesofbolts.blogspot.com/2010/08/benchmarking-advanced-f= ormat-drives.html > Notice, that for two subsequent phybs invocations there is big > difference in timings for the same parameters. Yes. WD Green disks suck. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 11:11:53 2010 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 82EEC1065674; Mon, 30 Aug 2010 11:11:53 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id DBC1E8FC16; Mon, 30 Aug 2010 11:11:52 +0000 (UTC) Received: by fxm4 with SMTP id 4so3618647fxm.13 for ; Mon, 30 Aug 2010 04:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=tbdatZTXKlGBKk72wv8EqKXyqlsX/gMONSseAPKrhvI=; b=XEnBAujXa3zAopSkBoIng7Y9+jFuHrtlI23/pwkcfctPD3s3/gjxpb4vsBIkdrBOtC GM2+Xy7zu7LMd1VVbBdIJKZuRjcD870vn32VkTLRVY7WyMO0/JOpD9mkO8V1NFbpwmN3 DGx9MBF5ol1KfNmDX/s/J0JZaKXQsEp+1PyDY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=C0LywlV1KbcW9motluGQg8VDHSPODcd3LDzWmmx9rz+VxjJb1U9QPSXMIUwukBAKKs +E43OGvoRORbHCzbfSGcc7IASHhJlZnVVOaXPoMpwOXVIG4lTRaYOxdwzJfMuTxT28D6 vLic4kTMQbjnPhxljf3v2XwlXdLN/cIWL74hk= Received: by 10.223.126.68 with SMTP id b4mr3581088fas.96.1283166711881; Mon, 30 Aug 2010 04:11:51 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id r8sm3252188faq.10.2010.08.30.04.11.50 (version=SSLv3 cipher=RC4-MD5); Mon, 30 Aug 2010 04:11:51 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C7B91EC.5070906@FreeBSD.org> Date: Mon, 30 Aug 2010 14:11:40 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: "YAMAMOTO, Taku" References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830195941.9731109c.taku@tackymt.homeip.net> In-Reply-To: <20100830195941.9731109c.taku@tackymt.homeip.net> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 11:11:53 -0000 YAMAMOTO, Taku wrote: > On Mon, 30 Aug 2010 13:07:38 +0300 > Alexander Motin wrote: >> Gary Jennejohn wrote: > (snip) >>> So, what else did you do to reduce interrupts so much? >>> >>> Ah, I think I see it now. My desktop has only C1 enabled. Is that it? >>> Unfortunately, it appears that only C1 is supported :( >> Yes, as I have said, at this moment empty ticks skipped only while CPU >> is in C2/C3 states. In C1 state there is no way to handle lost events on >> wake up. While it may be not very dangerous, it is not very good. > > There's an alternative way to catch exit-from-C1 atomically: > use MWAIT with bit0 of ECX set (``Treat masked interrupts as break events'' > in Intel 64 and IA-32 Architecthres Software Developer's Manual). > > In this way we can put each core individually into deeper Cx state without > additional costs (SMIs and the like) as a bonus. > > The problem is that it may be unavailable to earlier CPUs that support > MONITOR/MWAIT instructions: > we should check the presense of this feature by examining bit0 and bit1 of ECX > that is returned by CPUID 5. Thank you for the hint. I will investigate it now. But it still help only x86 systems. I have no idea how power management works on arm/mips/ppc/..., but I assume that periodic wake up there also may be not free. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 10:59:30 2010 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 5C8BE1065693; Mon, 30 Aug 2010 10:59:30 +0000 (UTC) (envelope-from taku@tackymt.homeip.net) Received: from basalt.tackymt.homeip.net (unknown [IPv6:2001:3e0:577:0:20d:61ff:fecc:2253]) by mx1.freebsd.org (Postfix) with ESMTP id 039188FC12; Mon, 30 Aug 2010 10:59:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by basalt.tackymt.homeip.net (Postfix) with ESMTP id E8733107C5; Mon, 30 Aug 2010 19:59:28 +0900 (JST) X-Virus-Scanned: amavisd-new at tackymt.homeip.net Received: from localhost ([127.0.0.1]) by localhost (basalt.tackymt.homeip.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wwOzlbsUSZbK; Mon, 30 Aug 2010 19:59:27 +0900 (JST) Received: from truth.mskc.confortune.co.jp (p0395aa.tokynt01.ap.so-net.ne.jp [121.3.149.170]) by basalt.tackymt.homeip.net (Postfix) with ESMTP; Mon, 30 Aug 2010 19:59:27 +0900 (JST) Date: Mon, 30 Aug 2010 19:59:41 +0900 From: "YAMAMOTO, Taku" To: Alexander Motin Message-Id: <20100830195941.9731109c.taku@tackymt.homeip.net> In-Reply-To: <4C7B82EA.2040104@FreeBSD.org> References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> X-Mailer: Sylpheed 3.0.3 (GTK+ 2.20.1; i386-portbld-freebsd8.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 30 Aug 2010 11:12:19 +0000 Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 10:59:30 -0000 On Mon, 30 Aug 2010 13:07:38 +0300 Alexander Motin wrote: > Gary Jennejohn wrote: (snip) > > So, what else did you do to reduce interrupts so much? > > > > Ah, I think I see it now. My desktop has only C1 enabled. Is that it? > > Unfortunately, it appears that only C1 is supported :( > > Yes, as I have said, at this moment empty ticks skipped only while CPU > is in C2/C3 states. In C1 state there is no way to handle lost events on > wake up. While it may be not very dangerous, it is not very good. There's an alternative way to catch exit-from-C1 atomically: use MWAIT with bit0 of ECX set (``Treat masked interrupts as break events'' in Intel 64 and IA-32 Architecthres Software Developer's Manual). In this way we can put each core individually into deeper Cx state without additional costs (SMIs and the like) as a bonus. The problem is that it may be unavailable to earlier CPUs that support MONITOR/MWAIT instructions: we should check the presense of this feature by examining bit0 and bit1 of ECX that is returned by CPUID 5. -- YAMAMOTO, Taku From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 11:57:10 2010 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 41CB910656A7; Mon, 30 Aug 2010 11:57:10 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 0305F8FC1B; Mon, 30 Aug 2010 11:57:09 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 0ABC01FFC34; Mon, 30 Aug 2010 11:57:09 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id D4E7184507; Mon, 30 Aug 2010 13:57:08 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Thiago Damas References: <86wrry1hwv.fsf@ds4.des.no> <20100828130912.48205a47@kibab.com> <20100828195024.3d671a76@kibab.com> Date: Mon, 30 Aug 2010 13:57:08 +0200 In-Reply-To: (Thiago Damas's message of "Sat, 28 Aug 2010 13:05:49 -0300") Message-ID: <86pqx0ia97.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Ilya Bakulin , hackers@freebsd.org, geom@freebsd.org Subject: Re: Support for WD Advanced Format disks X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 11:57:10 -0000 Thiago Damas writes: > "ATA 4K sector issues" > http://lists.freebsd.org/pipermail/freebsd-hackers/2010-March/031154.html Yes, we know. That's what this entire thread (and a zillion others before it) is about. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 11:57:11 2010 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 E10471065695; Mon, 30 Aug 2010 11:57:11 +0000 (UTC) (envelope-from webmaster@kibab.com) Received: from mx0.deglitch.com (backbone.deglitch.com [78.110.53.255]) by mx1.freebsd.org (Postfix) with ESMTP id 8CA548FC19; Mon, 30 Aug 2010 11:57:11 +0000 (UTC) Received: from kibab-work.smstraffic.ru (unknown [195.94.237.82]) by mx0.deglitch.com (Postfix) with ESMTPA id 4E9858FC4E; Mon, 30 Aug 2010 15:56:40 +0400 (MSD) Date: Mon, 30 Aug 2010 15:56:38 +0400 From: Ilya Bakulin To: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Message-ID: <20100830155638.710f8871@kibab-work.smstraffic.ru> In-Reply-To: <86bp8kjr7i.fsf@ds4.des.no> References: <86wrry1hwv.fsf@ds4.des.no> <20100828130912.48205a47@kibab.com> <20100828195024.3d671a76@kibab.com> <20100828204415.6875b4ec@kibab.com> <86bp8kjr7i.fsf@ds4.des.no> Organization: ON Labs X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: geom@freebsd.org, hackers@freebsd.org Subject: Re: Support for WD Advanced Format disks X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 11:57:12 -0000 =D0=92 Mon, 30 Aug 2010 13:05:37 +0200 Dag-Erling Sm=C3=B8rgrav =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > Ilya Bakulin writes: > > So, ad7p1.nop is shifted by 512 bytes and resides right on the > > beginning of the physical sector. And it has 4096 "sector" size. >=20 > Why did you shift the gnop? Did you short jumper 7-8? No, 7-8 remained as-is. ad7p1 was created using: #gpart add -t freebsd-ufs -s 10G -b 63 ad7=20 So it begins at sector #63, but physical 4096-block begins at logical secto= r 64. That's why I shifted gnop by 1 sector. > No, performance blows. :-( But this drive was bought primarily as backup solution. That is a good choi= ce according to your blog entry :-) > Yes. WD Green disks suck. Is it a problem of WD Green or it is common to all 4096-sector models? --=20 =D0=A1 =D1=83=D0=B2=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC, =D0=98=D0=BB=D1=8C=D1=8F =D0=91=D0=B0=D0=BA=D1=83=D0=BB=D0=B8=D0=BD (ON Lab= s) From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 12:01:43 2010 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 687051065675; Mon, 30 Aug 2010 12:01:43 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 262278FC19; Mon, 30 Aug 2010 12:01:42 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 2A90D1FFC34; Mon, 30 Aug 2010 12:01:42 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id EA59284507; Mon, 30 Aug 2010 14:01:41 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexander Best References: <20100829162707.GA98059@freebsd.org> <20100830103859.GA27716@freebsd.org> Date: Mon, 30 Aug 2010 14:01:41 +0200 In-Reply-To: <20100830103859.GA27716@freebsd.org> (Alexander Best's message of "Mon, 30 Aug 2010 10:38:59 +0000") Message-ID: <86iq2sia1m.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, Garrett Cooper Subject: Re: hexdump(1)/od(1) skip function off-by-one when offset == file 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, 30 Aug 2010 12:01:43 -0000 Alexander Best writes: > *hehehe* that might be true. maybe they've bought the src from AT&T? anyw= ay i > don't think the BSD license restricts you releasing code under a new lice= nse. > so what they did seems fine to me. You can release the code under a different license, but you still have to include the original license, disclaimer and copyright statement. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 12:44:26 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 6AFB310656A8; Mon, 30 Aug 2010 12:44:26 +0000 (UTC) Date: Mon, 30 Aug 2010 12:44:26 +0000 From: Alexander Best To: Dag-Erling =?iso-8859-15?Q?Sm=F8rgrav?= Message-ID: <20100830124426.GA58393@freebsd.org> References: <20100829162707.GA98059@freebsd.org> <20100830103859.GA27716@freebsd.org> <86iq2sia1m.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86iq2sia1m.fsf@ds4.des.no> Cc: freebsd-hackers@freebsd.org, Garrett Cooper Subject: Re: hexdump(1)/od(1) skip function off-by-one when offset == file 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, 30 Aug 2010 12:44:26 -0000 On Mon Aug 30 10, Dag-Erling Smørgrav wrote: > Alexander Best writes: > > *hehehe* that might be true. maybe they've bought the src from AT&T? anyway i > > don't think the BSD license restricts you releasing code under a new license. > > so what they did seems fine to me. > > You can release the code under a different license, but you still have > to include the original license, disclaimer and copyright statement. hmmm...might be a license violation then. dunno. i'll leave that to the lawyers to decide. ;) cheers. alex > > DES > -- > Dag-Erling Smørgrav - des@des.no -- a13x From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 12:59:54 2010 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 ABD801065697; Mon, 30 Aug 2010 12:59:54 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 6C7948FC0C; Mon, 30 Aug 2010 12:59:54 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 375071FFC38; Mon, 30 Aug 2010 12:59:53 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 042FD8452E; Mon, 30 Aug 2010 14:59:52 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ilya Bakulin References: <86wrry1hwv.fsf@ds4.des.no> <20100828130912.48205a47@kibab.com> <20100828195024.3d671a76@kibab.com> <20100828204415.6875b4ec@kibab.com> <86bp8kjr7i.fsf@ds4.des.no> <20100830155638.710f8871@kibab-work.smstraffic.ru> Date: Mon, 30 Aug 2010 14:59:52 +0200 In-Reply-To: <20100830155638.710f8871@kibab-work.smstraffic.ru> (Ilya Bakulin's message of "Mon, 30 Aug 2010 15:56:38 +0400") Message-ID: <86eidgi7cn.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: geom@freebsd.org, hackers@freebsd.org Subject: Re: Support for WD Advanced Format disks X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 12:59:54 -0000 Ilya Bakulin writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Why did you shift the gnop? Did you short jumper 7-8? > No, 7-8 remained as-is. ad7p1 was created using: > #gpart add -t freebsd-ufs -s 10G -b 63 ad7=20 > > So it begins at sector #63, but physical 4096-block begins at logical > sector 64. That's why I shifted gnop by 1 sector. Why aren't you using the whole disk? > > Yes. WD Green disks suck. > Is it a problem of WD Green or it is common to all 4096-sector models? WD Green, even their non-AF disks (like the WD20EADS I tested) suck. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 13:10:31 2010 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 90B8D10656A9; Mon, 30 Aug 2010 13:10:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 648798FC19; Mon, 30 Aug 2010 13:10:31 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 0712C46B29; Mon, 30 Aug 2010 09:10:31 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id F01DA8A03C; Mon, 30 Aug 2010 09:10:29 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org, Alexander Fiveg Date: Mon, 30 Aug 2010 08:16:11 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <20100827201140.GA2812@debmaster-laptop> In-Reply-To: <20100827201140.GA2812@debmaster-laptop> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201008300816.11278.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 30 Aug 2010 09:10:29 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: doc@freebsd.org Subject: Re: Debugging Loadable Modules Using GDB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 13:10:31 -0000 On Friday, August 27, 2010 4:11:41 pm Alexander Fiveg wrote: > Hi, > from "FreeBSD Developers' Handbook, 10.7 Debugging Loadable Modules Using > GDB": > "... > (kgdb) add-symbol-file /sys/modules/linux/linux.ko 0xc0ae22d0 > ... > " > Actually I couldn't debug my modules using .ko-file. Moreover, I've find out that .ko files do not contain sections with debugging info. With .kld-file debugging works out. Do I something incorrectly or the info in the Developers Book is outdated? With newer versions of kgdb you shouldn't need to manually invoke 'add-symbol- file'. Kernel modules are treated as shared libraries and should automatically be loaded. Try using 'info sharedlibrary' to see the list of kernel modules and if symbols for them are loaded already. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 13:10:32 2010 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 E5CC21065672 for ; Mon, 30 Aug 2010 13:10:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B85838FC1F for ; Mon, 30 Aug 2010 13:10:32 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 6B48646B0C; Mon, 30 Aug 2010 09:10:32 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 9250E8A04E; Mon, 30 Aug 2010 09:10:31 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Mon, 30 Aug 2010 08:28:51 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201008300828.51935.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 30 Aug 2010 09:10:31 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Davide Italiano Subject: Re: System freezes unexpectly X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 13:10:33 -0000 On Sunday, August 29, 2010 10:18:48 am Davide Italiano wrote: > Hi. > I'm running 8.1 on my Sony Vaio laptop, with dwm as window manager on > lastest Xorg on ports. > When I'm trying to run firefox3, the system "freezes" unexpectly. I > know that "freezes" is a bit generic but I can't find a more specific > term to describe the situation. Dmesg doesn't give useful infos. > > I installed firefox using pkg_add -r , the only add-on/plugin > installed is Xmarks. > > I'm ready to eventually debug, any suggestion is apprectiated. > > Thanks Can you ssh into the machine or ping it when it is frozen? -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 14:10:25 2010 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 EE7FE1065674 for ; Mon, 30 Aug 2010 14:10:25 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 4B74D8FC19 for ; Mon, 30 Aug 2010 14:10:24 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA12054 for ; Mon, 30 Aug 2010 17:10:23 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4C7BBBCF.4060904@icyb.net.ua> Date: Mon, 30 Aug 2010 17:10:23 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.8) Gecko/20100823 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4C7A8ACD.9020201@gmail.com> <4C7ACD77.7040608@freebsd.org> In-Reply-To: <4C7ACD77.7040608@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: System freezes unexpectly X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 14:10:26 -0000 on 30/08/2010 00:13 dougb@freebsd.org said the following: > On 08/29/2010 09:33 AM, Davide Italiano wrote: >>> Can you run firefox from xterm and check for any errors that might be >>> > generated? >>> > >>> > Cheers, >>> > >>> > -- >>> > Glen Barber >>> > >> Tried doing this. But no output. > > Try recompiling the port with the option for debug enabled. That'll get you some > output. :) Guys asking questions about firefox, etc, why do you do that? :) Did you misread system freeze as firefox freeze? -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 14:26:43 2010 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 0A13710656CB for ; Mon, 30 Aug 2010 14:26:43 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 89B5E8FC1C for ; Mon, 30 Aug 2010 14:26:42 +0000 (UTC) Received: by bwz20 with SMTP id 20so4398616bwz.13 for ; Mon, 30 Aug 2010 07:26:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=IBmDgN+sjS0HpwoJnFlzRyRO4wfpua7+fa7BWooI47Y=; b=IhGnPMCJQ58GTt3OOf3QSFq3o6oFOyM2vCIi4MSyNrgNDjRBL95CS6gZ5cXYNv9gir SFVfvjjzLqI3dqnnIn1bF9+jrt8qbGUzVULD4AypM/ZljgV19pRvDZ/cY7f2zG7fXMfQ dzzTNon3eeZ/ZLwfNxVumPEgScWmH2JSKJm2g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=B7H0r4ggKYRBvrmyjcTiWu+6e9eq0w+Shq4Q0P93uucMHtUxDWUrlumsyVwGJYDs+A Rxm9xA/eI05gdSE01wvR1kaXCfK6HH/nBbWpRWlo1sqyBWB7ox0cApo6dULcHG7tKVIl 2zsp7mPU3dTzjjhpwCPXTvIMK3dYioDjb+IYs= MIME-Version: 1.0 Received: by 10.204.57.9 with SMTP id a9mr3310805bkh.104.1283178401243; Mon, 30 Aug 2010 07:26:41 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.204.113.79 with HTTP; Mon, 30 Aug 2010 07:26:41 -0700 (PDT) In-Reply-To: <4C7BBBCF.4060904@icyb.net.ua> References: <4C7A8ACD.9020201@gmail.com> <4C7ACD77.7040608@freebsd.org> <4C7BBBCF.4060904@icyb.net.ua> Date: Mon, 30 Aug 2010 07:26:41 -0700 X-Google-Sender-Auth: MFgYNB1aUh1dMTTKP7sB2TEsPaU Message-ID: From: Garrett Cooper To: Andriy Gapon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: System freezes unexpectly X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 14:26:43 -0000 On Mon, Aug 30, 2010 at 7:10 AM, Andriy Gapon wrote: > on 30/08/2010 00:13 dougb@freebsd.org said the following: >> On 08/29/2010 09:33 AM, Davide Italiano wrote: >>>> Can you run firefox from xterm and check for any errors that might be >>>> > =A0generated? >>>> > >>>> > =A0Cheers, >>>> > >>>> > =A0-- >>>> > =A0Glen Barber >>>> > >>> Tried doing this. But no output. >> >> Try recompiling the port with the option for debug enabled. That'll get = you some >> output. :) > > Guys asking questions about firefox, etc, why do you do that? :) > Did you misread system freeze as firefox freeze? Because it might hold a valuable clue as to why the system is freezing :). Also, make sure that you have POSIX semaphores (the sem module, or `options P1003_1B_SEMAPHORES' in your kernel config) enabled on the system. Some functionality in Firefox depends on functioning POSIX semaphores. Cheers, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 16:12:57 2010 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 2BF0B106566C; Mon, 30 Aug 2010 16:12:57 +0000 (UTC) (envelope-from pebu3op@googlemail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 811E08FC08; Mon, 30 Aug 2010 16:12:55 +0000 (UTC) Received: by ewy4 with SMTP id 4so3571832ewy.13 for ; Mon, 30 Aug 2010 09:12:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:reply-to:mail-followup-to:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=badbaG216MEApN2909jiRjsOdZZV9j+MQNQbobCgVck=; b=kxNPIHplJ/6YzkUTT/Sz42gV/fOMJVjMyvrjcpkBdF6hx6KO93rrPZxNcpFx2LcKiy joDQPu5ug5RYdMtMjyr7cyvvY0K0viAMii3AFUMzDIKld17goEruhlwAYe0GdCt49V/u XrW5CYhOytWH8Sh+4H4nZMDoP/4ThExlvc0V8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:mail-followup-to :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; b=deKjsDvqEL0QR2Bu6h7JJb2wDziZnz5z+QPMtp5VxLRGIfF6n+9NGK1m4B075cJWkT Y1m78qTuFz4GO1HZU5jO/jEk9ryPVxZYsmL8nD6bpqziFcyNES6EBcLjFVIDhC3V7GzY iQ6Y3ywjHOkLmlXHqjMWJ9xsA7qiwB0bfZN5E= Received: by 10.216.7.129 with SMTP id 1mr5104650wep.90.1283184774889; Mon, 30 Aug 2010 09:12:54 -0700 (PDT) Received: from debmaster-laptop ([130.149.220.190]) by mx.google.com with ESMTPS id k7sm4558220wej.26.2010.08.30.09.12.52 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 30 Aug 2010 09:12:53 -0700 (PDT) Date: Mon, 30 Aug 2010 18:12:50 +0200 From: Alexander Fiveg To: John Baldwin Message-ID: <20100830161250.GA3135@debmaster-laptop> Mail-Followup-To: John Baldwin , freebsd-hackers@freebsd.org, doc@freebsd.org References: <20100827201140.GA2812@debmaster-laptop> <201008300816.11278.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201008300816.11278.jhb@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@freebsd.org, doc@freebsd.org Subject: Re: Debugging Loadable Modules Using GDB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexander Fiveg List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 16:12:57 -0000 On Mon, Aug 30, 2010 at 08:16:11AM -0400, John Baldwin wrote: > On Friday, August 27, 2010 4:11:41 pm Alexander Fiveg wrote: > > Hi, > > from "FreeBSD Developers' Handbook, 10.7 Debugging Loadable Modules Using > > GDB": > > "... > > (kgdb) add-symbol-file /sys/modules/linux/linux.ko 0xc0ae22d0 > > ... > > " > > Actually I couldn't debug my modules using .ko-file. Moreover, I've find out > that .ko files do not contain sections with debugging info. With .kld-file > debugging works out. Do I something incorrectly or the info in the Developers > Book is outdated? > > With newer versions of kgdb you shouldn't need to manually invoke 'add-symbol- > file'. Kernel modules are treated as shared libraries and should > automatically be loaded. Try using 'info sharedlibrary' to see the list of > kernel modules and if symbols for them are loaded already. Yes, the .ko files are loaded automatically. The problem is that they do not contain debugging info. I have always to load the .kld file in order to debug a module: (kgdb) f 9 #9 0xc4dc558b in rm_8254_delayed_interrupt_per_packet () from /boot/kernel/if_ringmap.ko (kgdb) info locals No symbol table info available. (kgdb) add-symbol-file /home/alexandre/p4/ringmap/current/sys/modules/ringmap/if_ringmap.kld 0xc4dafc70 add symbol table from file "/home/alexandre/p4/ringmap/current/sys/modules/ringmap/if_ringmap.kld" at .text_addr = 0xc4dafc70 (y or n) y Reading symbols from /home/alexandre/p4/ringmap/current/sys/modules/ringmap/if_ringmap.kld...done. (kgdb) f 9 #9 0xc4dc558b in rm_8254_delayed_interrupt_per_packet () at /home/alexandre/p4/ringmap/current/sys/modules/ringmap/../../dev/e1000/ringmap_8254.c:142 142 co->ring->slot[slot_num].ts = co->ring->last_ts; (kgdb) info locals co = (struct capt_object *) 0xc4d68380 adapter = (struct adapter *) 0xc4e77000 __func__ = "E\000\000ï¿œ\034@\000\000\211\203ï¿œE\000\000\017\206B\022\000\000\2039\000\213A\004\017\205ï¿œ\f\000\000\001ᅵᅵ1ï¿œ" Is there any way to get the all symbols and needed debug info without loading the .kld file ? Alex > > -- > John Baldwin > _______________________________________________ > 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" -- Alexander Fiveg Key fingerprint = ECBB 747C 919D 78F5 E8EC 7DBC 8B46 376D 107B CCAA From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 16:24:59 2010 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 DBF65106564A; Mon, 30 Aug 2010 16:24:59 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 744B68FC1B; Mon, 30 Aug 2010 16:24:59 +0000 (UTC) Received: by qyk8 with SMTP id 8so3211391qyk.13 for ; Mon, 30 Aug 2010 09:24:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=bT9yzAhRWF4kngZyUUwggNu3NZ3vsfvoYRwpxhwylVE=; b=cpB2/M3yX7EybTQztTVeaSO/Pw2v00Nz9/7IgAJplJa+rZsc+TQeCD3arkMGgzm3rd URlAHcXc490BOtTz/ZutbpNz1wAPyuaAR2Cq7Fv4iYYDLbp52nmhmERYEKtmrGm+q6DJ wR6CRyjloONeP85ttN7XRxTBGxUJO4DAssJxM= 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=VS5c+Tk+suajz5tLVoZo3B8QAuMLEvF/zTiOtMeBhgbmKkKeQUa76WPqcwFaDvbKjM oLMisQkX5FX6qTrwBm2e9qcLknQ7bJLcAQRt2f9Ewk8scH79w2rhK6VWjnr7S8D+Mwhf 5ggNkantOsvH1nNWgAB2LuiXPYMXeraDYMCz8= MIME-Version: 1.0 Received: by 10.224.79.11 with SMTP id n11mr2988834qak.256.1283185498383; Mon, 30 Aug 2010 09:24:58 -0700 (PDT) Received: by 10.229.246.68 with HTTP; Mon, 30 Aug 2010 09:24:58 -0700 (PDT) In-Reply-To: References: <4C7A8ACD.9020201@gmail.com> <4C7ACD77.7040608@freebsd.org> <4C7BBBCF.4060904@icyb.net.ua> Date: Mon, 30 Aug 2010 18:24:58 +0200 Message-ID: From: Davide Italiano To: Garrett Cooper Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, Andriy Gapon Subject: Re: System freezes unexpectly X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 16:24:59 -0000 removing ~/.mozilla works fine. I think that problem's related to add-on Xmarks I've been installer or to "Restore session" functionality From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 16:30:45 2010 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 A813C1065673; Mon, 30 Aug 2010 16:30:45 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id C29348FC25; Mon, 30 Aug 2010 16:30:44 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA14332; Mon, 30 Aug 2010 19:30:43 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4C7BDCB2.8090803@icyb.net.ua> Date: Mon, 30 Aug 2010 19:30:42 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.8) Gecko/20100823 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org, doc@freebsd.org, pebu3op@googlemail.com References: <20100827201140.GA2812@debmaster-laptop> <201008300816.11278.jhb@freebsd.org> <20100830161250.GA3135@debmaster-laptop> In-Reply-To: <20100830161250.GA3135@debmaster-laptop> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: Re: Debugging Loadable Modules Using GDB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 16:30:45 -0000 on 30/08/2010 19:12 Alexander Fiveg said the following: > Yes, the .ko files are loaded automatically. The problem is that they do > not contain debugging info. I have always to load the .kld file in order to > debug a module: хытшзъ > Is there any way to get the all symbols and needed debug info without > loading the .kld file ? As I've already suggested the symbols are in *.symbols files. If you have those then they should be loaded automatically, as John has suggested. If you don't have them, then arrange to have them. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 16:45:42 2010 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 041ED106566C for ; Mon, 30 Aug 2010 16:45:42 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 818DE8FC15 for ; Mon, 30 Aug 2010 16:45:41 +0000 (UTC) Received: by bwz20 with SMTP id 20so4570102bwz.13 for ; Mon, 30 Aug 2010 09:45:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=fVY7LZ48bMQ7VoeE1jsNqkvjDioNZ/B5kPIc/xnY00k=; b=DXK3CeoJiiFGo26r5zbtaMIEdITYTpMsWX1w2ccw6F/YYersC+14nYEex/9jSirQnZ pBU0YhAtsMBRpoAlWGJU+npjfGRuFe5C4HovAJfhCVyfBfnvkKcrnIyt5OKm1cK1fTtw GPhWH1DH9g2H69+Df/85U3HJ0z6+eSN8DA3kQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=fuBDLtHQlDY972hQVu7uGAxyDQ60up7MZS3r78lutSpfMTbCIABFDpZlq46pGiuc5F f4upuG8oEn9aTjVLSuekEjLI1g16ttJez721AM7WHYgPHRMTJ+6S3b6y4snIPtU+I4o1 n7n+aHoXOfebuEP43fmHiHI+24TKWsZLh096s= MIME-Version: 1.0 Received: by 10.204.146.153 with SMTP id h25mr3560553bkv.86.1283186740400; Mon, 30 Aug 2010 09:45:40 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.204.113.79 with HTTP; Mon, 30 Aug 2010 09:45:40 -0700 (PDT) In-Reply-To: References: <4C7A8ACD.9020201@gmail.com> <4C7ACD77.7040608@freebsd.org> <4C7BBBCF.4060904@icyb.net.ua> Date: Mon, 30 Aug 2010 09:45:40 -0700 X-Google-Sender-Auth: 0BBR-vpQM6IeBdMmx6IeGtwFM5E Message-ID: From: Garrett Cooper To: Davide Italiano Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, Andriy Gapon Subject: Re: System freezes unexpectly X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 16:45:42 -0000 On Mon, Aug 30, 2010 at 9:24 AM, Davide Italiano wrote: > removing ~/.mozilla works fine. I think that problem's related to > add-on Xmarks I've been installer or to "Restore session" > functionality It would have been interesting to capture what `froze' the machine, in particular because it could have been a valuable bug for either Mozilla to capture and fix, or for us to capture and fix. Unless your machine doesn't meet the hardware requirements, I don't see a reason why a userland application should lock up a system. There are other ways you can debug this further, using -safe-mode as a next step, then choose to not restore the last session (which is available from within the javascript settings file -- nsPrefs.js?). Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 17:14:25 2010 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 085C41065675; Mon, 30 Aug 2010 17:14:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id CE0FB8FC13; Mon, 30 Aug 2010 17:14:24 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 68CB346B0C; Mon, 30 Aug 2010 13:14:24 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id A40278A03C; Mon, 30 Aug 2010 13:14:23 -0400 (EDT) From: John Baldwin To: Alexander Fiveg Date: Mon, 30 Aug 2010 13:10:37 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <20100827201140.GA2812@debmaster-laptop> <201008300816.11278.jhb@freebsd.org> <20100830161250.GA3135@debmaster-laptop> In-Reply-To: <20100830161250.GA3135@debmaster-laptop> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201008301310.38148.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 30 Aug 2010 13:14:23 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org, doc@freebsd.org Subject: Re: Debugging Loadable Modules Using GDB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 17:14:25 -0000 On Monday, August 30, 2010 12:12:50 pm Alexander Fiveg wrote: > On Mon, Aug 30, 2010 at 08:16:11AM -0400, John Baldwin wrote: > > On Friday, August 27, 2010 4:11:41 pm Alexander Fiveg wrote: > > > Hi, > > > from "FreeBSD Developers' Handbook, 10.7 Debugging Loadable Modules U= sing > > > GDB": > > > "... > > > (kgdb) add-symbol-file /sys/modules/linux/linux.ko 0xc0ae22d0 > > > ... > > > " > > > Actually I couldn't debug my modules using .ko-file. Moreover, I've f= ind out=20 > > that .ko files do not contain sections with debugging info. With .kld-f= ile=20 > > debugging works out. Do I something incorrectly or the info in the Deve= lopers=20 > > Book is outdated? > >=20 > > With newer versions of kgdb you shouldn't need to manually invoke 'add-= symbol- > > file'. Kernel modules are treated as shared libraries and should=20 > > automatically be loaded. Try using 'info sharedlibrary' to see the lis= t of=20 > > kernel modules and if symbols for them are loaded already. > Yes, the .ko files are loaded automatically. The problem is that they do > not contain debugging info. I have always to load the .kld file in order = to=20 > debug a module: >=20 > (kgdb) f 9 > #9 0xc4dc558b in rm_8254_delayed_interrupt_per_packet () from > /boot/kernel/if_ringmap.ko > (kgdb) info locals > No symbol table info available. >=20 > (kgdb) add-symbol-file /home/alexandre/p4/ringmap/current/sys/modules/rin= gmap/if_ringmap.kld 0xc4dafc70 > add symbol table from file "/home/alexandre/p4/ringmap/current/sys/module= s/ringmap/if_ringmap.kld" > at > .text_addr =3D 0xc4dafc70 > (y or n) y > Reading symbols from /home/alexandre/p4/ringmap/current/sys/modules/ringm= ap/if_ringmap.kld...done. >=20 > (kgdb) f 9=20 > #9 0xc4dc558b in rm_8254_delayed_interrupt_per_packet () > at /home/alexandre/p4/ringmap/current/sys/modules/ringmap/../../dev/e= 1000/ringmap_8254.c:142 > 142 co->ring->slot[slot_num].ts =3D co->ring->last_ts; >=20 > (kgdb) info locals > co =3D (struct capt_object *) 0xc4d68380 > adapter =3D (struct adapter *) 0xc4e77000 > __func__ =3D "E\000\000=EF=BF=BD\034@\000\000\211\203=EF=BF=BDE\000\000\0= 17\206B\022\000\000\2039\000\213A\004\017\205=EF=BF=BD\f\000\000\001=EF=BF= =BD=EF=BF=BD1=EF=BF=BD" >=20 >=20 > Is there any way to get the all symbols and needed debug info without > loading the .kld file ? How are you compiling the kld? If you are building it by hand, use 'make DEBUG_FLAGS=3D-g' when you build and install the kld. That should bu= ild with debug symbols enabled and install the ko.symbols file which kgdb will find and use. =2D-=20 John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 20:34:09 2010 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 C20FE10656AC; Mon, 30 Aug 2010 20:34:09 +0000 (UTC) (envelope-from pebu3op@googlemail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id E5D8C8FC0A; Mon, 30 Aug 2010 20:34:08 +0000 (UTC) Received: by bwz20 with SMTP id 20so4767665bwz.13 for ; Mon, 30 Aug 2010 13:34:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:reply-to:mail-followup-to:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=fNJoURYUUg9EbMwZk3AFJ5Dso4ALeUlBSB5YFgXhHOk=; b=d20+F8ZJH9umbtepvhgbm3SGOwLalLXBIktMY1gSHMuAoZD5jaMLaW1+HNSNYrm9Y0 OkT0x6Yek1gdygc6FtZRydbR1mVkGROvlFAlR4GYJlPPibmDUDsoy0Os5jK4E+Y9L+HK FMc4IyM0VHAFBwV9LAIZg5UR99Y6cBBswz+1U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:mail-followup-to :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; b=oAOZhlU0fCiY4NyLnQ5SSAN1snPndKXTWopjGPc5nthJa4ZpbxHAnMntJoNhWxR5Gw zN3hQDhck3Leljyty0eG4J0CIU42lLOGTEJKUwfxO3amZf15ikhaSP6W0o2ws7A/ACQk 1t+tmuIbNlrkGMveZHKMzjCrSxVPbdcTWRLiw= Received: by 10.204.78.143 with SMTP id l15mr3773532bkk.22.1283200447526; Mon, 30 Aug 2010 13:34:07 -0700 (PDT) Received: from debmaster-laptop ([130.149.220.190]) by mx.google.com with ESMTPS id d27sm5572626bku.22.2010.08.30.13.34.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 30 Aug 2010 13:34:06 -0700 (PDT) Date: Mon, 30 Aug 2010 22:34:04 +0200 From: Alexander Fiveg To: John Baldwin Message-ID: <20100830203404.GC3135@debmaster-laptop> Mail-Followup-To: John Baldwin , freebsd-hackers@freebsd.org, doc@freebsd.org References: <20100827201140.GA2812@debmaster-laptop> <201008300816.11278.jhb@freebsd.org> <20100830161250.GA3135@debmaster-laptop> <201008301310.38148.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201008301310.38148.jhb@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@freebsd.org, doc@freebsd.org Subject: Re: Debugging Loadable Modules Using GDB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexander Fiveg List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 20:34:09 -0000 On Mon, Aug 30, 2010 at 01:10:37PM -0400, John Baldwin wrote: > On Monday, August 30, 2010 12:12:50 pm Alexander Fiveg wrote: > > On Mon, Aug 30, 2010 at 08:16:11AM -0400, John Baldwin wrote: > > > On Friday, August 27, 2010 4:11:41 pm Alexander Fiveg wrote: > > > > Hi, > > > > from "FreeBSD Developers' Handbook, 10.7 Debugging Loadable Modules Using > > > > GDB": > > > > "... > > > > (kgdb) add-symbol-file /sys/modules/linux/linux.ko 0xc0ae22d0 > > > > ... > > > > " > > > > Actually I couldn't debug my modules using .ko-file. Moreover, I've find out > > > that .ko files do not contain sections with debugging info. With .kld-file > > > debugging works out. Do I something incorrectly or the info in the Developers > > > Book is outdated? > > > > > > With newer versions of kgdb you shouldn't need to manually invoke 'add-symbol- > > > file'. Kernel modules are treated as shared libraries and should > > > automatically be loaded. Try using 'info sharedlibrary' to see the list of > > > kernel modules and if symbols for them are loaded already. > > Yes, the .ko files are loaded automatically. The problem is that they do > > not contain debugging info. I have always to load the .kld file in order to > > debug a module: > > > > (kgdb) f 9 > > #9 0xc4dc558b in rm_8254_delayed_interrupt_per_packet () from > > /boot/kernel/if_ringmap.ko > > (kgdb) info locals > > No symbol table info available. > > > > (kgdb) add-symbol-file /home/alexandre/p4/ringmap/current/sys/modules/ringmap/if_ringmap.kld 0xc4dafc70 > > add symbol table from file "/home/alexandre/p4/ringmap/current/sys/modules/ringmap/if_ringmap.kld" > > at > > .text_addr = 0xc4dafc70 > > (y or n) y > > Reading symbols from /home/alexandre/p4/ringmap/current/sys/modules/ringmap/if_ringmap.kld...done. > > > > (kgdb) f 9 > > #9 0xc4dc558b in rm_8254_delayed_interrupt_per_packet () > > at /home/alexandre/p4/ringmap/current/sys/modules/ringmap/../../dev/e1000/ringmap_8254.c:142 > > 142 co->ring->slot[slot_num].ts = co->ring->last_ts; > > > > (kgdb) info locals > > co = (struct capt_object *) 0xc4d68380 > > adapter = (struct adapter *) 0xc4e77000 > > __func__ = "E\000\000ï¿œ\034@\000\000\211\203ï¿œE\000\000\017\206B\022\000\000\2039\000\213A\004\017\205ï¿œ\f\000\000\001ᅵᅵ1ï¿œ" > > > > > > Is there any way to get the all symbols and needed debug info without > > loading the .kld file ? > > How are you compiling the kld? If you are building it by hand, use > 'make DEBUG_FLAGS=-g' when you build and install the kld. That should build > with debug symbols enabled and install the ko.symbols file which kgdb will > find and use. Thanks a lot!. That is what I want to know. But I think this option is not mentioned anywhere. I could not find it in "man make make.conf" and also no mention about it in FreeBSD Developers' Handbook. Alex > > -- > John Baldwin -- Alexander Fiveg Key fingerprint = ECBB 747C 919D 78F5 E8EC 7DBC 8B46 376D 107B CCAA From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 21:14:49 2010 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 6B7AD10656A4 for ; Mon, 30 Aug 2010 21:14:49 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 8EB9A8FC1B for ; Mon, 30 Aug 2010 21:14:48 +0000 (UTC) Received: by wwb34 with SMTP id 34so5841118wwb.31 for ; Mon, 30 Aug 2010 14:14:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject :date:user-agent:cc:references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=7FnbxWg0rI23rPnQrSLPNdKwtMSomVuEyb/JU1rTrG0=; b=gUMz3DU7e1Z5cz5+z6VqafAsLeyOH+At75aecx1g2+Xpv681jDZXqmaUU/qigpEYqW F5PM0vVZ7hjA6AzGYkzQzXJDH9Qf1juVj8CiY9rUsx9yB7Esw+FDlNL3tRNSSxhP6d8E bQDj0RKUXId0FFHMwLQRD0A/OimibAQ5uYncw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; b=XYfZhb8FmzigR/p8CiBPOuMpE/nTHe940QSBih/h/vF+f42RERn7OOonXG4Hx+gB/m fNrt0QjRuHNp+h0nuC0wik8EGxVGZkZdjwK9DHPI6r9RmIaxCJKXr8mEOA0PUxLzgM+Q 0iB06RsouuXL8EJxOfolXwx0T2nBb30RoQwNI= Received: by 10.227.135.18 with SMTP id l18mr5543446wbt.120.1283201045906; Mon, 30 Aug 2010 13:44:05 -0700 (PDT) Received: from dragon.dg (41-132-25-181.dsl.mweb.co.za [41.132.25.181]) by mx.google.com with ESMTPS id b23sm6882760wbb.22.2010.08.30.13.44.01 (version=SSLv3 cipher=RC4-MD5); Mon, 30 Aug 2010 13:44:05 -0700 (PDT) From: David Naylor Organization: Private To: freebsd-hackers@freebsd.org Date: Mon, 30 Aug 2010 22:44:13 +0200 User-Agent: KMail/1.13.5 (FreeBSD/9.0-CURRENT; KDE/4.4.5; amd64; ; ) References: <201006251852.30302.naylor.b.david@gmail.com> <201006252212.46301.naylor.b.david@gmail.com> In-Reply-To: <201006252212.46301.naylor.b.david@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1409236.Jd7gOkigLW"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201008302244.18208.naylor.b.david@gmail.com> Cc: Garrett Cooper Subject: Re: [RFR] mtree improvements (take 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: Mon, 30 Aug 2010 21:14:49 -0000 --nextPart1409236.Jd7gOkigLW Content-Type: multipart/mixed; boundary="Boundary-01=_dgBfMjvoRdsPhiC" Content-Transfer-Encoding: 7bit --Boundary-01=_dgBfMjvoRdsPhiC Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 25 June 2010 22:12:42 David Naylor wrote: > On Friday 25 June 2010 20:01:42 Garrett Cooper wrote: > > On Fri, Jun 25, 2010 at 9:52 AM, David Naylor >=20 > wrote: > > > Hi, > > >=20 > > > I've created a patch that increases the performance of mtree. This is > > > of particular use during a port install. In an extreme case I have > > > experienced a ~20% increase [1]. > > >=20 > > > For a full discussion see PR bin/143732. This arose out of [2] where= I > > > experienced the increase. > > >=20 > > > For your convenience I have attached the patch. > > >=20 > > > Please review this patch and if it is acceptable, commit it. > > >=20 > > > Regards, > > >=20 > > > David > > >=20 > > > 1] http://markmail.org/message/iju3l6hyv7s7emrb > > > 2] http://markmail.org/message/gfztjpszl5dozzii >=20 > I've included some more changes. I do not think -[uU] needs to be set wh= en > skipping vwalk. I also move sflag so it will get called even if eflag is > set (bug in my patch). >=20 > I'm not sure sflag will produce the same results as check() and vwalk() m= ay > call compare() in different orders? Will this impact on crc? I've also fixed a buffer overflow bug in mtree, there is an example of an m= tree=20 file that "triggers" the bug. Nothing interesting happens. =20 All comments are welcome. =20 David P.S. does anyone know of a test suite for mtree? --Boundary-01=_dgBfMjvoRdsPhiC Content-Type: text/plain; charset="ISO-8859-1"; name="big_path.mtree" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="big_path.mtree" /set uid=1001 gid=1001 mode=0755 . type=dir this_is_a_very_long_directory_name_that_is_exactly_128_characts_long_requiring_8_to_exceed_the_maximum_path_length_of_1024_byte type=dir this_is_a_very_long_directory_name_that_is_exactly_128_characts_long_requiring_8_to_exceed_the_maximum_path_length_of_1024_byte type=dir this_is_a_very_long_directory_name_that_is_exactly_128_characts_long_requiring_8_to_exceed_the_maximum_path_length_of_1024_byte type=dir this_is_a_very_long_directory_name_that_is_exactly_128_characts_long_requiring_8_to_exceed_the_maximum_path_length_of_1024_byte type=dir this_is_a_very_long_directory_name_that_is_exactly_128_characts_long_requiring_8_to_exceed_the_maximum_path_length_of_1024_byte type=dir this_is_a_very_long_directory_name_that_is_exactly_128_characts_long_requiring_8_to_exceed_the_maximum_path_length_of_1024_byte type=dir this_is_a_very_long_directory_name_that_is_exactly_128_characts_long_requiring_8_to_exceed_the_maximum_path_length_of_1024_byte type=dir this_is_a_very_long_directory_name_that_is_exactly_128_characts_long_requiring_8_to_exceed_the_maximum_path_length_of_1024_byte type=dir and_a_file_to_tip_the_scale .. .. .. .. .. .. .. .. .. --Boundary-01=_dgBfMjvoRdsPhiC Content-Type: text/x-patch; charset="ISO-8859-1"; name="mtree.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="mtree.diff" =2D-- /usr/src/usr.sbin/mtree/verify.c 2007-12-07 14:22:38.000000000 +0200 +++ verify.c 2010-08-30 22:32:32.000000000 +0200 @@ -47,20 +47,35 @@ #include "mtree.h" #include "extern.h" =20 +/* + * Error returned when buffer overflows, cannot be 2 as that is reserved f= or + * MISMATCHEXIT. + */ +#define BUFFEROVERFLOWEXIT 3 + static NODE *root; static char path[MAXPATHLEN]; =20 =2Dstatic void miss(NODE *, char *); +static int miss(NODE *, char *, size_t); +static int check(NODE *, char *, size_t); static int vwalk(void); =20 int mtree_verifyspec(FILE *fi) { =2D int rval; + int rval =3D 0; =20 root =3D mtree_readspec(fi); =2D rval =3D vwalk(); =2D miss(root, path); + /* No need to walk tree if we are ignoring extra files. */ + if (!eflag) + rval =3D vwalk(); + *path =3D '\0'; + rval |=3D miss(root, path, MAXPATHLEN); + + /* Called here to make sure vwalk() and check() have been called */ + if (sflag) + warnx("%s checksum: %lu", fullpath, (unsigned long)crc_total); + return (rval); } =20 @@ -135,40 +150,96 @@ if (ep) continue; extra: =2D if (!eflag) { =2D (void)printf("%s extra", RP(p)); =2D if (rflag) { =2D if ((S_ISDIR(p->fts_statp->st_mode) =2D ? rmdir : unlink)(p->fts_accpath)) { =2D (void)printf(", not removed: %s", =2D strerror(errno)); =2D } else =2D (void)printf(", removed"); =2D } =2D (void)putchar('\n'); + (void)printf("%s extra", RP(p)); + if (rflag) { + if ((S_ISDIR(p->fts_statp->st_mode) + ? rmdir : unlink)(p->fts_accpath)) { + (void)printf(", not removed: %s", + strerror(errno)); + } else + (void)printf(", removed"); } + (void)putchar('\n'); (void)fts_set(t, p, FTS_SKIP); } (void)fts_close(t); =2D if (sflag) =2D warnx("%s checksum: %lu", fullpath, (unsigned long)crc_total); return (rval); } =20 =2Dstatic void =2Dmiss(NODE *p, char *tail) +static int +check(NODE *p, char *tail, size_t tail_len) +{ + FTSENT fts; + struct stat fts_stat; + + if (strlcpy(tail, p->name, tail_len) >=3D tail_len) + return (BUFFEROVERFLOWEXIT); + + /* + * It is assumed that compare() only requires fts_accpath and fts_statp + * fields in the FTSENT structure. + */ + fts.fts_accpath =3D path; + fts.fts_statp =3D &fts_stat; + + if (ftsoptions & FTS_LOGICAL) { + if (stat(path, fts.fts_statp) || lstat(path, fts.fts_statp)) + return (0); + } else if (lstat(path, fts.fts_statp)) + return (0); + + p->flags |=3D F_VISIT; + if ((p->flags & F_NOCHANGE) =3D=3D 0 && compare(p->name, p, &fts)) + return (MISMATCHEXIT); + else + return (0); + + /* + * tail is not restored to '\0' as the next time tail (or path) is used + * is with a strlcpy (thus overriding the '\0'). + */ +} + +static int +miss(NODE *p, char *tail, size_t tail_len) { int create; char *tp; const char *type, *what; + int rval =3D 0; int serr; + size_t name_len; =20 for (; p; p =3D p->next) { + /* + * if check() needs to be called (eflag set) then directly + * update nodes if they are not directories and only + * directories are being checked otherwise check(). + */ +#if 1 + if (tail >=3D path + MAXPATHLEN) + (void)printf("!!!max path len exceeded!!!"); +#endif + if (eflag) { + if (dflag && (p->type !=3D F_DIR)) + p->flags |=3D F_VISIT; + else + rval |=3D check(p, tail, tail_len); + } + /* + * if check() needs to be called and fails with buffer overflow + * it is assumed the node cannot be visited as it also cannot + * exist (due to MAXPATHLEN being exceeded). + */ if (p->flags & F_OPT && !(p->flags & F_VISIT)) continue; if (p->type !=3D F_DIR && (dflag || p->flags & F_VISIT)) continue; =2D (void)strcpy(tail, p->name); + if ((name_len =3D strlcpy(tail, p->name, tail_len)) >=3D tail_len) { + (void)printf("%s%s (skipped, buffer overflow)\n", path, p->name); + rval |=3D BUFFEROVERFLOWEXIT; + continue; + } if (!(p->flags & F_VISIT)) { /* Don't print missing message if file exists as a symbolic link and the -q flag is set. */ @@ -228,10 +299,15 @@ if (!(p->flags & F_VISIT)) (void)putchar('\n'); =20 =2D for (tp =3D tail; *tp; ++tp); =2D *tp =3D '/'; =2D miss(p->child, tp + 1); =2D *tp =3D '\0'; + if (tail_len - name_len > 1) { + tp =3D tail + name_len; + *tp =3D '/'; + rval |=3D miss(p->child, tp + 1, tail_len - name_len - 1); + *tp =3D '\0'; + } else if (p->child) { + (void)printf("%s (children skipped, buffer overflow)\n", path); + rval |=3D BUFFEROVERFLOWEXIT; + } =20 if (!create) continue; @@ -256,4 +332,5 @@ (void)printf("%s: file flags not set: %s\n", path, strerror(errno)); } + return (rval); } --Boundary-01=_dgBfMjvoRdsPhiC-- --nextPart1409236.Jd7gOkigLW Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iEYEABECAAYFAkx8GCIACgkQUaaFgP9pFrJKeACdE8RcODZ018B4aM9UovipKDhj KLcAoIOJhC+m5bKkCH6vgb9F7Whh7a3M =MI0n -----END PGP SIGNATURE----- --nextPart1409236.Jd7gOkigLW-- From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 30 21:46:24 2010 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 1F50410656A7; Mon, 30 Aug 2010 21:46:24 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D1F968FC0C; Mon, 30 Aug 2010 21:46:23 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 4FC9C46B5B; Mon, 30 Aug 2010 17:46:23 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id E53138A04E; Mon, 30 Aug 2010 17:46:14 -0400 (EDT) From: John Baldwin To: Alexander Fiveg Date: Mon, 30 Aug 2010 17:34:01 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <20100827201140.GA2812@debmaster-laptop> <201008301310.38148.jhb@freebsd.org> <20100830203404.GC3135@debmaster-laptop> In-Reply-To: <20100830203404.GC3135@debmaster-laptop> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <201008301734.01740.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 30 Aug 2010 17:46:14 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-hackers@freebsd.org, doc@freebsd.org Subject: Re: Debugging Loadable Modules Using GDB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Aug 2010 21:46:24 -0000 On Monday, August 30, 2010 4:34:04 pm Alexander Fiveg wrote: > On Mon, Aug 30, 2010 at 01:10:37PM -0400, John Baldwin wrote: > > On Monday, August 30, 2010 12:12:50 pm Alexander Fiveg wrote: > > > On Mon, Aug 30, 2010 at 08:16:11AM -0400, John Baldwin wrote: > > > > On Friday, August 27, 2010 4:11:41 pm Alexander Fiveg wrote: > > > > > Hi, > > > > > from "FreeBSD Developers' Handbook, 10.7 Debugging Loadable Modul= es Using > > > > > GDB": > > > > > "... > > > > > (kgdb) add-symbol-file /sys/modules/linux/linux.ko 0xc0ae22d0 > > > > > ... > > > > > " > > > > > Actually I couldn't debug my modules using .ko-file. Moreover, I'= ve find out=20 > > > > that .ko files do not contain sections with debugging info. With .k= ld-file=20 > > > > debugging works out. Do I something incorrectly or the info in the = Developers=20 > > > > Book is outdated? > > > >=20 > > > > With newer versions of kgdb you shouldn't need to manually invoke '= add-symbol- > > > > file'. Kernel modules are treated as shared libraries and should=20 > > > > automatically be loaded. Try using 'info sharedlibrary' to see the= list of=20 > > > > kernel modules and if symbols for them are loaded already. > > > Yes, the .ko files are loaded automatically. The problem is that they= do > > > not contain debugging info. I have always to load the .kld file in or= der to=20 > > > debug a module: > > >=20 > > > (kgdb) f 9 > > > #9 0xc4dc558b in rm_8254_delayed_interrupt_per_packet () from > > > /boot/kernel/if_ringmap.ko > > > (kgdb) info locals > > > No symbol table info available. > > >=20 > > > (kgdb) add-symbol-file /home/alexandre/p4/ringmap/current/sys/modules= /ringmap/if_ringmap.kld 0xc4dafc70 > > > add symbol table from file "/home/alexandre/p4/ringmap/current/sys/mo= dules/ringmap/if_ringmap.kld" > > > at > > > .text_addr =3D 0xc4dafc70 > > > (y or n) y > > > Reading symbols from /home/alexandre/p4/ringmap/current/sys/modules/r= ingmap/if_ringmap.kld...done. > > >=20 > > > (kgdb) f 9=20 > > > #9 0xc4dc558b in rm_8254_delayed_interrupt_per_packet () > > > at /home/alexandre/p4/ringmap/current/sys/modules/ringmap/../../d= ev/e1000/ringmap_8254.c:142 > > > 142 co->ring->slot[slot_num].ts =3D co->ring->last_ts; > > >=20 > > > (kgdb) info locals > > > co =3D (struct capt_object *) 0xc4d68380 > > > adapter =3D (struct adapter *) 0xc4e77000 > > > __func__ =3D "E\000\000=EF=BF=BD\034@\000\000\211\203=EF=BF=BDE\000\0= 00\017\206B\022\000\000\2039\000\213A\004\017\205=EF=BF=BD\f\000\000\001=EF= =BF=BD=EF=BF=BD1=EF=BF=BD" > > >=20 > > >=20 > > > Is there any way to get the all symbols and needed debug info without > > > loading the .kld file ? > >=20 > > How are you compiling the kld? If you are building it by hand, use > > 'make DEBUG_FLAGS=3D-g' when you build and install the kld. That shoul= d build > > with debug symbols enabled and install the ko.symbols file which kgdb w= ill > > find and use. > Thanks a lot!. That is what I want to know. But I think this option is no= t=20 > mentioned anywhere. I could not find it in "man make make.conf" and also= =20 > no mention about it in FreeBSD Developers' Handbook.=20 It's a bit of a "feature" of the bsd.*.mk files that if you define 'DEBUG_FLAGS' it is added to CFLAGS (and CXXFLAGS) and that any resulting binaries are not stripped, etc. The same trick can be used to build debug versions of binaries and libraries. It probably is underdocumented. Not sure make.conf(5) is the right place as the typical usage is on the command line, not in /etc/make.conf or /etc/src.conf. However, I can't think of a better place. Maybe src.conf(5)? =2D-=20 John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 08:15:27 2010 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 712EB106564A; Tue, 31 Aug 2010 08:15:27 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id CA1028FC0A; Tue, 31 Aug 2010 08:15:26 +0000 (UTC) Received: by fxm4 with SMTP id 4so4386345fxm.13 for ; Tue, 31 Aug 2010 01:15:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=fNWjM43awMWNj/+ZLF/WYK3XLUos+0gEgMiJZWp9DD4=; b=PaEI6kA7WZ/WuH8MnBHcKD/78zcICocMRERnmj71xHLsl40GNSTFQtXASKwy1LWGAR bYIKUypFWLKlG6mCqkeU290ab6YKX5NxHTORguFTi7o7UqsDE3J9KxzBHoOiI7+Z2Oqu AA4o8t9q/kPcHmJQNEpuqGEa0acg9AQMeZ34I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=dj0nZY5IdSBLKWfF/cBxVtIm6QAgsX13JxDq7GXuIfzw0iEIvVrrhR3thC5XtsPGh5 XqY2ox6EnHoGDppnrCEf7dlsD7IQ3xYkVWaWrQCtFhU1XzGtpHjc3zxpU7Raq1sYxQFZ TwqZ1+C0+4lS3p/EDZIQrxvtMaLrxBSQA/apQ= Received: by 10.223.119.137 with SMTP id z9mr2647403faq.87.1283242525639; Tue, 31 Aug 2010 01:15:25 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id p2sm3828140fak.22.2010.08.31.01.15.24 (version=SSLv3 cipher=RC4-MD5); Tue, 31 Aug 2010 01:15:25 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C7CBA15.8010009@FreeBSD.org> Date: Tue, 31 Aug 2010 11:15:17 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: "YAMAMOTO, Taku" References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830195941.9731109c.taku@tackymt.homeip.net> <4C7B91EC.5070906@FreeBSD.org> In-Reply-To: <4C7B91EC.5070906@FreeBSD.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 08:15:27 -0000 Alexander Motin wrote: > YAMAMOTO, Taku wrote: >> On Mon, 30 Aug 2010 13:07:38 +0300 >> Alexander Motin wrote: >>> Gary Jennejohn wrote: >> (snip) >>>> So, what else did you do to reduce interrupts so much? >>>> >>>> Ah, I think I see it now. My desktop has only C1 enabled. Is that it? >>>> Unfortunately, it appears that only C1 is supported :( >>> Yes, as I have said, at this moment empty ticks skipped only while CPU >>> is in C2/C3 states. In C1 state there is no way to handle lost events on >>> wake up. While it may be not very dangerous, it is not very good. >> There's an alternative way to catch exit-from-C1 atomically: >> use MWAIT with bit0 of ECX set (``Treat masked interrupts as break events'' >> in Intel 64 and IA-32 Architecthres Software Developer's Manual). >> >> In this way we can put each core individually into deeper Cx state without >> additional costs (SMIs and the like) as a bonus. >> >> The problem is that it may be unavailable to earlier CPUs that support >> MONITOR/MWAIT instructions: >> we should check the presense of this feature by examining bit0 and bit1 of ECX >> that is returned by CPUID 5. > > Thank you for the hint. I will investigate it now. But it still help > only x86 systems. I have no idea how power management works on > arm/mips/ppc/..., but I assume that periodic wake up there also may be > not free. I have looked on these MWAIT features. They indeed allow to wake up with interrupts disabled, but I am worrying about the C-state in which CPU goes in that case. MWAIT states are CPU C-STATES, not ACPI C-states. So I have doubts that using MWAIT instead of HLT on ACPI system is correct. Also I have found some comments that MWAIT on AMD 10h family CPUs does not allows CPU to go to C1E state, while HLT does. So it is not a complete (worse) equivalent. Later AMD CPUs just do not support MWAIT. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 08:29:22 2010 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 B48E610656BA; Tue, 31 Aug 2010 08:29:22 +0000 (UTC) (envelope-from gljennjohn@googlemail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id A8CC18FC1E; Tue, 31 Aug 2010 08:29:21 +0000 (UTC) Received: by fxm4 with SMTP id 4so4389960fxm.13 for ; Tue, 31 Aug 2010 01:29:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:reply-to:x-mailer:mime-version :content-type:content-transfer-encoding; bh=FF95OBHJW6mUZesQaTUqkozxIhs10zB20SbqHLjB9Cg=; b=I/yLbWT1ulDHp+vbI67Ds2tn/Iy9Pj8G+Diswwbv9dyK1lqvUgnX1/JsZyXJtctg4q 3rgkS6aWmfKnG0O8o9qRHTcQenNe8kOO1I8eAGHI+fHZcqCPO1SQwKfOdhr+XLdytaA1 vEH9OG/GwBvt1mcOUbnySHRc++FJF68vCV4w4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; b=SxojT1+f1VxkEqYTd1JFZK/xo6NalzaFhydxZZs7W+HdyNIM/t4zCmenWTgsQlHhRs 5tatPmT2ORJ1+dhpSezkXscdlpMbmM9jsfk4WHtkYmu7oVZhsa3OxSfcDf51A1sw6rro 3tnsfMsv19Bqs8rejKdNjEI9aaEV6D1s6n1w0= Received: by 10.223.126.19 with SMTP id a19mr4918608fas.88.1283243360740; Tue, 31 Aug 2010 01:29:20 -0700 (PDT) Received: from ernst.jennejohn.org (p578E3809.dip.t-dialin.net [87.142.56.9]) by mx.google.com with ESMTPS id 2sm3832710faz.14.2010.08.31.01.29.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 31 Aug 2010 01:29:20 -0700 (PDT) Date: Tue, 31 Aug 2010 10:29:18 +0200 From: Gary Jennejohn To: gljennjohn@googlemail.com Message-ID: <20100831102918.4f5404cc@ernst.jennejohn.org> In-Reply-To: <20100830121148.11926306@ernst.jennejohn.org> References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830121148.11926306@ernst.jennejohn.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.7; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Alexander Motin , FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gljennjohn@googlemail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 08:29:22 -0000 On Mon, 30 Aug 2010 12:11:48 +0200 Gary Jennejohn wrote: > On Mon, 30 Aug 2010 13:07:38 +0300 > Alexander Motin wrote: > > > Gary Jennejohn wrote: > > > Hmm. I applied your patches and am now running the new kernel. But I > > > only installed the new kernel and didn't do make buildworld installworld. > > > > > > Mu systat -vm 1 doesn't look anything like yours. I'm seeing about 2300 > > > interrupts per second and most of those are coming from the hpet timers: > > > > > > 1122 hpet0:t0 > > > 1124 hpet0:t1 > > > > It means 1000Hz of hardclock (hz) events mixed with 127Hz of statclock > > (stathz) events. HPET timer here works in one-shot mode handling it. > > > > > So, what else did you do to reduce interrupts so much? > > > > > > Ah, I think I see it now. My desktop has only C1 enabled. Is that it? > > > Unfortunately, it appears that only C1 is supported :( > > > > Yes, as I have said, at this moment empty ticks skipped only while CPU > > is in C2/C3 states. In C1 state there is no way to handle lost events on > > wake up. While it may be not very dangerous, it is not very good. > > > > Too bad. I'd say that systems which are limited to C1 don't benefit > much (or not at all) from your changes. > OK, this is purely anecdotal, but I'll report it anyway. I was running pretty much all day with the patched kernel and things seemed to be working quite well. Then, after about 7 hours, everything just stopped. I had gkrellm running and noticed that it updated only when I moved the mouse. This behavior leads me to suspect that the timer interrupts had stopped working and the mouse interrupts were causing processes to get scheduled. Unfortunately, I wasn't able to get a dump and had to hit reset to recover. As I wrote above, this is only anecdotal, but I've never seen anything like this before applying the patches. -- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 08:48:39 2010 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 D72CC10656CF; Tue, 31 Aug 2010 08:48:39 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3B8D78FC29; Tue, 31 Aug 2010 08:48:38 +0000 (UTC) Received: by fxm4 with SMTP id 4so4395614fxm.13 for ; Tue, 31 Aug 2010 01:48:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=QK7We8UalLRz0rzBros5GAIiv0KmmnzAYulU7IkpONc=; b=uiN76XD+LDJChHuWmm3I1hmvetc1TLaWhwyQWvXH/NyG7iK3CnFmj2K4rtXWNI41fk NpUE0p4RCu+N5jScspbr0CWT018J0JWN7DpIabWsbuXerGcUuV0TF8wuFSo2MnW6h7dI Mi2gogUd+zrsGV+zL4q14givpTsAc7E816vGU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=nurylkafpMnZPLcmIPVz/EQEI04HREVDolvChzOp/EiCZ/M+eDzs4li/0BUjwSub/g Agx3LNjhCrR703k0FliekVN+5Lh+kUSqM6fPzaPf4dNXTkIgE9op61sZ3NuQDyItrgFk IGYfWitfy27FxHImZO44os9DyQ4Mq8TxKXVUs= Received: by 10.223.108.71 with SMTP id e7mr5033273fap.13.1283244518064; Tue, 31 Aug 2010 01:48:38 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id 14sm3838419fav.26.2010.08.31.01.48.36 (version=SSLv3 cipher=RC4-MD5); Tue, 31 Aug 2010 01:48:37 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C7CC1DE.1080907@FreeBSD.org> Date: Tue, 31 Aug 2010 11:48:30 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: gljennjohn@googlemail.com References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830121148.11926306@ernst.jennejohn.org> <20100831102918.4f5404cc@ernst.jennejohn.org> In-Reply-To: <20100831102918.4f5404cc@ernst.jennejohn.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 08:48:40 -0000 Gary Jennejohn wrote: > On Mon, 30 Aug 2010 12:11:48 +0200 > Gary Jennejohn wrote: > >> On Mon, 30 Aug 2010 13:07:38 +0300 >> Alexander Motin wrote: >> >>> Gary Jennejohn wrote: >>>> Hmm. I applied your patches and am now running the new kernel. But I >>>> only installed the new kernel and didn't do make buildworld installworld. >>>> >>>> Mu systat -vm 1 doesn't look anything like yours. I'm seeing about 2300 >>>> interrupts per second and most of those are coming from the hpet timers: >>>> >>>> 1122 hpet0:t0 >>>> 1124 hpet0:t1 >>> It means 1000Hz of hardclock (hz) events mixed with 127Hz of statclock >>> (stathz) events. HPET timer here works in one-shot mode handling it. >>> >>>> So, what else did you do to reduce interrupts so much? >>>> >>>> Ah, I think I see it now. My desktop has only C1 enabled. Is that it? >>>> Unfortunately, it appears that only C1 is supported :( >>> Yes, as I have said, at this moment empty ticks skipped only while CPU >>> is in C2/C3 states. In C1 state there is no way to handle lost events on >>> wake up. While it may be not very dangerous, it is not very good. >>> >> Too bad. I'd say that systems which are limited to C1 don't benefit >> much (or not at all) from your changes. >> > > OK, this is purely anecdotal, but I'll report it anyway. > > I was running pretty much all day with the patched kernel and things > seemed to be working quite well. > > Then, after about 7 hours, everything just stopped. > > I had gkrellm running and noticed that it updated only when I moved the > mouse. > > This behavior leads me to suspect that the timer interrupts had stopped > working and the mouse interrupts were causing processes to get scheduled. > > Unfortunately, I wasn't able to get a dump and had to hit reset to > recover. > > As I wrote above, this is only anecdotal, but I've never seen anything > like this before applying the patches. One-shot timers have one weak side: if for some reason timer interrupt getting lost -- there will be nobody to reload the timer. Such cases probably will require special attention. Same funny situation with mouse-driven scheduler happens also if LAPIC timer dies when pre-Core-iX CPU goes to C3 state. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 11:02:29 2010 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 B626610656B0; Tue, 31 Aug 2010 11:02:29 +0000 (UTC) (envelope-from webmaster@kibab.com) Received: from mx0.deglitch.com (backbone.deglitch.com [78.110.53.255]) by mx1.freebsd.org (Postfix) with ESMTP id 6E7578FC29; Tue, 31 Aug 2010 11:02:29 +0000 (UTC) Received: from kibab-work.smstraffic.ru (unknown [195.94.237.82]) by mx0.deglitch.com (Postfix) with ESMTPA id 207A58FC54; Tue, 31 Aug 2010 15:01:56 +0400 (MSD) Date: Tue, 31 Aug 2010 15:01:48 +0400 From: Ilya Bakulin To: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Message-ID: <20100831150148.494d72b6@kibab-work.smstraffic.ru> In-Reply-To: <86eidgi7cn.fsf@ds4.des.no> References: <86wrry1hwv.fsf@ds4.des.no> <20100828130912.48205a47@kibab.com> <20100828195024.3d671a76@kibab.com> <20100828204415.6875b4ec@kibab.com> <86bp8kjr7i.fsf@ds4.des.no> <20100830155638.710f8871@kibab-work.smstraffic.ru> <86eidgi7cn.fsf@ds4.des.no> Organization: ON Labs X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/UizKg3caIt9rhLzpQY7ZOKu"; protocol="application/pgp-signature" Cc: geom@freebsd.org, hackers@freebsd.org Subject: Re: Support for WD Advanced Format disks X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 11:02:29 -0000 --Sig_/UizKg3caIt9rhLzpQY7ZOKu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Mon, 30 Aug 2010 14:59:52 +0200 Dag-Erling Sm=C3=B8rgrav wrote: > Ilya Bakulin writes: > > So it begins at sector #63, but physical 4096-block begins at logical > > sector 64. That's why I shifted gnop by 1 sector. >=20 > Why aren't you using the whole disk? I just wanted to be closer to the real usage scenario. > WD Green, even their non-AF disks (like the WD20EADS I tested) suck. OK. Let's live with it :-) May you suggest any other tests? Or let's live with sucking WD Green and lo= ok for other 4096K-sector models from other manufacturers? --=20 Regards, Ilya Bakulin http://kibab.com xmpp://kibab612@jabber.ru --Sig_/UizKg3caIt9rhLzpQY7ZOKu Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) iEYEARECAAYFAkx84SIACgkQo9vlj1oadwh0GQCghxZKYvQ1vRjrqH7NqVQuuXMO V5AAnj6caX/k+S5RaLHWQ67qeo56D8eE =NF+w -----END PGP SIGNATURE----- --Sig_/UizKg3caIt9rhLzpQY7ZOKu-- From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 12:19:51 2010 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 635C410656B0; Tue, 31 Aug 2010 12:19:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 32E9F8FC17; Tue, 31 Aug 2010 12:19:51 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id D389A46B7E; Tue, 31 Aug 2010 08:19:50 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id BB8088A04F; Tue, 31 Aug 2010 08:19:47 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 31 Aug 2010 07:53:49 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201008310753.49567.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 31 Aug 2010 08:19:47 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: Davide Italiano , Andriy Gapon , Garrett Cooper Subject: Re: System freezes unexpectly X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 12:19:51 -0000 On Monday, August 30, 2010 12:45:40 pm Garrett Cooper wrote: > On Mon, Aug 30, 2010 at 9:24 AM, Davide Italiano > wrote: > > removing ~/.mozilla works fine. I think that problem's related to > > add-on Xmarks I've been installer or to "Restore session" > > functionality > > It would have been interesting to capture what `froze' the machine, in > particular because it could have been a valuable bug for either > Mozilla to capture and fix, or for us to capture and fix. Unless your > machine doesn't meet the hardware requirements, I don't see a reason > why a userland application should lock up a system. > > There are other ways you can debug this further, using -safe-mode as a > next step, then choose to not restore the last session (which is > available from within the javascript settings file -- nsPrefs.js?). If only firefox is frozen, then you can always ssh in from another machine and use top/ps, etc., or even gdb on the firefox process itself. -- John Baldwin From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 12:20:09 2010 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 66F2F10658CF; Tue, 31 Aug 2010 12:20:09 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 264D08FC31; Tue, 31 Aug 2010 12:20:08 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 2D4111FFC3C; Tue, 31 Aug 2010 12:20:08 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id F1D168454E; Tue, 31 Aug 2010 14:20:07 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Ilya Bakulin References: <86wrry1hwv.fsf@ds4.des.no> <20100828130912.48205a47@kibab.com> <20100828195024.3d671a76@kibab.com> <20100828204415.6875b4ec@kibab.com> <86bp8kjr7i.fsf@ds4.des.no> <20100830155638.710f8871@kibab-work.smstraffic.ru> <86eidgi7cn.fsf@ds4.des.no> <20100831150148.494d72b6@kibab-work.smstraffic.ru> Date: Tue, 31 Aug 2010 14:20:07 +0200 In-Reply-To: <20100831150148.494d72b6@kibab-work.smstraffic.ru> (Ilya Bakulin's message of "Tue, 31 Aug 2010 15:01:48 +0400") Message-ID: <86lj7n2cug.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: geom@freebsd.org, hackers@freebsd.org Subject: Re: Support for WD Advanced Format disks X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 12:20:09 -0000 Ilya Bakulin writes: > May you suggest any other tests? What other tests? The disks suck, how are more tests going to improve the situation? > Or let's live with sucking WD Green and look for other 4096K-sector > models from other manufacturers? I see no reason why sector size should be a selection criterium. Just buy the disk that gives you the best performance and / or capacity for your money. WD Green disks are cheap, but other vendors offer models with the same capacity and twice the speed for only 5% or 10% more. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 13:57:08 2010 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 6514810656B5; Tue, 31 Aug 2010 13:57:08 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9C0B08FC0C; Tue, 31 Aug 2010 13:57:07 +0000 (UTC) Received: by wyb33 with SMTP id 33so9222212wyb.13 for ; Tue, 31 Aug 2010 06:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=0LVcz6+5ThFwg1UfMONrmAHt7vJA9Xj/iZ/81z4OD9U=; b=vCMrgzRj8FIsE+4so/6JY1Unlfcn9gz984Ax2pZ8IzxbOnb/GvAj2qR90tcMszc8EM IxzU51Da32BvD4DvNFDTiSmbm7i40vaH5huKWWxuQEHo0GQKn0uxP07Yy7Xtsnw2spif UIXNX1o0cXclb2SgntjdR4L9UqejWgU7RfdC4= 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=n89ZpxoOnWfnkyBa216Ik465Slvy+7uylPJjdrh8G7zLpo5n7Y6tOmEoBW/eaqrFtW MgQmfQFmj2TRwdfUsXrFJAxK/otL/7MIDRR0ESjqlDNWTF47I390JaUGlCmbGaFgcqpZ qSf1rlmRJVLa/egjigmNIz2XqTltQ/prEqmNg= MIME-Version: 1.0 Received: by 10.227.157.17 with SMTP id z17mr6378508wbw.122.1283263026465; Tue, 31 Aug 2010 06:57:06 -0700 (PDT) Received: by 10.216.133.2 with HTTP; Tue, 31 Aug 2010 06:57:06 -0700 (PDT) In-Reply-To: <4C7CC1DE.1080907@FreeBSD.org> References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830121148.11926306@ernst.jennejohn.org> <20100831102918.4f5404cc@ernst.jennejohn.org> <4C7CC1DE.1080907@FreeBSD.org> Date: Tue, 31 Aug 2010 08:57:06 -0500 Message-ID: From: Brandon Gooch To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 13:57:08 -0000 On Tue, Aug 31, 2010 at 3:48 AM, Alexander Motin wrote: > Gary Jennejohn wrote: >> On Mon, 30 Aug 2010 12:11:48 +0200 >> Gary Jennejohn wrote: >> >>> On Mon, 30 Aug 2010 13:07:38 +0300 >>> Alexander Motin wrote: >>> >>>> Gary Jennejohn wrote: >>>>> Hmm. =A0I applied your patches and am now running the new kernel. =A0= But I >>>>> only installed the new kernel and didn't do make buildworld installwo= rld. >>>>> >>>>> Mu systat -vm 1 doesn't look anything like yours. =A0I'm seeing about= 2300 >>>>> interrupts per second and most of those are coming from the hpet time= rs: >>>>> >>>>> 1122 hpet0:t0 >>>>> 1124 hpet0:t1 >>>> It means 1000Hz of hardclock (hz) events mixed with 127Hz of statclock >>>> (stathz) events. HPET timer here works in one-shot mode handling it. >>>> >>>>> So, what else did you do to reduce interrupts so much? >>>>> >>>>> Ah, I think I see it now. =A0My desktop has only C1 enabled. =A0Is th= at it? >>>>> Unfortunately, it appears that only C1 is supported :( >>>> Yes, as I have said, at this moment empty ticks skipped only while CPU >>>> is in C2/C3 states. In C1 state there is no way to handle lost events = on >>>> wake up. While it may be not very dangerous, it is not very good. >>>> >>> Too bad. =A0I'd say that systems which are limited to C1 don't benefit >>> much (or not at all) from your changes. >>> >> >> OK, this is purely anecdotal, but I'll report it anyway. >> >> I was running pretty much all day with the patched kernel and things >> seemed to be working quite well. >> >> Then, after about 7 hours, everything just stopped. >> >> I had gkrellm running and noticed that it updated only when I moved the >> mouse. >> >> This behavior leads me to suspect that the timer interrupts had stopped >> working and the mouse interrupts were causing processes to get scheduled= . >> >> Unfortunately, I wasn't able to get a dump and had to hit reset to >> recover. >> >> As I wrote above, this is only anecdotal, but I've never seen anything >> like this before applying the patches. > > One-shot timers have one weak side: if for some reason timer interrupt > getting lost -- there will be nobody to reload the timer. Such cases > probably will require special attention. Same funny situation with > mouse-driven scheduler happens also if LAPIC timer dies when pre-Core-iX > CPU goes to C3 state. I too had the "freeze" or "pause" when testing with LAPIC, although I've been using HPET for a while now, and things seem normal: # systat -vmstat 1 3 users Load 0.28 0.33 0.24 Aug 31 08:48 Mem:KB REAL VIRTUAL VN PAGER SWAP PAG= ER Tot Share Tot Share Free in out in o= ut Act 364524 14244 1600988 17404 1427028 count All 492712 31000 1075523k 54724 pages Proc: Interrupts r p d s w Csw Trp Sys Int Sof Flt cow 363 total 74 2153 613 7083 361 144 6 5 zfod atkbd= 0 1 ozfod 115 hpet0= :t0 0 1.6%Sys 0.4%Intr 2.3%User 0.0%Nice 95.7%Idle %ozfod 56 hpet0= :t1 8 | | | | | | | | | | | daefr acpi0= 9 =3D> prcfr 187 psm= 0 12 36 dtbuf totfr ata0 = 14 Namei Name-cache Dir-cache 111105 desvn react uhci2= + 16 Calls hits % hits % 1953 numvn pdwak ehci1= 19 3 3 100 327 frevn pdpgs uhci0= 20 intrn ehci0= 22 Disks ada0 cd0 pass0 pass1 202356 wire vgapc= i0 KB/t 0.00 0.00 0.00 0.00 200264 act hdac0= 258 tps 0 0 0 0 167392 inact 5 iwn0 = 259 MB/s 0.00 0.00 0.00 0.00 4208 cache %busy 0 0 0 0 1422820 free # cat /boot/loader.conf: ... kern.hz=3D"100" hint.apic.0.clock=3D"0" hint.atrtc.0.clock=3D"0" hint.p4tcc.0.disabled=3D"1" hint.attimer.0.clock=3D0 hint.hpet.0.legacy_route=3D1 hint.acpi_throttle.0.disabled=3D"1" hw.pci.do_power_nodriver=3D"3" ... # cat /etc/rc.conf: ... powerd_enable=3D"YES" powerd_flags=3D"-a adaptive -b adaptive -n adaptive" performance_cpu_freq=3D"NONE" # Online CPU frequency economy_cpu_freq=3D"NONE" # Offline CPU frequency performance_cx_lowest=3D"C3" # Online CPU idle state economy_cx_lowest=3D"C3" # Offline CPU idle state ... # sysctl -a | grep cx hw.acpi.cpu.cx_lowest: C3 dev.cpu.0.cx_supported: C1/1 C2/1 C3/57 dev.cpu.0.cx_lowest: C3 dev.cpu.0.cx_usage: 0.00% 0.53% 99.46% last 2791us dev.cpu.1.cx_supported: C1/1 C2/1 C3/57 dev.cpu.1.cx_lowest: C3 dev.cpu.1.cx_usage: 0.00% 1.13% 98.86% last 1492us Suspend/resume still works well, for what it's worth :) -Brandon From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 16:16:47 2010 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 3291510656A6 for ; Tue, 31 Aug 2010 16:16:47 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout2.yahoo.com (mrout2.yahoo.com [216.145.54.172]) by mx1.freebsd.org (Postfix) with ESMTP id 1F32D8FC1A for ; Tue, 31 Aug 2010 16:16:46 +0000 (UTC) Received: from [127.0.0.1] (proxy8.corp.yahoo.com [216.145.48.13]) by mrout2.yahoo.com (8.13.8/8.13.8/y.out) with ESMTP id o7VGGXY1001335; Tue, 31 Aug 2010 09:16:33 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=serpent; d=yahoo-inc.com; c=nofws; q=dns; h=subject:from:reply-to:to:cc:content-type:date:message-id: mime-version:x-mailer:content-transfer-encoding; b=YsppHb7TbWBCcvaOVdBOMC1Hzt9ruew8RyVbZAAV6oK8WhwSbX2bm3XRWrS0WXqM From: Sean Bruno To: "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset="UTF-8" Date: Tue, 31 Aug 2010 09:16:33 -0700 Message-ID: <1283271393.3665.13.camel@home-yahoo> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-1.fc12) Content-Transfer-Encoding: 7bit Cc: Scott Long Subject: /etc/rc.d/mountcritremote X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 16:16:47 -0000 An issue in testing came up where we were trying to mount NFS directories from the same server, i.e. a machine trying to mount an NFS dir on itself. Because mountcritremote runs before the NFS server is up, we modified the REQUIRES section and appended nfsd. I *think* that this is a silly implementation, however it does make sense that this change be made. Comments? Index: mountcritremote =================================================================== --- mountcritremote (revision 212057) +++ mountcritremote (working copy) @@ -4,7 +4,7 @@ # # PROVIDE: mountcritremote -# REQUIRE: NETWORKING FILESYSTEMS cleanvar ipsec +# REQUIRE: NETWORKING FILESYSTEMS cleanvar ipsec nfsd # KEYWORD: nojail . /etc/rc.subr From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 16:56:32 2010 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 41DA710656A3 for ; Tue, 31 Aug 2010 16:56:32 +0000 (UTC) (envelope-from njm@njm.me.uk) Received: from smtp003.apm-internet.net (smtp003.apm-internet.net [85.119.248.52]) by mx1.freebsd.org (Postfix) with SMTP id 8E7908FC18 for ; Tue, 31 Aug 2010 16:56:31 +0000 (UTC) Received: (qmail 83408 invoked from network); 31 Aug 2010 16:29:49 -0000 Received: from unknown (HELO oberon.njm.me.uk) (86.129.201.125) by smtp003.apm-internet.net with SMTP; 31 Aug 2010 16:29:49 -0000 Received: from titania.njm.me.uk (titania.njm.me.uk [192.168.144.130]) by oberon.njm.me.uk (8.14.4/8.14.4) with ESMTP id o7VGTmmQ050045; Tue, 31 Aug 2010 17:29:48 +0100 (BST) (envelope-from njm@njm.me.uk) Received: from titania.njm.me.uk (localhost [127.0.0.1]) by titania.njm.me.uk (8.14.4/8.14.4) with ESMTP id o7VGTmJQ046816; Tue, 31 Aug 2010 17:29:48 +0100 (BST) (envelope-from njm@njm.me.uk) Received: (from njm@localhost) by titania.njm.me.uk (8.14.4/8.14.4/Submit) id o7VGTmPS046815; Tue, 31 Aug 2010 17:29:48 +0100 (BST) (envelope-from njm@njm.me.uk) Date: Tue, 31 Aug 2010 17:29:47 +0100 From: "N.J. Mann" To: sbruno@freebsd.org Message-ID: <20100831162947.GA61795@titania.njm.me.uk> Mail-Followup-To: sbruno@freebsd.org, "freebsd-hackers@freebsd.org" , Scott Long References: <1283271393.3665.13.camel@home-yahoo> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1283271393.3665.13.camel@home-yahoo> X-Operating-System: FreeBSD 8.1-STABLE User-Agent: mutt-NJM (2010-08-10) Cc: "freebsd-hackers@freebsd.org" , Scott Long Subject: Re: /etc/rc.d/mountcritremote X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 16:56:32 -0000 In message <1283271393.3665.13.camel@home-yahoo>, Sean Bruno (seanbru@yahoo-inc.com) wrote: > An issue in testing came up where we were trying to mount NFS > directories from the same server, i.e. a machine trying to mount an NFS > dir on itself. > > Because mountcritremote runs before the NFS server is up, we modified > the REQUIRES section and appended nfsd. Is this not what the 'late' attribute in /etc/fstab is for? e.g. oberon% grep /usr/ports /etc/fstab oberon:/export/usr/ports /usr/ports nfs late,rw,tcp Cheers, Nick. -- From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 17:59:50 2010 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 EBFBA1065695; Tue, 31 Aug 2010 17:59:50 +0000 (UTC) (envelope-from dirkx@webweaving.org) Received: from pikmeer.webweaving.org (pikmeer.webweaving.org [213.207.101.183]) by mx1.freebsd.org (Postfix) with ESMTP id 856318FC18; Tue, 31 Aug 2010 17:59:49 +0000 (UTC) Received: from pappamoem.home (host213-121-18-32.range213-121.btcentralplus.com [213.121.18.32]) (authenticated bits=0) by pikmeer.webweaving.org (8.14.4/8.14.4) with ESMTP id o7VHaS0b043629 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 31 Aug 2010 17:36:29 GMT (envelope-from dirkx@webweaving.org) Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Dirk-WIllem van Gulik In-Reply-To: <1283271393.3665.13.camel@home-yahoo> Date: Tue, 31 Aug 2010 18:45:20 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1283271393.3665.13.camel@home-yahoo> To: sbruno@freebsd.org X-Mailer: Apple Mail (2.1081) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.5 (pikmeer.webweaving.org [213.207.101.183]); Tue, 31 Aug 2010 17:36:29 +0000 (UTC) Cc: "freebsd-hackers@freebsd.org" , Scott Long Subject: Re: /etc/rc.d/mountcritremote X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 17:59:51 -0000 On 31 Aug 2010, at 17:16, Sean Bruno wrote: > An issue in testing came up where we were trying to mount NFS > directories from the same server, i.e. a machine trying to mount an = NFS > dir on itself. >=20 > Because mountcritremote runs before the NFS server is up, we modified > the REQUIRES section and appended nfsd. =20 Are you sure that is right for PXE style boots - where this is heavily = relied on ? Dw.= From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 18:01:03 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id B8CBC10656AE; Tue, 31 Aug 2010 18:01:03 +0000 (UTC) Date: Tue, 31 Aug 2010 18:01:03 +0000 From: Alexander Best To: freebsd-hackers@freebsd.org Message-ID: <20100831180103.GA92584@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: expand_number() for fetch'es -B and -S switches X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 18:01:03 -0000 hi there, just having a quick look around to see, if anybody would be interested in fetch -B and fetch -S accepting humanized numbers using expand_number()? cheers. alex -- a13x From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 18:42:59 2010 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 03B2C106564A for ; Tue, 31 Aug 2010 18:42:59 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout1-b.corp.re1.yahoo.com (mrout1-b.corp.re1.yahoo.com [69.147.107.20]) by mx1.freebsd.org (Postfix) with ESMTP id A483C8FC15 for ; Tue, 31 Aug 2010 18:42:58 +0000 (UTC) Received: from [127.0.0.1] (proxy8.corp.yahoo.com [216.145.48.13]) by mrout1-b.corp.re1.yahoo.com (8.13.8/8.13.8/y.out) with ESMTP id o7VIVwjN096005; Tue, 31 Aug 2010 11:32:01 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=serpent; d=yahoo-inc.com; c=nofws; q=dns; h=subject:from:to:cc:in-reply-to:references:content-type:date: message-id:mime-version:x-mailer:content-transfer-encoding; b=zjIPyBFjyRBTLw9XUCiSiIBf44272+0zm4YKw5JORySwI9lgORbscgGOFIW+5u19 From: Sean Bruno To: Dirk-WIllem van Gulik In-Reply-To: References: <1283271393.3665.13.camel@home-yahoo> Content-Type: text/plain; charset="UTF-8" Date: Tue, 31 Aug 2010 11:31:58 -0700 Message-ID: <1283279518.3665.64.camel@home-yahoo> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-1.fc12) Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 31 Aug 2010 18:49:47 +0000 Cc: "freebsd-hackers@freebsd.org" , "sbruno@freebsd.org" , Scott Long Subject: Re: /etc/rc.d/mountcritremote X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 18:42:59 -0000 On Tue, 2010-08-31 at 10:45 -0700, Dirk-WIllem van Gulik wrote: > On 31 Aug 2010, at 17:16, Sean Bruno wrote: > > > An issue in testing came up where we were trying to mount NFS > > directories from the same server, i.e. a machine trying to mount an NFS > > dir on itself. > > > > Because mountcritremote runs before the NFS server is up, we modified > > the REQUIRES section and appended nfsd. > > Are you sure that is right for PXE style boots - where this is heavily relied on ? > > Dw. Not sure. If the nfs server isn't configured to startup, then this is a no-op. I'm not sure what application would be running in a pxeboot environment and run an NFS server. Sean From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 18:44:41 2010 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 BE6AE10656B8 for ; Tue, 31 Aug 2010 18:44:41 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout2-b.corp.re1.yahoo.com (mrout2-b.corp.re1.yahoo.com [69.147.107.21]) by mx1.freebsd.org (Postfix) with ESMTP id 808118FC0C for ; Tue, 31 Aug 2010 18:44:41 +0000 (UTC) Received: from [127.0.0.1] (proxy8.corp.yahoo.com [216.145.48.13]) by mrout2-b.corp.re1.yahoo.com (8.13.8/8.13.8/y.out) with ESMTP id o7VIWhHK025272; Tue, 31 Aug 2010 11:32:44 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=serpent; d=yahoo-inc.com; c=nofws; q=dns; h=subject:from:to:cc:in-reply-to:references:content-type:date: message-id:mime-version:x-mailer:content-transfer-encoding; b=uaw4vneVZx6Mhu1SzBZm+bKeY3WF4w9U4hjzSrnjoFGVsj1idehowJtEGZkvgS12 From: Sean Bruno To: "N.J. Mann" In-Reply-To: <20100831162947.GA61795@titania.njm.me.uk> References: <1283271393.3665.13.camel@home-yahoo> <20100831162947.GA61795@titania.njm.me.uk> Content-Type: text/plain; charset="UTF-8" Date: Tue, 31 Aug 2010 11:32:43 -0700 Message-ID: <1283279563.3665.66.camel@home-yahoo> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-1.fc12) Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 31 Aug 2010 18:49:58 +0000 Cc: "freebsd-hackers@freebsd.org" , "sbruno@freebsd.org" , Scott Long Subject: Re: /etc/rc.d/mountcritremote X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 18:44:41 -0000 On Tue, 2010-08-31 at 09:29 -0700, N.J. Mann wrote: > In message <1283271393.3665.13.camel@home-yahoo>, > Sean Bruno (seanbru@yahoo-inc.com) wrote: > > An issue in testing came up where we were trying to mount NFS > > directories from the same server, i.e. a machine trying to mount an NFS > > dir on itself. > > > > Because mountcritremote runs before the NFS server is up, we modified > > the REQUIRES section and appended nfsd. > > Is this not what the 'late' attribute in /etc/fstab is for? > > e.g. > > oberon% grep /usr/ports /etc/fstab > oberon:/export/usr/ports /usr/ports nfs late,rw,tcp > > > Cheers, > Nick. Good question. Looking over the man page for mount, is there any reason to use 'late' versus what I am suggesting? Sean From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 19:27:22 2010 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 EF92F10656CD; Tue, 31 Aug 2010 19:27:22 +0000 (UTC) (envelope-from pebu3op@googlemail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 211218FC17; Tue, 31 Aug 2010 19:27:21 +0000 (UTC) Received: by bwz20 with SMTP id 20so5667456bwz.13 for ; Tue, 31 Aug 2010 12:27:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:reply-to:mail-followup-to:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=xXU6XnTMhcHF4/5CfNrs1OOZOGlBGxVv7+35HQE6BKY=; b=YSLovpT9ilJsrQwAcEJUA/mWYjuwuzu3v+PcDpb90Q0EiHNT1X4WFW62pK4YYbMEoL poLdrSY6xwA+RR8K+MoSEqs/IogPj0NK3WLdr5x7uKleKq9cpuHUaqSmmwcUmMu3e44d QDxctULarUUWHPOY1CfSy8gua7brzBOHQ15SI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:reply-to:mail-followup-to :references:mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; b=LI9PQiryc0AJ9c5P4YUDsfAPcxWA0POdXcRagSFJBBrcigrbw1u/im7SbJt40ISEEN 73AG+kA9AB4cZfFtJobmpLtSDMTjBUudyLHnvayOYIA6YbyhHPtDxtsVDMi+naFXf4pG /F/So+DfODiPBf26cf1KSebBGt65Dt2ZiAEt8= Received: by 10.204.45.136 with SMTP id e8mr4907302bkf.94.1283282840627; Tue, 31 Aug 2010 12:27:20 -0700 (PDT) Received: from debmaster-laptop ([130.149.220.190]) by mx.google.com with ESMTPS id f18sm6542426bkf.3.2010.08.31.12.27.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 31 Aug 2010 12:27:19 -0700 (PDT) Date: Tue, 31 Aug 2010 21:27:16 +0200 From: Alexander Fiveg To: John Baldwin Message-ID: <20100831192716.GB5521@debmaster-laptop> Mail-Followup-To: John Baldwin , freebsd-hackers@freebsd.org, doc@freebsd.org References: <20100827201140.GA2812@debmaster-laptop> <201008301310.38148.jhb@freebsd.org> <20100830203404.GC3135@debmaster-laptop> <201008301734.01740.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201008301734.01740.jhb@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@freebsd.org, doc@freebsd.org Subject: Re: Debugging Loadable Modules Using GDB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Alexander Fiveg List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 19:27:23 -0000 On Mon, Aug 30, 2010 at 05:34:01PM -0400, John Baldwin wrote: > On Monday, August 30, 2010 4:34:04 pm Alexander Fiveg wrote: > > On Mon, Aug 30, 2010 at 01:10:37PM -0400, John Baldwin wrote: > > > On Monday, August 30, 2010 12:12:50 pm Alexander Fiveg wrote: > > > > On Mon, Aug 30, 2010 at 08:16:11AM -0400, John Baldwin wrote: > > > > > On Friday, August 27, 2010 4:11:41 pm Alexander Fiveg wrote: > > > > > > Hi, > > > > > > from "FreeBSD Developers' Handbook, 10.7 Debugging Loadable Modules Using > > > > > > GDB": > > > > > > "... > > > > > > (kgdb) add-symbol-file /sys/modules/linux/linux.ko 0xc0ae22d0 > > > > > > ... > > > > > > " > > > > > > Actually I couldn't debug my modules using .ko-file. Moreover, I've find out > > > > > that .ko files do not contain sections with debugging info. With .kld-file > > > > > debugging works out. Do I something incorrectly or the info in the Developers > > > > > Book is outdated? > > > > > > > > > > With newer versions of kgdb you shouldn't need to manually invoke 'add-symbol- > > > > > file'. Kernel modules are treated as shared libraries and should > > > > > automatically be loaded. Try using 'info sharedlibrary' to see the list of > > > > > kernel modules and if symbols for them are loaded already. > > > > Yes, the .ko files are loaded automatically. The problem is that they do > > > > not contain debugging info. I have always to load the .kld file in order to > > > > debug a module: > > > > > > > > (kgdb) f 9 > > > > #9 0xc4dc558b in rm_8254_delayed_interrupt_per_packet () from > > > > /boot/kernel/if_ringmap.ko > > > > (kgdb) info locals > > > > No symbol table info available. > > > > > > > > (kgdb) add-symbol-file /home/alexandre/p4/ringmap/current/sys/modules/ringmap/if_ringmap.kld 0xc4dafc70 > > > > add symbol table from file "/home/alexandre/p4/ringmap/current/sys/modules/ringmap/if_ringmap.kld" > > > > at > > > > .text_addr = 0xc4dafc70 > > > > (y or n) y > > > > Reading symbols from /home/alexandre/p4/ringmap/current/sys/modules/ringmap/if_ringmap.kld...done. > > > > > > > > (kgdb) f 9 > > > > #9 0xc4dc558b in rm_8254_delayed_interrupt_per_packet () > > > > at /home/alexandre/p4/ringmap/current/sys/modules/ringmap/../../dev/e1000/ringmap_8254.c:142 > > > > 142 co->ring->slot[slot_num].ts = co->ring->last_ts; > > > > > > > > (kgdb) info locals > > > > co = (struct capt_object *) 0xc4d68380 > > > > adapter = (struct adapter *) 0xc4e77000 > > > > __func__ = "E\000\000ï¿œ\034@\000\000\211\203ï¿œE\000\000\017\206B\022\000\000\2039\000\213A\004\017\205ï¿œ\f\000\000\001ᅵᅵ1ï¿œ" > > > > > > > > > > > > Is there any way to get the all symbols and needed debug info without > > > > loading the .kld file ? > > > > > > How are you compiling the kld? If you are building it by hand, use > > > 'make DEBUG_FLAGS=-g' when you build and install the kld. That should build > > > with debug symbols enabled and install the ko.symbols file which kgdb will > > > find and use. > > Thanks a lot!. That is what I want to know. But I think this option is not > > mentioned anywhere. I could not find it in "man make make.conf" and also > > no mention about it in FreeBSD Developers' Handbook. > > It's a bit of a "feature" of the bsd.*.mk files that if you define > 'DEBUG_FLAGS' it is added to CFLAGS (and CXXFLAGS) and that any resulting > binaries are not stripped, etc. The same trick can be used to build debug > versions of binaries and libraries. It probably is underdocumented. Not > sure make.conf(5) is the right place as the typical usage is on the command > line, not in /etc/make.conf or /etc/src.conf. However, I can't think of a > better place. Maybe src.conf(5)? Anyway, "FreeBSD Developers' Handbook" wouldn't be wrong place for it :) > > -- > John Baldwin -- Alexander Fiveg Key fingerprint = ECBB 747C 919D 78F5 E8EC 7DBC 8B46 376D 107B CCAA From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 19:27:37 2010 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 79CD01065759 for ; Tue, 31 Aug 2010 19:27:37 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id F2BC58FC29 for ; Tue, 31 Aug 2010 19:27:36 +0000 (UTC) Received: by mail-bw0-f54.google.com with SMTP id 20so5667456bwz.13 for ; Tue, 31 Aug 2010 12:27:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=nrmhZK4yfzVgmYOFtlH4PaiuTqaeWinZ8kg6h2whONI=; b=vmjvrfzHn5QD1hyzO6iRw83Nx4s7bwg9xLjgvJ6fGkuYDs7Hshw0Gkq58FvFPKRiFt NREdEIZxnZWpvdXLh/twPm9awinInxtc8hIzW5t5USi8fzFpsG0x42+byEXWzRI9GZyY 3zSuG75pxESQbnbGYppQ/Z66CRe1NroniTNt4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=DLp1G/bFUbddbeZkCC4SCKdlOdsZjhMhJB8OsY5OJxxOoIpmgsAaL0JzUBqQInqR/f ZtsfUhRldv4W7aoViryjp/PMeOCWXaCoqUvt6Ap03s+gfq4MVxpSneVPH+gIfSwewuO9 CAQEgXRKs3EhqVtDjDL5wKdaQS0vK/9OLxxPU= MIME-Version: 1.0 Received: by 10.204.48.75 with SMTP id q11mr4539777bkf.0.1283282856471; Tue, 31 Aug 2010 12:27:36 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.204.113.79 with HTTP; Tue, 31 Aug 2010 12:27:36 -0700 (PDT) In-Reply-To: <1283279563.3665.66.camel@home-yahoo> References: <1283271393.3665.13.camel@home-yahoo> <20100831162947.GA61795@titania.njm.me.uk> <1283279563.3665.66.camel@home-yahoo> Date: Tue, 31 Aug 2010 12:27:36 -0700 X-Google-Sender-Auth: VodfT9lxtwFwPVpA13vx4fQ8KxU Message-ID: From: Garrett Cooper To: Sean Bruno Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-hackers@freebsd.org" , "sbruno@freebsd.org" , Scott Long , "N.J. Mann" Subject: Re: /etc/rc.d/mountcritremote X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 19:27:37 -0000 On Tue, Aug 31, 2010 at 11:32 AM, Sean Bruno wrote: > On Tue, 2010-08-31 at 09:29 -0700, N.J. Mann wrote: >> In message <1283271393.3665.13.camel@home-yahoo>, >> =A0 =A0 =A0 Sean Bruno (seanbru@yahoo-inc.com) wrote: >> > An issue in testing came up where we were trying to mount NFS >> > directories from the same server, i.e. a machine trying to mount an NF= S >> > dir on itself. >> > >> > Because mountcritremote runs before the NFS server is up, we modified >> > the REQUIRES section and appended nfsd. >> >> Is this not what the 'late' attribute in /etc/fstab is for? >> >> e.g. >> >> oberon% grep /usr/ports /etc/fstab >> oberon:/export/usr/ports =A0 /usr/ports =A0 nfs =A0 late,rw,tcp Specifying `late' seems extremely unnecessary for NFS mounts. If mountcritremote can't properly depend on nmbd, nfsd, smbd for mounting filesystems, then it seems like a rc script dependency issue (otherwise, mountcritremote is basically mountcritlocal, waiting for some networking connectivity to come up, right?). > > Good question. =A0Looking over the man page for mount, is there any reaso= n > to use 'late' versus what I am suggesting? Thanks, -Garrett From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 19:51:44 2010 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 F296A1065797; Tue, 31 Aug 2010 19:51:44 +0000 (UTC) (envelope-from seanbru@yahoo-inc.com) Received: from mrout2-b.corp.re1.yahoo.com (mrout2-b.corp.re1.yahoo.com [69.147.107.21]) by mx1.freebsd.org (Postfix) with ESMTP id B242D8FC19; Tue, 31 Aug 2010 19:51:44 +0000 (UTC) Received: from [127.0.0.1] (proxy8.corp.yahoo.com [216.145.48.13]) by mrout2-b.corp.re1.yahoo.com (8.13.8/8.13.8/y.out) with ESMTP id o7VJnGka054940; Tue, 31 Aug 2010 12:49:16 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; s=serpent; d=yahoo-inc.com; c=nofws; q=dns; h=subject:from:reply-to:to:cc:in-reply-to:references: content-type:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=wSWD0Nevs4y9kKmAE0zP0AcEFKLnWBozHFxQaWE6qwqVGI3Gkd8b5ushkY801v42 From: Sean Bruno To: Garrett Cooper In-Reply-To: References: <1283271393.3665.13.camel@home-yahoo> <20100831162947.GA61795@titania.njm.me.uk> <1283279563.3665.66.camel@home-yahoo> Content-Type: text/plain; charset="UTF-8" Date: Tue, 31 Aug 2010 12:49:15 -0700 Message-ID: <1283284155.3665.71.camel@home-yahoo> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 (2.28.3-1.fc12) Content-Transfer-Encoding: 7bit Cc: "freebsd-hackers@freebsd.org" , "sbruno@freebsd.org" , Scott Long , "N.J. Mann" Subject: Re: /etc/rc.d/mountcritremote X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: sbruno@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 19:51:45 -0000 On Tue, 2010-08-31 at 12:27 -0700, Garrett Cooper wrote: > On Tue, Aug 31, 2010 at 11:32 AM, Sean Bruno wrote: > > On Tue, 2010-08-31 at 09:29 -0700, N.J. Mann wrote: > >> In message <1283271393.3665.13.camel@home-yahoo>, > >> Sean Bruno (seanbru@yahoo-inc.com) wrote: > >> > An issue in testing came up where we were trying to mount NFS > >> > directories from the same server, i.e. a machine trying to mount an NFS > >> > dir on itself. > >> > > >> > Because mountcritremote runs before the NFS server is up, we modified > >> > the REQUIRES section and appended nfsd. > >> > >> Is this not what the 'late' attribute in /etc/fstab is for? > >> > >> e.g. > >> > >> oberon% grep /usr/ports /etc/fstab > >> oberon:/export/usr/ports /usr/ports nfs late,rw,tcp > > Specifying `late' seems extremely unnecessary for NFS mounts. If > mountcritremote can't properly depend on nmbd, nfsd, smbd for mounting > filesystems, then it seems like a rc script dependency issue > (otherwise, mountcritremote is basically mountcritlocal, waiting for > some networking connectivity to come up, right?). Yup. That's my impression. In my user's application, they have 100's of NFS mounts, of which ONE is a local-to-the-server mount. So, in this case, I don't really want to delay the mounting, I want the mounting to succeed at the time mountcritremote is invoked. The user application is doing something silly and severely knuckle headed, but it seems it should work in the way I propose instead of mounting late in "mountlate" However, I'm pretty ignorant of the dependencies in the system of rc scripts. There may be dragons here. Sean Sean From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 20:19:08 2010 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 920FC1065696 for ; Tue, 31 Aug 2010 20:19:08 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 4B4958FC08 for ; Tue, 31 Aug 2010 20:19:07 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OqXIN-00027C-8Q for freebsd-hackers@freebsd.org; Tue, 31 Aug 2010 22:19:03 +0200 Received: from 93-138-228-18.adsl.net.t-com.hr ([93.138.228.18]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 Aug 2010 22:19:03 +0200 Received: from ivoras by 93-138-228-18.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 31 Aug 2010 22:19:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Tue, 31 Aug 2010 22:18:51 +0200 Lines: 15 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 93-138-228-18.adsl.net.t-com.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100620 Thunderbird/3.0.4 Subject: nsswitch man page X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 20:19:08 -0000 I'm trying to do something with NSS and I see that NetBSD has much better documentation for it: http://www.daemon-systems.org/man/nsdispatch.3.html vs http://www.freebsd.org/cgi/man.cgi?query=nsdispatch >From the AUTHORS section on the FreeBSD's page it looks like it is an import of an earlier NetBSD version. Are the implementations still compatible? Could the manpage simply be reimported from NetBSD? From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 20:52:16 2010 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 1ABB510656AA; Tue, 31 Aug 2010 20:52:16 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from mxout0.bln1.prohost.de (mxout1.bln1.prohost.de [213.160.84.47]) by mx1.freebsd.org (Postfix) with ESMTP id 9EEF38FC1E; Tue, 31 Aug 2010 20:52:15 +0000 (UTC) Received: from Benedicts-Macbook-Pro.local (p508D654E.dip.t-dialin.net [80.141.101.78]) (authenticated bits=0) by mx1.bln1.prohost.de (8.14.1/8.14.1) with ESMTP id o7VKfSFC005940 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 31 Aug 2010 22:41:29 +0200 Message-ID: <4C7D68FF.9080209@FreeBSD.org> Date: Tue, 31 Aug 2010 22:41:35 +0200 From: Benedict Reuschling Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: John Baldwin , freebsd-hackers@FreeBSD.org, doc@FreeBSD.org References: <20100827201140.GA2812@debmaster-laptop> <201008301310.38148.jhb@freebsd.org> <20100830203404.GC3135@debmaster-laptop> <201008301734.01740.jhb@freebsd.org> <20100831192716.GB5521@debmaster-laptop> In-Reply-To: <20100831192716.GB5521@debmaster-laptop> X-Enigmail-Version: 1.1.1 OpenPGP: id=4A819348 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Null-Tag: 52368e8987b6b36ade734295e7113781 Cc: Subject: Re: Debugging Loadable Modules Using GDB X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bcr@FreeBSD.org List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 20:52:16 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 31.08.10 21:27, schrieb Alexander Fiveg: > On Mon, Aug 30, 2010 at 05:34:01PM -0400, John Baldwin wrote: >> On Monday, August 30, 2010 4:34:04 pm Alexander Fiveg wrote: >>> On Mon, Aug 30, 2010 at 01:10:37PM -0400, John Baldwin wrote: >>> > On Monday, August 30, 2010 12:12:50 pm Alexander Fiveg wrote: >>>>> On Mon, Aug 30, 2010 at 08:16:11AM -0400, John Baldwin wrote: >>>>> > On Friday, August 27, 2010 4:11:41 pm Alexander Fiveg wrote: >>>>>>> Hi, >>>>>>> from "FreeBSD Developers' Handbook, 10.7 Debugging Loadable Modules Using >>>>>>> GDB": >>>>>>> "... >>>>>>> (kgdb) add-symbol-file /sys/modules/linux/linux.ko 0xc0ae22d0 >>>>>>> ... >>>>>>> " >>>>>>> Actually I couldn't debug my modules using .ko-file. Moreover, I've find out >>>>>> that .ko files do not contain sections with debugging info. With .kld-file >>>>>> debugging works out. Do I something incorrectly or the info in the Developers >>>>>> Book is outdated? >>>>>> >>>>>> With newer versions of kgdb you shouldn't need to manually invoke 'add-symbol- >>>>>> file'. Kernel modules are treated as shared libraries and should >>>>>> automatically be loaded. Try using 'info sharedlibrary' to see the list of >>>>>> kernel modules and if symbols for them are loaded already. >>>>> Yes, the .ko files are loaded automatically. The problem is that they do >>>>> not contain debugging info. I have always to load the .kld file in order to >>>>> debug a module: >>>>> >>>>> (kgdb) f 9 >>>>> #9 0xc4dc558b in rm_8254_delayed_interrupt_per_packet () from >>>>> /boot/kernel/if_ringmap.ko >>>>> (kgdb) info locals >>>>> No symbol table info available. >>>>> >>>>> (kgdb) add-symbol-file /home/alexandre/p4/ringmap/current/sys/modules/ringmap/if_ringmap.kld 0xc4dafc70 >>>>> add symbol table from file "/home/alexandre/p4/ringmap/current/sys/modules/ringmap/if_ringmap.kld" >>>>> at >>>>> .text_addr = 0xc4dafc70 >>>>> (y or n) y >>>>> Reading symbols from /home/alexandre/p4/ringmap/current/sys/modules/ringmap/if_ringmap.kld...done. >>>>> >>>>> (kgdb) f 9 >>>>> #9 0xc4dc558b in rm_8254_delayed_interrupt_per_packet () >>>>> at /home/alexandre/p4/ringmap/current/sys/modules/ringmap/../../dev/e1000/ringmap_8254.c:142 >>>>> 142 co->ring->slot[slot_num].ts = co->ring->last_ts; >>>>> >>>>> (kgdb) info locals >>>>> co = (struct capt_object *) 0xc4d68380 >>>>> adapter = (struct adapter *) 0xc4e77000 >>>>> __func__ = "E\000\000ï¿œ\034@\000\000\211\203ï¿œE\000\000\017\206B\022\000\000\2039\000\213A\004\017\205ï¿œ\f\000\000\001ᅵᅵ1ï¿œ" >>>>> >>>>> >>>>> Is there any way to get the all symbols and needed debug info without >>>>> loading the .kld file ? >>>> >>>> How are you compiling the kld? If you are building it by hand, use >>>> 'make DEBUG_FLAGS=-g' when you build and install the kld. That should build >>>> with debug symbols enabled and install the ko.symbols file which kgdb will >>>> find and use. >>> Thanks a lot!. That is what I want to know. But I think this option is not >>> mentioned anywhere. I could not find it in "man make make.conf" and also >>> no mention about it in FreeBSD Developers' Handbook. >> >> It's a bit of a "feature" of the bsd.*.mk files that if you define >> 'DEBUG_FLAGS' it is added to CFLAGS (and CXXFLAGS) and that any resulting >> binaries are not stripped, etc. The same trick can be used to build debug >> versions of binaries and libraries. It probably is underdocumented. Not >> sure make.conf(5) is the right place as the typical usage is on the command >> line, not in /etc/make.conf or /etc/src.conf. However, I can't think of a >> better place. Maybe src.conf(5)? > > Anyway, "FreeBSD Developers' Handbook" wouldn't be wrong place for it :) I recently grabbed that the PR regarding the removal of the two sections in question: http://www.freebsd.org/cgi/query-pr.cgi?pr=docs/143342 Since I'm pretty blank when it come to knowledge about kld-debugging, I would appreciate some help integrating these changes you are discussing. If someone would write some sections about how this is being done, I volunteer to do the doc-related parts (formatting, grammar, sgml-markup and such). Otherwise, I would just remove these sections and close the PR. Regards Benedict Reuschling Mail: bcr@FreeBSD.org The FreeBSD Documentation Project FreeBSD German Documentation Project - https://doc.bsdgroup.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkx9aPcACgkQTSZQLkqBk0j4hwCgj2DHo7PPNsDbWELdVXn8Dw4g UBQAnRGZB666EVGbU0u4ALLFWJPTbJ/C =u0gb -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 31 21:27:47 2010 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 31FE910656B7; Tue, 31 Aug 2010 21:27:47 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 830158FC1C; Tue, 31 Aug 2010 21:27:46 +0000 (UTC) Received: by bwz20 with SMTP id 20so5772266bwz.13 for ; Tue, 31 Aug 2010 14:27:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=XI+IGy+BBBPBSo5JPS5zU7vzaVhtGCtQqOaNc9UqFMY=; b=uZyMsO5BAOO5H9SreQF56ulevPa3myY2REzQNaQu9b7yaTAvAIWpOvVHIFE+sIonpb 5xld7cWg38223H54X7kNyZQgSRF9WuiD1o1BlBlBnXw/bt43w3grJyiEyIWXw0aTP/ah 46fUNwxZHucY4uHSKzitrK82vMvcWgiTZ26hI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=B5uPKRJ4/cnzT5pEDQVhhj+lp2U+K0dy80F1vtPjgJth1aeDHbOCGjhSGKvD76ioV1 ihbwlHvp4X+mq9xSlLyB2BVNQdE86PrkX+Pt/Hh6ycRf6b1MnPHejZoyUbzTwqgjEiwX VJ/TKqVDfLAix1Wb5InlXXSYVTg5pzPnfUTdA= Received: by 10.204.45.136 with SMTP id e8mr5016477bkf.94.1283290065374; Tue, 31 Aug 2010 14:27:45 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id y2sm6619713bkx.20.2010.08.31.14.27.44 (version=SSLv3 cipher=RC4-MD5); Tue, 31 Aug 2010 14:27:44 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C7D73C8.5050205@FreeBSD.org> Date: Wed, 01 Sep 2010 00:27:36 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: gljennjohn@googlemail.com References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830121148.11926306@ernst.jennejohn.org> In-Reply-To: <20100830121148.11926306@ernst.jennejohn.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Aug 2010 21:27:47 -0000 Gary Jennejohn wrote: > On Mon, 30 Aug 2010 13:07:38 +0300 > Alexander Motin wrote: >> Yes, as I have said, at this moment empty ticks skipped only while CPU >> is in C2/C3 states. In C1 state there is no way to handle lost events on >> wake up. While it may be not very dangerous, it is not very good. >> > Too bad. I'd say that systems which are limited to C1 don't benefit > much (or not at all) from your changes. I've solved it! :) I've recalled that most of our interrupts are working in interrupt threads. It means that it may be not so important to disable interrupts completely, but only delay their threads execution by putting cpu_idle() inside critical section and releasing it only after all missed events handled. Sure, this approach will not help FILTER interrupt handlers, executed inside hardware interrupt context, but we have very few of them and they are usually very simple and I hope not very depend on system time precision. Also this new approach allows simple interrupts (like TLB invalidation IPIs) to execute before processing lost events. It should reduce performance penalty. To limit penalty even more, I have added counting of cpu_idle() calls per HZ tick. It allows to bypass timer stuff if CPU wakes up too often. It should help handle high interrupt rates without high overhead. Also I have added set of checks, blocking ACPI C3 state usage when C3-variant APIC timer is used and reduced priority of such timer. It makes use of C3 state usage safe enough and often allows AMD CPUs to not disable C1E state as it was done before. New patch is here: http://people.freebsd.org/~mav/timers_oneshot5.patch -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 01:29:28 2010 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 620B41065698 for ; Wed, 1 Sep 2010 01:29:28 +0000 (UTC) (envelope-from davide.italiano@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id E340F8FC13 for ; Wed, 1 Sep 2010 01:29:27 +0000 (UTC) Received: by wwb34 with SMTP id 34so7771449wwb.31 for ; Tue, 31 Aug 2010 18:29:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=w2GKRxxcT5nCDpSs1/f88eF2a1QrJYEbweMn0/osp8g=; b=H8o38ZS2XzoxMNb0pI3Tz9c6gWxmNrRk0zhe5Klz1AO9H7UEOk5ABkyTpR6Od8AW/e IB8iU394lbNtqXgYIu9jRy4WZs09yKh+LxioKYOhNXAnkhXBne+5o26WXy/lEbzMt14O 7jTuF6k7qY96x2Kc1bJ4hJ2D/cg/jJotu/zME= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=hl37cQckEYxDYefw+l5/FOEe4aisC5rUJcehOYs8SeugqWvjYV9ziSiZbfQMWKeSDO xKv/HVLkOe9mrNyfW5mf4DqN6Cu4RSTOBsA+ogDPsjLhoT7uOxTnkHNBlsRD4SXPn3ip fGkFPFr+u6mh7LljbXyYJTtp673dbl6SHfSm4= Received: by 10.227.138.6 with SMTP id y6mr7328661wbt.162.1283304557602; Tue, 31 Aug 2010 18:29:17 -0700 (PDT) Received: from phemt.homenet.telecomitalia.it.lan (host230-108-dynamic.42-79-r.retail.telecomitalia.it [79.42.108.230]) by mx.google.com with ESMTPS id k7sm5731608wej.26.2010.08.31.18.29.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 31 Aug 2010 18:29:16 -0700 (PDT) Date: Wed, 1 Sep 2010 01:29:13 +0200 From: Davide Italiano To: John Baldwin Message-ID: <20100831232913.GA8129@phemt.homenet.telecomitalia.it.lan> References: <201008310753.49567.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <201008310753.49567.jhb@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-hackers@freebsd.org Subject: Re: System freezes unexpectly 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, 01 Sep 2010 01:29:28 -0000 On 31/08/10 07:53, John Baldwin wrote: > On Monday, August 30, 2010 12:45:40 pm Garrett Cooper wrote: > > On Mon, Aug 30, 2010 at 9:24 AM, Davide Italiano > > wrote: > > > removing ~/.mozilla works fine. I think that problem's related to > > > add-on Xmarks I've been installer or to "Restore session" > > > functionality > > > > It would have been interesting to capture what `froze' the machine, in > > particular because it could have been a valuable bug for either > > Mozilla to capture and fix, or for us to capture and fix. Unless your > > machine doesn't meet the hardware requirements, I don't see a reason > > why a userland application should lock up a system. > > > > There are other ways you can debug this further, using -safe-mode as a > > next step, then choose to not restore the last session (which is > > available from within the javascript settings file -- nsPrefs.js?). > > If only firefox is frozen, then you can always ssh in from another machine and > use top/ps, etc., or even gdb on the firefox process itself. > > -- > John Baldwin > _______________________________________________ > 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" I tried to ssh from another machine or ping but I can't perform this operation (hostname lookup failure). I also noticed that the cause of the problem is pretty surely Xmarks. So, if I remove ~/.mozilla firefox3 works again. When I reinstall Xmarks the system freezes. Attilio Rao (rookie), an italian kernel developer suggest me to recompile the kernel using the options, KDB, DDB, GDB, KDB_UNATTENDED (in particular the last one, that reboot the machine if a panic occurs), but I didn't obtain nothin' useful, because isn't a panic (the machine doesn't reboot) neither dmesg is more verbose about the problem. I also tried to recompile firefox from ports w/ DEBUG flag enable, but I don't see anythin' good launching firefox from xterm. Regards Davide From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 06:41:00 2010 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 D71C710656C6; Wed, 1 Sep 2010 06:41:00 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.16.84]) by mx1.freebsd.org (Postfix) with ESMTP id 879BC8FC14; Wed, 1 Sep 2010 06:41:00 +0000 (UTC) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by kabab.cs.huji.ac.il with esmtp id 1Oqgb3-000CfV-PS; Wed, 01 Sep 2010 09:14:57 +0300 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Sean Bruno In-reply-to: <1283279518.3665.64.camel@home-yahoo> References: <1283271393.3665.13.camel@home-yahoo> <1283279518.3665.64.camel@home-yahoo> Comments: In-reply-to Sean Bruno message dated "Tue, 31 Aug 2010 11:31:58 -0700." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 01 Sep 2010 09:14:57 +0300 From: Daniel Braniss Message-ID: Cc: Dirk-WIllem van Gulik , "sbruno@freebsd.org" , Scott Long , "freebsd-hackers@freebsd.org" Subject: Re: /etc/rc.d/mountcritremote 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, 01 Sep 2010 06:41:00 -0000 > On Tue, 2010-08-31 at 10:45 -0700, Dirk-WIllem van Gulik wrote: > > On 31 Aug 2010, at 17:16, Sean Bruno wrote: > > > > > An issue in testing came up where we were trying to mount NFS > > > directories from the same server, i.e. a machine trying to mount an NFS > > > dir on itself. > > > > > > Because mountcritremote runs before the NFS server is up, we modified > > > the REQUIRES section and appended nfsd. > > > > Are you sure that is right for PXE style boots - where this is heavily relied on ? > > > > Dw. > > Not sure. If the nfs server isn't configured to startup, then this is a > no-op. > > I'm not sure what application would be running in a pxeboot environment > and run an NFS server. most of our servers are pxeboot'able/dataless. since we rely heavely on NFS - ie. /usr/local - I set early_late_divider to amd (the automounter), and made sure it runs early enough. Probably because we have been running NFS since V0 (pre automount too), booting machines was a nightmare, I refuse to have nfs mounts in fstab. danny From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 06:45:59 2010 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 0857C1065697; Wed, 1 Sep 2010 06:45:59 +0000 (UTC) (envelope-from realbushman@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 973C78FC0A; Wed, 1 Sep 2010 06:45:58 +0000 (UTC) Received: by qyk31 with SMTP id 31so308687qyk.13 for ; Tue, 31 Aug 2010 23:45:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=Sf+S+FIvYFmoEtNMpesZphP0Pmd1ROMOolWA5Gq67io=; b=k+fRqG/p3wH31hOXtvOswKGTwtjF5O1LKYwmWY2Q3mWPM/j3AK/5Xn2bo6OiVZhlq8 +/xWYbrLocN/4I4Q5zafkVV0YEy6USSLDMrNLWfvdj12VRlRFUI3ACnNlqboTbASO+vF Zxm/D4JFzReFxr5WnapAKooWafwPTTVcoNh+A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=tjPTsEXC8nL1+Zuj3Hq5t17VxAZPHNW7XEOtXhfoqw9lVWY1LcBxCUIHnGplYm58QS cqWVgDmwe9WckuWqItoGbJoD0W9EOauglNMMsR7RBfsYCw6GUNoC75gKNZVc1uKjUG05 gr+iLS7rjU9jQuGzgdcT/TIZNOchkvHyIjmUs= MIME-Version: 1.0 Received: by 10.224.85.134 with SMTP id o6mr4813642qal.82.1283321762589; Tue, 31 Aug 2010 23:16:02 -0700 (PDT) Sender: realbushman@gmail.com Received: by 10.229.187.143 with HTTP; Tue, 31 Aug 2010 23:16:02 -0700 (PDT) In-Reply-To: References: Date: Wed, 1 Sep 2010 10:16:02 +0400 X-Google-Sender-Auth: SKnjn-UUC6X2fbJlg8SDrkz1CK8 Message-ID: From: Michael Bushkov To: Ivan Voras Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: nsswitch man page 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, 01 Sep 2010 06:45:59 -0000 If you don't mind, as I've worked extensively with nsswitch, I can check the current implementation and provide you a patch to update the docs. On Wed, Sep 1, 2010 at 12:18 AM, Ivan Voras wrote: > I'm trying to do something with NSS and I see that NetBSD has much > better documentation for it: > > http://www.daemon-systems.org/man/nsdispatch.3.html > > vs > > http://www.freebsd.org/cgi/man.cgi?query=nsdispatch > > >From the AUTHORS section on the FreeBSD's page it looks like it is an > import of an earlier NetBSD version. > > Are the implementations still compatible? Could the manpage simply be > reimported from NetBSD? > > > _______________________________________________ > 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 Sep 1 09:17:53 2010 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 91CC810656A3 for ; Wed, 1 Sep 2010 09:17:53 +0000 (UTC) (envelope-from freebsd-hackers@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 4A2938FC19 for ; Wed, 1 Sep 2010 09:17:53 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OqjS2-0001Yu-Vt for freebsd-hackers@freebsd.org; Wed, 01 Sep 2010 11:17:50 +0200 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, 01 Sep 2010 11:17:50 +0200 Received: from ivoras by lara.cc.fer.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 01 Sep 2010 11:17:50 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-hackers@freebsd.org From: Ivan Voras Date: Wed, 01 Sep 2010 11:17:36 +0200 Lines: 7 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: lara.cc.fer.hr User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.9) Gecko/20100518 Thunderbird/3.0.4 In-Reply-To: X-Enigmail-Version: 1.0.1 Subject: Re: nsswitch man page 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, 01 Sep 2010 09:17:53 -0000 On 09/01/10 08:16, Michael Bushkov wrote: > If you don't mind, as I've worked extensively with nsswitch, I can > check the current implementation and provide you a patch to update the > docs. Of course, go ahead. From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 10:05:38 2010 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 D29CE10656CB; Wed, 1 Sep 2010 10:05:38 +0000 (UTC) (envelope-from gljennjohn@googlemail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id A56118FC13; Wed, 1 Sep 2010 10:05:37 +0000 (UTC) Received: by fxm4 with SMTP id 4so5337872fxm.13 for ; Wed, 01 Sep 2010 03:05:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:reply-to:x-mailer:mime-version :content-type:content-transfer-encoding; bh=P+kVzRLLgWTD8JVula6zYpbNd8ehlXyfrEKCcHpNimk=; b=lFuzOOK2iMYF+Vur9+vTkVlkfbQ+sWOeVUx5jGC3tTmcaqIWfE4vfMWlrP3QK3phwQ EVvybzFTDYdgk//h6lWFT3CR+pegIcUUf8hRsYYJqS/sz/SVWWJndBRb6CANhpIe5amX 19lWN1uZbxqjCOh736ju/F1MJro6almOQ/ODI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; b=wAkTOT6QaTeJIo9inex/mKRXkQy5UOwi5P1E3feZXBTrbFS9dwDeACyv11kDTijgK5 vpQVHRoW8puFi85zOZ17asPbRP16kQ0CA/j2BuT12lGRSErlHq3gOMrWgJ65Ziwa4MaV ntUALWI/wsdCJGIJU72JINOOWYFZMbBL7KyLE= Received: by 10.223.119.10 with SMTP id x10mr6736240faq.1.1283335536777; Wed, 01 Sep 2010 03:05:36 -0700 (PDT) Received: from ernst.jennejohn.org (p578E1567.dip.t-dialin.net [87.142.21.103]) by mx.google.com with ESMTPS id 14sm4494278fav.2.2010.09.01.03.05.35 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 01 Sep 2010 03:05:36 -0700 (PDT) Date: Wed, 1 Sep 2010 12:05:34 +0200 From: Gary Jennejohn To: Alexander Motin Message-ID: <20100901120534.1eb3db9b@ernst.jennejohn.org> In-Reply-To: <4C7D73C8.5050205@FreeBSD.org> References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830121148.11926306@ernst.jennejohn.org> <4C7D73C8.5050205@FreeBSD.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.7; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gljennjohn@googlemail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2010 10:05:43 -0000 On Wed, 01 Sep 2010 00:27:36 +0300 Alexander Motin wrote: > Gary Jennejohn wrote: > > On Mon, 30 Aug 2010 13:07:38 +0300 > > Alexander Motin wrote: > >> Yes, as I have said, at this moment empty ticks skipped only while CPU > >> is in C2/C3 states. In C1 state there is no way to handle lost events on > >> wake up. While it may be not very dangerous, it is not very good. > >> > > Too bad. I'd say that systems which are limited to C1 don't benefit > > much (or not at all) from your changes. > > I've solved it! :) > Yup, this definitely reduces the number of inerrupts on my C1-only system :) Now I'm seeing on the order of 100 to 200 interrupts/s instead of around 2300. I'll run this new kernel some more and see how stable it is. Thanks, mav! -- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 10:44:36 2010 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 EE2B41065675; Wed, 1 Sep 2010 10:44:36 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 46C628FC22; Wed, 1 Sep 2010 10:44:36 +0000 (UTC) Received: by bwz20 with SMTP id 20so6189435bwz.13 for ; Wed, 01 Sep 2010 03:44:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=WgJPjCVWXQFIX02uszys1SuSN6hSQlybkrsq0uYo+i8=; b=Cs5YwvKVv8rvCjIIBQoA0wUuroG4gwJ3a3XjB0d38YRRp/58AhZdkPMJ8E6W6zV6O6 vngAikdgaJjc6ZFlJIHK3KJUgcK5H0KucbKzZW1WYr6u7zPxuydokfqxYFDQ8nV7+gRT kd5+W/JvFw7H/q/42bxSnp04G1gU/VryQzdaE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=MFSRN/JqUGU1nx9ZH9R5d+Fpz3glHaUwFWyAdmLsAvecbY//cODWw296kUL8CDOPNA VPEtEPetDUvl/LmiQ2MDIdY+JVAsTqrwx2EUnvYpeNOD6Paea6/4FHIYOKfjMtgekyqq 1XewSVm4HQVQ8dZXh54dA7PMpyxi2f5UCEtXs= Received: by 10.204.178.67 with SMTP id bl3mr5259532bkb.161.1283337875236; Wed, 01 Sep 2010 03:44:35 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id bq20sm7117521bkb.16.2010.09.01.03.44.34 (version=SSLv3 cipher=RC4-MD5); Wed, 01 Sep 2010 03:44:34 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C7E2E8A.3030709@FreeBSD.org> Date: Wed, 01 Sep 2010 13:44:26 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: gljennjohn@googlemail.com References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830121148.11926306@ernst.jennejohn.org> <20100831102918.4f5404cc@ernst.jennejohn.org> <4C7CC1DE.1080907@FreeBSD.org> In-Reply-To: <4C7CC1DE.1080907@FreeBSD.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management 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, 01 Sep 2010 10:44:37 -0000 Alexander Motin wrote: > Gary Jennejohn wrote: >> On Mon, 30 Aug 2010 12:11:48 +0200 >> OK, this is purely anecdotal, but I'll report it anyway. >> >> I was running pretty much all day with the patched kernel and things >> seemed to be working quite well. >> >> Then, after about 7 hours, everything just stopped. >> >> I had gkrellm running and noticed that it updated only when I moved the >> mouse. >> >> This behavior leads me to suspect that the timer interrupts had stopped >> working and the mouse interrupts were causing processes to get scheduled. >> >> Unfortunately, I wasn't able to get a dump and had to hit reset to >> recover. >> >> As I wrote above, this is only anecdotal, but I've never seen anything >> like this before applying the patches. > > One-shot timers have one weak side: if for some reason timer interrupt > getting lost -- there will be nobody to reload the timer. Such cases > probably will require special attention. Same funny situation with > mouse-driven scheduler happens also if LAPIC timer dies when pre-Core-iX > CPU goes to C3 state. I have reproduced the problem locally. It happens more often when ticks are not stopped on idle, like in your original case (or if explicitly enabled by kern.eventtimer.idletick sysctl). I've made some changes to HPET driver, which, I hope, should fix interrupt losses there. Updated patch: http://people.freebsd.org/~mav/timers_oneshot6.patch Patch also includes some optimizations to reduce lock contention. Thanks for testing. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 12:15:45 2010 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 C6043106564A; Wed, 1 Sep 2010 12:15:45 +0000 (UTC) (envelope-from gljennjohn@googlemail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id BB31F8FC22; Wed, 1 Sep 2010 12:15:44 +0000 (UTC) Received: by fxm4 with SMTP id 4so5405503fxm.13 for ; Wed, 01 Sep 2010 05:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:reply-to:x-mailer:mime-version :content-type:content-transfer-encoding; bh=lfNqMsAo40SVSzz2+Nh31Ie6CFtfDWtSeUz7XZbNKso=; b=luI7u4UNFzkDytBWIc1tTAQ5dRzqXC+sR15vACBF4l6fPELkbs9hPlsV4AOr3+BAgo gSHtavwWzd/wgP2FNa+SK7mWot/5CQGnFjtVdIrSIdPlgHYnnsCOEKKhU3ailk1F+HmB b2KO5fubnqccl6C8P+LC+ml6am3WMA73i7HO4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; b=X8APA6yQxCKAuYaBgi6hv7W/VVM/O1XB9Ar8iOMbe6QfRR94asgHggu0YulhfkHCri 5AKRfGExzh80gAmgEQo5ZSCslqjoawTduYw9VQhFORQiaOt//VboKgzEv8tUKWT+Vu8O S+1pLNO5Y/8e4wsYFYYZb0YXPwGUFe5AJLqmw= Received: by 10.223.118.211 with SMTP id w19mr6805278faq.19.1283343343860; Wed, 01 Sep 2010 05:15:43 -0700 (PDT) Received: from ernst.jennejohn.org (p578E1567.dip.t-dialin.net [87.142.21.103]) by mx.google.com with ESMTPS id 2sm4536681faz.38.2010.09.01.05.15.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 01 Sep 2010 05:15:43 -0700 (PDT) Date: Wed, 1 Sep 2010 14:15:41 +0200 From: Gary Jennejohn To: Alexander Motin Message-ID: <20100901141541.3e36c868@ernst.jennejohn.org> In-Reply-To: <4C7E2E8A.3030709@FreeBSD.org> References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830121148.11926306@ernst.jennejohn.org> <20100831102918.4f5404cc@ernst.jennejohn.org> <4C7CC1DE.1080907@FreeBSD.org> <4C7E2E8A.3030709@FreeBSD.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.7; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gljennjohn@googlemail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2010 12:15:46 -0000 On Wed, 01 Sep 2010 13:44:26 +0300 Alexander Motin wrote: > Alexander Motin wrote: > > Gary Jennejohn wrote: > >> On Mon, 30 Aug 2010 12:11:48 +0200 > >> OK, this is purely anecdotal, but I'll report it anyway. > >> > >> I was running pretty much all day with the patched kernel and things > >> seemed to be working quite well. > >> > >> Then, after about 7 hours, everything just stopped. > >> > >> I had gkrellm running and noticed that it updated only when I moved the > >> mouse. > >> > >> This behavior leads me to suspect that the timer interrupts had stopped > >> working and the mouse interrupts were causing processes to get scheduled. > >> > >> Unfortunately, I wasn't able to get a dump and had to hit reset to > >> recover. > >> > >> As I wrote above, this is only anecdotal, but I've never seen anything > >> like this before applying the patches. > > > > One-shot timers have one weak side: if for some reason timer interrupt > > getting lost -- there will be nobody to reload the timer. Such cases > > probably will require special attention. Same funny situation with > > mouse-driven scheduler happens also if LAPIC timer dies when pre-Core-iX > > CPU goes to C3 state. > > I have reproduced the problem locally. It happens more often when ticks > are not stopped on idle, like in your original case (or if explicitly > enabled by kern.eventtimer.idletick sysctl). > > I've made some changes to HPET driver, which, I hope, should fix > interrupt losses there. > > Updated patch: http://people.freebsd.org/~mav/timers_oneshot6.patch > > Patch also includes some optimizations to reduce lock contention. > > Thanks for testing. > OK, I'll give it a try, althought your previous patch seems to be working quite well. BTW I've also been using tm6292_idle.patch. Do I really need it? -- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 12:21:57 2010 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 DF27510656C4; Wed, 1 Sep 2010 12:21:57 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3A1AE8FC15; Wed, 1 Sep 2010 12:21:56 +0000 (UTC) Received: by fxm4 with SMTP id 4so5409521fxm.13 for ; Wed, 01 Sep 2010 05:21:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=aye6magDiUeW6Xe07IAZI3Rlv93bizq39NJWsWFUHXU=; b=gNfxa7772+B5kVmqAJbuCdAK8bACnbL9uo6AoJWd/U5zyOJpSz3vvMvsHD2wxrHNF7 iq5fdPViCLikpeSavkr1Vk/3uvx/qsrjUnG9/00rqJU8hKLVJA4WDOvWNE5nspMDFutx TF+YhyXNQHuQRTIpJ1orn3+T9GbYwuOZHmM74= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=s85COAQpaSzIm17ZwoVhKSxAbORpx8Dt0kSeGnlJNcDx8Gd7vIuQmXyAacBGhu2qss uCE1itGoFtzFUDLRfLrKrxXLgyMKWpuPwilUoF/X+5yi0gw7ALwg3vMSEM9G596JpGOE 0ZJfnceu7LcEY5cmPzIa8+QXa5OCQFlITwP3M= Received: by 10.223.105.132 with SMTP id t4mr6815056fao.75.1283343716237; Wed, 01 Sep 2010 05:21:56 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id u8sm4538230fah.36.2010.09.01.05.21.54 (version=SSLv3 cipher=RC4-MD5); Wed, 01 Sep 2010 05:21:55 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C7E4555.3000802@FreeBSD.org> Date: Wed, 01 Sep 2010 15:21:41 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: gljennjohn@googlemail.com References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830121148.11926306@ernst.jennejohn.org> <20100831102918.4f5404cc@ernst.jennejohn.org> <4C7CC1DE.1080907@FreeBSD.org> <4C7E2E8A.3030709@FreeBSD.org> <20100901141541.3e36c868@ernst.jennejohn.org> In-Reply-To: <20100901141541.3e36c868@ernst.jennejohn.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management 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, 01 Sep 2010 12:21:58 -0000 Gary Jennejohn wrote: > On Wed, 01 Sep 2010 13:44:26 +0300 > Alexander Motin wrote: >> I have reproduced the problem locally. It happens more often when ticks >> are not stopped on idle, like in your original case (or if explicitly >> enabled by kern.eventtimer.idletick sysctl). >> >> I've made some changes to HPET driver, which, I hope, should fix >> interrupt losses there. >> >> Updated patch: http://people.freebsd.org/~mav/timers_oneshot6.patch >> >> Patch also includes some optimizations to reduce lock contention. >> >> Thanks for testing. > > OK, I'll give it a try, althought your previous patch seems to be working > quite well. Stopping/starting timer around idle could partially hide the problem. Single external even in such case could be enough to revive system. > BTW I've also been using tm6292_idle.patch. Do I really need it? It is not necessary. It just reduces number of events generated by system by hacking several aggressive places I've found. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 14:28:08 2010 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 6C01B1065697; Wed, 1 Sep 2010 14:28:08 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id C3CBA8FC0C; Wed, 1 Sep 2010 14:28:07 +0000 (UTC) Received: by fxm4 with SMTP id 4so5533884fxm.13 for ; Wed, 01 Sep 2010 07:28:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=MXdQB02v2WarFXyqJ+for8/mDbHOOXSujNc03TfSAY0=; b=gOqqWb6H4LvAlsORt4Brwse2XxmhezNSd8yt/xV2TED5onVvqvjoSu4o4wATPJRSQp 1700U2dElBc+BaDUyj+jFawjZCxiuLcRNWVy3dV3+otHoyrYObUWFTW2NRekky7anotD yImAcyJaRT+nkPvfEW6Zae7ZhM3/CNN93hNFc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=oKMXXXccfZYG4Pw4tJnhCA2K53H+ahf6tZH0FGnJxA6xePFGwjShRmg+X2fByvMZAx Y9k54p6YLZGqW6y+JJvXHWWTUTlDuvDrbE374i8c55vk5D88uYAwBGFgEMH8Ez69SvEx 6nUsJ5mOSGXnuVitu9Oeb1PRFQhYIM55H9fLY= Received: by 10.223.112.10 with SMTP id u10mr7037714fap.50.1283351286611; Wed, 01 Sep 2010 07:28:06 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id b11sm4610776faq.30.2010.09.01.07.28.04 (version=SSLv3 cipher=RC4-MD5); Wed, 01 Sep 2010 07:28:05 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C7E62E7.8070309@FreeBSD.org> Date: Wed, 01 Sep 2010 17:27:51 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: Alexander Leidinger References: <4C7A5C28.1090904@FreeBSD.org> <20100901161834.198574t14uxayygw@webmail.leidinger.net> In-Reply-To: <20100901161834.198574t14uxayygw@webmail.leidinger.net> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management 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, 01 Sep 2010 14:28:08 -0000 Alexander Leidinger wrote: > Quoting Alexander Motin (from Sun, 29 Aug 2010 > 16:10:00 +0300): > >> I have actively tested this code for a few days on my amd64 Core2Duo >> laptop and i386 Core-i5 desktop system. With C2/C3 states enabled >> systems experience only about 100-150 interrupts per second, having HZ >> set to 1000. These events mostly caused by several event-greedy >> processes in our tree. I have traced and hacked several most aggressive >> ones in this patch: http://people.freebsd.org/~mav/tm6292_idle.patch . >> It allowed me to reduce down to as low as 50 interrupts per system, >> including IPIs! > > It looks like you are comming to a point where Powertop would be > helpful. There's a dtracified version of it available at the opensolaris > site (it would at least need some additional dtrace probes in our kernel). > > http://hub.opensolaris.org/bin/view/Project+tesla/Powertop Thank you for the link. I was thinking about it, but worried that it could be too Linux-specific. Nice to here there is closer alternative. I'll look on it. PS: Until it is ported, I've found that `top -m io -o vcsw` could also be useful. The only thing it can't show is in-kernel callout(9) calls. User and kernel processes wakeups still nicely visible there. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 14:38:38 2010 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 271F51065781 for ; Wed, 1 Sep 2010 14:38:38 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id C5DC18FC21 for ; Wed, 1 Sep 2010 14:38:37 +0000 (UTC) Received: from outgoing.leidinger.net (p57B3A486.dip.t-dialin.net [87.179.164.134]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 76EA184400A; Wed, 1 Sep 2010 16:18:40 +0200 (CEST) Received: from webmail.leidinger.net (webmail.leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 2DFB81400; Wed, 1 Sep 2010 16:18:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=Leidinger.net; s=outgoing-alex; t=1283350716; bh=wUvW0SUxzmnC/EGW3wc7dtTBrFM8YOCT/7xgKkyGrE8=; h=Message-ID:Date:From:To:Cc:Subject:References:In-Reply-To: MIME-Version:Content-Type:Content-Transfer-Encoding; b=TgfJarNgGcQ18FMRW68kl8n8IzXdyySaloiNfGux732Ki4VCvkQ2/K8qYzLmQ7NnW Q3nQqMHbK4PHN8SQewp2vp1zBG7Gwkx2lSfgDSvt+zWotLmwg9rUJ9n2Df7sf1ix0E 4f146ylNxi4Jm9byqzcCC9lr3brj8fTItPg2mDqBcl4PIR7gnZ+ojQb040nbHsvR4H 630FTAaAeTDXIrhtHA5tzziLfPDOulshpAQWiyvh9TyUQNI4OQT94Pg05aJL4WyqhX FWrO2oX1vvX49vKS7u0OZhDWmcHEwBaKnetO0MBbNCDgRmA6Kp4t4jSO4rCMljcDod zZ7KV7VMvTVww== Received: (from www@localhost) by webmail.leidinger.net (8.14.4/8.13.8/Submit) id o81EIZKC086351; Wed, 1 Sep 2010 16:18:35 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.ec.europa.eu (pslux.ec.europa.eu [158.169.9.14]) by webmail.leidinger.net (Horde Framework) with HTTP; Wed, 01 Sep 2010 16:18:34 +0200 Message-ID: <20100901161834.198574t14uxayygw@webmail.leidinger.net> Date: Wed, 01 Sep 2010 16:18:34 +0200 From: Alexander Leidinger To: Alexander Motin References: <4C7A5C28.1090904@FreeBSD.org> In-Reply-To: <4C7A5C28.1090904@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.4) X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 76EA184400A.A3C50 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1.1, required 6, autolearn=disabled, ALL_TRUSTED -1.00, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1283955521.06581@R6gtFt2J/AmiNGXAxUk5hQ X-EBL-Spam-Status: No X-Mailman-Approved-At: Wed, 01 Sep 2010 15:31:32 +0000 Cc: freebsd-hackers@FreeBSD.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management 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, 01 Sep 2010 14:38:38 -0000 Quoting Alexander Motin (from Sun, 29 Aug 2010 16:10:00 +0300): > I have actively tested this code for a few days on my amd64 Core2Duo > laptop and i386 Core-i5 desktop system. With C2/C3 states enabled > systems experience only about 100-150 interrupts per second, having HZ > set to 1000. These events mostly caused by several event-greedy > processes in our tree. I have traced and hacked several most aggressive > ones in this patch: http://people.freebsd.org/~mav/tm6292_idle.patch . > It allowed me to reduce down to as low as 50 interrupts per system, > including IPIs! It looks like you are comming to a point where Powertop would be helpful. There's a dtracified version of it available at the opensolaris site (it would at least need some additional dtrace probes in our kernel). http://hub.opensolaris.org/bin/view/Project+tesla/Powertop Bye, Alexander. -- Our customers' paperwork is profit. Our own paperwork is loss. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 16:09:31 2010 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 AB02B10656A4; Wed, 1 Sep 2010 16:09:31 +0000 (UTC) (envelope-from gljennjohn@googlemail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 831708FC25; Wed, 1 Sep 2010 16:09:30 +0000 (UTC) Received: by fxm4 with SMTP id 4so5660174fxm.13 for ; Wed, 01 Sep 2010 09:09:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:reply-to:x-mailer:mime-version :content-type:content-transfer-encoding; bh=kBE+5xIKOXge18YCpdZfwEBaNbvg6pTJK4MpfnkXwNQ=; b=AErbtwGWihTQ7gzLML6JbikQqxD/hPcsUnLpkIMwMo53yYc6nJ+3IRG3QHmQOoQC66 1dVXGfaq0pyeUFbAW8iA7OEOUCXVSyVCZbv7onBUmR4rzrpncYvDEZ0ymf/nWpgJlV/g +hgbrmwH2sfiYVQHvaYUvkneO5Q+FiByIi14A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:reply-to :x-mailer:mime-version:content-type:content-transfer-encoding; b=vb6+Xs+0jJDOXh5rXHwOkt4M8kRa6EaiJbLWj/r3ptlv0F6wQrPapwcRUqsXkrYyFN yZmmGd0rgHVLDm3U0VHU44Mna54ychFBNKZoz11/EuO9I90y3QXrWB7jLldJm7E+Xo67 lpm8fYeSl7bGMOGJqJgxcb+0KdQf3+gc/BPU4= Received: by 10.223.116.3 with SMTP id k3mr7197834faq.81.1283357369395; Wed, 01 Sep 2010 09:09:29 -0700 (PDT) Received: from ernst.jennejohn.org (p578E1567.dip.t-dialin.net [87.142.21.103]) by mx.google.com with ESMTPS id j14sm1750101faa.47.2010.09.01.09.09.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 01 Sep 2010 09:09:27 -0700 (PDT) Date: Wed, 1 Sep 2010 18:09:26 +0200 From: Gary Jennejohn To: gljennjohn@googlemail.com Message-ID: <20100901180926.4b04e2cc@ernst.jennejohn.org> In-Reply-To: <20100901141541.3e36c868@ernst.jennejohn.org> References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830121148.11926306@ernst.jennejohn.org> <20100831102918.4f5404cc@ernst.jennejohn.org> <4C7CC1DE.1080907@FreeBSD.org> <4C7E2E8A.3030709@FreeBSD.org> <20100901141541.3e36c868@ernst.jennejohn.org> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.18.7; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Alexander Motin , FreeBSD-Current Subject: Re: One-shot-oriented event timers management X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gljennjohn@googlemail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2010 16:09:31 -0000 On Wed, 1 Sep 2010 14:15:41 +0200 Gary Jennejohn wrote: > On Wed, 01 Sep 2010 13:44:26 +0300 > Alexander Motin wrote: > > Updated patch: http://people.freebsd.org/~mav/timers_oneshot6.patch > > > > Patch also includes some optimizations to reduce lock contention. > > > > Thanks for testing. > > > > OK, I'll give it a try, althought your previous patch seems to be working > quite well. > This has changed the behavior of the HPET timers somewhat. With patch5 I was seeing approximately equal interrupt counts from hpet0 and hpet1. Now the majority of interrupts are on hpet0 by a factor of 6 to 10. Not a show stopper, just thought I'd mention it. One difference is that I didn't apply tm6292_idle.patch this time. -- Gary Jennejohn From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 16:13:45 2010 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 A0F3E10656A4; Wed, 1 Sep 2010 16:13:45 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id C74D48FC0A; Wed, 1 Sep 2010 16:13:37 +0000 (UTC) Received: by bwz20 with SMTP id 20so6505783bwz.13 for ; Wed, 01 Sep 2010 09:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=ybo8wmegBqlhF0OJFdOI/LhSsJBuB6A+8uRDyzS2AIw=; b=VX7ABb4PiNDP9j55AvwxelhupTEW2d/u1qgN+nwZLFsfViV7XCK7v6xYOIwmXweEg4 M6hQ+kpw7yv1tseLl/aX8lqlvgJ94z619Eidb0Nyl2Mv42xnMeZNAY/2Z3Rgm8qVJazG q6cCVf+YsRmmCZAfZtZww3M+5jjUXqDO3Za94= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=RpfBuUCCDvQlvuNwR6ic7q+nxvfYM4kVjkTooHPWUPKlTcdbE50aswg/z7mEpFm+tO EjVn4G7QsZ2iyAeaKpH0h7Nsap0lj4WXReFSC83msFB4hsCJ/CDyNUx3cmmqEgWXWdZt pZUj1SwM+g5ADyv+OGXM+awVMZXzzT7hrOy5o= Received: by 10.204.63.9 with SMTP id z9mr5806830bkh.66.1283357616658; Wed, 01 Sep 2010 09:13:36 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id s34sm7409643bkk.1.2010.09.01.09.13.35 (version=SSLv3 cipher=RC4-MD5); Wed, 01 Sep 2010 09:13:35 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C7E7BA7.5090206@FreeBSD.org> Date: Wed, 01 Sep 2010 19:13:27 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: gljennjohn@googlemail.com References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830121148.11926306@ernst.jennejohn.org> <20100831102918.4f5404cc@ernst.jennejohn.org> <4C7CC1DE.1080907@FreeBSD.org> <4C7E2E8A.3030709@FreeBSD.org> <20100901141541.3e36c868@ernst.jennejohn.org> <20100901180926.4b04e2cc@ernst.jennejohn.org> In-Reply-To: <20100901180926.4b04e2cc@ernst.jennejohn.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management 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, 01 Sep 2010 16:13:45 -0000 Gary Jennejohn wrote: > On Wed, 1 Sep 2010 14:15:41 +0200 > Gary Jennejohn wrote: > >> On Wed, 01 Sep 2010 13:44:26 +0300 >> Alexander Motin wrote: >>> Updated patch: http://people.freebsd.org/~mav/timers_oneshot6.patch >>> >>> Patch also includes some optimizations to reduce lock contention. >>> >>> Thanks for testing. >>> >> OK, I'll give it a try, althought your previous patch seems to be working >> quite well. > > This has changed the behavior of the HPET timers somewhat. > > With patch5 I was seeing approximately equal interrupt counts from > hpet0 and hpet1. > > Now the majority of interrupts are on hpet0 by a factor of 6 to 10. > > Not a show stopper, just thought I'd mention it. > > One difference is that I didn't apply tm6292_idle.patch this time. That could be the reason. This patch removes up to few hundreds events per second. -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 17:53:06 2010 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 70F9210656B1; Wed, 1 Sep 2010 17:53:06 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id A66DE8FC15; Wed, 1 Sep 2010 17:53:05 +0000 (UTC) Received: by eyx24 with SMTP id 24so5114702eyx.13 for ; Wed, 01 Sep 2010 10:53:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=aD/83CgCQ2wfD6y/2GQneA/OoDZEv6t6qFv6yVMU9fk=; b=ZWXlmULmHXg+dVowutYxaQ3ULc+lrXhddY/+d7ruHGumlFxcB7VoBrahf3gA4d1ffw 5tT2TFCt77D9AR46u8JfwPArAlJ1xshuVt7f+8WyYiRtyB4LhLOrA0LeH2hDrYNaDRZ8 D/c4Q3cB/po9Nljxji4RxvJIe/oGdCXK/ldvo= 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=iC59HOuWJf44JIbbrWiXJmHoAcbnqB+drvBuVAIfjY6GTWTxQSMW3H2yp7bIA7XYKa tp3Y0hpViEB2doOfWRKcRdQThNkLD2fkY8JAfIyYq0QbvKjOstpUzqUc7pq4Xs+InQF3 awlaFULVVl/EZoYMStGAGGPLKFDTngwx1bxP8= MIME-Version: 1.0 Received: by 10.216.176.8 with SMTP id a8mr597609wem.93.1283363584516; Wed, 01 Sep 2010 10:53:04 -0700 (PDT) Received: by 10.216.133.2 with HTTP; Wed, 1 Sep 2010 10:53:04 -0700 (PDT) In-Reply-To: <4C7E2E8A.3030709@FreeBSD.org> References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830121148.11926306@ernst.jennejohn.org> <20100831102918.4f5404cc@ernst.jennejohn.org> <4C7CC1DE.1080907@FreeBSD.org> <4C7E2E8A.3030709@FreeBSD.org> Date: Wed, 1 Sep 2010 12:53:04 -0500 Message-ID: From: Brandon Gooch To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management 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, 01 Sep 2010 17:53:06 -0000 On Wed, Sep 1, 2010 at 5:44 AM, Alexander Motin wrote: > Alexander Motin wrote: >> Gary Jennejohn wrote: >>> On Mon, 30 Aug 2010 12:11:48 +0200 >>> OK, this is purely anecdotal, but I'll report it anyway. >>> >>> I was running pretty much all day with the patched kernel and things >>> seemed to be working quite well. >>> >>> Then, after about 7 hours, everything just stopped. >>> >>> I had gkrellm running and noticed that it updated only when I moved the >>> mouse. >>> >>> This behavior leads me to suspect that the timer interrupts had stopped >>> working and the mouse interrupts were causing processes to get scheduled. >>> >>> Unfortunately, I wasn't able to get a dump and had to hit reset to >>> recover. >>> >>> As I wrote above, this is only anecdotal, but I've never seen anything >>> like this before applying the patches. >> >> One-shot timers have one weak side: if for some reason timer interrupt >> getting lost -- there will be nobody to reload the timer. Such cases >> probably will require special attention. Same funny situation with >> mouse-driven scheduler happens also if LAPIC timer dies when pre-Core-iX >> CPU goes to C3 state. > > I have reproduced the problem locally. It happens more often when ticks > are not stopped on idle, like in your original case (or if explicitly > enabled by kern.eventtimer.idletick sysctl). > > I've made some changes to HPET driver, which, I hope, should fix > interrupt losses there. > > Updated patch: http://people.freebsd.org/~mav/timers_oneshot6.patch > > Patch also includes some optimizations to reduce lock contention. > > Thanks for testing. This latest patch causes an interrupt storm with the HPET timer on my system. The machine took about 8 minutes to boot and bring me to a login prompt. System interactivity (i.e. input from keyboard, output on console) was fine, but after checking the output of `systat vmstat -1`, I saw the interrupt rate on each HPET entry was over 120k! Can I provide any useful detail? Of course, test patches are always welcome :) -Brandon From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 18:27:28 2010 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 59E7A1065694; Wed, 1 Sep 2010 18:27:28 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 1C9CC8FC0C; Wed, 1 Sep 2010 18:27:27 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 09E331FFC37; Wed, 1 Sep 2010 18:27:27 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id C66C784525; Wed, 1 Sep 2010 20:27:26 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexander Best References: <20100831180103.GA92584@freebsd.org> Date: Wed, 01 Sep 2010 20:27:26 +0200 In-Reply-To: <20100831180103.GA92584@freebsd.org> (Alexander Best's message of "Tue, 31 Aug 2010 18:01:03 +0000") Message-ID: <86fwxt5ng1.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: expand_number() for fetch'es -B and -S switches 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, 01 Sep 2010 18:27:28 -0000 Alexander Best writes: > just having a quick look around to see, if anybody would be interested in > fetch -B and fetch -S accepting humanized numbers using expand_number()? I can understand it for -B, but not for -S, since in the common case (by 1023 to 1, assuming a random distribution) the argument to -S can not be expressed in [kMGTEP]B. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 18:44:47 2010 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 AC76110656B4 for ; Wed, 1 Sep 2010 18:44:47 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 736D58FC21 for ; Wed, 1 Sep 2010 18:44:47 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 5CFDA1FFC37 for ; Wed, 1 Sep 2010 18:44:46 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 26F368452E; Wed, 1 Sep 2010 20:44:46 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: hackers@freebsd.org Date: Wed, 01 Sep 2010 20:44:45 +0200 Message-ID: <86bp8h5mn6.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Subject: /stand/camcontrol 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, 01 Sep 2010 18:44:47 -0000 Consider the following commit: r89471 | joerg | 2002-01-17 21:26:14 +0100 (Thu, 17 Jan 2002) | 8 lines Provide an option to make camcontrol `minimalistic': if the (env/make) variable RELEASE_BUILD_FIXIT is defined, a camcontrol binary will be built that only knows the "rescan" and "reset" subcommands. The resulting code is small enough to still fit onto the boot floppy. This makes /stand/camcontrol completely useless. Do we still care about fitting sysinstall on a floppy? The full camcontrol is about 100 kB larger than the pared-down version, but I'm not sure the difference is that big when it's crunched with the rest of /stand. text data bss dec hex filename 268751 26464 54112 349327 5548f camcontrol-crunch 355122 27064 58904 441090 6bb02 camcontrol-full DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 19:16:50 2010 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 462F810656BD; Wed, 1 Sep 2010 19:16:50 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 93B278FC17; Wed, 1 Sep 2010 19:16:49 +0000 (UTC) Received: by bwz20 with SMTP id 20so6686567bwz.13 for ; Wed, 01 Sep 2010 12:16:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=vN7UlXgi+pKX3NSJnirMVvn1bbLJzikF+061Nb/itOo=; b=ZZxXOWBsANAyNF96i5/dY/c/27jGakAkMrG56892o9/Y1P4T1Ld0EFmvSzOtVeWOup //ssBt8UMZbmJa0n93i4AsLloNwKdSp8pVEh+qlzIsLk51e/Xgiz8c5EKU5pFqVTAwG0 +mIbD73UScq3puEmqs6QULUGLidFqC1zNhjSg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=P7RWeB9hOKrG4O8vM+Xt0+fd+t7RfAfjYpN2lOqioEQm7H1jIstxSWYbU/FptJnwdI tOW9hQgSoKs74hCnKdGfxs/oSJEy6M6uiO28iIaQ9jytY9ArpBuxdSeZ1OnWMl9mMb1R VzxnNH8LA2x78CEq6dz1l5CCpR2lQMhpZoeE4= Received: by 10.204.84.17 with SMTP id h17mr5820223bkl.101.1283368608348; Wed, 01 Sep 2010 12:16:48 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id f18sm7557539bkf.3.2010.09.01.12.16.47 (version=SSLv3 cipher=RC4-MD5); Wed, 01 Sep 2010 12:16:47 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C7EA696.3030901@FreeBSD.org> Date: Wed, 01 Sep 2010 22:16:38 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Brandon Gooch References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830121148.11926306@ernst.jennejohn.org> <20100831102918.4f5404cc@ernst.jennejohn.org> <4C7CC1DE.1080907@FreeBSD.org> <4C7E2E8A.3030709@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management 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, 01 Sep 2010 19:16:50 -0000 Brandon Gooch wrote: > This latest patch causes an interrupt storm with the HPET timer on my > system. The machine took about 8 minutes to boot and bring me to a > login prompt. System interactivity (i.e. input from keyboard, output > on console) was fine, but after checking the output of `systat vmstat > -1`, I saw the interrupt rate on each HPET entry was over 120k! > > Can I provide any useful detail? Of course, test patches are always welcome :) I was able to reproduce alike storm in some situations. Try new version: http://people.freebsd.org/~mav/timers_oneshot7.patch -- Alexander Motin From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 20:37:53 2010 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 C0C431065672 for ; Wed, 1 Sep 2010 20:37:53 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 890218FC12 for ; Wed, 1 Sep 2010 20:37:53 +0000 (UTC) Received: by iwn34 with SMTP id 34so1266947iwn.13 for ; Wed, 01 Sep 2010 13:37:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=8b5rBYTEmpjfqhoamO9H+VtwOpOnyu82aQ6cPNotU7o=; b=rl2bWepIcW6JVKXAEIz1jsjxI22kjuK1/wxcxFFLuO5H+eDM3oMXmgyAubuGMQ/+2u kt4wZK/p96xVtqRVTbjI03gvtL/300syEwHN6QRdtws7Oa+RmavThql3Z/gdv/MeFOvT TD9YoX2hvwggPbx49JG1Z1UJ4YlAWi0LpsTXM= 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=qK0dn+kXSI0YSbHJ8QW45z7atxoMAJevmE8VdnrUB2BSywUDTUtDjEWzCuatPJ48mp E5AE/hc/mfLR7uGdKkkoSBcrGm4AYL9+VM+gRfNIJVr/L6OMY5s22d9klgCGGEzdecEP tseXmRPKO20XyKTI5V6T9h7OwljOXHWIZnlMM= MIME-Version: 1.0 Received: by 10.231.152.78 with SMTP id f14mr9664479ibw.60.1283371639782; Wed, 01 Sep 2010 13:07:19 -0700 (PDT) Received: by 10.231.146.10 with HTTP; Wed, 1 Sep 2010 13:07:19 -0700 (PDT) In-Reply-To: <86bp8h5mn6.fsf@ds4.des.no> References: <86bp8h5mn6.fsf@ds4.des.no> Date: Wed, 1 Sep 2010 13:07:19 -0700 Message-ID: From: Xin LI To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org Subject: Re: /stand/camcontrol 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, 01 Sep 2010 20:37:53 -0000 2010/9/1 Dag-Erling Sm=C3=B8rgrav : > Consider the following commit: > > =C2=A0r89471 | joerg | 2002-01-17 21:26:14 +0100 (Thu, 17 Jan 2002) | 8 l= ines > > =C2=A0Provide an option to make camcontrol `minimalistic': if the (env/ma= ke) > =C2=A0variable RELEASE_BUILD_FIXIT is defined, a camcontrol binary will b= e > =C2=A0built that only knows the "rescan" and "reset" subcommands. =C2=A0T= he > =C2=A0resulting code is small enough to still fit onto the boot floppy. > > This makes /stand/camcontrol completely useless. > > Do we still care about fitting sysinstall on a floppy? > > The full camcontrol is about 100 kB larger than the pared-down version, > but I'm not sure the difference is that big when it's crunched with the > rest of /stand. > > =C2=A0 text =C2=A0 =C2=A0data =C2=A0 =C2=A0 bss =C2=A0 =C2=A0 dec =C2=A0 = =C2=A0 hex filename > =C2=A0268751 =C2=A0 26464 =C2=A0 54112 =C2=A0349327 =C2=A0 5548f camcontr= ol-crunch > =C2=A0355122 =C2=A0 27064 =C2=A0 58904 =C2=A0441090 =C2=A0 6bb02 camcontr= ol-full My 2 cents: I think we don't really need to care about the size for rescue binary after the splitfs VFS layer have been introduced to libstand? Build of release split MFSROOT was 2006-ish and I feel that this can be gone. One of my hope is that we can add bzip2 or even 7zip support to loader, though, which may not fit a floppy though. Cheers, --=20 Xin LI http://www.delphij.net From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 22:28:34 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 1AFBF1065698; Wed, 1 Sep 2010 22:28:34 +0000 (UTC) Date: Wed, 1 Sep 2010 22:28:34 +0000 From: Alexander Best To: Dag-Erling =?iso-8859-15?Q?Sm=F8rgrav?= Message-ID: <20100901222834.GA66517@freebsd.org> References: <20100831180103.GA92584@freebsd.org> <86fwxt5ng1.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <86fwxt5ng1.fsf@ds4.des.no> Cc: freebsd-hackers@freebsd.org Subject: Re: expand_number() for fetch'es -B and -S switches 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, 01 Sep 2010 22:28:34 -0000 On Wed Sep 1 10, Dag-Erling Smørgrav wrote: > Alexander Best writes: > > just having a quick look around to see, if anybody would be interested in > > fetch -B and fetch -S accepting humanized numbers using expand_number()? > > I can understand it for -B, but not for -S, since in the common case (by > 1023 to 1, assuming a random distribution) the argument to -S can not be > expressed in [kMGTEP]B. you're absolutely correct there. i didn't really think about it. i just thought -B might profit from expand_number() amnd saw that -S was also taking a byte value as argument so i added it to my previous mail. i should have read the description for -S more carefully. ;) since you're the originator of fetch(1): should i send you a patch to add expand_numer() to the -B switch or do you think fetch is better off as it is now without humanised numbers? i'm not sure, but i think fetch(1) is BSD specific so no POSIX regulations need to be taken into consideration. but you probably know more about this matter. cheers. alex > > DES > -- > Dag-Erling Smørgrav - des@des.no -- a13x From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 23:03:38 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 23A3910656EE; Wed, 1 Sep 2010 23:03:38 +0000 (UTC) Date: Wed, 1 Sep 2010 23:03:38 +0000 From: Alexander Best To: freebsd-hackers@freebsd.org Message-ID: <20100901230338.GA75974@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: porting cputick2usec() to userland 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, 01 Sep 2010 23:03:38 -0000 hi there, there was a thread some time ago related to porting cputick2usec() to userland [1]. however it seems the idea got lost at some point. i remember uqs working on an implementation, but can't remember the details. a few people including uqs and jhb liked the idea. any comments on that? cheers. alex [1] http://www.mail-archive.com/freebsd-hackers@freebsd.org/msg70400.html -- a13x From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 23:23:59 2010 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 6B40B1065697; Wed, 1 Sep 2010 23:23:59 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [IPv6:2001:470:a803::1]) by mx1.freebsd.org (Postfix) with ESMTP id 13CC98FC19; Wed, 1 Sep 2010 23:23:59 +0000 (UTC) Received: from mail.geekcn.org (tarsier.geekcn.org [211.166.10.233]) by tarsier.geekcn.org (Postfix) with ESMTP id 88D42A684DA; Thu, 2 Sep 2010 07:23:57 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([211.166.10.233]) by mail.geekcn.org (mail.geekcn.org [211.166.10.233]) (amavisd-new, port 10024) with LMTP id Ki-DqG-6V2nm; Thu, 2 Sep 2010 07:23:51 +0800 (CST) Received: from delta.delphij.net (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTPSA id AB051A67D60; Thu, 2 Sep 2010 07:23:49 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type:content-transfer-encoding; b=NDbeVANs4Kq8u4eC1zQsm7a0xGEBypVHZU3lEMEg3epphiFttKyV/zfoNp8Ab3ml4 LUxexwJRKpnRp7BnnKr9Q== Message-ID: <4C7EE07F.7000803@delphij.net> Date: Wed, 01 Sep 2010 16:23:43 -0700 From: Xin LI Organization: The Geek China Organization User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.11) Gecko/20100721 Thunderbird/3.0.6 ThunderBrowse/3.3.2 MIME-Version: 1.0 To: Alexander Best References: <20100901230338.GA75974@freebsd.org> In-Reply-To: <20100901230338.GA75974@freebsd.org> X-Enigmail-Version: 1.0.1 OpenPGP: id=3FCA37C1; url=http://www.delphij.net/delphij.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, =?ISO-8859-1?Q?Ulrich_Sp=F6rlein?= Subject: Re: porting cputick2usec() to userland X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2010 23:23:59 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 2010/09/01 16:03, Alexander Best wrote: > hi there, > > there was a thread some time ago related to porting cputick2usec() to > userland [1]. > > however it seems the idea got lost at some point. i remember uqs working on an > implementation, but can't remember the details. > > a few people including uqs and jhb liked the idea. any comments on that? I think uqs@ actually have a patch but can't seem to access his git repository anymore for some reason :-/ > cheers. > alex > > [1] http://www.mail-archive.com/freebsd-hackers@freebsd.org/msg70400.html - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iQEcBAEBCAAGBQJMfuB/AAoJEATO+BI/yjfBnwoIAJF+Wu3E8m92PkNmmpdwymU1 BFbtzxZ//MIDmOkrW5qnIjfQPpcnizXX12Le8/6YFbBjP2fDqsn06CwVb6BKX6Kb bJfzMLKIEN/zaGVNmteduHLPL7Y0xv8TKUspk2B7wfpgk3aLCuUH00e3kSHsriwm Cwyoqn+GQs4GC2056bV3LL7PdQec6vfaQtBlBN9+WavHQFbaJsBAOqx+Ekkvu8t7 PcRQlvLyp3ledsO5ezJjlnMsyvu4JAbAv+/RFiODLhLlpiJpa0y8T8cqnA5FLTIj ZAvtW/Adu28H2aMvhRWHT0JzoOVbZWsuK2FCgw9gY4KYXlePeTUk+EJlfN+YWtE= =f55Y -----END PGP SIGNATURE----- From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 23:29:51 2010 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 50F1D10656CA; Wed, 1 Sep 2010 23:29:51 +0000 (UTC) (envelope-from jamesbrandongooch@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8B98A8FC0A; Wed, 1 Sep 2010 23:29:50 +0000 (UTC) Received: by wyb33 with SMTP id 33so11496273wyb.13 for ; Wed, 01 Sep 2010 16:29:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=ouO9yLp/D3oAwN8ez0lnbuEcnbuGR5ETQV3rvxrXmtk=; b=HNVMl+Ume48DH54Hhhx1OqYhUzguEZJ6KBOSbWDaBKl6cmHwmp8CXYNPg5jlFhb8Ke 2flUuDMICc8cKyBmjXCCWxrOXen2HqOZYGdL7nEgz6Z9UNBpeCN1m3LgFbh616EDe1+Y 0lNFZnZ14NBJlHQud5WpD2uRGcylhYtmREanw= 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=DCSNvNfaZ/fDsA5EY36G+fIvq3oSWyzu2Xpjd7FxgbQu2PdngNh3ZRgfIg8S8TDmoQ 2PletVhg7V+Dxkngc2yR5nPPW9zhHiS1Qov/0YqZW2soy/WTKpnE8Jc3x9VAUySvvit5 OphWaMS1XzZkE6pdGz+uDsx/WPGyHCul7Elyc= MIME-Version: 1.0 Received: by 10.216.87.209 with SMTP id y59mr8451723wee.91.1283383789448; Wed, 01 Sep 2010 16:29:49 -0700 (PDT) Received: by 10.216.133.2 with HTTP; Wed, 1 Sep 2010 16:29:48 -0700 (PDT) In-Reply-To: <4C7EA696.3030901@FreeBSD.org> References: <4C7A5C28.1090904@FreeBSD.org> <20100830110932.23425932@ernst.jennejohn.org> <4C7B82EA.2040104@FreeBSD.org> <20100830121148.11926306@ernst.jennejohn.org> <20100831102918.4f5404cc@ernst.jennejohn.org> <4C7CC1DE.1080907@FreeBSD.org> <4C7E2E8A.3030709@FreeBSD.org> <4C7EA696.3030901@FreeBSD.org> Date: Wed, 1 Sep 2010 18:29:48 -0500 Message-ID: From: Brandon Gooch To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org, FreeBSD-Current Subject: Re: One-shot-oriented event timers management 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, 01 Sep 2010 23:29:51 -0000 On Wed, Sep 1, 2010 at 2:16 PM, Alexander Motin wrote: > Brandon Gooch wrote: >> This latest patch causes an interrupt storm with the HPET timer on my >> system. The machine took about 8 minutes to boot and bring me to a >> login prompt. System interactivity (i.e. input from keyboard, output >> on console) was fine, but after checking the output of `systat vmstat >> -1`, I saw the interrupt rate on each HPET entry was over 120k! >> >> Can I provide any useful detail? Of course, test patches are always welcome :) > > I was able to reproduce alike storm in some situations. > > Try new version: http://people.freebsd.org/~mav/timers_oneshot7.patch Definitely solved it!!! Awesome, BTW, check out my C3 time: # gnu-watch -n1 'sysctl dev.cpu | grep cx_usage' Every 1.0s: sysctl dev.cpu | grep cx_usage Wed Sep 1 17:56:31 2010 dev.cpu.0.cx_usage: 0.00% 0.03% 99.96% last 7159us dev.cpu.1.cx_usage: 0.00% 0.00% 100.00% last 6343us I've now seen my computer at it's lowest battery drain rate yet (around 11000 mW) while "using" my system. This just keeps getting better and better mav@, hope we see more testers soon :) -Brandon From owner-freebsd-hackers@FreeBSD.ORG Wed Sep 1 23:34:03 2010 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 4E36E10656D2; Wed, 1 Sep 2010 23:34:03 +0000 (UTC) (envelope-from jandrese@mitre.org) Received: from smtp-bedford.mitre.org (smtp-bedford.mitre.org [129.83.20.191]) by mx1.freebsd.org (Postfix) with ESMTP id C5EFC8FC16; Wed, 1 Sep 2010 23:34:02 +0000 (UTC) Received: from smtp-bedford.mitre.org (localhost.localdomain [127.0.0.1]) by smtp-bedford.mitre.org (8.13.1/8.13.1) with ESMTP id o81HfWTR030885; Wed, 1 Sep 2010 13:41:32 -0400 Received: from imchub2.MITRE.ORG (imchub2.mitre.org [129.83.29.74]) by smtp-bedford.mitre.org (8.13.1/8.13.1) with ESMTP id o81HfVoN030879; Wed, 1 Sep 2010 13:41:31 -0400 Received: from IMCMBX3.MITRE.ORG ([129.83.29.206]) by imchub2.MITRE.ORG ([129.83.29.74]) with mapi; Wed, 1 Sep 2010 13:41:31 -0400 From: "Andresen, Jason R." To: =?utf-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= , Ilya Bakulin Date: Wed, 1 Sep 2010 13:41:29 -0400 Thread-Topic: Support for WD Advanced Format disks Thread-Index: ActJBxsYCK4eVTEcTD2BmJD82InIlwA9ZHIQ Message-ID: <600C0C33850FFE49B76BDD81AED4D25802685412EF@IMCMBX3.MITRE.ORG> References: <86wrry1hwv.fsf@ds4.des.no> <20100828130912.48205a47@kibab.com> <20100828195024.3d671a76@kibab.com> <20100828204415.6875b4ec@kibab.com> <86bp8kjr7i.fsf@ds4.des.no> <20100830155638.710f8871@kibab-work.smstraffic.ru> <86eidgi7cn.fsf@ds4.des.no> <20100831150148.494d72b6@kibab-work.smstraffic.ru> <86lj7n2cug.fsf@ds4.des.no> In-Reply-To: <86lj7n2cug.fsf@ds4.des.no> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 Cc: "geom@freebsd.org" , "hackers@freebsd.org" Subject: RE: Support for WD Advanced Format disks 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, 01 Sep 2010 23:34:03 -0000 RnJvbTogRGFnLUVybGluZyBTbcO4cmdyYXY6DQo+DQo+SWx5YSBCYWt1bGluIDx3ZWJtYXN0ZXJA a2liYWIuY29tPiB3cml0ZXM6DQo+PiBNYXkgeW91IHN1Z2dlc3QgYW55IG90aGVyIHRlc3RzPw0K Pg0KPldoYXQgb3RoZXIgdGVzdHM/ICBUaGUgZGlza3Mgc3VjaywgaG93IGFyZSBtb3JlIHRlc3Rz IGdvaW5nIHRvIGltcHJvdmUNCj50aGUgc2l0dWF0aW9uPw0KPg0KPj4gT3IgbGV0J3MgbGl2ZSB3 aXRoIHN1Y2tpbmcgV0QgR3JlZW4gYW5kIGxvb2sgZm9yIG90aGVyIDQwOTZLLXNlY3Rvcg0KPj4g bW9kZWxzIGZyb20gb3RoZXIgbWFudWZhY3R1cmVycz8NCj4NCj5JIHNlZSBubyByZWFzb24gd2h5 IHNlY3RvciBzaXplIHNob3VsZCBiZSBhIHNlbGVjdGlvbiBjcml0ZXJpdW0uICBKdXN0DQo+YnV5 IHRoZSBkaXNrIHRoYXQgZ2l2ZXMgeW91IHRoZSBiZXN0IHBlcmZvcm1hbmNlIGFuZCAvIG9yIGNh cGFjaXR5IGZvcg0KPnlvdXIgbW9uZXkuICBXRCBHcmVlbiBkaXNrcyBhcmUgY2hlYXAsIGJ1dCBv dGhlciB2ZW5kb3JzIG9mZmVyIG1vZGVscw0KPndpdGggdGhlIHNhbWUgY2FwYWNpdHkgYW5kIHR3 aWNlIHRoZSBzcGVlZCBmb3Igb25seSA1JSBvciAxMCUgbW9yZS4NCg0KSGVjaywgV2VzdGVybiBE aWdpdGFsIHRoZW1zZWx2ZXMgb2ZmZXIgZmFzdGVyIGRyaXZlcyB0aGF0IGFyZSBvbmx5IGEgZmV3 IGRvbGxhcnMgbW9yZS4gIFRoZSBHcmVlbiBkcml2ZXMgYXJlIGJ1aWx0IGZvciBsb3cgbm9pc2Uv cG93ZXIvaGVhdCwgbm90IGZvciBzcGVlZC4NCg== From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 2 05:56:10 2010 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 04DBE10656A7; Thu, 2 Sep 2010 05:56:10 +0000 (UTC) (envelope-from uqs@freebsd.org) Received: from acme.spoerlein.net (acme.spoerlein.net [IPv6:2001:470:9a47::1]) by mx1.freebsd.org (Postfix) with ESMTP id BA0838FC21; Thu, 2 Sep 2010 05:56:09 +0000 (UTC) Received: from acme.spoerlein.net (localhost.spoerlein.net [IPv6:::1]) by acme.spoerlein.net (8.14.4/8.14.4) with ESMTP id o825tW17019884 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 2 Sep 2010 07:55:33 +0200 (CEST) (envelope-from uqs@freebsd.org) Received: (from uqs@localhost) by acme.spoerlein.net (8.14.4/8.14.4/Submit) id o825tWQN019883; Thu, 2 Sep 2010 07:55:32 +0200 (CEST) (envelope-from uqs@freebsd.org) Date: Thu, 2 Sep 2010 07:55:32 +0200 From: Ulrich =?utf-8?B?U3DDtnJsZWlu?= To: Xin LI Message-ID: <20100902055532.GX3523@acme.spoerlein.net> Mail-Followup-To: Xin LI , Alexander Best , freebsd-hackers@freebsd.org References: <20100901230338.GA75974@freebsd.org> <4C7EE07F.7000803@delphij.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C7EE07F.7000803@delphij.net> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Alexander Best , freebsd-hackers@freebsd.org Subject: Re: porting cputick2usec() to userland 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, 02 Sep 2010 05:56:10 -0000 On Wed, 01.09.2010 at 16:23:43 -0700, Xin LI wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > On 2010/09/01 16:03, Alexander Best wrote: > > hi there, > > > > there was a thread some time ago related to porting cputick2usec() to > > userland [1]. > > > > however it seems the idea got lost at some point. i remember uqs working on an > > implementation, but can't remember the details. > > > > a few people including uqs and jhb liked the idea. any comments on that? > > I think uqs@ actually have a patch but can't seem to access his git > repository anymore for some reason :-/ You can see the diff at https://www.spoerlein.net/cgit/cgit.cgi/freebsd.work/commit/?h=warns&id=c3b4cf79a8f39ad965d023718073a006cc15f340 (also note the parent commit) I didn't have time to test and finish the change though, if someone wants to test/finish/commit this, please go ahead. It might take me still a while to get to it. Regards, Uli From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 2 10:02:09 2010 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 6F56C10656B0 for ; Thu, 2 Sep 2010 10:02:09 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 31F3D8FC16 for ; Thu, 2 Sep 2010 10:02:09 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 4AFBC1FFC34; Thu, 2 Sep 2010 10:02:08 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 235B5845DC; Thu, 2 Sep 2010 12:02:08 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Xin LI References: <86bp8h5mn6.fsf@ds4.des.no> Date: Thu, 02 Sep 2010 12:02:08 +0200 In-Reply-To: (Xin LI's message of "Wed, 1 Sep 2010 13:07:19 -0700") Message-ID: <86d3swmpjz.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org Subject: Re: /stand/camcontrol 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, 02 Sep 2010 10:02:09 -0000 Xin LI writes: > My 2 cents: I think we don't really need to care about the size for > rescue binary after the splitfs VFS layer have been introduced to > libstand? Build of release split MFSROOT was 2006-ish and I feel that > this can be gone. This is /stand, not /rescue; /rescue has a full camcontrol. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 2 10:03:30 2010 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 9B3F3106566C; Thu, 2 Sep 2010 10:03:30 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 56A178FC0C; Thu, 2 Sep 2010 10:03:30 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 89CD61FFC34; Thu, 2 Sep 2010 10:03:29 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 6656D8454C; Thu, 2 Sep 2010 12:03:29 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Andresen\, Jason R." References: <86wrry1hwv.fsf@ds4.des.no> <20100828130912.48205a47@kibab.com> <20100828195024.3d671a76@kibab.com> <20100828204415.6875b4ec@kibab.com> <86bp8kjr7i.fsf@ds4.des.no> <20100830155638.710f8871@kibab-work.smstraffic.ru> <86eidgi7cn.fsf@ds4.des.no> <20100831150148.494d72b6@kibab-work.smstraffic.ru> <86lj7n2cug.fsf@ds4.des.no> <600C0C33850FFE49B76BDD81AED4D25802685412EF@IMCMBX3.MITRE.ORG> Date: Thu, 02 Sep 2010 12:03:29 +0200 In-Reply-To: <600C0C33850FFE49B76BDD81AED4D25802685412EF@IMCMBX3.MITRE.ORG> (Jason R. Andresen's message of "Wed, 1 Sep 2010 13:41:29 -0400") Message-ID: <868w3kmphq.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Ilya Bakulin , "hackers@freebsd.org" , "geom@freebsd.org" Subject: Re: Support for WD Advanced Format disks 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, 02 Sep 2010 10:03:30 -0000 "Andresen, Jason R." writes: > Dag-Erling Sm=C3=B8rgrav writes: > > I see no reason why sector size should be a selection criterium. Just > > buy the disk that gives you the best performance and / or capacity for > > your money. WD Green disks are cheap, but other vendors offer models > > with the same capacity and twice the speed for only 5% or 10% more. > Heck, Western Digital themselves offer faster drives that are only a > few dollars more. Yes, the blue series IIRC. I was looking at Caviar Black prices, which are significantly higher. > The Green drives are built for low noise/power/heat, not for speed. Yup. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 2 10:04:22 2010 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 6F12A1065695; Thu, 2 Sep 2010 10:04:22 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 3059B8FC28; Thu, 2 Sep 2010 10:04:22 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 7A8AB1FFC34; Thu, 2 Sep 2010 10:04:21 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 57072845DC; Thu, 2 Sep 2010 12:04:21 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexander Best References: <20100831180103.GA92584@freebsd.org> <86fwxt5ng1.fsf@ds4.des.no> <20100901222834.GA66517@freebsd.org> Date: Thu, 02 Sep 2010 12:04:21 +0200 In-Reply-To: <20100901222834.GA66517@freebsd.org> (Alexander Best's message of "Wed, 1 Sep 2010 22:28:34 +0000") Message-ID: <864oe8mpga.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: expand_number() for fetch'es -B and -S switches 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, 02 Sep 2010 10:04:22 -0000 Alexander Best writes: > since you're the originator of fetch(1): should i send you a patch to add > expand_numer() to the -B switch or do you think fetch is better off as it= is > now without humanised numbers? Sure, but we need to commit the expand_number() patch first. > i'm not sure, but i think fetch(1) is BSD specific so no POSIX regulation= s need > to be taken into consideration. but you probably know more about this mat= ter. fetch(1) is 100% home-grown. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 2 10:14:53 2010 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 ACF641065674 for ; Thu, 2 Sep 2010 10:14:53 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 73CC18FC20 for ; Thu, 2 Sep 2010 10:14:53 +0000 (UTC) Received: by iwn34 with SMTP id 34so427379iwn.13 for ; Thu, 02 Sep 2010 03:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=cfKTsY/3n6uk4KYErD9L0vTZltwqaZwGmlbW8JFzh3M=; b=neOPeH1s2LfJkm9iR5ohqUkQzWwnzK86is7gO0Ue6HQr2qwdgZm6J59E/j9N3exOcm QQgy/QKfgie8gEknJLHWgLnI9/5USGNhaPdnbgpRw9sKgwuOOttHW+XR65soN1K7BZWl LtgLnVUD43qi5wzq1wtLm3X5LrLjD1mJmIahI= 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=b7DdqdzQLD2sr8Q9f5P3NEyycW47U6OGlJH/a4RErODDx7KBkYNuhdRjGTqxijoRCZ JAf5R26TFvJ95lQK5dSxdj2JXdd9NxvPDfXet5YvDGlhCek9bHheP8bnTnOKN4MFrTN+ IOHTAxCw6Oa7BEYDcCJrpUFlZQqqwzxlqBjYg= MIME-Version: 1.0 Received: by 10.231.154.73 with SMTP id n9mr10226131ibw.10.1283422487975; Thu, 02 Sep 2010 03:14:47 -0700 (PDT) Received: by 10.231.146.10 with HTTP; Thu, 2 Sep 2010 03:14:47 -0700 (PDT) In-Reply-To: <86d3swmpjz.fsf@ds4.des.no> References: <86bp8h5mn6.fsf@ds4.des.no> <86d3swmpjz.fsf@ds4.des.no> Date: Thu, 2 Sep 2010 03:14:47 -0700 Message-ID: From: Xin LI To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org Subject: Re: /stand/camcontrol 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, 02 Sep 2010 10:14:53 -0000 2010/9/2 Dag-Erling Sm=C3=B8rgrav : > Xin LI writes: >> My 2 cents: I think we don't really need to care about the size for >> rescue binary after the splitfs VFS layer have been introduced to >> libstand? =C2=A0Build of release split MFSROOT was 2006-ish and I feel t= hat >> this can be gone. > > This is /stand, not /rescue; /rescue has a full camcontrol. Oh you are right. But MFSROOT have /stand (for sysinstall), not /rescue, I think? Cheers, --=20 Xin LI http://www.delphij.net From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 2 10:21:10 2010 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 784181065698 for ; Thu, 2 Sep 2010 10:21:10 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 387958FC0C for ; Thu, 2 Sep 2010 10:21:10 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id CEE1B1FFC33; Thu, 2 Sep 2010 10:21:08 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 781518454C; Thu, 2 Sep 2010 12:21:07 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Xin LI References: <86bp8h5mn6.fsf@ds4.des.no> <86d3swmpjz.fsf@ds4.des.no> Date: Thu, 02 Sep 2010 12:21:07 +0200 In-Reply-To: (Xin LI's message of "Thu, 2 Sep 2010 03:14:47 -0700") Message-ID: <86vd6ola3w.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org Subject: Re: /stand/camcontrol 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, 02 Sep 2010 10:21:10 -0000 Xin LI writes: > Dag-Erling Sm=C3=B8rgrav writes: > > Xin LI writes: > > > My 2 cents: I think we don't really need to care about the size > > > for rescue binary after the splitfs VFS layer have been introduced > > > to libstand? Build of release split MFSROOT was 2006-ish and I > > > feel that this can be gone. > > This is /stand, not /rescue; /rescue has a full camcontrol. > Oh you are right. But MFSROOT have /stand (for sysinstall), not > /rescue, I think? Correct. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 2 11:46:55 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 21C601065760; Thu, 2 Sep 2010 11:46:55 +0000 (UTC) Date: Thu, 2 Sep 2010 11:46:55 +0000 From: Alexander Best To: Dag-Erling =?iso-8859-15?Q?Sm=F8rgrav?= Message-ID: <20100902114655.GA9071@freebsd.org> References: <20100831180103.GA92584@freebsd.org> <86fwxt5ng1.fsf@ds4.des.no> <20100901222834.GA66517@freebsd.org> <864oe8mpga.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="gBBFr7Ir9EOA20Yy" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <864oe8mpga.fsf@ds4.des.no> Cc: freebsd-hackers@freebsd.org Subject: Re: expand_number() for fetch'es -B and -S switches 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, 02 Sep 2010 11:46:55 -0000 --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Thu Sep 2 10, Dag-Erling Smørgrav wrote: > Alexander Best writes: > > since you're the originator of fetch(1): should i send you a patch to add > > expand_numer() to the -B switch or do you think fetch is better off as it is > > now without humanised numbers? > > Sure, but we need to commit the expand_number() patch first. so how about something like this? the fetch(1) manual would have to be changed a bit to state that if '-B val' > 1G it silently gets set to 1G. however it might be better to simply fail in that case, since a failure will occur anyway, if val exceeds uint64_t (see expand_number(3)). cheers. alex > > > i'm not sure, but i think fetch(1) is BSD specific so no POSIX regulations need > > to be taken into consideration. but you probably know more about this matter. > > fetch(1) is 100% home-grown. > > DES > -- > Dag-Erling Smørgrav - des@des.no -- a13x --gBBFr7Ir9EOA20Yy Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="fetch.diff" diff --git a/usr.bin/fetch/Makefile b/usr.bin/fetch/Makefile index 6f0db80..a21ab50 100644 --- a/usr.bin/fetch/Makefile +++ b/usr.bin/fetch/Makefile @@ -4,8 +4,8 @@ PROG= fetch CSTD?= c99 -DPADD= ${LIBFETCH} ${LIBMD} -LDADD= -lfetch -lmd +DPADD= ${LIBFETCH} ${LIBMD} ${LIBUTIL} +LDADD= -lfetch -lmd -lutil .if ${MK_OPENSSL} != "no" DPADD+= ${LIBSSL} ${LIBCRYPTO} LDADD+= -lssl -lcrypto diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c index 7553bd8..99a82b0 100644 --- a/usr.bin/fetch/fetch.c +++ b/usr.bin/fetch/fetch.c @@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -48,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #define MINBUFSIZE 4096 +#define MAXBUFSIZE 1073741824 #define TIMEOUT 120 /* Option flags */ @@ -772,8 +774,9 @@ main(int argc, char *argv[]) a_flag = 1; break; case 'B': - B_size = (off_t)strtol(optarg, &end, 10); - if (*optarg == '\0' || *end != '\0') + errno = 0; + expand_number(optarg, &B_size); + if(errno) errx(1, "invalid buffer size (%s)", optarg); break; case 'b': @@ -898,6 +901,8 @@ main(int argc, char *argv[]) /* allocate buffer */ if (B_size < MINBUFSIZE) B_size = MINBUFSIZE; + if (B_size > MAXBUFSIZE) + B_size = MAXBUFSIZE; if ((buf = malloc(B_size)) == NULL) errx(1, "%s", strerror(ENOMEM)); --gBBFr7Ir9EOA20Yy-- From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 2 11:55:52 2010 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 EB14D10657F6; Thu, 2 Sep 2010 11:55:52 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id ABEAF8FC1D; Thu, 2 Sep 2010 11:55:52 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 9B0821FFC34; Thu, 2 Sep 2010 11:55:51 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 6F6D484645; Thu, 2 Sep 2010 13:55:51 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexander Best References: <20100831180103.GA92584@freebsd.org> <86fwxt5ng1.fsf@ds4.des.no> <20100901222834.GA66517@freebsd.org> <864oe8mpga.fsf@ds4.des.no> <20100902114655.GA9071@freebsd.org> Date: Thu, 02 Sep 2010 13:55:51 +0200 In-Reply-To: <20100902114655.GA9071@freebsd.org> (Alexander Best's message of "Thu, 2 Sep 2010 11:46:55 +0000") Message-ID: <8639tsl5q0.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: expand_number() for fetch'es -B and -S switches 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, 02 Sep 2010 11:55:53 -0000 Alexander Best writes: > so how about something like this? the fetch(1) manual would have to be ch= anged > a bit to state that if '-B val' > 1G it silently gets set to 1G. 1 GB is ridiculously large. 1 MB should be plenty. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 2 12:23:48 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 9D4771065777; Thu, 2 Sep 2010 12:23:48 +0000 (UTC) Date: Thu, 2 Sep 2010 12:23:48 +0000 From: Alexander Best To: Dag-Erling =?iso-8859-15?Q?Sm=F8rgrav?= Message-ID: <20100902122348.GA38047@freebsd.org> References: <20100831180103.GA92584@freebsd.org> <86fwxt5ng1.fsf@ds4.des.no> <20100901222834.GA66517@freebsd.org> <864oe8mpga.fsf@ds4.des.no> <20100902114655.GA9071@freebsd.org> <8639tsl5q0.fsf@ds4.des.no> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8639tsl5q0.fsf@ds4.des.no> Cc: freebsd-hackers@freebsd.org Subject: Re: expand_number() for fetch'es -B and -S switches 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, 02 Sep 2010 12:23:48 -0000 On Thu Sep 2 10, Dag-Erling Smørgrav wrote: > Alexander Best writes: > > so how about something like this? the fetch(1) manual would have to be changed > > a bit to state that if '-B val' > 1G it silently gets set to 1G. > > 1 GB is ridiculously large. 1 MB should be plenty. the current maximum buffer limit of fetch(1) actually is around 1G. i think 1M is not enough, because if people are pulling data over fast lines they'll have almost constant disk writes. how about 100M then? ;) on the other hand why have a maximum limit? if people want to have a buffer of 100 gigabyte why shouldn't they? it's their decision actually. so maybe the maximum buffer check should just be left out and the only limitation will be that expand_number() can't handle anything that won't fit into uint64_t. cheers. alex > > DES > -- > Dag-Erling Smørgrav - des@des.no -- a13x From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 2 12:55:21 2010 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 B225B1065773; Thu, 2 Sep 2010 12:55:21 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 728548FC1A; Thu, 2 Sep 2010 12:55:21 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id AD73C1FFC37; Thu, 2 Sep 2010 12:55:20 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 745318457B; Thu, 2 Sep 2010 14:55:20 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexander Best References: <20100831180103.GA92584@freebsd.org> <86fwxt5ng1.fsf@ds4.des.no> <20100901222834.GA66517@freebsd.org> <864oe8mpga.fsf@ds4.des.no> <20100902114655.GA9071@freebsd.org> <8639tsl5q0.fsf@ds4.des.no> <20100902122348.GA38047@freebsd.org> Date: Thu, 02 Sep 2010 14:55:20 +0200 In-Reply-To: <20100902122348.GA38047@freebsd.org> (Alexander Best's message of "Thu, 2 Sep 2010 12:23:48 +0000") Message-ID: <86pqwwjoef.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: expand_number() for fetch'es -B and -S switches 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, 02 Sep 2010 12:55:21 -0000 Alexander Best writes: > the current maximum buffer limit of fetch(1) actually is around 1G. i > think 1M is not enough, because if people are pulling data over fast > lines they'll have almost constant disk writes. how about 100M then? > ;) Large buffer sizes are *not* better, since fetch(1) will alternate between filling the buffer and writing it to disk. The buffer should not be too small, but it should not be too large either; the sweet spot is somewhere around 128 kB. > on the other hand why have a maximum limit? if people want to have a > buffer of 100 gigabyte why shouldn't they? it's their decision > actually. Good point... although if they set it too high, either malloc(3) will fail - if they're lucky - or fetch(1) will crash when the system runs out of physical RAM and swap, and they'll have to start over. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 3 15:47:13 2010 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 D9F661065892 for ; Fri, 3 Sep 2010 15:47:13 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 325C78FC16 for ; Fri, 3 Sep 2010 15:47:12 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA19288; Fri, 03 Sep 2010 18:47:11 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4C81187E.9050308@icyb.net.ua> Date: Fri, 03 Sep 2010 18:47:10 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.8) Gecko/20100823 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-hackers@FreeBSD.org X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Subject: minidump: a hack to prevent vm_page_dump bitmap change during dumping 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, 03 Sep 2010 15:47:13 -0000 I see that rather frequently vm_page_dump bitmap gets changed during minidumpsys execution. Sometimes this results in number of pages to dump growing larger than space we already reserved on disk, and thus in aborting dump near the end with "Attempt to write outside dump device boundaries" error. Sometimes it results in dumped bitmap and dumped pages being out of sync (perhaps silently). Below is a simple patch for amd64 minidump, a hack rather, that seems to work around the issue by ignoring dump_add_page/dump_drop_page calls after minidumpsys is called. Not sure if mb() call there is needed or has any effect. Proper fix, of course, would be to stop other CPUs and interrupts and also avoiding memory allocations in dump path (or something to that effect). Please review. Thank! diff --git a/sys/amd64/amd64/minidump_machdep.c b/sys/amd64/amd64/minidump_machdep.c index a9af809..56849a0 100644 --- a/sys/amd64/amd64/minidump_machdep.c +++ b/sys/amd64/amd64/minidump_machdep.c @@ -53,6 +53,9 @@ CTASSERT(sizeof(struct kerneldumpheader) == 512); #define MD_ALIGN(x) (((off_t)(x) + PAGE_MASK) & ~PAGE_MASK) #define DEV_ALIGN(x) (((off_t)(x) + (DEV_BSIZE-1)) & ~(DEV_BSIZE-1)) +void dump_add_page_priv(vm_paddr_t pa); +void dump_drop_page_priv(vm_paddr_t pa); + extern uint64_t KPDPphys; uint64_t *vm_page_dump; @@ -65,6 +68,7 @@ static off_t dumplo; static size_t fragsz; static void *dump_va; static size_t counter, progress; +static int bitmap_frozen = 0; CTASSERT(sizeof(*vm_page_dump) == 8); @@ -181,6 +185,10 @@ minidumpsys(struct dumperinfo *di) int i, j, k, bit; struct minidumphdr mdhdr; + /*XXX*/ + bitmap_frozen = 1; + mb(); + counter = 0; /* Walk page table pages, set bits in vm_page_dump */ ptesize = 0; @@ -202,7 +210,7 @@ minidumpsys(struct dumperinfo *di) pa = pd[j] & PG_PS_FRAME; for (k = 0; k < NPTEPG; k++) { if (is_dumpable(pa)) - dump_add_page(pa); + dump_add_page_priv(pa); pa += PAGE_SIZE; } continue; @@ -214,7 +222,7 @@ minidumpsys(struct dumperinfo *di) if ((pt[k] & PG_V) == PG_V) { pa = pt[k] & PG_FRAME; if (is_dumpable(pa)) - dump_add_page(pa); + dump_add_page_priv(pa); } } } else { @@ -235,7 +243,7 @@ minidumpsys(struct dumperinfo *di) if (is_dumpable(pa)) { dumpsize += PAGE_SIZE; } else { - dump_drop_page(pa); + dump_drop_page_priv(pa); } bits &= ~(1ul << bit); } @@ -387,6 +395,9 @@ dump_add_page(vm_paddr_t pa) { int idx, bit; + if (bitmap_frozen) + return; + pa >>= PAGE_SHIFT; idx = pa >> 6; /* 2^6 = 64 */ bit = pa & 63; @@ -398,8 +409,33 @@ dump_drop_page(vm_paddr_t pa) { int idx, bit; + if (bitmap_frozen) + return; + pa >>= PAGE_SHIFT; idx = pa >> 6; /* 2^6 = 64 */ bit = pa & 63; atomic_clear_long(&vm_page_dump[idx], 1ul << bit); } + +void +dump_add_page_priv(vm_paddr_t pa) +{ + int idx, bit; + + pa >>= PAGE_SHIFT; + idx = pa >> 6; /* 2^6 = 64 */ + bit = pa & 63; + vm_page_dump[idx] |= 1ul << bit; +} + +void +dump_drop_page_priv(vm_paddr_t pa) +{ + int idx, bit; + + pa >>= PAGE_SHIFT; + idx = pa >> 6; /* 2^6 = 64 */ + bit = pa & 63; + vm_page_dump[idx] &= ~(1ul << bit); +} -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 3 16:10:13 2010 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 C03A51065846 for ; Fri, 3 Sep 2010 16:10:13 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 74E3A8FC1A for ; Fri, 3 Sep 2010 16:10:13 +0000 (UTC) Received: from [192.168.221.2] (remotevpn [192.168.221.2]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o83GAAfm011967 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Fri, 3 Sep 2010 09:10:11 -0700 (PDT) (envelope-from mj@feral.com) Message-ID: <4C811DDC.6080001@feral.com> Date: Fri, 03 Sep 2010 09:10:04 -0700 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4C81187E.9050308@icyb.net.ua> In-Reply-To: <4C81187E.9050308@icyb.net.ua> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.6 (ns1.feral.com [192.168.221.1]); Fri, 03 Sep 2010 09:10:12 -0700 (PDT) Subject: Re: minidump: a hack to prevent vm_page_dump bitmap change during dumping 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, 03 Sep 2010 16:10:13 -0000 You can do it this way, but IMO, the best thing to do is to when you're panicing stop all other CPUs. From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 3 16:17:08 2010 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 D893E106577F for ; Fri, 3 Sep 2010 16:17:08 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 103078FC17 for ; Fri, 3 Sep 2010 16:17:07 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id TAA19601; Fri, 03 Sep 2010 19:17:01 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4C811F7D.9040807@icyb.net.ua> Date: Fri, 03 Sep 2010 19:17:01 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.8) Gecko/20100823 Lightning/1.0b2 Thunderbird/3.1.2 MIME-Version: 1.0 To: Matthew Jacob References: <4C81187E.9050308@icyb.net.ua> <4C811DDC.6080001@feral.com> In-Reply-To: <4C811DDC.6080001@feral.com> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: minidump: a hack to prevent vm_page_dump bitmap change during dumping 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, 03 Sep 2010 16:17:08 -0000 on 03/09/2010 19:10 Matthew Jacob said the following: > You can do it this way, but IMO, the best thing to do is to when you're panicing > stop all other CPUs. Entirely agree, that's the way it should be handled. Unfortunately, all I could come up with was the patch that I posted. -- Andriy Gapon From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 3 16:20:22 2010 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 CA62F10657C9 for ; Fri, 3 Sep 2010 16:20:22 +0000 (UTC) (envelope-from mj@feral.com) Received: from ns1.feral.com (ns1.feral.com [192.67.166.1]) by mx1.freebsd.org (Postfix) with ESMTP id 967398FC1A for ; Fri, 3 Sep 2010 16:20:22 +0000 (UTC) Received: from [192.168.221.2] (remotevpn [192.168.221.2]) by ns1.feral.com (8.14.3/8.14.3) with ESMTP id o83GKCtc012046 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Fri, 3 Sep 2010 09:20:21 -0700 (PDT) (envelope-from mj@feral.com) Message-ID: <4C812037.5070701@feral.com> Date: Fri, 03 Sep 2010 09:20:07 -0700 From: Matthew Jacob Organization: Feral Software User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org References: <4C81187E.9050308@icyb.net.ua> <4C811DDC.6080001@feral.com> <4C811F7D.9040807@icyb.net.ua> In-Reply-To: <4C811F7D.9040807@icyb.net.ua> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-4.2.6 (ns1.feral.com [192.168.221.1]); Fri, 03 Sep 2010 09:20:22 -0700 (PDT) Subject: Re: minidump: a hack to prevent vm_page_dump bitmap change during dumping 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, 03 Sep 2010 16:20:22 -0000 On 9/3/2010 9:17 AM, Andriy Gapon wrote: > on 03/09/2010 19:10 Matthew Jacob said the following: >> You can do it this way, but IMO, the best thing to do is to when you're panicing >> stop all other CPUs. > Entirely agree, that's the way it should be handled. > Unfortunately, all I could come up with was the patch that I posted. > Ah. I have some stuff for stopping other CPUs, but haven't had time to clean them up from the 7.2 implementation for head. From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 4 06:00:52 2010 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 8D46610656A6 for ; Sat, 4 Sep 2010 06:00:52 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [IPv6:2607:f678:1010::34]) by mx1.freebsd.org (Postfix) with ESMTP id 6ACB88FC15 for ; Sat, 4 Sep 2010 06:00:52 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id o8460n8M030021 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 3 Sep 2010 23:00:49 -0700 (PDT) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id o8460nQC030020; Fri, 3 Sep 2010 23:00:49 -0700 (PDT) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA19451; Fri, 3 Sep 10 22:56:31 PDT Date: Fri, 03 Sep 2010 22:56:26 -0700 From: perryh@pluto.rain.com To: mj@feral.com Message-Id: <4c81df8a.QnrOLT9v+2qoEZVY%perryh@pluto.rain.com> References: <4C81187E.9050308@icyb.net.ua> <4C811DDC.6080001@feral.com> In-Reply-To: <4C811DDC.6080001@feral.com> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: minidump: a hack to prevent vm_page_dump bitmap change during dumping X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Sep 2010 06:00:52 -0000 Matthew Jacob wrote: > ... IMO, the best thing to do is to when > you're panicing stop all other CPUs. which is fine _if_ the system is healthy enough to do it. If it's unhealthy enough to be panicing, it may not be healthy enough to be doing IPC operations.