Displaying 1 50 of 38,792 commits (0.009s)

DragonFlyBSD — usr.bin/vmstat vmstat.c vmstat.8

vmstat - Fix formatting

* 'fre' memory formatting width was incorrect, causing
  the rest of the field to be incorrectly offset.

* Display more precision as the field width allows.

* Add -b for 'brief' mode to display less precision.

* Add -u for 'unformatted' mode to display raw numbers (columnar
  output will not be aligned).
Delta File
+69 -23 usr.bin/vmstat/vmstat.c
+9 -2 usr.bin/vmstat/vmstat.8
+78 -25 2 files

DragonFlyBSD — sys/vm vm_pageout.c

kernel - Use different cache_rover for emergency pager

* Fix an issue where the same cache_rover index was being used for both
  pageout threads.  This could result in a great deal of contention
  and cache line bouncing between the threads due to the vm pagerq
  spinlock.

* Fix by changing cache_rover to an array[2].  In addition, the
  one pageout thread iterates its rover forwards while the other
  runs its rover backwards, plus a little more code, to minimize
  conflicts.
Delta File
+14 -3 sys/vm/vm_pageout.c
+14 -3 1 file

DragonFlyBSD — sys/netinet tcp_syncache.c

kernel - Zero out syncache_percpu properly

* The kmalloc for the syncache_percpu was not using M_ZERO
  which I believe can cause cache_count to be some random
  value.  If this value is close to or larger than the syncache
  limit, the garbage collector may run with no entries to reuse,
  causing a NULL pointer dereference and panic.

Reported-by: pa3k #3088
Delta File
+4 -4 sys/netinet/tcp_syncache.c
+4 -4 1 file

DragonFlyBSD — sys/netinet tcp_syncache.c

kernel - Zero out syncache_percpu properly

* The kmalloc for the syncache_percpu was not using M_ZERO
  which I believe can cause cache_count to be some random
  value.  If this value is close to or larger than the syncache
  limit, the garbage collector may run with no entries to reuse,
  causing a NULL pointer dereference and panic.

Reported-by: pa3k #3088
Delta File
+4 -4 sys/netinet/tcp_syncache.c
+4 -4 1 file

DragonFlyBSD — sys/dev/sound/pci/hda hdaa.c

hdaa - Remove dead code

* Remove dead code (an impossible condition).

Reported-by: dcb #3077
Delta File
+0 -5 sys/dev/sound/pci/hda/hdaa.c
+0 -5 1 file

DragonFlyBSD — usr.bin/bc tty.c

bc - Adjust bad syntax

* Adjust a badly syntaxed expression.

Reported-by: dcb #3079
Delta File
+1 -1 usr.bin/bc/tty.c
+1 -1 1 file

DragonFlyBSD — sbin/swapon swapon.c

swapon - Fix minor memory leak

* Fix a minor memory leak

Reported-by: liweitianux bug #3086
Delta File
+1 -0 sbin/swapon/swapon.c
+1 -0 1 file

DragonFlyBSD — sys/kern lwkt_thread.c

kernel - Cleanup token code, add simple exclusive priority (2)

* The priority mechanism revealed an issue with lwkt_switch()'s
  fall-back code in dealing with contended tokens.  The code was
  refusing to schedule a lower-priority thread on a cpu requesting an
  exclusive lock as another on that same cpu requesting a shared lock.

  This creates a problem for the exclusive priority feature.  More
  pointedly, it also creates a fairness problem in the mixed lock
  type use case generally.

* Change the mechanism to allow any thread polling on tokens to be
  scheduled.  The scheduler will still iterate in priority order.
  This imposes a little extra overhead with regards to userspace
  returns as a thread might be scheduled that then tries to return
  to userland without being the designated user thread.

* This also fixes another bug that cropped up recently where a
  32-way threaded program would sometimes not quickly schedule to
  all 32 cpus, sometimes leaving one or two cpus idle for a few
  seconds.
Delta File
+14 -6 sys/kern/lwkt_thread.c
+14 -6 1 file

DragonFlyBSD — usr.sbin/pstat pstat.8

pstat.8: Add markup.
Delta File
+3 -1 usr.sbin/pstat/pstat.8
+3 -1 1 file

