PERFORCE change 118147 for review
Scott Long
scottl at FreeBSD.org
Sun Apr 15 08:05:39 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=118147
Change 118147 by scottl at scottl-x64 on 2007/04/15 08:04:53
IFC
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/Makefile#12 integrate
.. //depot/projects/scottl-camlock/src/sys/amd64/amd64/pmap.c#18 integrate
.. //depot/projects/scottl-camlock/src/sys/compat/linux/linux_socket.c#12 integrate
.. //depot/projects/scottl-camlock/src/sys/conf/options#19 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/utmisc.c#6 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/common/atomic/amd64/atomic.S#2 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/common/atomic/i386/atomic.S#2 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/uts/common/fs/dnlc.c#2 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c#3 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/uts/common/fs/zfs/dbuf.c#2 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c#2 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/uts/common/fs/zfs/spa.c#2 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/uts/common/fs/zfs/spa_config.c#2 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h#2 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h#2 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h#2 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c#2 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c#2 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c#2 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c#2 integrate
.. //depot/projects/scottl-camlock/src/sys/contrib/pf/net/if_pfsync.c#12 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/cxgb/cxgb_main.c#2 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/cxgb/cxgb_sge.c#3 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/cxgb/sys/mvec.h#2 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/cxgb/sys/uipc_mvec.c#2 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/msk/if_msk.c#4 integrate
.. //depot/projects/scottl-camlock/src/sys/dev/usb/usbdevs#17 integrate
.. //depot/projects/scottl-camlock/src/sys/fs/pseudofs/pseudofs.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/fs/pseudofs/pseudofs.h#8 integrate
.. //depot/projects/scottl-camlock/src/sys/fs/pseudofs/pseudofs_fileno.c#3 integrate
.. //depot/projects/scottl-camlock/src/sys/fs/pseudofs/pseudofs_internal.h#3 integrate
.. //depot/projects/scottl-camlock/src/sys/fs/pseudofs/pseudofs_vncache.c#6 integrate
.. //depot/projects/scottl-camlock/src/sys/fs/pseudofs/pseudofs_vnops.c#7 integrate
.. //depot/projects/scottl-camlock/src/sys/geom/vinum/geom_vinum.h#5 integrate
.. //depot/projects/scottl-camlock/src/sys/geom/vinum/geom_vinum_rm.c#6 integrate
.. //depot/projects/scottl-camlock/src/sys/geom/vinum/geom_vinum_share.c#3 integrate
.. //depot/projects/scottl-camlock/src/sys/geom/vinum/geom_vinum_subr.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/i386/mp_machdep.c#13 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/i386/pmap.c#19 integrate
.. //depot/projects/scottl-camlock/src/sys/i386/include/pmap.h#13 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/kern_jail.c#11 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/uipc_mbuf.c#12 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/uipc_mqueue.c#9 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/vfs_mount.c#19 integrate
.. //depot/projects/scottl-camlock/src/sys/kern/vfs_subr.c#18 integrate
.. //depot/projects/scottl-camlock/src/sys/net/if_trunk.c#2 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/sctp_constants.h#5 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/sctp_crc32.c#4 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/sctp_indata.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/sctp_input.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/sctp_output.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/sctp_pcb.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/sctp_peeloff.c#4 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/sctp_timer.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/sctp_uio.h#5 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/sctp_usrreq.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/sctp_var.h#4 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/sctputil.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/tcp_input.c#17 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/tcp_output.c#12 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/tcp_sack.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/tcp_subr.c#13 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/tcp_syncache.c#16 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/tcp_timer.c#12 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/tcp_timer.h#8 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/tcp_usrreq.c#15 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet/tcp_var.h#15 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet6/ipsec.c#9 integrate
.. //depot/projects/scottl-camlock/src/sys/netinet6/sctp6_usrreq.c#5 integrate
.. //depot/projects/scottl-camlock/src/sys/rpc/types.h#2 integrate
.. //depot/projects/scottl-camlock/src/sys/security/audit/audit.c#11 integrate
.. //depot/projects/scottl-camlock/src/sys/security/audit/audit.h#5 integrate
.. //depot/projects/scottl-camlock/src/sys/security/audit/audit_arg.c#9 integrate
.. //depot/projects/scottl-camlock/src/sys/security/audit/audit_bsm.c#7 integrate
.. //depot/projects/scottl-camlock/src/sys/security/audit/audit_bsm_token.c#8 integrate
.. //depot/projects/scottl-camlock/src/sys/security/audit/audit_private.h#8 integrate
.. //depot/projects/scottl-camlock/src/sys/security/audit/audit_syscalls.c#9 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/eventhandler.h#6 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/mbuf.h#14 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/mutex.h#12 integrate
.. //depot/projects/scottl-camlock/src/sys/sys/proc.h#16 integrate
Differences ...
==== //depot/projects/scottl-camlock/src/sys/Makefile#12 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/Makefile,v 1.41 2007/03/24 22:21:01 maxim Exp $
+# $FreeBSD: src/sys/Makefile,v 1.42 2007/04/14 16:29:15 maxim Exp $
.include <bsd.own.mk>
@@ -8,10 +8,10 @@
.endif
# Directories to include in cscope name file and TAGS.
-CSCOPEDIRS= cam coda compat conf contrib crypto ddb dev fs geom gnu i4b \
- isa kern libkern modules net net80211 netatalk netatm \
+CSCOPEDIRS= bsm cam coda compat conf contrib crypto ddb dev fs geom gnu \
+ i4b isa kern libkern modules net net80211 netatalk netatm \
netgraph netinet netinet6 netipx netkey netnatm netncp \
- netsmb nfs nfsclient nfs4client rpc pccard pci sys \
+ netsmb nfs nfsclient nfs4client rpc pccard pci security sys \
ufs vm ${ARCHDIR}
ARCHDIR ?= ${MACHINE}
==== //depot/projects/scottl-camlock/src/sys/amd64/amd64/pmap.c#18 (text+ko) ====
@@ -77,7 +77,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.581 2007/03/10 20:26:43 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.582 2007/04/13 16:07:29 alc Exp $");
/*
* Manages physical address maps.
@@ -3261,7 +3261,7 @@
pd_entry_t *pde;
pt_entry_t *pte;
- base = va & PG_FRAME;
+ base = trunc_page(va);
offset = va & PAGE_MASK;
size = roundup(offset + size, PAGE_SIZE);
==== //depot/projects/scottl-camlock/src/sys/compat/linux/linux_socket.c#12 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.72 2007/02/01 13:36:19 kib Exp $");
+__FBSDID("$FreeBSD: src/sys/compat/linux/linux_socket.c,v 1.73 2007/04/14 10:35:09 rwatson Exp $");
/* XXX we use functions that might not exist. */
#include "opt_compat.h"
@@ -1028,6 +1028,16 @@
error = copyin(PTRIN(linux_args.msg), &msg, sizeof(msg));
if (error)
return (error);
+
+ /*
+ * Some Linux applications (ping) define a non-NULL control data
+ * pointer, but a msg_controllen of 0, which is not allowed in the
+ * FreeBSD system call interface. NULL the msg_control pointer in
+ * order to handle this case. This should be checked, but allows the
+ * Linux ping to work.
+ */
+ if (msg.msg_control != NULL && msg.msg_controllen == 0)
+ msg.msg_control = NULL;
error = copyiniov(msg.msg_iov, msg.msg_iovlen, &iov, EMSGSIZE);
if (error)
return (error);
==== //depot/projects/scottl-camlock/src/sys/conf/options#19 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.585 2007/04/04 14:44:15 andre Exp $
+# $FreeBSD: src/sys/conf/options,v 1.586 2007/04/14 20:16:03 kmacy Exp $
#
# On the handling of kernel options
#
@@ -127,6 +127,7 @@
NO_ADAPTIVE_MUTEXES opt_adaptive_mutexes.h
NO_ADAPTIVE_RWLOCKS
NSWBUF_MIN opt_swap.h
+MBUF_PACKET_ZONE_DISABLE opt_global.h
PANIC_REBOOT_WAIT_TIME opt_panic.h
PPC_DEBUG opt_ppc.h
PPC_PROBE_CHIPSET opt_ppc.h
==== //depot/projects/scottl-camlock/src/sys/contrib/dev/acpica/utmisc.c#6 (text+ko) ====
@@ -1295,6 +1295,11 @@
{
va_list args;
+#ifdef _KERNEL
+ /* Temporarily hide too verbose printfs. */
+ if (!bootverbose)
+ return;
+#endif
/*
* Removed ModuleName, LineNumber, and acpica version, not needed
==== //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/common/atomic/amd64/atomic.S#2 (text+ko) ====
@@ -78,52 +78,52 @@
ENTRY(atomic_inc_8_nv)
ALTENTRY(atomic_inc_uchar_nv)
- movb (%rdi), %al
+ movb (%rdi), %al // %al = old value
1:
- leaq 1(%rax), %rcx
+ leaq 1(%rax), %rcx // %cl = new value
lock
- cmpxchgb %cl, (%rdi)
+ cmpxchgb %cl, (%rdi) // try to stick it in
jne 1b
- movzbl %cl, %eax
+ movzbl %cl, %eax // return new value
ret
SET_SIZE(atomic_inc_uchar_nv)
SET_SIZE(atomic_inc_8_nv)
ENTRY(atomic_inc_16_nv)
ALTENTRY(atomic_inc_ushort_nv)
- movw (%rdi), %ax
+ movw (%rdi), %ax // %ax = old value
1:
- leaq 1(%rax), %rcx
+ leaq 1(%rax), %rcx // %cx = new value
lock
- cmpxchgw %cx, (%rdi)
+ cmpxchgw %cx, (%rdi) // try to stick it in
jne 1b
- movzwl %cx, %eax
+ movzwl %cx, %eax // return new value
ret
SET_SIZE(atomic_inc_ushort_nv)
SET_SIZE(atomic_inc_16_nv)
ENTRY(atomic_inc_32_nv)
ALTENTRY(atomic_inc_uint_nv)
- movl (%rdi), %eax
+ movl (%rdi), %eax // %eax = old value
1:
- leaq 1(%rax), %rcx
+ leaq 1(%rax), %rcx // %ecx = new value
lock
- cmpxchgl %ecx, (%rdi)
+ cmpxchgl %ecx, (%rdi) // try to stick it in
jne 1b
- movl %ecx, %eax
+ movl %ecx, %eax // return new value
ret
SET_SIZE(atomic_inc_uint_nv)
SET_SIZE(atomic_inc_32_nv)
ENTRY(atomic_inc_64_nv)
ALTENTRY(atomic_inc_ulong_nv)
- movq (%rdi), %rax
+ movq (%rdi), %rax // %rax = old value
1:
- leaq 1(%rax), %rcx
+ leaq 1(%rax), %rcx // %rcx = new value
lock
- cmpxchgq %rcx, (%rdi)
+ cmpxchgq %rcx, (%rdi) // try to stick it in
jne 1b
- movq %rcx, %rax
+ movq %rcx, %rax // return new value
ret
SET_SIZE(atomic_inc_ulong_nv)
SET_SIZE(atomic_inc_64_nv)
@@ -162,52 +162,52 @@
ENTRY(atomic_dec_8_nv)
ALTENTRY(atomic_dec_uchar_nv)
- movb (%rdi), %al
+ movb (%rdi), %al // %al = old value
1:
- leaq -1(%rax), %rcx
+ leaq -1(%rax), %rcx // %cl = new value
lock
- cmpxchgb %cl, (%rdi)
+ cmpxchgb %cl, (%rdi) // try to stick it in
jne 1b
- movzbl %cl, %eax
+ movzbl %cl, %eax // return new value
ret
SET_SIZE(atomic_dec_uchar_nv)
SET_SIZE(atomic_dec_8_nv)
ENTRY(atomic_dec_16_nv)
ALTENTRY(atomic_dec_ushort_nv)
- movw (%rdi), %ax
+ movw (%rdi), %ax // %ax = old value
1:
- leaq -1(%rax), %rcx
+ leaq -1(%rax), %rcx // %cx = new value
lock
- cmpxchgw %cx, (%rdi)
+ cmpxchgw %cx, (%rdi) // try to stick it in
jne 1b
- movzwl %cx, %eax
+ movzwl %cx, %eax // return new value
ret
SET_SIZE(atomic_dec_ushort_nv)
SET_SIZE(atomic_dec_16_nv)
ENTRY(atomic_dec_32_nv)
ALTENTRY(atomic_dec_uint_nv)
- movl (%rdi), %eax
+ movl (%rdi), %eax // %eax = old value
1:
- leaq -1(%rax), %rcx
+ leaq -1(%rax), %rcx // %ecx = new value
lock
- cmpxchgl %ecx, (%rdi)
+ cmpxchgl %ecx, (%rdi) // try to stick it in
jne 1b
- movl %ecx, %eax
+ movl %ecx, %eax // return new value
ret
SET_SIZE(atomic_dec_uint_nv)
SET_SIZE(atomic_dec_32_nv)
ENTRY(atomic_dec_64_nv)
ALTENTRY(atomic_dec_ulong_nv)
- movq (%rdi), %rax
+ movq (%rdi), %rax // %rax = old value
1:
- leaq -1(%rax), %rcx
+ leaq -1(%rax), %rcx // %rcx = new value
lock
- cmpxchgq %rcx, (%rdi)
+ cmpxchgq %rcx, (%rdi) // try to stick it in
jne 1b
- movq %rcx, %rax
+ movq %rcx, %rax // return new value
ret
SET_SIZE(atomic_dec_ulong_nv)
SET_SIZE(atomic_dec_64_nv)
@@ -278,28 +278,28 @@
ENTRY(atomic_add_8_nv)
ALTENTRY(atomic_add_char_nv)
- movb (%rdi), %al
+ movb (%rdi), %al // %al = old value
1:
movb %sil, %cl
- addb %al, %cl
+ addb %al, %cl // %cl = new value
lock
- cmpxchgb %cl, (%rdi)
+ cmpxchgb %cl, (%rdi) // try to stick it in
jne 1b
- movzbl %cl, %eax
+ movzbl %cl, %eax // return new value
ret
SET_SIZE(atomic_add_char_nv)
SET_SIZE(atomic_add_8_nv)
ENTRY(atomic_add_16_nv)
ALTENTRY(atomic_add_short_nv)
- movw (%rdi), %ax
+ movw (%rdi), %ax // %ax = old value
1:
movw %si, %cx
- addw %ax, %cx
+ addw %ax, %cx // %cx = new value
lock
- cmpxchgw %cx, (%rdi)
+ cmpxchgw %cx, (%rdi) // try to stick it in
jne 1b
- movzwl %cx, %eax
+ movzwl %cx, %eax // return new value
ret
SET_SIZE(atomic_add_short_nv)
SET_SIZE(atomic_add_16_nv)
@@ -336,28 +336,28 @@
ENTRY(atomic_and_8_nv)
ALTENTRY(atomic_and_uchar_nv)
- movb (%rdi), %al
+ movb (%rdi), %al // %al = old value
1:
movb %sil, %cl
- andb %al, %cl
+ andb %al, %cl // %cl = new value
lock
- cmpxchgb %cl, (%rdi)
+ cmpxchgb %cl, (%rdi) // try to stick it in
jne 1b
- movzbl %cl, %eax
+ movzbl %cl, %eax // return new value
ret
SET_SIZE(atomic_and_uchar_nv)
SET_SIZE(atomic_and_8_nv)
ENTRY(atomic_and_16_nv)
ALTENTRY(atomic_and_ushort_nv)
- movw (%rdi), %ax
+ movw (%rdi), %ax // %ax = old value
1:
movw %si, %cx
- andw %ax, %cx
+ andw %ax, %cx // %cx = new value
lock
- cmpxchgw %cx, (%rdi)
+ cmpxchgw %cx, (%rdi) // try to stick it in
jne 1b
- movzwl %cx, %eax
+ movzwl %cx, %eax // return new value
ret
SET_SIZE(atomic_and_ushort_nv)
SET_SIZE(atomic_and_16_nv)
@@ -392,28 +392,28 @@
ENTRY(atomic_or_8_nv)
ALTENTRY(atomic_or_uchar_nv)
- movb (%rdi), %al
+ movb (%rdi), %al // %al = old value
1:
movb %sil, %cl
- orb %al, %cl
+ orb %al, %cl // %cl = new value
lock
- cmpxchgb %cl, (%rdi)
+ cmpxchgb %cl, (%rdi) // try to stick it in
jne 1b
- movzbl %cl, %eax
+ movzbl %cl, %eax // return new value
ret
SET_SIZE(atomic_and_uchar_nv)
SET_SIZE(atomic_and_8_nv)
ENTRY(atomic_or_16_nv)
ALTENTRY(atomic_or_ushort_nv)
- movw (%rdi), %ax
+ movw (%rdi), %ax // %ax = old value
1:
movw %si, %cx
- orw %ax, %cx
+ orw %ax, %cx // %cx = new value
lock
- cmpxchgw %cx, (%rdi)
+ cmpxchgw %cx, (%rdi) // try to stick it in
jne 1b
- movzwl %cx, %eax
+ movzwl %cx, %eax // return new value
ret
SET_SIZE(atomic_or_ushort_nv)
SET_SIZE(atomic_or_16_nv)
@@ -527,7 +527,7 @@
lock
btsq %rsi, (%rdi)
jnc 1f
- decl %eax
+ decl %eax // return -1
1:
ret
SET_SIZE(atomic_set_long_excl)
@@ -537,7 +537,7 @@
lock
btrq %rsi, (%rdi)
jc 1f
- decl %eax
+ decl %eax // return -1
1:
ret
SET_SIZE(atomic_clear_long_excl)
==== //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/common/atomic/i386/atomic.S#2 (text+ko) ====
@@ -75,28 +75,28 @@
ENTRY(atomic_inc_8_nv)
ALTENTRY(atomic_inc_uchar_nv)
- movl 4(%esp), %edx
- movb (%edx), %al
+ movl 4(%esp), %edx // %edx = target address
+ movb (%edx), %al // %al = old value
1:
- leal 1(%eax), %ecx
+ leal 1(%eax), %ecx // %cl = new value
lock
- cmpxchgb %cl, (%edx)
+ cmpxchgb %cl, (%edx) // try to stick it in
jne 1b
- movzbl %cl, %eax
+ movzbl %cl, %eax // return new value
ret
SET_SIZE(atomic_inc_uchar_nv)
SET_SIZE(atomic_inc_8_nv)
ENTRY(atomic_inc_16_nv)
ALTENTRY(atomic_inc_ushort_nv)
- movl 4(%esp), %edx
- movw (%edx), %ax
+ movl 4(%esp), %edx // %edx = target address
+ movw (%edx), %ax // %ax = old value
1:
- leal 1(%eax), %ecx
+ leal 1(%eax), %ecx // %cx = new value
lock
- cmpxchgw %cx, (%edx)
+ cmpxchgw %cx, (%edx) // try to stick it in
jne 1b
- movzwl %cx, %eax
+ movzwl %cx, %eax // return new value
ret
SET_SIZE(atomic_inc_ushort_nv)
SET_SIZE(atomic_inc_16_nv)
@@ -104,14 +104,14 @@
ENTRY(atomic_inc_32_nv)
ALTENTRY(atomic_inc_uint_nv)
ALTENTRY(atomic_inc_ulong_nv)
- movl 4(%esp), %edx
- movl (%edx), %eax
+ movl 4(%esp), %edx // %edx = target address
+ movl (%edx), %eax // %eax = old value
1:
- leal 1(%eax), %ecx
+ leal 1(%eax), %ecx // %ecx = new value
lock
- cmpxchgl %ecx, (%edx)
+ cmpxchgl %ecx, (%edx) // try to stick it in
jne 1b
- movl %ecx, %eax
+ movl %ecx, %eax // return new value
ret
SET_SIZE(atomic_inc_ulong_nv)
SET_SIZE(atomic_inc_uint_nv)
@@ -121,20 +121,20 @@
ALTENTRY(atomic_inc_64_nv)
pushl %edi
pushl %ebx
- movl 12(%esp), %edi
+ movl 12(%esp), %edi // %edi = target address
movl (%edi), %eax
- movl 4(%edi), %edx
+ movl 4(%edi), %edx // %edx:%eax = old value
1:
xorl %ebx, %ebx
xorl %ecx, %ecx
- incl %ebx
+ incl %ebx // %ecx:%ebx = 1
addl %eax, %ebx
- adcl %edx, %ecx
+ adcl %edx, %ecx // add in the carry from inc
lock
- cmpxchg8b (%edi)
+ cmpxchg8b (%edi) // try to stick it in
jne 1b
movl %ebx, %eax
- movl %ecx, %edx
+ movl %ecx, %edx // return new value
popl %ebx
popl %edi
ret
@@ -172,28 +172,28 @@
ENTRY(atomic_dec_8_nv)
ALTENTRY(atomic_dec_uchar_nv)
- movl 4(%esp), %edx
- movb (%edx), %al
+ movl 4(%esp), %edx // %edx = target address
+ movb (%edx), %al // %al = old value
1:
- leal -1(%eax), %ecx
+ leal -1(%eax), %ecx // %cl = new value
lock
- cmpxchgb %cl, (%edx)
+ cmpxchgb %cl, (%edx) // try to stick it in
jne 1b
- movzbl %cl, %eax
+ movzbl %cl, %eax // return new value
ret
SET_SIZE(atomic_dec_uchar_nv)
SET_SIZE(atomic_dec_8_nv)
ENTRY(atomic_dec_16_nv)
ALTENTRY(atomic_dec_ushort_nv)
- movl 4(%esp), %edx
- movw (%edx), %ax
+ movl 4(%esp), %edx // %edx = target address
+ movw (%edx), %ax // %ax = old value
1:
- leal -1(%eax), %ecx
+ leal -1(%eax), %ecx // %cx = new value
lock
- cmpxchgw %cx, (%edx)
+ cmpxchgw %cx, (%edx) // try to stick it in
jne 1b
- movzwl %cx, %eax
+ movzwl %cx, %eax // return new value
ret
SET_SIZE(atomic_dec_ushort_nv)
SET_SIZE(atomic_dec_16_nv)
@@ -201,14 +201,14 @@
ENTRY(atomic_dec_32_nv)
ALTENTRY(atomic_dec_uint_nv)
ALTENTRY(atomic_dec_ulong_nv)
- movl 4(%esp), %edx
- movl (%edx), %eax
+ movl 4(%esp), %edx // %edx = target address
+ movl (%edx), %eax // %eax = old value
1:
- leal -1(%eax), %ecx
+ leal -1(%eax), %ecx // %ecx = new value
lock
- cmpxchgl %ecx, (%edx)
+ cmpxchgl %ecx, (%edx) // try to stick it in
jne 1b
- movl %ecx, %eax
+ movl %ecx, %eax // return new value
ret
SET_SIZE(atomic_dec_ulong_nv)
SET_SIZE(atomic_dec_uint_nv)
@@ -218,21 +218,21 @@
ALTENTRY(atomic_dec_64_nv)
pushl %edi
pushl %ebx
- movl 12(%esp), %edi
+ movl 12(%esp), %edi // %edi = target address
movl (%edi), %eax
- movl 4(%edi), %edx
+ movl 4(%edi), %edx // %edx:%eax = old value
1:
xorl %ebx, %ebx
xorl %ecx, %ecx
not %ecx
- not %ebx
+ not %ebx // %ecx:%ebx = -1
addl %eax, %ebx
- adcl %edx, %ecx
+ adcl %edx, %ecx // add in the carry from inc
lock
- cmpxchg8b (%edi)
+ cmpxchg8b (%edi) // try to stick it in
jne 1b
movl %ebx, %eax
- movl %ecx, %edx
+ movl %ecx, %edx // return new value
popl %ebx
popl %edi
ret
@@ -305,30 +305,30 @@
ENTRY(atomic_add_8_nv)
ALTENTRY(atomic_add_char_nv)
- movl 4(%esp), %edx
- movb (%edx), %al
+ movl 4(%esp), %edx // %edx = target address
+ movb (%edx), %al // %al = old value
1:
- movl 8(%esp), %ecx
- addb %al, %cl
+ movl 8(%esp), %ecx // %ecx = delta
+ addb %al, %cl // %cl = new value
lock
- cmpxchgb %cl, (%edx)
+ cmpxchgb %cl, (%edx) // try to stick it in
jne 1b
- movzbl %cl, %eax
+ movzbl %cl, %eax // return new value
ret
SET_SIZE(atomic_add_char_nv)
SET_SIZE(atomic_add_8_nv)
ENTRY(atomic_add_16_nv)
ALTENTRY(atomic_add_short_nv)
- movl 4(%esp), %edx
- movw (%edx), %ax
+ movl 4(%esp), %edx // %edx = target address
+ movw (%edx), %ax // %ax = old value
1:
- movl 8(%esp), %ecx
- addw %ax, %cx
+ movl 8(%esp), %ecx // %ecx = delta
+ addw %ax, %cx // %cx = new value
lock
- cmpxchgw %cx, (%edx)
+ cmpxchgw %cx, (%edx) // try to stick it in
jne 1b
- movzwl %cx, %eax
+ movzwl %cx, %eax // return new value
ret
SET_SIZE(atomic_add_short_nv)
SET_SIZE(atomic_add_16_nv)
@@ -337,15 +337,15 @@
ALTENTRY(atomic_add_int_nv)
ALTENTRY(atomic_add_ptr_nv)
ALTENTRY(atomic_add_long_nv)
- movl 4(%esp), %edx
- movl (%edx), %eax
+ movl 4(%esp), %edx // %edx = target address
+ movl (%edx), %eax // %eax = old value
1:
- movl 8(%esp), %ecx
- addl %eax, %ecx
+ movl 8(%esp), %ecx // %ecx = delta
+ addl %eax, %ecx // %ecx = new value
lock
- cmpxchgl %ecx, (%edx)
+ cmpxchgl %ecx, (%edx) // try to stick it in
jne 1b
- movl %ecx, %eax
+ movl %ecx, %eax // return new value
ret
SET_SIZE(atomic_add_long_nv)
SET_SIZE(atomic_add_ptr_nv)
@@ -356,19 +356,19 @@
ALTENTRY(atomic_add_64_nv)
pushl %edi
pushl %ebx
- movl 12(%esp), %edi
+ movl 12(%esp), %edi // %edi = target address
movl (%edi), %eax
- movl 4(%edi), %edx
+ movl 4(%edi), %edx // %edx:%eax = old value
1:
movl 16(%esp), %ebx
- movl 20(%esp), %ecx
+ movl 20(%esp), %ecx // %ecx:%ebx = delta
addl %eax, %ebx
- adcl %edx, %ecx
+ adcl %edx, %ecx // %ecx:%ebx = new value
lock
- cmpxchg8b (%edi)
+ cmpxchg8b (%edi) // try to stick it in
jne 1b
movl %ebx, %eax
- movl %ecx, %edx
+ movl %ecx, %edx // return new value
popl %ebx
popl %edi
ret
@@ -377,30 +377,30 @@
ENTRY(atomic_or_8_nv)
ALTENTRY(atomic_or_uchar_nv)
- movl 4(%esp), %edx
- movb (%edx), %al
+ movl 4(%esp), %edx // %edx = target address
+ movb (%edx), %al // %al = old value
1:
- movl 8(%esp), %ecx
- orb %al, %cl
+ movl 8(%esp), %ecx // %ecx = delta
+ orb %al, %cl // %cl = new value
lock
- cmpxchgb %cl, (%edx)
+ cmpxchgb %cl, (%edx) // try to stick it in
jne 1b
- movzbl %cl, %eax
+ movzbl %cl, %eax // return new value
ret
SET_SIZE(atomic_or_uchar_nv)
SET_SIZE(atomic_or_8_nv)
ENTRY(atomic_or_16_nv)
ALTENTRY(atomic_or_ushort_nv)
- movl 4(%esp), %edx
- movw (%edx), %ax
+ movl 4(%esp), %edx // %edx = target address
+ movw (%edx), %ax // %ax = old value
1:
- movl 8(%esp), %ecx
- orw %ax, %cx
+ movl 8(%esp), %ecx // %ecx = delta
+ orw %ax, %cx // %cx = new value
lock
- cmpxchgw %cx, (%edx)
+ cmpxchgw %cx, (%edx) // try to stick it in
jne 1b
- movzwl %cx, %eax
+ movzwl %cx, %eax // return new value
ret
SET_SIZE(atomic_or_ushort_nv)
SET_SIZE(atomic_or_16_nv)
@@ -408,15 +408,15 @@
ENTRY(atomic_or_32_nv)
ALTENTRY(atomic_or_uint_nv)
ALTENTRY(atomic_or_ulong_nv)
- movl 4(%esp), %edx
- movl (%edx), %eax
+ movl 4(%esp), %edx // %edx = target address
+ movl (%edx), %eax // %eax = old value
1:
- movl 8(%esp), %ecx
- orl %eax, %ecx
+ movl 8(%esp), %ecx // %ecx = delta
+ orl %eax, %ecx // %ecx = new value
lock
- cmpxchgl %ecx, (%edx)
+ cmpxchgl %ecx, (%edx) // try to stick it in
jne 1b
- movl %ecx, %eax
+ movl %ecx, %eax // return new value
ret
SET_SIZE(atomic_or_ulong_nv)
SET_SIZE(atomic_or_uint_nv)
@@ -426,19 +426,19 @@
ALTENTRY(atomic_or_64_nv)
pushl %edi
pushl %ebx
- movl 12(%esp), %edi
+ movl 12(%esp), %edi // %edi = target address
movl (%edi), %eax
- movl 4(%edi), %edx
+ movl 4(%edi), %edx // %edx:%eax = old value
1:
movl 16(%esp), %ebx
- movl 20(%esp), %ecx
+ movl 20(%esp), %ecx // %ecx:%ebx = delta
orl %eax, %ebx
- orl %edx, %ecx
+ orl %edx, %ecx // %ecx:%ebx = new value
lock
- cmpxchg8b (%edi)
+ cmpxchg8b (%edi) // try to stick it in
jne 1b
movl %ebx, %eax
- movl %ecx, %edx
+ movl %ecx, %edx // return new value
popl %ebx
popl %edi
ret
@@ -447,30 +447,30 @@
ENTRY(atomic_and_8_nv)
ALTENTRY(atomic_and_uchar_nv)
- movl 4(%esp), %edx
- movb (%edx), %al
+ movl 4(%esp), %edx // %edx = target address
+ movb (%edx), %al // %al = old value
1:
- movl 8(%esp), %ecx
- andb %al, %cl
+ movl 8(%esp), %ecx // %ecx = delta
+ andb %al, %cl // %cl = new value
lock
- cmpxchgb %cl, (%edx)
+ cmpxchgb %cl, (%edx) // try to stick it in
jne 1b
- movzbl %cl, %eax
+ movzbl %cl, %eax // return new value
ret
SET_SIZE(atomic_and_uchar_nv)
SET_SIZE(atomic_and_8_nv)
ENTRY(atomic_and_16_nv)
ALTENTRY(atomic_and_ushort_nv)
- movl 4(%esp), %edx
- movw (%edx), %ax
+ movl 4(%esp), %edx // %edx = target address
+ movw (%edx), %ax // %ax = old value
1:
- movl 8(%esp), %ecx
- andw %ax, %cx
+ movl 8(%esp), %ecx // %ecx = delta
+ andw %ax, %cx // %cx = new value
lock
- cmpxchgw %cx, (%edx)
+ cmpxchgw %cx, (%edx) // try to stick it in
jne 1b
- movzwl %cx, %eax
+ movzwl %cx, %eax // return new value
ret
SET_SIZE(atomic_and_ushort_nv)
SET_SIZE(atomic_and_16_nv)
@@ -478,15 +478,15 @@
ENTRY(atomic_and_32_nv)
ALTENTRY(atomic_and_uint_nv)
ALTENTRY(atomic_and_ulong_nv)
- movl 4(%esp), %edx
- movl (%edx), %eax
+ movl 4(%esp), %edx // %edx = target address
+ movl (%edx), %eax // %eax = old value
1:
- movl 8(%esp), %ecx
- andl %eax, %ecx
+ movl 8(%esp), %ecx // %ecx = delta
+ andl %eax, %ecx // %ecx = new value
lock
- cmpxchgl %ecx, (%edx)
+ cmpxchgl %ecx, (%edx) // try to stick it in
jne 1b
- movl %ecx, %eax
+ movl %ecx, %eax // return new value
ret
SET_SIZE(atomic_and_ulong_nv)
SET_SIZE(atomic_and_uint_nv)
@@ -496,19 +496,19 @@
ALTENTRY(atomic_and_64_nv)
pushl %edi
pushl %ebx
- movl 12(%esp), %edi
+ movl 12(%esp), %edi // %edi = target address
movl (%edi), %eax
- movl 4(%edi), %edx
+ movl 4(%edi), %edx // %edx:%eax = old value
1:
movl 16(%esp), %ebx
- movl 20(%esp), %ecx
+ movl 20(%esp), %ecx // %ecx:%ebx = delta
andl %eax, %ebx
- andl %edx, %ecx
+ andl %edx, %ecx // %ecx:%ebx = new value
lock
- cmpxchg8b (%edi)
+ cmpxchg8b (%edi) // try to stick it in
jne 1b
movl %ebx, %eax
- movl %ecx, %edx
+ movl %ecx, %edx // return new value
popl %ebx
popl %edi
ret
@@ -608,7 +608,7 @@
movl 16(%esp), %ebx
movl 20(%esp), %ecx
movl (%esi), %eax
- movl 4(%esi), %edx
+ movl 4(%esi), %edx // %edx:%eax = old value
1:
lock
cmpxchg8b (%esi)
@@ -619,25 +619,25 @@
SET_SIZE(atomic_swap_64)
ENTRY(atomic_set_long_excl)
- movl 4(%esp), %edx
- movl 8(%esp), %ecx
+ movl 4(%esp), %edx // %edx = target address
+ movl 8(%esp), %ecx // %ecx = bit id
xorl %eax, %eax
lock
btsl %ecx, (%edx)
jnc 1f
- decl %eax
+ decl %eax // return -1
1:
ret
SET_SIZE(atomic_set_long_excl)
ENTRY(atomic_clear_long_excl)
- movl 4(%esp), %edx
- movl 8(%esp), %ecx
+ movl 4(%esp), %edx // %edx = target address
+ movl 8(%esp), %ecx // %ecx = bit id
xorl %eax, %eax
lock
btrl %ecx, (%edx)
jc 1f
- decl %eax
+ decl %eax // return -1
1:
ret
SET_SIZE(atomic_clear_long_excl)
==== //depot/projects/scottl-camlock/src/sys/contrib/opensolaris/uts/common/fs/dnlc.c#2 (text+ko) ====
@@ -53,6 +53,7 @@
#include <sys/taskq.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
+#include <sys/eventhandler.h>
#include <vm/vm.h>
#include <vm/vm_page.h>
@@ -285,8 +286,10 @@
static ncache_t *dnlc_get(uchar_t namlen);
static ncache_t *dnlc_search(vnode_t *dp, char *name, uchar_t namlen, int hash);
static void do_dnlc_reduce_cache(void *);
+static void dnlc_lowvnodes(void *arg __unused, int nvnodes);
static kstat_t *dnlc_ksp = NULL;
+static eventhandler_tag dnlc_event_lowvnodes = NULL;
/*
* Initialize the directory cache.
@@ -305,7 +308,7 @@
#if 0
dnlc_nentries_low_water = 4 * (v.v_proc + maxusers) + 320;
#else
- dnlc_nentries_low_water = vm_kmem_size / 20480;
+ dnlc_nentries_low_water = (desiredvnodes * 49) / 100;
#endif
ncsize = dnlc_nentries_low_water +
(dnlc_nentries_low_water / dnlc_low_water_divisor);
@@ -363,6 +366,9 @@
dnlc_ksp->ks_data = (void *) &ncs;
kstat_install(dnlc_ksp);
}
+
+ dnlc_event_lowvnodes = EVENTHANDLER_REGISTER(vfs_lowvnodes,
+ dnlc_lowvnodes, NULL, EVENTHANDLER_PRI_FIRST);
}
static void
@@ -371,6 +377,9 @@
nc_hash_t *hp;
int i;
+ if (dnlc_event_lowvnodes != NULL)
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list