SES/SAF-TE + SATA == SEMB!
Hi. As probably not many know, SATA specification defines the way to talk to SES/SAF-TE enclosures -- Serial ATA Enclosure Management Bridge (SEMB). It can be either separate device or built-in to SATA Port Multiplier. I know at leat two models of Port Multipliers including SEMB and having I2C interfaces to talk to SEP (backplane): SiI3726 and SiI4726. Unluckily such combination of hardware is not widely spread (backplanes are rarely used in desktops, while PMPs are rarely used in servers), but finally I've built such setup! I've connected SuperMicro SAS815TQ backplane to the SiI3726 multiplier with I2C cable and it works like a charm! I've made a patch for HEAD to support it. It adds SEMB devices support to the ATA/SATA XPT probe code, some glue to handle one more ATA-based command protocol and some changes to ses(4) driver to teach it talk to such devices: http://people.freebsd.org/~mav/semb.patch As result I've got: %dmesg |grep ses0 ses0 at ahcich8 bus 0 scbus8 target 5 lun 0 ses0: AMI MG9071 1.00 0011 SEMB S-E-S 2.00 device ses0: Serial Number 50030481 ses0: 150.000MB/s transfers (SATA 1.x, NONE, PIO 8192bytes) ses0: SEMB SES Device ses0: GenCode 0 0 Subenclosures ses0: SubEnclosure ID 0, 4 Types With this ID, Enclosure Length 36 ses0: WWN: 3530303330343831 ses0: Type Desc[0]: Type 0x17, MaxElt 4, In Subenc 0, Text Length 0 ses0: Type Desc[1]: Type 0x4, MaxElt 1, In Subenc 0, Text Length 0 ses0: Type Desc[2]: Type 0xe, MaxElt 1, In Subenc 0, Text Length 0 ses0: Type Desc[3]: Type 0x6, MaxElt 1, In Subenc 0, Text Length 0 %camcontrol devlist ST3500418AS CC46 at scbus8 target 0 lun 0 (ada0,pass1) ST3500418AS CC46 at scbus8 target 1 lun 0 (ada1,pass2) ST3500418AS CC46 at scbus8 target 2 lun 0 (pass5,ada2) ST3500418AS CC46 at scbus8 target 3 lun 0 (pass6,ada3) AMI MG9071 1.00 0011 at scbus8 target 5 lun 0 (ses0,pass3) Port Multiplier 37261095 1706at scbus8 target 15 lun 0 (pass4,pmp0) %getencstat -v /dev/ses0 /dev/ses0: Enclosure Status OK Element 0x0: Array device OK (Status=ok (bytes=0x11 0x00 0x00 0x00)) Element 0x1: Array device OK (Status=ok (bytes=0x11 0x00 0x00 0x00)) Element 0x2: Array device OK (Status=ok (bytes=0x01 0x00 0x00 0x00)) Element 0x3: Array device OK (Status=ok (bytes=0x01 0x00 0x00 0x00)) Element 0x4: Temperature sensors OK (Status=ok (bytes=0x01 0x00 0x32 0x00)) Element 0x5: Enclosure OK (Status=ok (bytes=0x01 0x00 0x00 0x00)) Element 0x6: Audible alarm OK (Status=ok (bytes=0x01 0x00 0x00 0x00)) YAY! So now three questions: 1. Does anybody else have alike hardware and wish to test it? 2. Patch reviews are welcome. 3. Is there any software except share/examples/ses working with ses(4) and/or some good use practices? -- Alexander Motin ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: SES/SAF-TE + SATA == SEMB!
On Friday 27 May 2011 09:00:51 Alexander Motin wrote: YAY! So now three questions: 1. Does anybody else have alike hardware and wish to test it? 2. Patch reviews are welcome. 3. Is there any software except share/examples/ses working with ses(4) and/or some good use practices? Does it work with USB? --HPS ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: SES/SAF-TE + SATA == SEMB!
Hans Petter Selasky wrote: On Friday 27 May 2011 09:00:51 Alexander Motin wrote: YAY! So now three questions: 1. Does anybody else have alike hardware and wish to test it? 2. Patch reviews are welcome. 3. Is there any software except share/examples/ses working with ses(4) and/or some good use practices? Does it work with USB? SEMB is ATA-specific. I've never heard about SES/SAF-TE on USB, but I think more likely it will be reported as usual SCSI Enclosure Services device -- there is no need to invent something new. Technically for ATA it also could be made as regular ATAPI (SCSI) device, but for some reason it was made in custom way. -- Alexander Motin ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: newnfs user setup
On Thu, 26 May 2011, Rick Macklem wrote: ... Alternately, if you could email me some simple instructions on how to test it, that would be appreciated as well. (I have never used DTrace, so I have no idea how to test it.) It is basically a clone of the other one, except for the NFSv4 stuff, so it should work about the same. The simplest way of a basic test should be: - Put into your kernel.conf: options KDTRACE_FRAME # could be for amd64 only options KDTRACE_HOOKS options DDB_CTF # could be optional - make buildworld WITH_CTF=1 make buildkernel WITH_CTF=1 - Put into your loader.conf: dtraceall_load=YES After reboot check: dtrace -l If you see lots of fbt and sdt (esp. the nfs ones) providers all should be prepared and fine. Bye/2 --- Michael Reifenberger mich...@reifenberger.com http://www.Reifenberger.com ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: newnfs user setup
Quoting Michael Reifenberger m...@reifenberger.com (from Fri, 27 May 2011 10:02:09 +0200 (CEST)): - make buildworld WITH_CTF=1 make buildkernel WITH_CTF=1 Do not build world with CTF, this will produce broken static executables. Bye, Alexander. -- Freedom is nothing else but the chance to do better. -- Camus http://www.Leidinger.netAlexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Testing new nfs and VIMAGE
I have been testing VIMAGE a lot lately to see how it works an all my test cases works as expected except when I use NFSv4 from an NFS client with a kerrel with VIMAGE enabled. All other permutations work and this error is very specific. All crashes occurs when trying to read or write to an NFS v4 volume. I have seen it on both i386 and amd64. #12 0xc0a73c15 in rt_tables_get_rnh (table=0, fam=2) at /usr/src/sys/net/route.c:153 static __inline struct radix_node_head ** rt_tables_get_rnh_ptr(int table, int fam) { struct radix_node_head **rnh; KASSERT(table = 0 table rt_numfibs, (%s: table out of bounds., __func__)); KASSERT(fam = 0 fam (AF_MAX+1), (%s: fam out of bounds., __func__)); /* rnh is [fib=0][af=0]. */ ---rnh = (struct radix_node_head **)V_rt_tables; /* Get the offset to the requested table and fam. */ rnh += table * (AF_MAX+1) + fam; return (rnh); } Any ideas? Cores and dumps are available plus a vmware player setup to test and debug. /glz Dump header from device /dev/da0p3 Architecture: i386 Architecture Version: 2 Dump Length: 105414656B (100 MB) Blocksize: 512 Dumptime: Fri May 27 09:54:13 2011 Hostname: vserver.test.ismobile.com Magic: FreeBSD Kernel Dump Version String: FreeBSD 9.0-CURRENT #2: Fri May 27 03:45:23 CEST 2011 r...@nfsserver.test.hidden-powers.com:/usr/obj/usr/src/sys/VSERVER Panic String: from debugger Dump Parity: 3851082861 Bounds: 3 Dump Status: good --- There is hopeful symbolism in the fact that flags do not wave in a vacuum. -- Arthur C. Clarke ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Testing new nfs and VIMAGE
And the attached core.txt got eaten. http://people.hidden-powers.com/~glz/core.txt.3 /glz --On May 27, 2011 10:37:32 +0200 Goran Lowkrantz g...@hidden-powers.com wrote: I have been testing VIMAGE a lot lately to see how it works an all my test cases works as expected except when I use NFSv4 from an NFS client with a kerrel with VIMAGE enabled. All other permutations work and this error is very specific. All crashes occurs when trying to read or write to an NFS v4 volume. I have seen it on both i386 and amd64. # 12 0xc0a73c15 in rt_tables_get_rnh (table=0, fam=2) at /usr/src/sys/net/route.c:153 static __inline struct radix_node_head ** rt_tables_get_rnh_ptr(int table, int fam) { struct radix_node_head **rnh; KASSERT(table = 0 table rt_numfibs, (%s: table out of bounds., __func__)); KASSERT(fam = 0 fam (AF_MAX+1), (%s: fam out of bounds., __func__)); /* rnh is [fib=0][af=0]. */ ---rnh = (struct radix_node_head **)V_rt_tables; /* Get the offset to the requested table and fam. */ rnh += table * (AF_MAX+1) + fam; return (rnh); } Any ideas? Cores and dumps are available plus a vmware player setup to test and debug. /glz Dump header from device /dev/da0p3 Architecture: i386 Architecture Version: 2 Dump Length: 105414656B (100 MB) Blocksize: 512 Dumptime: Fri May 27 09:54:13 2011 Hostname: vserver.test.ismobile.com Magic: FreeBSD Kernel Dump Version String: FreeBSD 9.0-CURRENT #2: Fri May 27 03:45:23 CEST 2011 r...@nfsserver.test.hidden-powers.com:/usr/obj/usr/src/sys/VSERVER Panic String: from debugger Dump Parity: 3851082861 Bounds: 3 Dump Status: good --- There is hopeful symbolism in the fact that flags do not wave in a vacuum. -- Arthur C. Clarke ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org --- There is hopeful symbolism in the fact that flags do not wave in a vacuum. -- Arthur C. Clarke ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: newnfs user setup
On Fri, 27 May 2011, Alexander Leidinger wrote: Date: Fri, 27 May 2011 10:43:58 +0200 From: Alexander Leidinger alexan...@leidinger.net To: Michael Reifenberger m...@reifenberger.com Cc: Rick Macklem rmack...@uoguelph.ca, FreeBSD-Current freebsd-current@FreeBSD.org Subject: Re: newnfs user setup Quoting Michael Reifenberger m...@reifenberger.com (from Fri, 27 May 2011 10:02:09 +0200 (CEST)): - make buildworld WITH_CTF=1 make buildkernel WITH_CTF=1 Do not build world with CTF, this will produce broken static executables. Ups. Thanks for reminding! Bye/2 --- Michael Reifenberger mich...@reifenberger.com http://www.Reifenberger.com ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Boot halts on Thinkpad X220 (Sandy Bridge)
I finally got around to trying is out, and although the installation completed successfully, the installation isn't recognized upon boot. I am getting a PXE-E61 error: media test failure, please check cable. I tried reinstalling three or four times, with the same results. I do not believe the issue is a BIOS setting or HD failure, because i can still successfully install windows 7 without any problems. On Tuesday, May 17, 2011, Daniel Staal dst...@usa.net wrote: (Sorry I can't reply to anyone, I just joined the list. I saw this discussion in the archives and thought I should join in.) I've managed to boot a X220i using -CURRENT as of last night. I got some help on -questions to get it done though. From a blank machine, you'll need either a non-USB boot device with FreeBSD media (untested) or a USB keyboard. If you are using a USB keyboard set hint.atkbd.0.disabled=1 to install, and use the USB keyboard during installation. Then on the first reboot in the BIOS set 'USB UEFI BIOS' to disabled. (This means you can't boot from a USB device.) At that point, the machine will boot fine. I've tried 8.2-RELEASE, the last amd64 -CURRENT I could find on the FreeBSD website, and -CURRENT as of 2011-05-16. I'm building a couple of ports at the moment, and want to reboot with a couple of config changes in the loader to see if I can get the WiFi recognized. As soon as I do that I can post my dmesg someplace. Daniel T. Staal --- This email copyright the author. Unless otherwise noted, you are expressly allowed to retransmit, quote, or otherwise use the contents for non-commercial purposes. This copyright will expire 5 years after the author's death, or in 30 years, whichever is longer, unless such a period is in excess of local copyright law. --- ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: newnfs user setup
On Thu, 26 May 2011, Rick Macklem wrote: ... http://people.freebsd.org/~rmacklem/dtrace.patch Hmm. Is it just me? Trying to test the patch I get: (fs)(root) patch -C dtrace.patch Hmm... I can't seem to find a patch in there anywhere. Bye/2 --- Michael Reifenberger mich...@reifenberger.com http://www.Reifenberger.com ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: newnfs user setup
On Thu, 26 May 2011, Rick Macklem wrote: ... http://people.freebsd.org/~rmacklem/dtrace.patch Hmm. Is it just me? Trying to test the patch I get: (fs)(root) patch -C dtrace.patch Hmm... I can't seem to find a patch in there anywhere. Here's how I apply the patch. - download dtrace.patch to somewhere, lets say /tmp, then # cd /usr/src/sys -- sys subdirectory of a current head, which you don't mind messing up doesn't have to be at /usr/src/sys, of course. # patch -p1 /tmp/dtrace.patch rick ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
[PATCH] Toggle display of the kernel idle process (per-CPU idle threads) in top
Some times in top, I don't want to see all the per-CPU idle threads but instead focus on the non-idle threads that are running. Especially on a system with a lot of CPUs, the idle threads can push all the interesting threads off of the list. This patch adds a new 'z' flag (gratuitously chosen letter) and interactive command to toggle the display of the system idle process. Patch is tested against 8, but should work fine on HEAD too: Index: contrib/top/commands.c === --- contrib/top/commands.c (revision 221924) +++ contrib/top/commands.c (working copy) @@ -94,6 +94,7 @@ a - toggle the displaying of process titles\n\ t - toggle the display of this process\n\ u - display processes for only one user (+ selects all users)\n\ +z - toggle the displaying of system idle process\n\ \n\ \n, stdout); } Index: contrib/top/top.c === --- contrib/top/top.c (revision 221924) +++ contrib/top/top.c (working copy) @@ -196,9 +196,9 @@ fd_set readfds; #ifdef ORDER -static char command_chars[] = \f qh?en#sdkriIutHmSCajo; +static char command_chars[] = \f qh?en#sdkriIutHmSCajzo; #else -static char command_chars[] = \f qh?en#sdkriIutHmSCaj; +static char command_chars[] = \f qh?en#sdkriIutHmSCajz; #endif /* these defines enumerate the strchrs of the commands in command_chars */ #define CMD_redraw 0 @@ -224,8 +224,9 @@ #defineCMD_wcputog 19 #defineCMD_showargs20 #defineCMD_jidtog 21 +#define CMD_kidletog 22 #ifdef ORDER -#define CMD_order 22 +#define CMD_order 23 #endif /* set the buffer for stdout */ @@ -258,6 +259,7 @@ ps.thread = No; ps.wcpu= 1; ps.jail= No; +ps.kidle = Yes; ps.command = NULL; /* get preset options from the environment */ @@ -283,7 +285,7 @@ optind = 1; } - while ((i = getopt(ac, av, CSIHPabijnquvs:d:U:m:o:t)) != EOF) + while ((i = getopt(ac, av, CSIHPabijnquvzs:d:U:m:o:t)) != EOF) { switch(i) { @@ -412,10 +414,14 @@ pcpu_stats = Yes; break; + case 'z': + ps.kidle = !ps.kidle; + break; + default: fprintf(stderr, Top version %s\n -Usage: %s [-abCHIijnPqStuv] [-d count] [-m io | cpu] [-o field] [-s time]\n +Usage: %s [-abCHIijnPqStuvz] [-d count] [-m io | cpu] [-o field] [-s time]\n [-U username] [number]\n, version_string(), myname); exit(1); @@ -1075,7 +1081,13 @@ reset_display(); putchar('\r'); break; - + case CMD_kidletog: + ps.kidle = !ps.kidle; + new_message(MT_standout | MT_delayed, +%sisplaying kernel idle process., + ps.idle ? D : Not d); + putchar('\r'); + break; default: new_message(MT_standout, BAD CASE IN SWITCH!); putchar('\r'); Index: contrib/top/machine.h === --- contrib/top/machine.h (revision 221924) +++ contrib/top/machine.h (working copy) @@ -65,6 +65,7 @@ int uid; /* only this uid (unless uid == -1) */ int wcpu; /* show weighted cpu */ int jail; /* show jail ID */ +int kidle; /* show per-CPU idle threads */ char *command; /* only this command (unless == NULL) */ }; Index: contrib/top/top.X === --- contrib/top/top.X (revision 221924) +++ contrib/top/top.X (working copy) @@ -10,7 +10,7 @@ .SH SYNOPSIS .B top [ -.B \-abCHIijnPqStuv +.B \-abCHIijnPqStuvz ] [ .BI \-d count ] [ @@ -142,6 +142,9 @@ No other processing takes place when this option is used. To see current revision information while top is running, use the help command \*(lq?\*(rq. .TP +.B \-z +Do not display the system idle process. +.TP .BI \-d count Show only .I count @@ -303,6 +306,9 @@ Toggle the display of the .I top process. +.TP +.B z +Toggle the display of the system idle process. .SH THE DISPLAY The actual display varies depending on the specific variant of Unix that the machine is running. This description may not exactly match Index: usr.bin/top/machine.c === --- usr.bin/top/machine.c (revision 221924) +++ usr.bin/top/machine.c (working copy) @@ -623,6 +623,7 @@ int
Re: [PATCH] Toggle display of the kernel idle process (per-CPU idle threads) in top
On 27 May 2011 18:46, John Baldwin j...@freebsd.org wrote: Some times in top, I don't want to see all the per-CPU idle threads but instead focus on the non-idle threads that are running. Especially on a system with a lot of CPUs, the idle threads can push all the interesting threads off of the list. This patch adds a new 'z' flag (gratuitously chosen letter) and interactive command to toggle the display of the system idle process. Patch is tested against 8, but should work fine on HEAD too: Works on HEAD as well. I like this idea. Perhaps it could be combined with i key? @@ -1075,7 +1081,13 @@ reset_display(); putchar('\r'); break; - + case CMD_kidletog: + ps.kidle = !ps.kidle; + new_message(MT_standout | MT_delayed, + %sisplaying kernel idle process., + ps.idle ? D : Not d); ^^ typo: s/idle/kidle/ -- wbr, pluknet ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: [PATCH] Toggle display of the kernel idle process (per-CPU idle threads) in top
On Friday, May 27, 2011 11:17:58 am Sergey Kandaurov wrote: On 27 May 2011 18:46, John Baldwin j...@freebsd.org wrote: Some times in top, I don't want to see all the per-CPU idle threads but instead focus on the non-idle threads that are running. Especially on a system with a lot of CPUs, the idle threads can push all the interesting threads off of the list. This patch adds a new 'z' flag (gratuitously chosen letter) and interactive command to toggle the display of the system idle process. Patch is tested against 8, but should work fine on HEAD too: Works on HEAD as well. I like this idea. Perhaps it could be combined with i key? I couldn't think of a sane way. There are a few times when I want to see the idle processes, but mostly I don't want to see them and want all the other settings (idle, system, threads, etc.) to be orthogonal. I'd even be up for defaulting kdile to No so we don't show the idle threads by default. That would match the behavior of 4.x where there were no idle threads. @@ -1075,7 +1081,13 @@ reset_display(); putchar('\r'); break; - + case CMD_kidletog: + ps.kidle = !ps.kidle; + new_message(MT_standout | MT_delayed, +%sisplaying kernel idle process., + ps.idle ? D : Not d); ^^ typo: s/idle/kidle/ Oops, thanks! -- John Baldwin ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Boot halts on Thinkpad X220 (Sandy Bridge)
It appears this was just a boot loader problem. Using BTX loader appears to fix the issue. On Friday, May 27, 2011, tiredash...@gmail.com tiredash...@gmail.com wrote: I finally got around to trying is out, and although the installation completed successfully, the installation isn't recognized upon boot. I am getting a PXE-E61 error: media test failure, please check cable. I tried reinstalling three or four times, with the same results. I do not believe the issue is a BIOS setting or HD failure, because i can still successfully install windows 7 without any problems. On Tuesday, May 17, 2011, Daniel Staal dst...@usa.net wrote: (Sorry I can't reply to anyone, I just joined the list. I saw this discussion in the archives and thought I should join in.) I've managed to boot a X220i using -CURRENT as of last night. I got some help on -questions to get it done though. From a blank machine, you'll need either a non-USB boot device with FreeBSD media (untested) or a USB keyboard. If you are using a USB keyboard set hint.atkbd.0.disabled=1 to install, and use the USB keyboard during installation. Then on the first reboot in the BIOS set 'USB UEFI BIOS' to disabled. (This means you can't boot from a USB device.) At that point, the machine will boot fine. I've tried 8.2-RELEASE, the last amd64 -CURRENT I could find on the FreeBSD website, and -CURRENT as of 2011-05-16. I'm building a couple of ports at the moment, and want to reboot with a couple of config changes in the loader to see if I can get the WiFi recognized. As soon as I do that I can post my dmesg someplace. Daniel T. Staal --- This email copyright the author. Unless otherwise noted, you are expressly allowed to retransmit, quote, or otherwise use the contents for non-commercial purposes. This copyright will expire 5 years after the author's death, or in 30 years, whichever is longer, unless such a period is in excess of local copyright law. --- ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: [PATCH] Toggle display of the kernel idle process (per-CPU idle threads) in top
In the last episode (May 27), John Baldwin said: On Friday, May 27, 2011 11:17:58 am Sergey Kandaurov wrote: On 27 May 2011 18:46, John Baldwin j...@freebsd.org wrote: Some times in top, I don't want to see all the per-CPU idle threads but instead focus on the non-idle threads that are running. Especially on a system with a lot of CPUs, the idle threads can push all the interesting threads off of the list. This patch adds a new 'z' flag (gratuitously chosen letter) and interactive command to toggle the display of the system idle process. Patch is tested against 8, but should work fine on HEAD too: Works on HEAD as well. I like this idea. Perhaps it could be combined with i key? I couldn't think of a sane way. There are a few times when I want to see the idle processes, but mostly I don't want to see them and want all the other settings (idle, system, threads, etc.) to be orthogonal. Top currently maps both i and I to toggle idle processes. Maybe map I to toggle system idle processes? -- Dan Nelson dnel...@allantgroup.com ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Boot halts on Thinkpad X220 (Sandy Bridge)
On Thu, May 19, 2011 at 5:18 AM, Johannes Dieterich dieterich@googlemail.com wrote: On Wed, May 18, 2011 at 7:40 PM, Xin LI delp...@delphij.net wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Try this patch? The attached patch makes 9-CURRENT-amd64 boot on the X220 w/o any hints or BIOS fixes needed. Thanks a lot! :-) (I'm still opted to disable the typematic rate detection by default at least for amd64, as we don't do it in the past for amd64) What does this mean concerning getting the fix into CURRENT? Well, that's not a perfect fix and we do lose the ability of detecting typematic rate (by default), so technically it's a workaround (sufficient to make the kernel boot and work, though) and doesn't fix anything. I have committed it anyway since we do not have better fix (yet), and have updated atkbd(4) manual page so one can enable it again when wanted. The problem we had was that it seems that running the BIOS in the x86emu emulator on amd64 would cause problem. This doesn't seem to be fixable without hands-on experiments on a system in question, it's either a BIOS bug or an emulator bug. The strange part of the problem is that the functionality is quite common in the Good Old Days (TM). Cheers, -- Xin LI delp...@delphij.net http://www.delphij.net ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Boot halts on Thinkpad X220 (Sandy Bridge)
--As of May 27, 2011 10:14:20 AM -0700, Xin LI is alleged to have said: The problem we had was that it seems that running the BIOS in the x86emu emulator on amd64 would cause problem. This doesn't seem to be fixable without hands-on experiments on a system in question, it's either a BIOS bug or an emulator bug. The strange part of the problem is that the functionality is quite common in the Good Old Days (TM). --As for the rest, it is mine. Lenovo has posted an updated BIOS for the box. Would you like me to try booting an older install with it? Daniel T. Staal --- This email copyright the author. Unless otherwise noted, you are expressly allowed to retransmit, quote, or otherwise use the contents for non-commercial purposes. This copyright will expire 5 years after the author's death, or in 30 years, whichever is longer, unless such a period is in excess of local copyright law. --- ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: [PATCH] Toggle display of the kernel idle process (per-CPU idle threads) in top
On Friday, May 27, 2011 12:56:42 pm Dan Nelson wrote: In the last episode (May 27), John Baldwin said: On Friday, May 27, 2011 11:17:58 am Sergey Kandaurov wrote: On 27 May 2011 18:46, John Baldwin j...@freebsd.org wrote: Some times in top, I don't want to see all the per-CPU idle threads but instead focus on the non-idle threads that are running. Especially on a system with a lot of CPUs, the idle threads can push all the interesting threads off of the list. This patch adds a new 'z' flag (gratuitously chosen letter) and interactive command to toggle the display of the system idle process. Patch is tested against 8, but should work fine on HEAD too: Works on HEAD as well. I like this idea. Perhaps it could be combined with i key? I couldn't think of a sane way. There are a few times when I want to see the idle processes, but mostly I don't want to see them and want all the other settings (idle, system, threads, etc.) to be orthogonal. Top currently maps both i and I to toggle idle processes. Maybe map I to toggle system idle processes? Well, top -I is the command line argument for that already (and for other things like 'H' and 'S' the command line flag matches the interactive command). However, I wouldn't want to take 'i' as I know that's what my brain is hardwired to do to toggle the idle flag. I figure that at this point it would be too much of a POLA violation to change either of 'i' or 'I'. -- John Baldwin ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: Testing new nfs and VIMAGE
And the attached core.txt got eaten. http://people.hidden-powers.com/~glz/core.txt.3 /glz --On May 27, 2011 10:37:32 +0200 Goran Lowkrantz g...@hidden-powers.com wrote: I have been testing VIMAGE a lot lately to see how it works an all my test cases works as expected except when I use NFSv4 from an NFS client with a kerrel with VIMAGE enabled. All other permutations work and this error is very specific. All crashes occurs when trying to read or write to an NFS v4 volume. I have seen it on both i386 and amd64. # 12 0xc0a73c15 in rt_tables_get_rnh (table=0, fam=2) at /usr/src/sys/net/route.c:153 static __inline struct radix_node_head ** rt_tables_get_rnh_ptr(int table, int fam) { struct radix_node_head **rnh; KASSERT(table = 0 table rt_numfibs, (%s: table out of bounds., __func__)); KASSERT(fam = 0 fam (AF_MAX+1), (%s: fam out of bounds., __func__)); /* rnh is [fib=0][af=0]. */ --- rnh = (struct radix_node_head **)V_rt_tables; /* Get the offset to the requested table and fam. */ rnh += table * (AF_MAX+1) + fam; return (rnh); } Any ideas? Cores and dumps are available plus a vmware player setup to test and debug. I know diddly about VIMAGE, but you could try the attached patch which imitates what is done other places. If the patch isn't attached, you can find it at: http://people.freebsd.org/~rmacklem/vnet.patch rick --- fs/nfsclient/nfs_clport.c.sav 2011-05-04 19:12:10.0 -0400 +++ fs/nfsclient/nfs_clport.c 2011-05-27 18:52:11.0 -0400 @@ -943,7 +943,9 @@ nfscl_getmyip(struct nfsmount *nmp, int sad.sin_family = AF_INET; sad.sin_len = sizeof (struct sockaddr_in); sad.sin_addr.s_addr = sin-sin_addr.s_addr; + CURVNET_SET(TD_TO_VNET(curthread)); rt = rtalloc1((struct sockaddr *)sad, 0, 0UL); + CURVNET_RESTORE(); if (rt != NULL) { if (rt-rt_ifp != NULL rt-rt_ifa != NULL @@ -966,7 +968,9 @@ nfscl_getmyip(struct nfsmount *nmp, int sad6.sin6_family = AF_INET6; sad6.sin6_len = sizeof (struct sockaddr_in6); sad6.sin6_addr = sin6-sin6_addr; + CURVNET_SET(TD_TO_VNET(curthread)); rt = rtalloc1((struct sockaddr *)sad6, 0, 0UL); + CURVNET_RESTORE(); if (rt != NULL) { if (rt-rt_ifp != NULL rt-rt_ifa != NULL ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
message buffer scrambling fix
Hey folks, I have attached some patches to the kernel message buffer code (this affects dmesg(8) output as well as kernel messages that go to the syslog) to address log scrambling. This fixes the same issue that 'options PRINTF_BUFR_SIZE=128' fixes for the console. The problem is that you can have multiple kernel threads writing to the message buffer at the same time, and so their characters will get interleaved. All of the characters will get in there, because they're written with atomic operations, but the output might looked scrambled. So the fix is to use the same stack buffer that is used for the console output (so the stack size doesn't increase), and use a spin lock instead of atomic operations to insert the string into the message buffer. The result is that dmesg and syslog output should look the same as the console output. As long as individual kernel prints fit in the printf buffer size, they will be put into the message buffer atomically. I also fixed a couple of other long-standing issues. putcons() (in subr_prf.c) was adding a carriage return before calling cnputs(). But cnputs() calls cnputc(), which adds a carriage return before every newline. So much of the console output (the part that came from putcons() at least) had two carriage returns at the end. The other issue was that log_console() was inserting a newline for any console write that didn't already have one at the end. The issue with that can be seen if you do a 'dmesg -a' and compare that to the console output. You'll see something like this on the console: Updating motd:. But this in dmesg -a: Updating motd: . That is because Updating motd: is written first, log_console() appends a newline, and then .\n is written. I added a loader tunable and sysctl to turn the old behavior back on (kern.log_console_add_linefeed) if you want the old behavior, but I think we should be able to safely remove it. Also, the new msgbuf_addstr() function allows the caller to optionally ask for carriage returns to be stripped out. However, in my testing I haven't seen any carriage returns to strip. Let me know if you have any comments. I'm planning to check this into head next week. Thanks, Ken -- Kenneth Merry k...@freebsd.org Index: sys/kern/subr_msgbuf.c === --- sys/kern/subr_msgbuf.c (revision 222390) +++ sys/kern/subr_msgbuf.c (working copy) @@ -31,8 +31,16 @@ #include sys/param.h #include sys/systm.h +#include sys/lock.h +#include sys/mutex.h #include sys/msgbuf.h +/* + * Maximum number conversion buffer length: uintmax_t in base 2, plus + * around the priority, and a terminating NUL. + */ +#defineMAXPRIBUF (sizeof(intmax_t) * NBBY + 3) + /* Read/write sequence numbers are modulo a multiple of the buffer size. */ #define SEQMOD(size) ((size) * 16) @@ -51,6 +59,9 @@ mbp-msg_seqmod = SEQMOD(size); msgbuf_clear(mbp); mbp-msg_magic = MSG_MAGIC; + mbp-msg_lastpri = -1; + mbp-msg_needsnl = 0; + mtx_init(mbp-msg_lock, msgbuf, NULL, MTX_SPIN); } /* @@ -80,6 +91,11 @@ } msgbuf_clear(mbp); } + + mbp-msg_lastpri = -1; + /* Assume that the old message buffer didn't end in a newline. */ + mbp-msg_needsnl = 1; + mtx_init(mbp-msg_lock, msgbuf, NULL, MTX_SPIN); } /* @@ -110,28 +126,143 @@ } /* - * Append a character to a message buffer. This function can be - * considered fully reentrant so long as the number of concurrent - * callers is less than the number of characters in the buffer. - * However, the message buffer is only guaranteed to be consistent - * for reading when there are no callers in this function. + * Add a character into the message buffer, and update the checksum and + * sequence number. + * + * The caller should hold the message buffer spinlock. */ +static inline void +msgbuf_do_addchar(struct msgbuf *mbp, u_int *seq, int c) +{ + u_int pos; + + /* Make sure we properly wrap the sequence number. */ + pos = MSGBUF_SEQ_TO_POS(mbp, *seq); + + mbp-msg_cksum += (u_int)c - + (u_int)(u_char)mbp-msg_ptr[pos]; + + mbp-msg_ptr[pos] = c; + + *seq = MSGBUF_SEQNORM(mbp, *seq + 1); +} + +/* + * Append a character to a message buffer. + */ void msgbuf_addchar(struct msgbuf *mbp, int c) { - u_int new_seq, pos, seq; + mtx_lock_spin(mbp-msg_lock); - do { - seq = mbp-msg_wseq; - new_seq = MSGBUF_SEQNORM(mbp, seq + 1); - } while (atomic_cmpset_rel_int(mbp-msg_wseq, seq, new_seq) == 0); - pos = MSGBUF_SEQ_TO_POS(mbp, seq); - atomic_add_int(mbp-msg_cksum, (u_int)(u_char)c - - (u_int)(u_char)mbp-msg_ptr[pos]); - mbp-msg_ptr[pos] = c; + msgbuf_do_addchar(mbp, mbp-msg_wseq, c); + + mtx_unlock_spin(mbp-msg_lock); } /* + * Append a NUL-terminated string with a priority to a message
[head tinderbox] failure on i386/i386
TB --- 2011-05-28 02:20:00 - tinderbox 2.7 running on freebsd-current.sentex.ca TB --- 2011-05-28 02:20:00 - starting HEAD tinderbox run for i386/i386 TB --- 2011-05-28 02:20:00 - cleaning the object tree TB --- 2011-05-28 02:20:27 - cvsupping the source tree TB --- 2011-05-28 02:20:27 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/i386/i386/supfile TB --- 2011-05-28 02:25:57 - building world TB --- 2011-05-28 02:25:57 - MAKEOBJDIRPREFIX=/obj TB --- 2011-05-28 02:25:57 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2011-05-28 02:25:57 - TARGET=i386 TB --- 2011-05-28 02:25:57 - TARGET_ARCH=i386 TB --- 2011-05-28 02:25:57 - TZ=UTC TB --- 2011-05-28 02:25:57 - __MAKE_CONF=/dev/null TB --- 2011-05-28 02:25:57 - cd /src TB --- 2011-05-28 02:25:57 - /usr/bin/make -B buildworld World build started on Sat May 28 02:25:58 UTC 2011 Rebuilding the temporary build tree stage 1.1: legacy release compatibility shims stage 1.2: bootstrap tools stage 2.1: cleaning up the object tree stage 2.2: rebuilding the object tree stage 2.3: build tools stage 3: cross tools stage 4.1: building includes stage 4.2: building libraries stage 4.3: make dependencies stage 4.4: building everything World build completed on Sat May 28 04:21:19 UTC 2011 TB --- 2011-05-28 04:21:19 - generating LINT kernel config TB --- 2011-05-28 04:21:19 - cd /src/sys/i386/conf TB --- 2011-05-28 04:21:19 - /usr/bin/make -B LINT TB --- 2011-05-28 04:21:19 - building LINT kernel TB --- 2011-05-28 04:21:19 - MAKEOBJDIRPREFIX=/obj TB --- 2011-05-28 04:21:19 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2011-05-28 04:21:19 - TARGET=i386 TB --- 2011-05-28 04:21:19 - TARGET_ARCH=i386 TB --- 2011-05-28 04:21:19 - TZ=UTC TB --- 2011-05-28 04:21:19 - __MAKE_CONF=/dev/null TB --- 2011-05-28 04:21:19 - cd /src TB --- 2011-05-28 04:21:19 - /usr/bin/make -B buildkernel KERNCONF=LINT Kernel build for LINT started on Sat May 28 04:21:19 UTC 2011 stage 1: configuring the kernel stage 2.1: cleaning up the object tree stage 2.2: rebuilding the object tree stage 2.3: build tools stage 3.1: making dependencies stage 3.2: building everything Kernel build for LINT completed on Sat May 28 04:50:30 UTC 2011 TB --- 2011-05-28 04:50:30 - cd /src/sys/i386/conf TB --- 2011-05-28 04:50:30 - /usr/sbin/config -m GENERIC TB --- 2011-05-28 04:50:30 - building GENERIC kernel TB --- 2011-05-28 04:50:30 - MAKEOBJDIRPREFIX=/obj TB --- 2011-05-28 04:50:30 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2011-05-28 04:50:30 - TARGET=i386 TB --- 2011-05-28 04:50:30 - TARGET_ARCH=i386 TB --- 2011-05-28 04:50:30 - TZ=UTC TB --- 2011-05-28 04:50:30 - __MAKE_CONF=/dev/null TB --- 2011-05-28 04:50:30 - cd /src TB --- 2011-05-28 04:50:30 - /usr/bin/make -B buildkernel KERNCONF=GENERIC Kernel build for GENERIC started on Sat May 28 04:50:30 UTC 2011 stage 1: configuring the kernel stage 2.1: cleaning up the object tree stage 2.2: rebuilding the object tree stage 2.3: build tools stage 3.1: making dependencies stage 3.2: building everything [...] cc -O2 -pipe -fno-strict-aliasing -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /obj/i386.i386/src/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -I/obj/i386.i386/src/sys/GENERIC -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse -mno-mmx -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-missing-prototypes -I/src/sys/modules/xfs/../../gnu/fs/xfs/FreeBSD -I/src/sys/modules/xfs/../../gnu/fs/xfs/FreeBSD/support -I/src/sys/modules/xfs/../../gnu/fs/xfs -c /src/sys/modules/xfs/../../gnu/fs/xfs/xfs_btree.c cc -O2 -pipe -fno-strict-aliasing -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /obj/i386.i386/src/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common -g -I/obj/i386.i386/src/sys/GENERIC -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse -mno-mmx -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999 -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-missing-prototypes -I/src/sys/modules/xfs/../../gnu/fs/xfs/FreeBSD -I/src/sys/modules/xfs/../../gnu/fs/xfs/FreeBSD/support -I/src/sys/modules/xfs/../../gnu/fs/xfs -c /src/sys/modules/xfs/../../gnu/fs/xfs/xfs_buf_item.c cc -O2 -pipe -fno-strict-aliasing -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include