DragonFlyBSD — sys/netinet6 nd6.c

inet6: Make non-prefix and directly reachable inet6 routes work.

e.g. inet6 routes added w/ -interface:

sysctl net.inet6.icmp6.nd6_onlink_ns_rfc4861=1
ifconfig ix0 inet6 2003:db8::1
route add -inet6 2003:db8:1::/64 -interface ix0

NOTE: net.inet6.icmp6.nd6_onlink_ns_rfc4861 MUST be on.
Delta File
+4 -1 sys/netinet6/nd6.c
+4 -1 1 file

DragonFlyBSD — usr.sbin/pstat pstat.8

pstat.8: Remove a duplicate option of swapinfo
Delta File
+1 -1 usr.sbin/pstat/pstat.8
+1 -1 1 file

DragonFlyBSD — share/initrd/bin Makefile

initrd - Add 'fetch'

* Add the 'fetch' program to the recovery shell.  This is just too
  useful a program to not have on the rescue ramdisk.
Delta File
+2 -2 share/initrd/bin/Makefile
+2 -2 1 file

DragonFlyBSD — share/initrd/bin Makefile

initrd - Add 'fetch'

* Add the 'fetch' program to the recovery shell.  This is just too
  useful a program to not have on the rescue ramdisk.
Delta File
+2 -2 share/initrd/bin/Makefile
+2 -2 1 file

DragonFlyBSD — sys/kern lwkt_token.c, sys/sys thread.h

kernel - Cleanup token code, add simple exclusive priority

* Cleanup the token code and bring the comments up to date.

* Implement exclusive priority for the situation where a thread is
  acquiring only a single shared token.  We cannot implement exclusive
  priority when multiple tokens are held because that can lead to
  deadlocks.  The token code guarantees no deadlocks.
Delta File
+19 -34 sys/kern/lwkt_token.c
+21 -7 sys/sys/thread.h
+40 -41 2 files

DragonFlyBSD — sys/dev/acpica acpi.c

kernel/acpi: Ouch, add forgotten semicolon.
Delta File
+1 -1 sys/dev/acpica/acpi.c
+1 -1 1 file

DragonFlyBSD — sys/dev/acpica acpi.c

kernel/acpi: Use ACPI_UUID_LENGTH in acpi_eval_osc().
Delta File
+2 -2 sys/dev/acpica/acpi.c
+2 -2 1 file

DragonFlyBSD — sys/kern kern_prot.c kern_exit.c, sys/sys proc.h

kernel - Add p_ppid

* We have proc->p_pptr, but still needed a shared p->p_token to access
  the ppid.  Buckle under and add proc->p_ppid as well so getppid() can
  run lockless.

* Adjust the vmtotal proc scan to use a shared proc->p_token instead
  of an exclusive one.

DragonFlyBSD — sys/kern kern_clock.c

kernel - Adjust tsc_delay()

* Add more cpu_pause()'s to the tsc_delay() loop to
  be more hyper-thread friendly.
Delta File
+6 -1 sys/kern/kern_clock.c
+6 -1 1 file

DragonFlyBSD — sys/dev/acpica/Osd OsdSynch.c

kernel - Increase ACPI_SEMAPHORES_MAX_PENDING

* Increase ACPI_SEMAPHORES_MAX_PENDING to a very large number.
  Some of the ACPI codes assumes that mutexes always succeed,
  but the mutex code uses the semaphore code and the semaphore
  code appears to have an arbitrary failure path based on the
  number of concurrent requests.

* This fixes kernel confusion and console spam from the ACPI
  subsystem when running sysctl -a concurrently on more than
  4 threads.
Delta File
+1 -1 sys/dev/acpica/Osd/OsdSynch.c
+1 -1 1 file

DragonFlyBSD — sys/dev/acpica/Osd OsdSynch.c

kernel - Increase ACPI_SEMAPHORES_MAX_PENDING

* Increase ACPI_SEMAPHORES_MAX_PENDING to a very large number.
  Some of the ACPI codes assumes that mutexes always succeed,
  but the mutex code uses the semaphore code and the semaphore
  code appears to have an arbitrary failure path based on the
  number of concurrent requests.

