Displaying 1 50 of 39,103 commits (0.009s)

DragonFlyBSD — sys/vm vm_page.c vm_contig.c

kernel - Revert part of the contig allocation work

* Revert part of the contig allocation work.  Always use the alist
  allocation from the DMA reserve first, and revert to scanning the
  VM page list only if it fails.

* Fixes performance problems with X.

* What this means, generally, is that we will probably need to rely
  directly on the dma reserve for most of our DMA allocation and
  freeing just to ensure reasonable performance.  Scanning page
  lists is a big lose.

Reported-by: mneumann
Delta File
+14 -1 sys/vm/vm_page.c
+11 -1 sys/vm/vm_contig.c
+25 -2 2 files

DragonFlyBSD — lib/libc Versions.def

libc: Forgotten adjustment in Versions.def

Reported-by: Aaron LI <aly at aaronly.me>
Delta File
+1 -1 lib/libc/Versions.def
+1 -1 1 file

DragonFlyBSD — . Makefile_upgrade.inc

Makefile_upgrade.inc: Add adding_user.8 to the end of the list.
Delta File
+1 -1 Makefile_upgrade.inc
+1 -1 1 file

DragonFlyBSD — lib/libc Versions.def, lib/libc/gen tcsetattr.3 termios.c

libc/termios: Add cfmakesane().

This makes net/bsdrcmds build, in preparation for removing rcp, rlogin,
rlogind, rsh and rshd from base.

Taken-from: FreeBSD

DragonFlyBSD — share/misc bsd-family-tree

Update bsd-family-tree
Delta File
+3 -3 share/misc/bsd-family-tree
+3 -3 1 file

DragonFlyBSD — . Makefile_upgrade.inc, share/man/man8 adding_user.8 Makefile

Remove 'adding_user.8'

Not to be confused with adduser.
Not to be confused with useful information.

DragonFlyBSD — share/misc flowers

flowers: correct spelling of lily, Camellia
Delta File
+3 -3 share/misc/flowers
+3 -3 1 file

DragonFlyBSD — share/misc scsi_modes

scsi_modes - bring up to date

Obtained-from:   FreeBSD
Delta File
+166 -31 share/misc/scsi_modes
+166 -31 1 file

DragonFlyBSD — share/misc ascii

ascii: Use standard name for ASCII control codes

Obtained-from:        FreeBSD r293281
Delta File
+3 -3 share/misc/ascii
+3 -3 1 file

DragonFlyBSD — libexec/rlogind rlogind.c

rlogind(8): Staticize and remove unused declarations.
Delta File
+31 -33 libexec/rlogind/rlogind.c
+31 -33 1 file

DragonFlyBSD — bin/cp extern.h, bin/cpdup cpdup.h

Add __attribute__((__noreturn__)) to various function prototypes in bin/.

This general cleanup is useful in various ways. It helps the compiler
optimize better and it also helps later GCCs detect better when to give
-Wimplicit-fallthrough warnings and when not.

Found-with: -Wsuggest-attribute=noreturn
Delta File
+1 -3 bin/cpdup/cpdup.h
+1 -2 bin/rcp/extern.h
+1 -2 bin/expr/expr.y
+1 -2 bin/dd/extern.h
+1 -2 bin/ls/extern.h
+1 -2 bin/pax/extern.h
+5 -6 5 files not shown
+11 -19 11 files

DragonFlyBSD — bin/rcp rcp.c

rcp(1): Staticize.
Delta File
+18 -18 bin/rcp/rcp.c
+18 -18 1 file

DragonFlyBSD — bin/pwd pwd.c

pwd(1): Staticize, remove void cast.
Delta File
+3 -3 bin/pwd/pwd.c
+3 -3 1 file

DragonFlyBSD — sys/dev/drm/radeon radeon_irq_kms.c

drm/radeon: Prevent a crash on load with newer drm code

* The existing drm/radeon code base contained an invalid unlock/lock
  sequence in radeon_irq_kms_init() which caused the kernel to crash
  during driver initialization with the drm code base from Linux 4.8

