Re: [CFT] Paravirtualized KVM clock

2015-01-21 Thread Peter Jeremy
On 2015-Jan-04 11:56:14 -0600, Bryan Venteicher bry...@daemoninthecloset.org 
wrote:
For the last few weeks, I've been working on adding support for KVM clock
in the projects/paravirt branch. Currently, a KVM VM guest will end up
selecting either the HPET or ACPI as the timecounter source. Unfortunately,
this is very costly since every timecounter fetch causes a VM exit. KVM
clock allows the guest to use the TSC instead; it is very similar to the
existing Xen timer.

A somewhat late response but have you looked at
https://github.com/blitz/freebsd/commit/cdc5f872b3e48cc0dda031fc7d6bdedc65c3148f
I've been running this[*] on a Google Compute Engine instance for about 6
months without problems.

[*] I had to patch out the test for KVM_FEATURE_CLOCKSOURCE_STABLE_BIT but
I think that's a GCE issue.

-- 
Peter Jeremy


pgpi9_M8QUFuE.pgp
Description: PGP signature


panic in pmap_remove_pages()

2015-01-21 Thread Steve Kargl
Just got this panic.  If anyone is interested I have the
kenrel and core, so can do some additional poking around.

troutmask.apl.washington.edu dumped core - see /var/crash/vmcore.0

Wed Jan 21 13:28:04 PST 2015

FreeBSD troutmask.apl.washington.edu 11.0-CURRENT FreeBSD 11.0-CURRENT #7 
r276378M: Mon Dec 29 14:13:57 PST 2014 
ka...@troutmask.apl.washington.edu:/data/obj/usr/src/sys/SPEW  amd64

panic: general protection fault

Unread portion of the kernel message buffer:

Fatal trap 9: general protection fault while in kernel mode
cpuid = 3; apic id = 13
instruction pointer = 0x20:0x8079abf9
stack pointer   = 0x28:0xfe047325e360
frame pointer   = 0x28:0xfe047325e440
code segment= base 0x0, limit 0xf, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags= interrupt enabled, resume, IOPL = 0
current process = 41779 (z)
trap number = 9
panic: general protection fault
cpuid = 3
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfe047325e020
panic() at panic+0x1c1/frame 0xfe047325e0e0
trap_fatal() at trap_fatal+0x396/frame 0xfe047325e140
trap() at trap+0x6ce/frame 0xfe047325e2a0
calltrap() at calltrap+0x8/frame 0xfe047325e2a0
--- trap 0x9, rip = 0x8079abf9, rsp = 0xfe047325e360, rbp = 
0xfe047325e440 ---
pmap_remove_pages() at pmap_remove_pages+0x539/frame 0xfe047325e440
exec_new_vmspace() at exec_new_vmspace+0x180/frame 0xfe047325e4a0
exec_elf64_imgact() at exec_elf64_imgact+0x6c0/frame 0xfe047325e570
kern_execve() at kern_execve+0x484/frame 0xfe047325e8c0
sys_execve() at sys_execve+0x35/frame 0xfe047325e920
amd64_syscall() at amd64_syscall+0x289/frame 0xfe047325ea30
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfe047325ea30
--- syscall (59, FreeBSD ELF64, sys_execve), rip = 0x4251ba, rsp = 
0x7e8ebab8, rbp = 0x7e8ec1c0 ---
Uptime: 22d22h22m46s

#0  doadump (textdump=1) at pcpu.h:219
219 pcpu.h: No such file or directory.
in pcpu.h
(kgdb) #0  doadump (textdump=1) at pcpu.h:219
#1  0x80555bd7 in kern_reboot (howto=260)
at /usr/src/sys/kern/kern_shutdown.c:447
#2  0x80556040 in panic (fmt=value optimized out)
at /usr/src/sys/kern/kern_shutdown.c:746
#3  0x807a2986 in trap_fatal (frame=value optimized out, 
eva=value optimized out) at /usr/src/sys/amd64/amd64/trap.c:867
#4  0x807a25de in trap (frame=value optimized out)
at /usr/src/sys/amd64/amd64/trap.c:201
#5  0x80787ca3 in calltrap ()
at /usr/src/sys/amd64/amd64/exception.S:235
#6  0x8079abf9 in pmap_remove_pages (pmap=0xf801c627dec8)
at /usr/src/sys/amd64/amd64/pmap.c:5389
#7  0x8051fa00 in exec_new_vmspace (imgp=0xfe047325e6e0, 
sv=0x80b3e8e8) at /usr/src/sys/kern/kern_exec.c:1036
#8  0x804fed20 in exec_elf64_imgact (imgp=0xfe047325e6e0)
at /usr/src/sys/kern/imgact_elf.c:830
#9  0x8051e4f4 in kern_execve (td=0xf8027588f490, 
args=0xfe047325e8d8, mac_p=0x1da) at /usr/src/sys/kern/kern_exec.c:486
#10 0x8051de15 in sys_execve (td=value optimized out, 
uap=value optimized out) at /usr/src/sys/kern/kern_exec.c:210
#11 0x807a3199 in amd64_syscall (td=0xf8027588f490, traced=0)
at subr_syscall.c:133
#12 0x80787f8b in Xfast_syscall ()
at /usr/src/sys/amd64/amd64/exception.S:395
#13 0x004251ba in ?? ()