* This fixes kernel confusion and console spam from the ACPI
  subsystem when running sysctl -a concurrently on more than
  4 threads.
Delta File
+1 -1 sys/dev/acpica/Osd/OsdSynch.c
+1 -1 1 file

DragonFlyBSD — sys/kern kern_sysctl.c

kernel - Make certain sysctl's unlocked (2)

* Make most of the oid translation and iteration sysctls unlocked.

Suggested-by: mjg
Delta File
+11 -7 sys/kern/kern_sysctl.c
+11 -7 1 file

DragonFlyBSD — sys/kern kern_proc.c kern_mib.c, sys/sys sysctl.h

kernel - Make certain sysctl's unlocked

* Automatically flag all SYSCTL_[U]INT, [U]LONG, and [U]QUAD
  definitions CTLFLAG_NOLOCK.  These do not have to be locked.
  Will improve program startup performance a tad.

* Flag a ton of other sysctls used in program startup and
  also 'ps' CTLFLAG_NOLOCK.

* For kern.hostname, interlock changes using XLOCK and allow
  the sysctl to run NOLOCK, avoiding unnecessary cache line
  bouncing.

DragonFlyBSD — sys/kern kern_sysctl.c lwkt_thread.c, sys/sys sysctl.h globaldata.h

kernel - Refactor sysctl locking

* Get rid of the global topology lock.  Instead of a pcpu shared lock
  and change the XLOCK code (which is barely ever executed) to obtain
  an exclusive lock on all cpus.

* Add CTLFLAG_NOLOCK, which disable the automatic per-OID sysctl lock.

Suggested-by: mjg (Mateusz Guzik)

DragonFlyBSD — sys/platform/pc64/include pmap.h, sys/platform/pc64/x86_64 pmap.c

kernel - Improve pmap hinting, improve performance

* Refactor pm_pvhint into two fields, pm_pvhint_pt and pm_pvhint_pte.
  These are the most common hits.

* Consolidate the pv_entry lookup core into pv_entry_lookup() and
  implementing the double hinting.  Adjust pv_cache() to use the
  new fields.

* Improve pmap_object_init_pt() performance by using the new
  RB_SCAN_NOLK() code and soft-busying the VM pages instead
  of hard-busying them.  If we have to deactivate the page, however,
  we must hard-busy the page.

* Fix vm_prefault_quick() committed recently.  When soft-busying
  VM pages for pmap-entry, we have to fall-back to a hard-busy
  if the page must be moved out of PQ_CACHE.

DragonFlyBSD — sys/vfs/devfs devfs_vnops.c devfs_core.c

kernel - Improve concurrency in devfs VOPs

* Use LK_SHARED instead of LK_EXCLUSIVE whenever possible.  This
  significantly reduces lock congestion for getattr(), read(),
  and readlink().

* Check the new D_QUICK flag and, if set, devfs can avoid lock
  congestion for open() and close() on devices (e.g. such as on
  /dev/null, /dev/urandom, etc).

DragonFlyBSD — sys/kern vfs_helper.c

kernel - Use soft-busy in vop_helper_read_shortcut()

* Use a soft-busy for related VM pages in vop_helper_read_shortcut().
  This prevents locking conflicts related to concurrent read() operation
  from causing the routine to abort.

  Related software can run optimized I/O from related VM pages
  concurrently without conflict.  This occurs in particular with
  the concurrent exec*() of dynamic executables.
Delta File
+3 -13 sys/kern/vfs_helper.c
+3 -13 1 file

DragonFlyBSD — sys/kern kern_memio.c, sys/sys device.h

kernel - Add D_QUICK device flag

* Add the D_QUICK device flag.  This flag tells devfs that it does not
  have to handle complex opencount interactions in VOP_OPEN and
  VOP_CLOSE, allowing devfs to retain the shared lock for those
  operations.

* Flag kernel special devices such as /dev/zero, /dev/null,
  /dev/urandom, etc, with D_QUICK.
Delta File
+15 -1 sys/kern/kern_memio.c
+1 -0 sys/sys/device.h
+16 -1 2 files

DragonFlyBSD — sys/sys tree.h

kernel - Add more features to the RB tree