* Fixed by replacing the problematic function with its version from
  Linux 4.8
Delta File
+14 -2 sys/dev/drm/radeon/radeon_irq_kms.c
+14 -2 1 file

DragonFlyBSD — sys/dev/misc/evdev Makefile

kernel/evdev: Fix Makefile permission.
Delta File
+0 -0 sys/dev/misc/evdev/Makefile
+0 -0 1 file

DragonFlyBSD — sys/bus/u4b/input ums.c ukbd.c, sys/bus/u4b/input/ukbd Makefile

kernel - Add evdev support to kbdmux, ukbd and ums

* Allows kbdmux, ukbd and ums to send input events to evdev if kernel
  is built with evdev support.

* The sysctl kern.evdev.rcpt_mask determines which drivers are allowed
  to send events to evdev. Its default value is 3, meaning that kbdmux
  and sysmouse are enabled. Since the latter is not yet supported, one
  might want to change the value to 6 (kbdmux and ums) until sysmouse
  will be added.

Obtained-from: FreeBSD

DragonFlyBSD — sys/conf files options, sys/config LINT64

kernel - Bring in evdev from FreeBSD

* This is a port of evdev, the generic input event interface, from
  FreeBSD. Wikipedia: "Evdev generalizes raw input events from device
  drivers and makes them available through character devices in the
  /dev/input/ directory."

* It is currently considered experimental since in rare cases it may cause
  kernel crash when a device, e.g. usb mouse or keyboard, is detached
  while a userland program reading from the corresponding input/eventX
  device.

* In order to enable evdev, kernel needs to be rebuilt with 'device evdev'
  and 'options EVDEV_SUPPORT'. For debugging, add 'options EVDEV_DEBUG'.

* At present, only ums, kbd and kbdmux can send events to their respective
  input/eventX devices. More drivers will be added in due course. The sysctl
  kern.evdev.rcpt_mask determines which drivers send events to evdev.

DragonFlyBSD — sys/vfs/devfs devfs_vnops.c

kernel - Fix crash when cdev is destroyed

* If a device is destroyed while a userland program is blocked
  in a read() or device ioctl, the underlying node will be deleted.
  Returning EIO will prevent kernel from crashing.

* This is a temporary hack until a better solution is found.
Delta File
+9 -0 sys/vfs/devfs/devfs_vnops.c
+9 -0 1 file

DragonFlyBSD — sys/vfs/tmpfs tmpfs_vnops.c

tmpfs - Correct some timestamp update issues

* write() was updating ACCESSED and MODIFIED when it should only
  be updating MODIFIED.

* unlink() (aka rm) was updating CHANGE, ACCESSED, and MODIFIED
  which would be visible if a file has multiple links.  It should
  only update the CHANGE time.

* rmdir() was doing the same thing as UNLINKED.  Fixed this too,
  but the bug would not be readily visible anyway since directories
  cannot be hardlinked.  However, fstat() on an open descriptor
  would still reveal it.
Delta File
+3 -5 sys/vfs/tmpfs/tmpfs_vnops.c
+3 -5 1 file

DragonFlyBSD — share/man/man4 ddb.4

ddb.4: Document i command addition.

While there, document call and reset commands too.
Delta File
+14 -1 share/man/man4/ddb.4
+14 -1 1 file

DragonFlyBSD — sys/vm vm_page.c vm_contig.c

kernel - Improve contiguous DMA memory allocation

* vm_page_alloc_contig() will use vm_page_alloc() for degenerate
  requests instead of the free page reserve.  This case often
  occurs when called from kmem_alloc_attr().

* vm_contig_pg_alloc() will scan the VM page queues first for
  unrestricted memory requests, falling back to vm_page_alloc_contig()
  if this fails.

  vm_contig_pg_alloc() will call vm_page_alloc_contig() first if the
  memory request has an address range restriction, falling back to
  a VM page queue scan if it fails.