-- 
Steve
___
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: [CFT] Paravirtualized KVM clock

2015-01-21 Thread Bryan Venteicher
On Wed, Jan 21, 2015 at 3:15 PM, Peter Jeremy pe...@rulingia.com wrote:

 On 2015-Jan-04 11:56:14 -0600, Bryan Venteicher 
 bry...@daemoninthecloset.org wrote:
 For the last few weeks, I've been working on adding support for KVM clock
 in the projects/paravirt branch. Currently, a KVM VM guest will end up
 selecting either the HPET or ACPI as the timecounter source.
 Unfortunately,
 this is very costly since every timecounter fetch causes a VM exit. KVM
 clock allows the guest to use the TSC instead; it is very similar to the
 existing Xen timer.

 A somewhat late response but have you looked at

 https://github.com/blitz/freebsd/commit/cdc5f872b3e48cc0dda031fc7d6bdedc65c3148f
 I've been running this[*] on a Google Compute Engine instance for about 6
 months without problems.


A goal of my work was to put a bit of infrastructure in place so FreeBSD
can support pvops across a variety of hypervisors. KVMCLOCK happens to be
about the easiest to implement, and has a decent performance win for many
situations.

I think that commit is broken on SMP guests: CPU_FOREACH() does not switch
the current CPU, so it just keeps writing to the MSR on the BSP.

[*] I had to patch out the test for KVM_FEATURE_CLOCKSOURCE_STABLE_BIT but
 I think that's a GCE issue.

 --
 Peter Jeremy

___
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


logged errors with current drm stuff

2015-01-21 Thread Adrian Chadd
Hi!

I'm seeing this with your patch now:

error: [drm:pid5:i915_gem_object_unbind] *ERROR* Attempting to unbind
pinned buffer

Nothing seems to be problematic at the moment; but it does seem to
happen quite frequently.

Any ideas?



-adrian
___
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: Head not buildin in zfs.c

2015-01-21 Thread Willem Jan Withagen

On 2015-01-21 11:08, Garrett Cooper wrote:

On Jan 21, 2015, at 2:05, Willem Jan Withagen w...@digiware.nl wrote:


On 2015-01-21 10:51, Benjamin Perrault wrote:



On Jan 21, 2015, at 1:34 AM, Willem Jan Withagen w...@digiware.nl
wrote:


Found this lastnight build. Just fetched the most recent HEAD.
Error remains

--- zfs/zfs.o --- In file included from
/usr/srcs/src11/src/lib/libprocstat/zfs/../zfs.c:39:
/usr/srcs/src11/src/lib/libprocstat/zfs/../../../cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h:538:9:
error: 'NSEC_TO_TICK' macro redefined [-Werror,-Wmacro-redefined]
#define NSEC_TO_TICK(usec)  ((usec) / (NANOSEC / hz)) ^
/usr/srcs/src11/src/lib/libprocstat/zfs/../../../sys/cddl/compat/opensolaris/sys/time.h:54:9:
note: previous definition is here #define NSEC_TO_TICK(nsec)
((nsec) / (NANOSEC / hz)) ^ /etc/{make,src}.conf are empty




I’m seeing the exact same issue. It began for me at r277472 and is
still persisting as of r277482 ( the most recent HEAD as of writing
this email ).


Well, the problem is reported several times during compilation.
This is the first warning that also has -Werror, and hence building stops.

I have not been able to find where this -Werror all of a sudden pops up.

Has to be in any of those commits...


It’s a mismatch in the macro definitions, made in the commit below.
I’m testing out a fix for it right now.
Thanks for the report!


r277449 | will | 2015-01-20 14:29:27 -0800 (Tue, 20 Jan 2015) | 2 lines

NSEC_TO_TICK(usec) - NSEC_TO_TICK(nsec)



Right, picky nasty compilers being fussy. ;)

I did in look in the svn log of both .h files, but overlooked what you 
just found. Need more coffee.


I'll be waiting the the fix in the tree..

Thanx,
--WjW

___
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: Head not buildin in zfs.c

2015-01-21 Thread Garrett Cooper
On Jan 21, 2015, at 2:17, Willem Jan Withagen w...@digiware.nl wrote:

