Re: hwpmc support for Ivy Bridge Xeon
On Mon, Jan 28, 2013 at 7:27 PM, hiren panchasara hiren.panchas...@gmail.com wrote: On Sat, Jan 26, 2013 at 1:58 AM, hiren panchasara hiren.panchas...@gmail.com wrote: I've tried to update hwpmc by adding support for xeon class of Ivy bridge processors. Thanks Jim for pointing me to the correct document. (325462-045US Jan 2013) I do not have a reference machine to test with. Any help in that regard would be appreciated. Got a machine with ivy bridge xeon. Will test my changes and update here soon. Hiren It seems to be working fine: Here is o/p of pmccontrol -L listing all the event counters: http://www.strugglingcoder.info/patches/hwpmc_ibx_pmccontrol.txt And below is the o/p of pmctest.py script: http://www.strugglingcoder.info/patches/hwpmc_ibx_pmctest.txt cheers, Hiren Here are the diffs against head (245927): http://www.strugglingcoder.info/patches/hwpmc_ibx.txt Thanks, Hiren ___ 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: mounting root from NFS via ROOTDEVNAME
On Mon, Jan 28, 2013 at 7:13 AM, Eggert, Lars l...@netapp.com wrote: Hi, I'm trying to netboot a system where the root device is specified in the kernel via ROOTDEVNAME: Lars, I recommend that you do not use ROOTDEVNAME, and instead you should follow the instructions which I wrote and contributed to the FreeBSD handbook: PXE Booting with an NFS Root File System http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-pxe-nfs.html The content of this document is the same as the text file which Rick Macklem pointed out (I wrote that too). BTW, if you ever visit the Netapp campus in Sunnyvale, California, feel free to say hello, because I work around the corner from there. :) -- Craig Rodrigues rodr...@crodrigues.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: mounting root from NFS via ROOTDEVNAME
Hi, On Jan 29, 2013, at 9:34, Craig Rodrigues rodr...@crodrigues.org wrote: I recommend that you do not use ROOTDEVNAME, and instead you should follow the instructions which I wrote and contributed to the FreeBSD handbook: PXE Booting with an NFS Root File System http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-pxe-nfs.html The content of this document is the same as the text file which Rick Macklem pointed out (I wrote that too). I had read both before, and they're very useful documents. Unfortunately, they don't fully apply to my case, since I'm not PXE-booting the system; it netboots the kernel from a custom loader. So once the kernel bootstraps, I need it to obtain an IP address and then NFS-mount root. BTW, if you ever visit the Netapp campus in Sunnyvale, California, feel free to say hello, because I work around the corner from there. :) -- Craig Rodrigues rodr...@crodrigues.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: mounting root from NFS via ROOTDEVNAME
On Jan 29, 2013, at 10:13, Lars Eggert l...@netapp.com wrote: On Jan 29, 2013, at 9:34, Craig Rodrigues rodr...@crodrigues.org wrote: I recommend that you do not use ROOTDEVNAME, and instead you should follow the instructions which I wrote and contributed to the FreeBSD handbook: PXE Booting with an NFS Root File System http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-pxe-nfs.html The content of this document is the same as the text file which Rick Macklem pointed out (I wrote that too). I had read both before, and they're very useful documents. Unfortunately, they don't fully apply to my case, since I'm not PXE-booting the system; it netboots the kernel from a custom loader. So once the kernel bootstraps, I need it to obtain an IP address and then NFS-mount root. (Whoops, hit send by mistake.) That's what I was trying to achieve with the BOOTP and BOOTP_WIRED_TO options. Hm, I wonder if I could simply use the custom loader to netboot tftpboot, and then follow your instructions... Will try. BTW, if you ever visit the Netapp campus in Sunnyvale, California, feel free to say hello, because I work around the corner from there. :) Am there about once a month, will do :-) Lars ___ 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: hwpmc support for Ivy Bridge Xeon
On Tue, Jan 29, 2013 at 12:29 AM, hiren panchasara hiren.panchas...@gmail.com wrote: On Mon, Jan 28, 2013 at 7:27 PM, hiren panchasara hiren.panchas...@gmail.com wrote: On Sat, Jan 26, 2013 at 1:58 AM, hiren panchasara hiren.panchas...@gmail.com wrote: I've tried to update hwpmc by adding support for xeon class of Ivy bridge processors. Thanks Jim for pointing me to the correct document. (325462-045US Jan 2013) I do not have a reference machine to test with. Any help in that regard would be appreciated. Got a machine with ivy bridge xeon. Will test my changes and update here soon. Hiren It seems to be working fine: Here is o/p of pmccontrol -L listing all the event counters: http://www.strugglingcoder.info/patches/hwpmc_ibx_pmccontrol.txt I don't see anything wrong there. And below is the o/p of pmctest.py script: http://www.strugglingcoder.info/patches/hwpmc_ibx_pmctest.txt With 'pmctest.py' are you talking about the gnn@ script available in tools/ ? What are you profiling (ls, find, the kernel) ? I've recently discovered an excellent tool from Peter in stress2 suite to test pmc. Maybe you can try it. http://svnweb.freebsd.org/base/user/pho/stress2/misc/pmc.sh?revision=237222view=markup cheers, Hiren Here are the diffs against head (245927): http://www.strugglingcoder.info/patches/hwpmc_ibx.txt Thanks, Hiren ___ 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 Thanks -- Davide ___ 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
r246057: buildworld fails with: /usr/obj/usr/src/tmp/usr/lib/libc++.so: undefined reference to `std::bad_alloc::~bad_alloc()'
I receive this error since yesterday building world and it is still sticky on most recent sources (r246057) and I was wondering why the tinderboxes do not pick this up on the 10.0-CURRENT builds ... just for a notice for the development folks ... oh === libexec/atf/atf-check (all) c++ -O3 -pipe -fno-strict-aliasing -march=native -march=native -DHAVE_CONFIG_H -I/usr/src/libexec/atf/atf-check/../../../contrib/atf -Qunused-arguments -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith -Wno-uninitialized -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion -stdlib=libc++ -std=c++11 -c /usr/src/libexec/atf/atf-check/../../../contrib/atf/atf-sh/atf-check.cpp c++ -O3 -pipe -fno-strict-aliasing -march=native -march=native -DHAVE_CONFIG_H -I/usr/src/libexec/atf/atf-check/../../../contrib/atf -Qunused-arguments -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith -Wno-uninitialized -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion -stdlib=libc++ -std=c++11 -L/usr/obj/usr/src/libexec/atf/atf-check/../../../lib/atf/libatf-c++ -L/usr/obj/usr/src/libexec/atf/atf-check/../../../lib/atf/libatf-c -o atf-check atf-check.o -latf-c++ -latf-c /usr/obj/usr/src/tmp/usr/lib/libc++.so: undefined reference to `std::bad_alloc::~bad_alloc()' /usr/obj/usr/src/libexec/atf/atf-check/../../../lib/atf/libatf-c++/libatf-c++.so: undefined reference to `std::bad_alloc::bad_alloc()' /usr/obj/usr/src/libexec/atf/atf-check/../../../lib/atf/libatf-c++/libatf-c++.so: undefined reference to `std::bad_alloc::~bad_alloc()' /usr/obj/usr/src/tmp/usr/lib/libc++.so: undefined reference to `std::bad_alloc::bad_alloc()' c++: error: linker command failed with exit code 1 (use -v to see invocation) *** [atf-check] Error code 1 Stop in /usr/src/libexec/atf/atf-check. *** [all] Error code 1 Stop in /usr/src/libexec/atf. *** [all] Error code 1 Stop in /usr/src/libexec. *** [libexec.all__D] Error code 1 Stop in /usr/src. *** [everything] Error code 1 Stop in /usr/src. *** [buildworld] Error code 1 Stop in /usr/src. signature.asc Description: OpenPGP digital signature
Re: r246057: buildworld fails with: /usr/obj/usr/src/tmp/usr/lib/libc++.so: undefined reference to `std::bad_alloc::~bad_alloc()'
On 01/29/13 11:08, David Chisnall wrote: On 29 Jan 2013, at 10:06, O. Hartmann wrote: I receive this error since yesterday building world and it is still sticky on most recent sources (r246057) and I was wondering why the tinderboxes do not pick this up on the 10.0-CURRENT builds ... just for a notice for the development folks ... Are you building with -DNO_CLEAN or similar? This error is expected if you have recompiled libcxxrt but not libc++. If you recompile libc++, it should work correctly. Alternatively, if it is accidentally trying to link the libc++ that you build against your installed libcxxrt, then it will also break. David No, not that I'm aware of that (no -DNO_CLESN). I run a script calling make -jX buildworld, the script evaluates simply the number of threads possible and also deletes(!) /usr/obj completely. So I'm quite sure that I start over with a virging /usr/obj when I start building world. oh signature.asc Description: OpenPGP digital signature
Re: r246057: buildworld fails with: /usr/obj/usr/src/tmp/usr/lib/libc++.so: undefined reference to `std::bad_alloc::~bad_alloc()'
On 29 Jan 2013, at 10:48, O. Hartmann wrote: On 01/29/13 11:08, David Chisnall wrote: On 29 Jan 2013, at 10:06, O. Hartmann wrote: I receive this error since yesterday building world and it is still sticky on most recent sources (r246057) and I was wondering why the tinderboxes do not pick this up on the 10.0-CURRENT builds ... just for a notice for the development folks ... Are you building with -DNO_CLEAN or similar? This error is expected if you have recompiled libcxxrt but not libc++. If you recompile libc++, it should work correctly. Alternatively, if it is accidentally trying to link the libc++ that you build against your installed libcxxrt, then it will also break. David No, not that I'm aware of that (no -DNO_CLESN). I run a script calling make -jX buildworld, the script evaluates simply the number of threads possible and also deletes(!) /usr/obj completely. So I'm quite sure that I start over with a virging /usr/obj when I start building world. Is it building libcxxrt before building libc++? Can you check what command it is running to link libc++? David signature.asc Description: Message signed with OpenPGP using GPGMail
Re: hwpmc support for Ivy Bridge Xeon
On Tue, Jan 29, 2013 at 2:05 AM, Davide Italiano dav...@freebsd.org wrote: On Tue, Jan 29, 2013 at 12:29 AM, hiren panchasara hiren.panchas...@gmail.com wrote: On Mon, Jan 28, 2013 at 7:27 PM, hiren panchasara hiren.panchas...@gmail.com wrote: On Sat, Jan 26, 2013 at 1:58 AM, hiren panchasara hiren.panchas...@gmail.com wrote: I've tried to update hwpmc by adding support for xeon class of Ivy bridge processors. Thanks Jim for pointing me to the correct document. (325462-045US Jan 2013) I do not have a reference machine to test with. Any help in that regard would be appreciated. Got a machine with ivy bridge xeon. Will test my changes and update here soon. Hiren It seems to be working fine: Here is o/p of pmccontrol -L listing all the event counters: http://www.strugglingcoder.info/patches/hwpmc_ibx_pmccontrol.txt I don't see anything wrong there. And below is the o/p of pmctest.py script: http://www.strugglingcoder.info/patches/hwpmc_ibx_pmctest.txt With 'pmctest.py' are you talking about the gnn@ script available in tools/ ? Yes. What are you profiling (ls, find, the kernel) ? I was testing simple commands like ls. I've recently discovered an excellent tool from Peter in stress2 suite to test pmc. Maybe you can try it. http://svnweb.freebsd.org/base/user/pho/stress2/misc/pmc.sh?revision=237222view=markup Interesting tool. I will spend more time in looking into it. Though I quickly did run pmc.sh run: run time 0+00:05:00, incarnations 1, load 100, verbose 1 10:48:37 Loop #1 rw: run time 0+00:02:00, incarnations 8, load 70, verbose 1 swap: run time 0+00:02:00, incarnations 38, load 80, verbose 1 creat: run time 0+00:02:00, incarnations 3, load 80, verbose 1 10:52:05 Loop #2 rw: run time 0+00:02:00, incarnations 17, load 70, verbose 1 creat: run time 0+00:02:00, incarnations 18, load 80, verbose 1 mkdir: run time 0+00:02:00, incarnations 9, load 80, verbose 1 Again, I appreciate you helping here, Thanks, Hiren cheers, Hiren Here are the diffs against head (245927): http://www.strugglingcoder.info/patches/hwpmc_ibx.txt Thanks, Hiren ___ 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 Thanks -- Davide ___ 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: mounting root from NFS via ROOTDEVNAME
On Tue, 2013-01-29 at 09:17 +, Eggert, Lars wrote: On Jan 29, 2013, at 10:13, Lars Eggert l...@netapp.com wrote: On Jan 29, 2013, at 9:34, Craig Rodrigues rodr...@crodrigues.org wrote: I recommend that you do not use ROOTDEVNAME, and instead you should follow the instructions which I wrote and contributed to the FreeBSD handbook: PXE Booting with an NFS Root File System http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-pxe-nfs.html The content of this document is the same as the text file which Rick Macklem pointed out (I wrote that too). I had read both before, and they're very useful documents. Unfortunately, they don't fully apply to my case, since I'm not PXE-booting the system; it netboots the kernel from a custom loader. So once the kernel bootstraps, I need it to obtain an IP address and then NFS-mount root. (Whoops, hit send by mistake.) That's what I was trying to achieve with the BOOTP and BOOTP_WIRED_TO options. Hm, I wonder if I could simply use the custom loader to netboot tftpboot, and then follow your instructions... Will try. I think that's what I used to do before I switched to configuring the boot file and root path via dhcp as well. I could've sworn I used BOOTP without BOOTP_NFSROOT, but perhaps that's just my muddled memory of what I tried to do that never worked out. I also think all of this is a bug. It seems to me that BOOTP without BOOTP_NFSROOT should obtain ip-related info from dhcp but use ROOTDEVNAME as configured, perhaps with any dhcp-provided root path as a fallback if there's a problem or ROOTDEVNAME is unconfigured. -- Ian ___ 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: r246057: buildworld fails with: /usr/obj/usr/src/tmp/usr/lib/libc++.so: undefined reference to `std::bad_alloc::~bad_alloc()'
On 29 Jan 2013, at 10:06, O. Hartmann wrote: I receive this error since yesterday building world and it is still sticky on most recent sources (r246057) and I was wondering why the tinderboxes do not pick this up on the 10.0-CURRENT builds ... just for a notice for the development folks ... Are you building with -DNO_CLEAN or similar? This error is expected if you have recompiled libcxxrt but not libc++. If you recompile libc++, it should work correctly. Alternatively, if it is accidentally trying to link the libc++ that you build against your installed libcxxrt, then it will also break. David ___ 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
BHyVe on 10-Current r245673
I am using FreeBSD 10-Current r245673 as a host on an HP p2-1394. I have the host OS installed on 1 drive using UFS and a second drive using ZFS with a pool named 'tank.' They layout for zfs for my guest install is /tank/guest01. When using the command: # bhyveload -d /tmp/FreeBSD-9.1-RELEASE-amd64-disk1.iso -m 512 -h /tank/guest01 guest01 bhyve -c 2 -a -A -m 512 -g 0 -P -H -s 1,virtio-net,tap0 -s 2,virtio-blk,diskdev guest01 sleep 20 ifconfig tap0 up I get the boot screen for FreeBSD 9.1 and after the timed pause it fails with: Could not open backing file: No such file or directory ACPI tables require and ioapic Assertion failed: (error == 0), function main, file /usr/src/usr.sbin/bhyve/bhyverun.c, line 774. Abort (core dumped) root@localhost:/tmp# I am using the bhyveload comamnd from a PDF I found from BSDCan but when I used the -m 768 -M 1024 as used in the doc it failed with a syntax error, so I switched to using just -m 512. My .iso is in /tmp as indicated in my command with '-d'. I'm guessing my command is wrong, but not sure where. Any help would be appreciated. Thanks, Gary ___ 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: BHyVe on 10-Current r245673
On 01/29/2013 09:15 AM, G B wrote: I am using FreeBSD 10-Current r245673 as a host on an HP p2-1394. I have the host OS installed on 1 drive using UFS and a second drive using ZFS with a pool named 'tank.' They layout for zfs for my guest install is /tank/guest01. When using the command: # bhyveload -d /tmp/FreeBSD-9.1-RELEASE-amd64-disk1.iso -m 512 -h /tank/guest01 guest01 bhyve -c 2 -a -A -m 512 -g 0 -P -H -s 1,virtio-net,tap0 -s 2,virtio-blk,diskdev guest01 sleep 20 ifconfig tap0 up I get the boot screen for FreeBSD 9.1 and after the timed pause it fails with: Could not open backing file: No such file or directory ACPI tables require and ioapic Assertion failed: (error == 0), function main, file /usr/src/usr.sbin/bhyve/bhyverun.c, line 774. Abort (core dumped) root@localhost:/tmp# I am using the bhyveload comamnd from a PDF I found from BSDCan but when I used the -m 768 -M 1024 as used in the doc it failed with a syntax error, so I switched to using just -m 512. My .iso is in /tmp as indicated in my command with '-d'. I'm guessing my command is wrong, but not sure where. Any help would be appreciated. Thanks, Gary ___ 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 diskdev is your actual disk (i.e. -s 2,virtio-blk,/dev/zvol/tank/guest01). Also, you need a zvol if you are doing this. Also, -h in bhyveload specifies a directory with a loader config, kernel, and modules. You definitely don't need it with an .iso boot. Also, see examples here: http://mirrors.nycbug.org/pub/BHyVe/r244024/INSTRUCTIONS-COPYRIGHT.txt and files here: http://mirrors.nycbug.org/pub/BHyVe/r244024/ Also, check http://callfortesting.org/ for some more examples. - Nikolai Lifanov ___ 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: Zpool surgery
Dan Nelson dnel...@allantgroup.com wrote: In the last episode (Jan 28), Fabian Keil said: Ulrich Spörlein u...@freebsd.org wrote: On Mon, 2013-01-28 at 07:11:40 +1100, Peter Jeremy wrote: On 2013-Jan-27 14:31:56 -, Steven Hartland kill...@multiplay.co.uk wrote: - Original Message - From: Ulrich Spörlein u...@freebsd.org I want to transplant my old zpool tank from a 1TB drive to a new 2TB drive, but *not* use dd(1) or any other cloning mechanism, as the pool was very full very often and is surely severely fragmented. Cant you just drop the disk in the original machine, set it as a mirror then once the mirror process has completed break the mirror and remove the 1TB disk. That will replicate any fragmentation as well. zfs send | zfs recv is the only (current) way to defragment a ZFS pool. It's not obvious to me why zpool replace (or doing it manually) would replicate the fragmentation. zpool replace essentially adds your new disk as a mirror to the parent vdev, then deletes the original disk when the resilver is done. Since mirrors are block-identical copies of each other, the new disk will contain an exact copy of the original disk, followed by 1TB of freespace. Thanks for the explanation. I was under the impression that zfs mirrors worked at a higher level than traditional mirrors like gmirror but there seems to be indeed less magic than I expected. Fabian signature.asc Description: PGP signature
Re: BHyVe on 10-Current r245673
On 01/29/2013 09:15 AM, G B wrote: I am using FreeBSD 10-Current r245673 as a host on an HP p2-1394. I have the host OS installed on 1 drive using UFS and a second drive using ZFS with a pool named 'tank.' They layout for zfs for my guest install is /tank/guest01. When using the command: # bhyveload -d /tmp/FreeBSD-9.1-RELEASE-amd64-disk1.iso -m 512 -h /tank/guest01 guest01 bhyve -c 2 -a -A -m 512 -g 0 -P -H -s 1,virtio-net,tap0 -s 2,virtio-blk,diskdev guest01 sleep 20 ifconfig tap0 up I get the boot screen for FreeBSD 9.1 and after the timed pause it fails with: Could not open backing file: No such file or directory ACPI tables require and ioapic Assertion failed: (error == 0), function main, file /usr/src/usr.sbin/bhyve/bhyverun.c, line 774. Abort (core dumped) root@localhost:/tmp# I am using the bhyveload comamnd from a PDF I found from BSDCan but when I used the -m 768 -M 1024 as used in the doc it failed with a syntax error, so I switched to using just -m 512. My .iso is in /tmp as indicated in my command with '-d'. I'm guessing my command is wrong, but not sure where. Any help would be appreciated. Thanks, Gary ___ 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 diskdev is your actual disk (i.e. -s 2,virtio-blk,/dev/zvol/tank/guest01). Also, you need a zvol if you are doing this. Also, -h in bhyveload specifies a directory with a loader config, kernel, and modules. You definitely don't need it with an .iso boot. - Nikolai Lifanov ___ 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: Why don't we check for preemption when we unlend priority?
On Friday, January 25, 2013 3:01:14 pm Ryan Stone wrote: I'm having a problem where userland threads are running with a loaned (via mutex priority propagation) priority even after they have released the mutex. This is causing the low-priority userland thread to starve high-priority interrupt threads. One scenario is(which I am seeing on FreeBSD 8.2, but the priority lending code does not seem to have changed in HEAD): 1) I have several swi threads that are pulling packets off of interfaces and forwarding them. Each swi thread is pinned to a CPU. 2) A remote user initiates an scp of a large file to this machine. 3) sshd (which handles the scp) takes a mutex on its socket 4) An interrupt or taskqueue thread belonging to the driver that is receiving the scp traffic tries to take the same mutex. It can't and so it lends its priority to the sshd thread. 5) My swi thread is woken. It is pinned to the same CPU as sshd, but it has a lower priority than the lent priority, so it is placed on the runqueue. 6) The sshd thread releases the mutex. sched_unlend_prio is called to set its priority back to a normal user priority. However, it does not check whether any higher-priority threads are waiting in the runqueue. 7) The sshd thread is allowed to run for its full quantum (100ms). This is easily long enough for my swi thread to start and I drop packets. Well, I think there is an implicit assumption that the only higher priority things are ones that are about to be woken up later in turnstile_unpend(). The order of operations in turnstile_unpend() should handle the case where one of the threads waiting on the lock needs your inherited priority. In the absence of CPU pinning this would indeed work correctly because if the current thread's priority is lowered, it is definitely going to preempt to the thread it borrowed it from, and when that thread finishes running it will examine the run queues to find which thread to run next. CPU pinning has broken that assumption however. I can't fully evaulate your patch, though sched_unlend_prio should only be called on curthread, so I think that your sched_check_preempt() should always see tdq == TDQ_SELF()? diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 01559ee..2659614 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -1586,6 +1586,22 @@ sched_pctcpu_update(struct td_sched *ts) ts-ts_ftick = ts-ts_ltick - SCHED_TICK_TARG; } +static void +sched_check_preempt(struct tdq *tdq, struct thread *td) +{ + + KASSERT(TD_IS_RUNNING(td), (thread is not running)); + TDQ_LOCK_ASSERT(tdq, MA_OWNED); + KASSERT(tdq == TDQ_CPU(td-td_sched-ts_cpu), (tdq does not td)); + + if (tdq == TDQ_SELF()) { + if (td-td_priority tdq-tdq_lowpri + sched_shouldpreempt(tdq-tdq_lowpri, td-td_priority, 0)) + td-td_owepreempt = 1; + } else + tdq_notify(tdq, td); +} + /* * Adjust the priority of a thread. Move it to the appropriate run-queue * if necessary. This is the back-end for several priority related @@ -1635,8 +1651,10 @@ sched_thread_priority(struct thread *td, u_char prio) td-td_priority = prio; if (prio tdq-tdq_lowpri) tdq-tdq_lowpri = prio; - else if (tdq-tdq_lowpri == oldpri) + else if (tdq-tdq_lowpri == oldpri) { tdq_setlowpri(tdq, td); + sched_check_preempt(tdq, td); + } return; } td-td_priority = prio; -- 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: r246057: buildworld fails with: /usr/obj/usr/src/tmp/usr/lib/libc++.so: undefined reference to `std::bad_alloc::~bad_alloc()'
On Tue, Jan 29, 2013 at 11:06:02AM +0100, O. Hartmann wrote: I receive this error since yesterday building world and it is still sticky on most recent sources (r246057) and I was wondering why the tinderboxes do not pick this up on the 10.0-CURRENT builds ... just for a notice for the development folks ... ... === libexec/atf/atf-check (all) ... c++ -O3 -pipe -fno-strict-aliasing -march=native -march=native -DHAVE_CONFIG_H -I/usr/src/libexec/atf/atf-check/../../../contrib/atf -Qunused-arguments -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith -Wno-uninitialized -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion -stdlib=libc++ -std=c++11 -L/usr/obj/usr/src/libexec/atf/atf-check/../../../lib/atf/libatf-c++ -L/usr/obj/usr/src/libexec/atf/atf-check/../../../lib/atf/libatf-c -o atf-check atf-check.o -latf-c++ -latf-c /usr/obj/usr/src/tmp/usr/lib/libc++.so: undefined reference to `std::bad_alloc::~bad_alloc()' /usr/obj/usr/src/libexec/atf/atf-check/../../../lib/atf/libatf-c++/libatf-c++.so: undefined reference to `std::bad_alloc::bad_alloc()' /usr/obj/usr/src/libexec/atf/atf-check/../../../lib/atf/libatf-c++/libatf-c++.so: undefined reference to `std::bad_alloc::~bad_alloc()' /usr/obj/usr/src/tmp/usr/lib/libc++.so: undefined reference to `std::bad_alloc::bad_alloc()' c++: error: linker command failed with exit code 1 (use -v to see invocation) *** [atf-check] Error code 1 Stop in /usr/src/libexec/atf/atf-check. *** [all] Error code 1 ... In contrast, I don't see a problem; most recent head build I have is: FreeBSD freebeast.catwhisker.org 10.0-CURRENT FreeBSD 10.0-CURRENT #1057 r246057M/246068: Tue Jan 29 07:29:55 PST 2013 r...@freebeast.catwhisker.org:/usr/obj/usr/src/sys/GENERIC i386 For reference, yesterday's was: FreeBSD freebeast.catwhisker.org 10.0-CURRENT FreeBSD 10.0-CURRENT #1056 r246028M/246028: Mon Jan 28 06:49:44 PST 2013 r...@freebeast.catwhisker.org:/usr/obj/usr/src/sys/GENERIC i386 That said (and this may be relevant), I'm using clang/clang++ to build FreeBSD. Peace, david -- David H. Wolfskill da...@catwhisker.org Taliban: Evil men with guns afraid of truth from a 14-year old girl. See http://www.catwhisker.org/~david/publickey.gpg for my public key. pgpL9T9hSlHzm.pgp Description: PGP signature
Re: BHyVe on 10-Current r245673
Hi Gary, On Tue, Jan 29, 2013 at 6:15 AM, G B g_patri...@yahoo.com wrote: I am using FreeBSD 10-Current r245673 as a host on an HP p2-1394. I have the host OS installed on 1 drive using UFS and a second drive using ZFS with a pool named 'tank.' They layout for zfs for my guest install is /tank/guest01. When using the command: # bhyveload -d /tmp/FreeBSD-9.1-RELEASE-amd64-disk1.iso -m 512 -h /tank/guest01 guest01 bhyve -c 2 -a -A -m 512 -g 0 -P -H -s 1,virtio-net,tap0 -s 2,virtio-blk,diskdev guest01 sleep 20 ifconfig tap0 up I get the boot screen for FreeBSD 9.1 and after the timed pause it fails with: Could not open backing file: No such file or directory ACPI tables require and ioapic Assertion failed: (error == 0), function main, file /usr/src/usr.sbin/bhyve/bhyverun.c, line 774. Abort (core dumped) root@localhost:/tmp# I am using the bhyveload comamnd from a PDF I found from BSDCan but when I used the -m 768 -M 1024 as used in the doc it failed with a syntax error, so I switched to using just -m 512. My .iso is in /tmp as indicated in my command with '-d'. I'm guessing my command is wrong, but not sure where. Any help would be appreciated. Can you try out the following instructions to get you started? http://people.freebsd.org/~neel/bhyve/bhyve_instructions.txt The script that I use is pretty basic and has less bells and whistles than other howto guides out there. But that makes it easier to figure out what is happening under the hood. best Neel Thanks, Gary ___ 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
[CFT] WITH_BSD_PATCH
(Not sure the first announcement made it - Sorry if you get this twice) Fellow FreeBSD developers; As many of you may have noticed as of r246074 we have a new version of patch(1) in the tree! The brief history is this: - Larry Wall developed the first patch(1) implementation which was taken by the FSF and greatly enhanced into what today is GNU patch. - FreeBSD has been using an early version of GNU patch (2.1) and made some relatively small enhancements on it. Two of the files in FreeBSD are under the GPL. -OpenBSD took a very old version of patch (2.0) and started from there. The GPL'd files were replaced with PD or otherwise unrestricted versions. - The OpenBSD version was ported to DragonFly BSD and after further enhancements the DF version was also adopted by NetBSD. I took the DragonFly version and back-ported some of the changes that we had in the FreeBSD version. As a result the new BSD patch that is available as an option in the tree covers most of the functionality of the patch in FreeBSD with two exceptions: -I and -S. Both options seem to be obsolete and don't seem to be used in ports. Furthermore GNU and BSD patch already uses -I to ignore white spaces. The new version is expected to be a complete replacement for our previous GNU patch but has only been lightly tested. Please test extensively, report bugs, and submit patches. We would love to use the new patch by default in 10.0 but only testing will let us know when it's ready. Special thanks to: Christoph Mallon - for porting the perforce diff support. Gabor Kovesdan - for doing the import since he has experience bringing these jewels into tree :). Enjoy! Pedro. On 01/29/2013 12:03, Gabor Kovesdan wrote: Author: gabor Date: Tue Jan 29 17:03:18 2013 New Revision: 246074 URL: http://svnweb.freebsd.org/changeset/base/246074 Log: - Add a BSD-licensed patch, ported by Pedro F. Giffuni (pfg) from DragonflyBSD and install it as bsdpatch. WITH_BSD_PATCH makes it default and installs GNU patch as gnupatch. Submitted by:pfg Obtained from: The DragonflyBSD Project Added: head/tools/build/options/WITH_BSD_PATCH (contents, props changed) head/usr.bin/patch/ head/usr.bin/patch/Makefile (contents, props changed) head/usr.bin/patch/backupfile.c (contents, props changed) head/usr.bin/patch/backupfile.h (contents, props changed) head/usr.bin/patch/common.h (contents, props changed) head/usr.bin/patch/inp.c (contents, props changed) head/usr.bin/patch/inp.h (contents, props changed) head/usr.bin/patch/mkpath.c (contents, props changed) head/usr.bin/patch/patch.1 (contents, props changed) head/usr.bin/patch/patch.c (contents, props changed) head/usr.bin/patch/pathnames.h (contents, props changed) head/usr.bin/patch/pch.c (contents, props changed) head/usr.bin/patch/pch.h (contents, props changed) head/usr.bin/patch/util.c (contents, props changed) head/usr.bin/patch/util.h (contents, props changed) Modified: head/UPDATING head/gnu/usr.bin/patch/Makefile head/share/mk/bsd.own.mk head/usr.bin/Makefile ___ 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: mounting root from NFS via ROOTDEVNAME
On Tue, Jan 29, 2013 at 1:17 AM, Eggert, Lars l...@netapp.com wrote: On Jan 29, 2013, at 10:13, Lars Eggert l...@netapp.com wrote: On Jan 29, 2013, at 9:34, Craig Rodrigues rodr...@crodrigues.org wrote: I had read both before, and they're very useful documents. Unfortunately, they don't fully apply to my case, since I'm not PXE-booting the system; it netboots the kernel from a custom loader. So once the kernel bootstraps, I need it to obtain an IP address and then NFS-mount root. Hi, What kind of architecture are you trying to do this on? Is this i386/amd64 or something else? I am not familiar with netboot compared to PXE. Is TFTP involved at all with netboot? What does your dhcpd configuration file look like? Also, are you using the FreeBSD loader, or something else? What kinds of customizations have you done on the loader? If through your setup you have already managed to load the kernel over the network, then a lot of the hard work has been done. Telling the kernel where the root file system is located becomes the next tricky part. In src/sys/boot/common/boot.c which is part of the loader (not the kernel), if you look in the getrootmount() function, you will see that the loader will try to figure out where the root file system is by parsing /etc/fstab, and looking for the / mount. So, if your kernel is located in: /usr/home/elars/dst/boot/kernel/kernel Then create a file /usr/home/elars/dst/etc/fstab file with something like: # Device MountpointFSType Options Dump Pass 10.11.12.13:/usr/home/elars/dst/ / nfs ro00 Alternatively, if you don't want to create an /etc/fstab file, then you could put something like this in your loader.conf file: vfs.root.mountfrom=nfs:10.11.12.13:/usr/home/elars/dst If you can get this to work without introducing new kernel options, that would be ideal, because the kernel options you are enabling are triggering behaviors. -- Craig Rodrigues rodr...@crodrigues.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: x220 notes
On Wed, Mar 14, 2012 at 11:15 PM, Hannes Mehnert han...@mehnert.org wrote: Ciao, On 03/14/2012 00:38, matt wrote: I have brightness control through raw acpi...\_BCL and friends seem to do nothing. Most of the video methods differentiate between \VIGD (which seems to be a check for integrated graphics vs optimus, but that's still a guess) If \VIGD is true, brightness commands are sent to the EC, where they don't seem to do much yet. This is probably where we could enable something via EC/ibm-acpi? If \VIGD is false, brightness commands are handled in ACPI, although coarsely, via \VBRC. \VBRC seems to allow control over the backlight, at least, so those of you with sore eyes or the 3-cell battery may have some success using the acpi_call port (Danger!) kldload acpi_call acpi_call -p '\VBRC' -i n (where n is 0-10) Great news! Works for me. n is actually 0-16 (plus any other value which turns the backlight off (-1 or 17 eg). Thanks, Hannes Thanks, acpi_call -p '\VBRC' -i n [0-15] work fine, if set 17 black screen :) And other problems. 1) wi-fi standart rtl8192cu - not work change AR5B95 - work n-mode (thanks Adrian Chadd :) need hack BIOS dev.acpi_ibm.0.wlan: 1 - read only hardware switch work, not send mesage 2) sound # cat /dev/sndstat FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64) Installed devices: pcm0: Conexant CX20590 (Analog) (play/rec) pcm1: Conexant CX20590 (Analog) (play/rec) default pcm2: Intel Cougar Point (HDMI/DP 8ch) (play) pcm3: Intel Cougar Point (HDMI/DP 8ch) (play) pcm4: Intel Cougar Point (HDMI/DP 8ch) (play) sound headphones only, if set sysctl hw.snd.default_unit=0 and restart application, on's speakers (if remove headphones). Automatic switching possible? 2.2) sound control in mplayer automatic fine work multimedia key multimedia key and system mixer, and sysctl not work xev data VolUP, VolDn, mute (release event similar) KeyPress event, serial 27, synthetic NO, window 0x1e1, root 0x120, subw 0x0, time 210234226, (623,634), root:(623,650), state 0x10, keycode 176 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 27, synthetic NO, window 0x1e1, root 0x120, subw 0x0, time 210235273, (623,634), root:(623,650), state 0x10, keycode 174 (keysym 0x1008ff11, XF86AudioLowerVolume), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 27, synthetic NO, window 0x1e1, root 0x120, subw 0x0, time 210241638, (623,634), root:(623,650), state 0x10, keycode 140 (keysym 0x0, NoSymbol), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False 3) ACPI work poorly 191 0x81f01000 37c7 acpi_video.ko 201 0x81f05000 330f acpi_ibm.ko 211 0x81f09000 1fc acpi_call.ko # sysctl -a | grep ibm acpi_ibm0: IBM ThinkPad ACPI Extras on acpi0 acpi_ibm0: detached acpi_ibm0: IBM ThinkPad ACPI Extras on acpi0 dev.acpi_ibm.0.%desc: IBM ThinkPad ACPI Extras dev.acpi_ibm.0.%driver: acpi_ibm dev.acpi_ibm.0.%location: handle=\_SB_.PCI0.LPC_.EC__.HKEY dev.acpi_ibm.0.%pnpinfo: _HID=LEN0068 _UID=0 dev.acpi_ibm.0.%parent: acpi0 dev.acpi_ibm.0.initialmask: 2060 dev.acpi_ibm.0.availmask: 134217727 dev.acpi_ibm.0.events: 1 dev.acpi_ibm.0.eventmask: 134217727 dev.acpi_ibm.0.hotkey: 3353 dev.acpi_ibm.0.lcd_brightness: 0 - not work dev.acpi_ibm.0.volume: 0 - not work dev.acpi_ibm.0.mute: 0 - not work dev.acpi_ibm.0.thinklight: 0 - work fine :) dev.acpi_ibm.0.bluetooth: 0 - work LED (bt not use, not test) dev.acpi_ibm.0.wlan: 1 - read only dev.acpi_ibm.0.fan_speed: 3880 - not work or read only dev.acpi_ibm.0.fan_level: 0 dev.acpi_ibm.0.fan: 1 LED HDD may be work blink infrequently SSD :) 3) video work acceptable WITH_NEW_XORG=true WITH_KMS=true from terminal adjustable brightness acpi_call -p '\VBRC' -i n [0-15] I would like to consolidate these actions on the standard key # cat /var/run/devd.pipe !system=ACPI subsystem=IBM type=\_SB_.PCI0.LPC_.EC__.HKEY notify=0x10 ( Fn+Home) !system=ACPI subsystem=IBM type=\_SB_.PCI0.LPC_.EC__.HKEY notify=0x11 (Fn+End) 4) mouse Xorg with out config standard trackpad and other work fine if hook up USB mouse not work Jan 27 17:53:23 x220 kernel: ugen1.3: A4Tech at usbus1 Jan 27 17:53:23 x220 kernel: ums0: A4Tech USB Mouse, class 0/0, rev 1.10/0.14, addr 3 on usbus1 Jan 27 17:53:23 x220 kernel: ums0: 8 buttons and [XYZ] coordinates ID=0 and disconnect Jan 27 17:53:42 x220 kernel: ugen1.3: A4Tech at usbus1 (disconnected) Jan 27 17:53:42 x220 kernel: ums0: at uhub3, port 2, addr 3 (disconnected) 5) suspend/resume not test while, if there is a manual will be grateful Trick, to work without xorg.conf :) # cat /home/andrey/.xsession /usr/local/bin/xset +fp /usr/local/lib/X11/fonts/terminus-font/ - need some applications xkbset -b
Re: Fast gettimeofday(2) and static linking
On Mon, Jan 28, 2013 at 05:55:24PM +0200, Konstantin Belousov wrote: On Mon, Jan 28, 2013 at 04:45:17PM +0100, Marius Strobl wrote: On Fri, Jan 25, 2013 at 02:35:54PM +0200, Konstantin Belousov wrote: Bruce Evans reported that statically linked binaries on HEAD an stable/9 use the syscall for gettimeofday(2) and clock_gettime(2). Apparently, this is due to my use of the weak reference to the __vdso* symbols in the libc implementations. Patch below reworks the __vdso* attributes to only make the symbols weak, but keep the references strong. Since I have to add a stub for each architecture, I would like to ask non-x86 machines owners to test the patch. Hi Konstantin, what's the appropriate way to test this? Please rebuild the world with the patch and check that gettimeofday(2) still works on your architecture, both for the static and dynamic binaries. I think that just booting multiuser is enough. Okay, looks good on sparc64 (tested with a dynamically as well as a statically built time(1)). Marius ___ 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
Missing compile_et and kerberos breaks buildworld
Hi, Is there any way to fix this issue? This issue happens when I compile world without KRB then re-enable again for second compilation. I have to disable KRB with WITHOUT_KERBEROS=yes for me to compile the world :-( Regards, Alie T ___ 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: Fast gettimeofday(2) and static linking
On Tue, Jan 29, 2013 at 11:16:00PM +0100, Marius Strobl wrote: On Mon, Jan 28, 2013 at 05:55:24PM +0200, Konstantin Belousov wrote: Please rebuild the world with the patch and check that gettimeofday(2) still works on your architecture, both for the static and dynamic binaries. I think that just booting multiuser is enough. Okay, looks good on sparc64 (tested with a dynamically as well as a statically built time(1)). Thank you very much. pgpiVhtGb1QVT.pgp Description: PGP signature
FreeBSD 9.1 - not work IPMI
srv3# dmesg -a | grep -i ipmi ipmi0: IPMI System Interface on isa0 ipmi0: KCS mode found at io 0xca2 alignment 0x1 on isa ipmi0: Timed out waiting for GET_DEVICE_ID srv3# ll /dev/ipmi* ls: No match. srv3# srv3# uname -a FreeBSD srv3.host-food.ru 9.1-RELEASE FreeBSD 9.1-RELEASE #0: Wed Dec 5 04:53:34 MSK 2012 t...@srv3.host-food.ru:/usr/obj/usr/src/sys/HOST-FOOD amd64 srv3# not work on HP Proliant DL165 G7, SuperMicro AS-1022G-URF work on Tyan B8236G24W4HR-IL before update, on 8.3, it work on all ___ 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