* This should hopefully reduce instances where device drivers probed
  prior to e.g. NATA eat up all available low-memory DMA space,
  leaving none for NATA (or other drivers) that might need low-memory
  DMA space.
Delta File
+46 -24 sys/vm/vm_page.c
+26 -5 sys/vm/vm_contig.c
+2 -1 sys/vm/vm_kern.c
+74 -30 3 files

DragonFlyBSD — sys/platform/pc64/x86_64 machdep.c

kernel - Fix ranging test in memory probe, adjust memory test (2)

* Correct bug in ranging test commit.

DragonFlyBSD — sys/vm vm_page.c

kernel - Fix vmstats.v_dma_pages

* Fix an atomic adjustment on v_dma_pages that we believe was
  messing it up, due to not sign-extended a negation of an unsigned
  field.

Reported-by: swildner
Delta File
+1 -1 sys/vm/vm_page.c
+1 -1 1 file

DragonFlyBSD — sys/platform/pc64/x86_64 machdep.c, sys/platform/vkernel64/x86_64 cpu_regs.c

kernel - Fix hw.usermem, hw.physmem, hw.availpages

* Fix the hw.usermem, hw.physmem, and hw.availpages sysctls.
  Some of these were improperly 32-bit sysctls when they need
  to be 64-bits, causing silly values to be returned on
  machines with more than 2G of ram.

Reported-by: zrj

DragonFlyBSD — sys/kern vfs_subr.c, sys/platform/pc64/x86_64 machdep.c

kernel - Adjust vfs.nbuf, kern.maxvnodes, and debug.max_softdeps counts

* Cap some system limits on machines with tons of memory.

* vfs.nbuf is capped at roughly 350,000 buffer cache buffers.  This
  also caps buffer cache data to approximately 11G.

  The reason for this is to avoid wiring too much physical memory in
  the default configuration since programs might want to use the
  memory fo r other purposes.  Buffer cache buffers provide very fast
  access when reading data from cached vnodes, but the new KVABIO ABI
  will soon allow us to acquire and dispose of such buffers more
  efficiently, increasing the efficiency of accessing data cached via
  the block device and making long-term caching via vnode-backed
  buffers somewhat less important.

* kern.maxvnodes is capped at approximately 3 million vnodes.  This
  can be set higher at run-time via a sysctl, if desired.

  NOTE: Our go-to filesystems are designed to or can be set to cache
        file data via the block device instead of the vnode, which is
        preferable on systems with lots of memory.  vnode caching is
        still important, but a bit less so now than in prior years.

* debug.max_softdeps is capped at 1000000, because even a million
  is an obscenely high value for softdep structures.

DragonFlyBSD — sys/platform/pc64/x86_64 machdep.c

kernel - Fix ranging test in memory probe, adjust memory test

* Fix a ranging test in the memory probe code.  The 'incr' value can
  potentially skip over blacked-out areas of memory and thus accidently
  include them in the range.

* We no longer exhaustively test memory.  Instead, just test the first
  and last page for each range.
Delta File
+70 -34 sys/platform/pc64/x86_64/machdep.c
+70 -34 1 file

DragonFlyBSD — sys/ddb db_watch.c db_command.c

kernel - add 'i' command to ddb

* Add the 'i' command, which just issues a cpu_invltlb() on the
  current cpu.  Useful when testing MMU/PMAP issues.
Delta File
+7 -0 sys/ddb/db_watch.c
+1 -0 sys/ddb/db_command.c
+1 -0 sys/ddb/ddb.h
+9 -0 3 files

DragonFlyBSD — usr.sbin/efisetup efisetup.sh

efisetup - Correct bugs

* nvme0 was hardwired in one place, use ${drive}.  This fixes
  issues with efisetup not working on e.g. drives other than nvme0.

* Use -f in the newfs_hammer to avoid complaints about small
  partition sizes.
Delta File
+2 -2 usr.sbin/efisetup/efisetup.sh
+2 -2 1 file

DragonFlyBSD — sys/dev/drm/include/linux pci.h