…

 Right, picky nasty compilers being fussy. ;)
 
 I did in look in the svn log of both .h files, but overlooked what you just 
 found. Need more coffee.
 
 I'll be waiting the the fix in the tree..

Fixed in r277484 — thanks!


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: Head not buildin in zfs.c

2015-01-21 Thread Willem Jan Withagen

On 2015-01-21 10:51, Benjamin Perrault wrote:



On Jan 21, 2015, at 1:34 AM, Willem Jan Withagen w...@digiware.nl
wrote:


Found this lastnight build. Just fetched the most recent HEAD.
Error remains

--- zfs/zfs.o --- In file included from
/usr/srcs/src11/src/lib/libprocstat/zfs/../zfs.c:39:
/usr/srcs/src11/src/lib/libprocstat/zfs/../../../cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h:538:9:
error: 'NSEC_TO_TICK' macro redefined [-Werror,-Wmacro-redefined]
#define NSEC_TO_TICK(usec)  ((usec) / (NANOSEC / hz)) ^
/usr/srcs/src11/src/lib/libprocstat/zfs/../../../sys/cddl/compat/opensolaris/sys/time.h:54:9:
note: previous definition is here #define NSEC_TO_TICK(nsec)
((nsec) / (NANOSEC / hz)) ^ /etc/{make,src}.conf are empty




I’m seeing the exact same issue. It began for me at r277472 and is
still persisting as of r277482 ( the most recent HEAD as of writing
this email ).


Well, the problem is reported several times during compilation.
This is the first warning that also has -Werror, and hence building stops.

I have not been able to find where this -Werror all of a sudden pops up.

Has to be in any of those commits...

--WjW

___
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: Head not buildin in zfs.c

2015-01-21 Thread Garrett Cooper
On Jan 21, 2015, at 2:05, Willem Jan Withagen w...@digiware.nl wrote:

 On 2015-01-21 10:51, Benjamin Perrault wrote:
 
 On Jan 21, 2015, at 1:34 AM, Willem Jan Withagen w...@digiware.nl
 wrote:
 
 
 Found this lastnight build. Just fetched the most recent HEAD.
 Error remains
 
 --- zfs/zfs.o --- In file included from
 /usr/srcs/src11/src/lib/libprocstat/zfs/../zfs.c:39:
 /usr/srcs/src11/src/lib/libprocstat/zfs/../../../cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h:538:9:
 error: 'NSEC_TO_TICK' macro redefined [-Werror,-Wmacro-redefined]
 #define NSEC_TO_TICK(usec)  ((usec) / (NANOSEC / hz)) ^
 /usr/srcs/src11/src/lib/libprocstat/zfs/../../../sys/cddl/compat/opensolaris/sys/time.h:54:9:
 note: previous definition is here #define NSEC_TO_TICK(nsec)
 ((nsec) / (NANOSEC / hz)) ^ /etc/{make,src}.conf are empty
 
 
 I’m seeing the exact same issue. It began for me at r277472 and is
 still persisting as of r277482 ( the most recent HEAD as of writing
 this email ).
 
 Well, the problem is reported several times during compilation.
 This is the first warning that also has -Werror, and hence building stops.
 
 I have not been able to find where this -Werror all of a sudden pops up.
 
 Has to be in any of those commits...

It’s a mismatch in the macro definitions, made in the commit below.
I’m testing out a fix for it right now.
Thanks for the report!


r277449 | will | 2015-01-20 14:29:27 -0800 (Tue, 20 Jan 2015) | 2 lines

NSEC_TO_TICK(usec) - NSEC_TO_TICK(nsec)


signature.asc
Description: Message signed with OpenPGP using GPGMail


Head not buildin in zfs.c

2015-01-21 Thread Willem Jan Withagen


Found this lastnight build.
Just fetched the most recent HEAD.
Error remains

--- zfs/zfs.o ---
In file included from /usr/srcs/src11/src/lib/libprocstat/zfs/../zfs.c:39:
/usr/srcs/src11/src/lib/libprocstat/zfs/../../../cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h:538:9: 
error: 'NSEC_TO_TICK' macro redefined [-Werror,-Wmacro-redefined]

#define NSEC_TO_TICK(usec)  ((usec) / (NANOSEC / hz))
^
/usr/srcs/src11/src/lib/libprocstat/zfs/../../../sys/cddl/compat/opensolaris/sys/time.h:54:9: 
note: previous definition is here

#define NSEC_TO_TICK(nsec)  ((nsec) / (NANOSEC / hz))
^
/etc/{make,src}.conf are empty

--WjW
___
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: Head not buildin in zfs.c