* Add RB_SCAN_NOLCK(), a version of RB_SCAN() that does not protect
  the iterator with a spin-lock.  This can be used in any scan loop
  where the scan loop is able to determine whether the iterator has
  been lost or not.

* Add RB_LOOKUP_REL(), a version of RB_LOOKUP() that optimizes the
  specific next-index and prev-index case.
Delta File
+64 -9 sys/sys/tree.h
+64 -9 1 file

DragonFlyBSD — sys/kern kern_lock.c, sys/sys indefinite2.h indefinite.h

kernel - Add lock debugging

* Refactor debug.lock_test_mode to allow dumping of stack backtraces
  when lockmgr locks or spinlocks are contested.

* Make some adjustments to the indefinite code (w/ heads up from mjg).
  Do not start recording the TSC until we've contested for 15 loops,
  and do not record the end time or duration unless we have contested
  for more than 15 loops.

DragonFlyBSD — sys/dev/drm drm_vm.c, sys/dev/drm/i915 i915_gem.c

kernel - refactor vm_page busy

* Move PG_BUSY, PG_WANTED, PG_SBUSY, and PG_SWAPINPROG out of m->flags.

* Add m->busy_count with PBUSY_LOCKED, PBUSY_WANTED, PBUSY_SWAPINPROG,
  and PBUSY_MASK (for the soft-busy count).

* Add support for acquiring a soft-busy count without a hard-busy.
  This requires that there not already be a hard-busy.  The purpose
  of this is to allow a vm_page to be 'locked' in a shared manner
  via the soft-busy for situations where we only intend to read from
  it.
Delta File
+151 -83 sys/vm/vm_page.c
+37 -65 sys/vm/vm_page.h
+53 -15 sys/vm/vm_fault.c
+26 -20 sys/vm/swap_pager.c
+27 -5 sys/vm/vm_page2.h
+12 -9 sys/vm/vm_contig.c
+28 -20 12 files not shown
+334 -217 18 files

DragonFlyBSD — sys/vm vm_page.c vm_pageout.c

kernel - Cleanup vm_page_repurpose()

* Remove the now unused vm_page_repurpose() function.

* Remove emrunning variable.
Delta File
+0 -74 sys/vm/vm_page.c
+0 -6 sys/vm/vm_pageout.c
+0 -2 sys/vm/vm_page.h
+0 -82 3 files

DragonFlyBSD — sys/kern imgact_resident.c kern_kinfo.c, sys/platform/pc64/x86_64 pmap.c

kernel: Remove <sys/sysref{,2}.h> inclusion from files that don't need it.

Some of the headers are public in one way or another so bump
__DragonFly_version for safety.

While here, add a missing <sys/objcache.h> include to kern_exec.c which
was previously relying on it coming in via <sys/sysref.h> (which was
included by <sys/vm_map.h> prior to this commit).
Delta File
+2 -1 sys/sys/param.h
+0 -3 sys/vm/vm_map.h
+0 -3 sys/sys/vnode.h
+0 -2 sys/kern/imgact_resident.c
+0 -2 sys/kern/kern_kinfo.c
+0 -2 sys/vfs/procfs/procfs_mem.c
+1 -14 14 files not shown
+3 -27 20 files

DragonFlyBSD — sys/sys indefinite2.h

<sys/indefinite2.h>: Add missing include for VKERNEL64.
Delta File
+3 -0 sys/sys/indefinite2.h
+3 -0 1 file

DragonFlyBSD — share/man/man4 vtnet.4, sys/dev/virtual/virtio/net if_vtnet.c

if_vtnet - Disable rx csum offload due to unsupported ipv6 rx csum offload.

* Ignoring the checksum offloading in the receive path of the driver isn't
  sufficient, since we might receive only partially checksummed packets
  from the host.

* Unfortunately there is only a single feature flag for both ipv4 and ipv6
  receive checksum offloading, so we need to disable both for now.

* At the moment we don't support a way to explicitly enable the rx csum
  feature at runtime, but this will be easily possible by adding support
  for the VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature.

* Mention this as a caveat in the manpage.

* Update correct default value of hw.vtnet.lro_disable tunable in the
  manpage, to match the code again.

DragonFlyBSD — share/man/man4 vtnet.4, sys/dev/virtual/virtio/net if_vtnet.c