drm/linux: Improve linux/pci.h

* Add pci_get_drvdata and pci_set_drvdata()

* Add pci_register_driver()
Delta File
+23 -1 sys/dev/drm/include/linux/pci.h
+23 -1 1 file

DragonFlyBSD — sys/dev/disk/fd fd.c

fdc(4): Check return error from isa_dma_init().

Must have been a bad sector in
0bc821c68ba308f17d4f0a7bfd300c432d575a09

Reported-by: dcb <https://bugs.dragonflybsd.org/issues/3108>
Delta File
+2 -2 sys/dev/disk/fd/fd.c
+2 -2 1 file

DragonFlyBSD — sbin/ipfw3 ipfw3nat.c

kernel/ipfw3: Minimal K&R cleanup.
Delta File
+1 -1 sbin/ipfw3/ipfw3nat.c
+1 -1 1 file

DragonFlyBSD — lib/libcipher crypt.c

libcipher: Minimal K&R cleanup.
Delta File
+1 -2 lib/libcipher/crypt.c
+1 -2 1 file

DragonFlyBSD — lib/libcrypt blowfish.c crypt-blowfish.c

libcrypt: K&R cleanup.

DragonFlyBSD — lib/libcrypt blowfish.c crypt-blowfish.c

libcrypt: Remove some __STDC__ checks.

DragonFlyBSD — libexec/rtld-elf rtld.c

rtld - Fix ifunc relocations

* ifunc relocations had a bug that caused an immediate seg-fault.
  Apparently this type of relocation is not used very much, we've
  never encountered it before.  But the qemu port uses it.

* Fix the bug.  Basically missing lockstate and the top level in
  rtld was expected to hold the bind lock.
Delta File
+13 -4 libexec/rtld-elf/rtld.c
+13 -4 1 file

DragonFlyBSD — lib/libstand netif.h, lib/libtelnet misc.h

Remove some orphaned externs.

DragonFlyBSD — sys/vm vm_map.c

kernel - Correct vm_map_entry_reserve() call depth issue w/vkernel

* vm_map was making vaddr tests against VM_MAX_USER_ADDRESS to
  determine when to call vm_map_entry_reserve().  This test works
  fine on real hardware but will not work properly for a vkernel.

* Instead, just use td_nest_count to prevent excessive recursion,
  or test against &kernel_map when necessary.

* Fixes SIGILL in vkernel due to stack overflow.

Reported-by: tuxillo
Delta File
+14 -3 sys/vm/vm_map.c
+14 -3 1 file

DragonFlyBSD — lib/libc/stdlib dmalloc.c

libc - Adjust comment

* Adjust comment for dmalloc.c
Delta File
+1 -2 lib/libc/stdlib/dmalloc.c
+1 -2 1 file

DragonFlyBSD — test/debug kmapinfo.c

debug - Adjust kmapinfo

* Use formatnum() for kmapinfo's segment size output when
  printing EMPTY segments.  This makes the output more readable.
Delta File
+2 -2 test/debug/kmapinfo.c
+2 -2 1 file

DragonFlyBSD — usr.bin/vmstat vmstat.c

vmstat(8): Change few printf formats for -s.

Catch up with b7ea2f3f550021bfaabd8ed8d50b54c157fb55bf
Delta File
+5 -5 usr.bin/vmstat/vmstat.c
+5 -5 1 file

DragonFlyBSD — lib/libc/sys umtx.2, lib/libpthread pthread_mutex_getprioceiling.3

Fix mdoc issues in various manual pages.

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

kernel - Expand physical memory support to 64TB

* Make NKPML4E truly programmable and change the default from 1
  PDP page to 16 PDP pages.  This increases KVM from 512G to
  8TB, which should be enough to accomodate a maximal 64TB
  configuration.

  Note that e.g. 64TB of physical ram certainly requires more
  than one kernel PDP page, since the vm_page_array alone
  would require around 2TB, never mind everything else!

  PDP entries in the PML4E (512 total @ 512GB per entry):
        256        User space
        112        (unused, avail for NKPML4E)
        128        DMAP (64TB max physical memory)
         16        KVM NKPML4E default (8TB) (recommend 64 max)