2015-01-21 Thread Benjamin Perrault

 On Jan 21, 2015, at 1:34 AM, Willem Jan Withagen w...@digiware.nl wrote:
 
 
 Found this lastnight build.
 Just fetched the most recent HEAD.
 Error remains
 
 --- zfs/zfs.o ---
 In file included from /usr/srcs/src11/src/lib/libprocstat/zfs/../zfs.c:39:
 /usr/srcs/src11/src/lib/libprocstat/zfs/../../../cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h:538:9:
  error: 'NSEC_TO_TICK' macro redefined [-Werror,-Wmacro-redefined]
 #define NSEC_TO_TICK(usec)  ((usec) / (NANOSEC / hz))
^
 /usr/srcs/src11/src/lib/libprocstat/zfs/../../../sys/cddl/compat/opensolaris/sys/time.h:54:9:
  note: previous definition is here
 #define NSEC_TO_TICK(nsec)  ((nsec) / (NANOSEC / hz))
^
 /etc/{make,src}.conf are empty
 
 --WjW
 ___
 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

I’m seeing the exact same issue. It began for me at r277472 and is still 
persisting as of r277482 ( the most recent HEAD as of writing this email ).

cheers and thanks,
-bp
___
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: Head not buildin in zfs.c

2015-01-21 Thread Will Andrews
On Wed, Jan 21, 2015 at 02:47:57AM -0800, Garrett Cooper wrote:
 On Jan 21, 2015, at 2:17, Willem Jan Withagen w...@digiware.nl wrote:
 
 …
 
  Right, picky nasty compilers being fussy. ;)
  
  I did in look in the svn log of both .h files, but overlooked what you just 
  found. Need more coffee.
  
  I'll be waiting the the fix in the tree..
 
 Fixed in r277484 — thanks!

Thanks!  Sorry for the noise.

--Will.


pgpdmFn4VHM6f.pgp
Description: PGP signature


LOR with bufwait (bufwait) @ /usr/src/sys/ufs/ffs/ffs_vnops.c:263

2015-01-21 Thread Willem Jan Withagen

Hoi,

Looked at:
http://sources.zabbadoz.net/freebsd/lor.html#howtoreportalor

But did not find any reference to ffs_vnops, so it might be a new one?

I got this from running 'make installworld' of todays HEAD IN a bhyveVM 
which was already running thismornings kernel.

So it was not the Dom0 server, but the actual version running in the VM

FreeBSD-11 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r277423: Wed Jan 21 
09:38:40 UTC 2015 wjw@FreeBSD-11:/usr/obj/usr/src/sys/GENERIC  amd64


--WjW

lock order reversal:
 1st 0xf80009aa2240 ufs (ufs) @ /usr/src/sys/kern/vfs_subr.c:2164
 2nd 0xfe01ea244770 bufwait (bufwait) @ 
/usr/src/sys/ufs/ffs/ffs_vnops.c:263

 3rd 0xf801685dc418 ufs (ufs) @ /usr/src/sys/kern/vfs_subr.c:2164

KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 
0xfe02332ecd60

witness_checkorder() at witness_checkorder+0xe50/frame 0xfe02332ecdf0
__lockmgr_args() at __lockmgr_args+0xacf/frame 0xfe02332ecf20
ffs_lock() at ffs_lock+0x84/frame 0xfe02332ecf70
VOP_LOCK1_APV() at VOP_LOCK1_APV+0xfc/frame 0xfe02332ecfa0
_vn_lock() at _vn_lock+0x8a/frame 0xfe02332ed010
vget() at vget+0x67/frame 0xfe02332ed050
vfs_hash_get() at vfs_hash_get+0xdc/frame 0xfe02332ed0a0
ffs_vgetf() at ffs_vgetf+0x40/frame 0xfe02332ed130
softdep_sync_buf() at softdep_sync_buf+0xa90/frame 0xfe02332ed210
ffs_syncvnode() at ffs_syncvnode+0x259/frame 0xfe02332ed290
ffs_truncate() at ffs_truncate+0x671/frame 0xfe02332ed470
ufs_direnter() at ufs_direnter+0x7d2/frame 0xfe02332ed530
ufs_makeinode() at ufs_makeinode+0x5bf/frame 0xfe02332ed6f0
ufs_symlink() at ufs_symlink+0x32/frame 0xfe02332ed740
VOP_SYMLINK_APV() at VOP_SYMLINK_APV+0xf7/frame 0xfe02332ed770
kern_symlinkat() at kern_symlinkat+0x245/frame 0xfe02332ed9a0
amd64_syscall() at amd64_syscall+0x25a/frame 0xfe02332edab0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfe02332edab0
--- syscall (57, FreeBSD ELF64, sys_symlink), rip = 0x4101ba, rsp = 
0x7ffec3d8, rbp = 0x7ffec800 ---

___
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