if_vtnet - Disable rx csum offload due to unsupported ipv6 rx csum offload.

* Ignoring the checksum offloading in the receive path of the driver isn't
  sufficient, since we might receive only partially checksummed packets
  from the host.

* Unfortunately there is only a single feature flag for both ipv4 and ipv6
  receive checksum offloading, so we need to disable both for now.

* At the moment we don't support a way to explicitly enable the rx csum
  feature at runtime, but this will be easily possible by adding support
  for the VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature.

* Mention this as a caveat in the manpage.

* Update correct default value of hw.vtnet.lro_disable tunable in the
  manpage, to match the code again.

DragonFlyBSD — share/man/man4 vtnet.4, sys/dev/virtual/virtio/net if_vtnet.c

if_vtnet - Disable rx csum offload due to unsupported ipv6 rx csum offload.

* Ignoring the checksum offloading in the receive path of the driver isn't
  sufficient, since we might receive only partially checksummed packets
  from the host.

* Unfortunately there is only a single feature flag for both ipv4 and ipv6
  receive checksum offloading, so we need to disable both for now.

* At the moment we don't support a way to explicitly enable the rx csum
  feature at runtime, but this will be easily possible by adding support
  for the VIRTIO_NET_F_CTRL_GUEST_OFFLOADS feature.

* Mention this as a caveat in the manpage.

* Update correct default value of hw.vtnet.lro_disable tunable in the
  manpage, to match the code again.

DragonFlyBSD — sys/dev/virtual/virtio/net if_vtnet.c if_vtnetvar.h

if_vtnet - Handle missing IFCAP_VLAN_* flags nicer. Comment IFCAP_LOR stuff.

* The if_vtnet driver used to define the IFCAP_LRO, IFCAP_VLAN_HWFILTER and
  IFCAP_VLAN_HWTSO flags itself, to make the code from FreeBSD build.
  Instead define IFCAP_VLAN_HWFILTER and IFCAP_VLAN_HWTSO to 0, when they
  are not defined already. This allows the code to build, but all checks
  for the flags fail. (Inspired by the vmxnet3 driver port).

* The IFCAP_LRO flag is unavailable in DragonFly, but the LRO offload seems
  to work somehow.

* According to the virtio specification, LRO support should be possible
  without rx checksum support as well.

DragonFlyBSD — sys/dev/virtual/virtio/net if_vtnet.c if_vtnetvar.h

if_vtnet - Handle missing IFCAP_VLAN_* flags nicer. Comment IFCAP_LOR stuff.

* The if_vtnet driver used to define the IFCAP_LRO, IFCAP_VLAN_HWFILTER and
  IFCAP_VLAN_HWTSO flags itself, to make the code from FreeBSD build.
  Instead define IFCAP_VLAN_HWFILTER and IFCAP_VLAN_HWTSO to 0, when they
  are not defined already. This allows the code to build, but all checks
  for the flags fail. (Inspired by the vmxnet3 driver port).

* The IFCAP_LRO flag is unavailable in DragonFly, but the LRO offload seems
  to work somehow.

* According to the virtio specification, LRO support should be possible
  without rx checksum support as well.

DragonFlyBSD — sys/dev/virtual/virtio/net if_vtnet.c if_vtnetvar.h

if_vtnet - Handle missing IFCAP_VLAN_* flags nicer. Comment IFCAP_LOR stuff.

* The if_vtnet driver used to define the IFCAP_LRO, IFCAP_VLAN_HWFILTER and
  IFCAP_VLAN_HWTSO flags itself, to make the code from FreeBSD build.
  Instead define IFCAP_VLAN_HWFILTER and IFCAP_VLAN_HWTSO to 0, when they
  are not defined already. This allows the code to build, but all checks
  for the flags fail. (Inspired by the vmxnet3 driver port).

* The IFCAP_LRO flag is unavailable in DragonFly, but the LRO offload seems
  to work somehow.

* According to the virtio specification, LRO support should be possible
  without rx checksum support as well.

DragonFlyBSD — sys/vm vm_pageout.c

kernel - Remove 'Emergency Pager' debugging messages