* Increase the DMAP from 64 PDP pages to 128 PDP pages, allowing
  support for up to 64TB of physical memory.

* Changes the meaning of KPML4I from being 'the index of the only
  PDP page in the PML4e' to 'the index of the first PDP page in
  the PML4e'.  There are NKPML4E PDP pages starting at index KPML4I.

* NKPDPE can now exceed 512.  This is calculated to be the maximmum

    [8 lines not shown]

DragonFlyBSD — sys/config LINT64, sys/platform/pc64/conf options

kernel - Remove DISABLE_PSE option and related code

* Remove the DISABLE_PSE option and related code.  Note that the pmap
  code was already forcing DISABLE_PSE since we are 64-bit only and
  the pmap code never supported PSE anyway.

DragonFlyBSD — sys/platform/pc64/x86_64 pmap.c, sys/platform/vkernel64/platform pmap.c

kernel - Expand page count fields to 64 bits

* 32 bit page count fields limit us to 8TB of ram.  Expand to allow
  up to the DMAP limit (32TB).  Do an initial pass on various page
  count fields and change them from int's to long's or vm_pindex_t's.

* Fix a 32-bit overflow in the pv_entry initialization code.

  pv_entry_max = shpgperproc * maxproc + vm_page_array_size;
                  2000 * 1046516 + pages_of_phys_memory;

  maxproc is 1046516 @ 512GB.  This calculation overflows its 32
  bit signed variable somewhere between 256G and 512G of ram.  This
  can lead to a zinitna() allocation in pvzone that is much too
  large.

Reported-by: zrj
Delta File
+37 -35 sys/vm/vm_page.c
+33 -33 sys/vm/vm_meter.c
+30 -29 sys/vm/vm_pageout.c
+24 -23 sys/sys/vmmeter.h
+11 -12 sys/platform/vkernel64/platform/pmap.c
+12 -10 sys/vm/vm_contig.c
+11 -11 3 files not shown
+158 -153 9 files

DragonFlyBSD — test/vkernel Makefile

test/vkernel - Add hammer2 support

- Fix fstab and loader.conf settings.
Delta File
+25 -7 test/vkernel/Makefile
+25 -7 1 file

DragonFlyBSD — sys/conf files, sys/dev/drm linux_sort.c

drm/linux: Implement sort()

DragonFlyBSD — sys/conf files, sys/dev/drm linux_dma.c

drm/linux: Fix linux/dma-mapping.h compilation...

... with the drm/i915 codebase from Linux 4.8

* Move functions from .h to .c files in order to hide their implementations

* This avoids leaking DragonFly headers to Linux code or Linux headers
  to DragonFly code with associated bad side-effects like type redefinitions

DragonFlyBSD — sys/dev/drm/include/linux i2c.h

drm/linux: Add i2c_get_adapdata and i2c_set_adapdata()
Delta File
+14 -1 sys/dev/drm/include/linux/i2c.h
+14 -1 1 file

DragonFlyBSD — sys/dev/drm linux_workqueue.c, sys/dev/drm/include/linux workqueue.h

drm/linux: Add system_unbound_wq

DragonFlyBSD — sys/vfs/hammer2 hammer2_vnops.c

hammer2 - Fix indefinite dirty chains due to rename

* Do not call cache_setunresolved() on tnch before calling
  cache_rename().  Doing so prevents cache_rename() from properly
  setting VREF_FINALIZE on the vnode.  Since the deleted inode is
  no longer in the chain hierarchy the related chains can remain
  dirty indefinitely (until the vnode is reused or the filesystem
  is unmounted).

* This fixes inmem dirty chain accounting and 'chnmem' stalls.
Delta File
+15 -7 sys/vfs/hammer2/hammer2_vnops.c
+15 -7 1 file