* Remove these messages.  They were for debugging only and, in fact,
  the activation of the anonymous-only pager is not really an
  'Emergency'.
Delta File
+2 -6 sys/vm/vm_pageout.c
+2 -6 1 file

DragonFlyBSD — sys/vm vm_pageout.c

kernel - Remove 'Emergency Pager' debugging messages

* Remove these messages.  They were for debugging only and, in fact,
  the activation of the anonymous-only pager is not really an
  'Emergency'.
Delta File
+2 -6 sys/vm/vm_pageout.c
+2 -6 1 file

DragonFlyBSD — sys/kern kern_lock.c vfs_vnops.c, sys/sys vnode.h

Stitch LINT64 build back together.

b1793cc6ba47622ab6ad154905f5c1385a6825bd removed the debuglockmgr()
code in kern_lock.c that was enabled with the DEBUG_LOCKS kernel
option. Its only consumer was in vfs_vnops.c for vn_lock.

For now, remove all associated remains.
Delta File
+0 -13 sys/kern/kern_lock.c
+0 -11 sys/kern/vfs_vnops.c
+0 -10 sys/sys/vnode.h
+0 -34 3 files

DragonFlyBSD — share/initrd/sbin Makefile

Add mount_hammer2 and newfs_hammer2 to initrd list.
Delta File
+2 -0 share/initrd/sbin/Makefile
+2 -0 1 file

DragonFlyBSD — share/initrd/sbin Makefile

Add mount_hammer2 and newfs_hammer2 to initrd list.
Delta File
+2 -0 share/initrd/sbin/Makefile
+2 -0 1 file

DragonFlyBSD — sys/net/pf pf.c

pf: Make pf_print_host() print IPv6 addresses correctly

Taken-from: OpenBSD sys/net/pf.c v.1.615
Delta File
+17 -18 sys/net/pf/pf.c
+17 -18 1 file

DragonFlyBSD — sys/net/pf pf.c

pf: Always skip "urpf-failed" test for IPv6 link local addresses

We could re-embed the scope-id before we do the route lookup,
but then we would just find the very interface we've received
the packet on anyway.

Taken-from: OpenBSD sys/net/pf.c v.1.625
Delta File
+6 -0 sys/net/pf/pf.c
+6 -0 1 file

DragonFlyBSD — sys/net/pf pf.c

pf: use IN6_IS_SCOPE_EMBED to check kernel-internal form addresses

Use IN6_IS_SCOPE_EMBED to check kernel-internal form addresses
(s6_addr16[1] filled).

Taken-from: OpenBSD sys/net/pf.c v.1.520
Delta File
+1 -1 sys/net/pf/pf.c
+1 -1 1 file

DragonFlyBSD — . UPDATING Makefile_upgrade.inc, etc/mtree BSD.usr.dist BSD.include.dist

Remove "kernel ppp", i.e. if_ppp.ko and pppd(8).

It has been replaced by ppp(8), in conjunction with tun(4).

While here, rename the ppp-user rc script to 'ppp' and fix up
REQUIRE/PROVIDE situation.
Delta File
+0 -2,438 usr.sbin/pppd/options.c
+0 -1,809 usr.sbin/pppd/lcp.c
+0 -1,686 usr.sbin/pppd/pppd.8
+0 -1,670 usr.sbin/pppd/main.c
+0 -1,584 usr.sbin/pppd/auth.c
+0 -1,577 sys/net/ppp/if_ppp.c
+96 -13,777 77 files not shown
+96 -24,541 83 files

DragonFlyBSD — share/initrd/etc rc

mkinitrd - Add missing /var/db (3)

* When /var is mounted via tmpfs we have to mkdir the subdirs
  manually.

* Add /var/db and /var/empty to the directories initrd creates
  in its rc.

Submitted-by: amonk
Delta File
+2 -0 share/initrd/etc/rc
+2 -0 1 file

DragonFlyBSD — share/initrd/etc rc

mkinitrd - Add missing /var/db (3)

* When /var is mounted via tmpfs we have to mkdir the subdirs
  manually.

* Add /var/db and /var/empty to the directories initrd creates
  in its rc.

Submitted-by: amonk
Delta File
+2 -0 share/initrd/etc/rc
+2 -0 1 file