Displaying 1 51 of 36,100 commits (0.010s)

DragonFlyBSD — sys/dev/drm drm_irq.c

drm: Restore DRM_DEBUG_VBLANK() calls
Delta File
+16 -16 sys/dev/drm/drm_irq.c
+16 -16 1 file

DragonFlyBSD — sys/dev/drm/i915 intel_runtime_pm.c intel_uncore.c

drm/i915: Use the spin_lock_irq() family of functions (2/2)

Further reducing differences with Linux 4.3.

DragonFlyBSD — sys/dev/drm drm_irq.c drm_atomic.c

drm: Use the spin_lock_irq() family of functions

Reducing differences with Linux 4.3

DragonFlyBSD — sys/dev/drm/i915 i915_irq.c intel_ringbuffer.c

drm/i915: Use the spin_lock_irq() family of functions

Reducing differences with Linux 4.3

DragonFlyBSD — sys/kern vfs_bio.c

kernel - Enhance buffer flush and cluster_write linearity (2)

* Fix bug last commit.  When looping the buffer has to be reset to
  the marker or the iteration can wind up on the wrong queue.

* Also count the INVAL case in the loop instead of breaking out.
Delta File
+5 -3 sys/kern/vfs_bio.c
+5 -3 1 file

DragonFlyBSD — sys/vfs/hammer2 hammer2_inode.c

hammer2 - Fix inode destroy panic

* Fix a race in hammer2_inode_xop_destroy() when deleting an inode chain.
  The parent can be ripped out from under the code before it gets both
  parent and chain locked, resulting in an assertion in hammer2_chain_delete().

  Properly test the linkage and retry if the parent changes.
Delta File
+13 -2 sys/vfs/hammer2/hammer2_inode.c
+13 -2 1 file

DragonFlyBSD — sys/kern vfs_bio.c vfs_cluster.c

kernel - Enhance buffer flush and cluster_write linearity

* flushbufqueues() was iterating between cpus, taking only one buffer off
  of each cpu's queue.  This forced non-linearly on-flush, messing up
  sequential performance for HAMMER1 and HAMMER2.  For HAMMER2 this also
  caused physical blocks to be allocated out of order.

  Add sysctl vfs.flushperqueue to specify the number of buffers to flush
  per cpu before iterating the pcpu queue.  Default 1024.

* cluster_write() no longer requires that a buffer be VOP_BMAP()'d
  successfully in order to issue writes.  This effects HAMMER2, which does
  not assign physical device blocks until the logical buffer is actually
  flushed to the backend device.

* Fixes non-linearity problems for buffer daemon flushbufqueues() calls,
  and for cluster_write() with or without write_behind.
Delta File
+17 -10 sys/kern/vfs_bio.c
+16 -3 sys/kern/vfs_cluster.c
+33 -13 2 files

DragonFlyBSD — sys/vfs/hammer2 hammer2_chain.c hammer2_disk.h

hammer2 - Optimize indirect block algorithm

* Pack indirect blocks for linear files significantly better.

* First level indirect block for directories reduced to 4KB (32 entries).

* For now make the first level indirect block for directories cover the
  entire hash range for either inodes or directory entries (63 bits).

DragonFlyBSD — sys/vfs/hammer2 hammer2_strategy.c hammer2_chain.c

hammer2 - Stabilization pass

* If the HAMMER2_CHAIN_DEDUP flag is set modified_needs_new_allocation()
  must return 1 to force a new allocation.  This fixes a number of dirty
  buffer rewrite cases that broke dedup.

* Do not try to dedup a chain flagged MODIFIED or INITIAL.

* The indirect-block deletion code in the flusher needed to also count
  blockrefs if it hadn't been done yet.  This fixes cases of missing
  directory entries.

* For now use a transaction in hammer2_strategy_write().  We probably don't
  need it due to the way the logical buffer cache is handled, but do it
  anyway.

* Clean-up some of the code documentation.

* Implement sysctls for dedup and buffer invalidation enablement.  dedup
  is turned on by default, invalidation is turned off.  Invalidation is
  not currently working well.

DragonFlyBSD — sys/vfs/hammer2 hammer2_inode.c hammer2_xops.c

hammer2 - Remove the hidden directory, rework deletions

* Now that inodes are separately indexed we no longer need the hidden
  directory abstraction to handle unlinked-but-open files.  Get rid of
  ALL the hidden directory handling code.

* Rework xop_unlink and hammer2_inode_unlink_finisher().  We cannot safely
  reference the inode chain's inode data to get the nlinks count.  Instead,
  figure it all out on the frontend using the active nlinks in the
  hammer2_inode_t structure.

* Fixes hardlink removal and rename issues.

DragonFlyBSD — sys/net if_mib.c if_var.h, sys/net/ppp if_ppp.c

ifnet: Add oqdrops statistics
Delta File
+12 -7 usr.bin/netstat/if.c
+2 -2 sys/net/ppp/if_ppp.c
+2 -0 sys/net/if_mib.c
+2 -0 sys/net/if_var.h
+2 -0 sys/net/ifq_var.h
+2 -0 sys/net/if.c
+6 -3 5 files not shown
+28 -12 11 files

DragonFlyBSD — sbin/hammer2 cmd_debug.c, sys/vfs/hammer2 hammer2_bulkfree.c hammer2_flush.c

hammer2 - Stabilization, fix bulkfree bugs, change 'df' output

* Automatically delete any indirect nodes which become empty.  This is done
  in the flusher.  Verify that a rm -rf cleans everything out.

* Fix three serious bugs in the bulkfree code.

  (1) A range-check of cbinfo->sstop was using '>' instead of '>=', causing
      a one-element overflow during the scan and potentially corrupting
      memory.

  (2) The live bitmap pointer must be reloaded after calling
      hammer2_chain_modify()!  The old pointer points to a buffer
      which must remain clean, or worse points to a buffer completely
      unrelated to the hammer2 filesystem.

  (3) We were zeroing the temporary bmap, but it actually needs to be
      initialized properly (particularly its reserved areas).  Just
      zeroing it led to reserved areas being improperly marked as
      available for allocation.

* Validate that the free space counter is recovered properly after a
  rm -rf and bulkfree.

* Disable the modify_tid test in the bulkfree code for now and go back to

    [9 lines not shown]

DragonFlyBSD — sys/kern vfs_vm.c

kernel - Fix panic in error path of nvextendbuf()

* nvextendbuf() was not releasing bp in the error path, leading to
  a hanging lock and 'locking against myself' panic later on.
Delta File
+2 -0 sys/kern/vfs_vm.c
+2 -0 1 file

DragonFlyBSD — sys/vfs/hammer2 hammer2_chain.c hammer2_io.c

hammer2 - Stabilization (data corruption)

* Move the check code errors into hammer2_chain_testcheck() and supply
  additional information in the kprintf.

* Reformulate hammer2_io_newq() a bit.

* Fix bugs in the buffer invalidation path.  The hammer2_io_newq() path
  was improperly setting INVALOK.  This path is only used by the freemap
  code to pre-validate a buffer to avoid unnecessary reads.  Fixed by
  not setting INVALOK if IOCB_QUICK is set.

DragonFlyBSD — sbin/mount_hammer2 mount_hammer2.c

hammer2 - Update error message in hammer2_mount

* Update the error message to reflect the current default labels
  when the '@LABEL' specification is missing.

DragonFlyBSD — sbin/hammer2 cmd_debug.c

hammer2 - Enhance freemap output

* Output the base data offset for each freemap line in the freemap
  dump.

* Also provide more check data info in the output.
Delta File
+12 -7 sbin/hammer2/cmd_debug.c
+12 -7 1 file

DragonFlyBSD — sys/dev/disk/nvme nvme.c nvme.h

nvme - Handle full submission queue

* The submission queue is a ring and can be full even if requests are
  available due to out-of-order completion.  Update the submission queue's
  subq_head from the completion queue status and check for a full condition.
  The normal requeue signaling suffices for resume.

* Also note that we allocate maxqe requests, which is actually one more than
  we can have on the ring at once.  But now that we have the queue-full check,
  this becomes a non-issue.  Just leave it at maxqe for convenience.

* Tested by temporarily reducing maxqe to 16 and doing stuff to overload it.
  Maxqe was returned to 256 for the commit.
Delta File
+52 -12 sys/dev/disk/nvme/nvme.c
+3 -1 sys/dev/disk/nvme/nvme.h
+55 -13 2 files

DragonFlyBSD — sys/vm swap_pager.c

kernel - Enhance swap allocation failure message

* Output a more appropriate message if the system wants to page to swap
  and no swap is configured.
Delta File
+8 -2 sys/vm/swap_pager.c
+8 -2 1 file

DragonFlyBSD — sys/cpu/x86_64/include atomic.h, sys/kern kern_lock.c

kernel - Misc bug fixes and enhancements

* Add atomic_*_64() for 64-bit-explicit calls.  This way if a platform
  doesn't support 64-bit atomic ops H2 will at least get a compile error.

* Fix bug in sys/mutex2.h.  mtx_upgrade_try() was not setting mtx_owner
  on success.

* Enhance assertion panic message in lockmgr_kernproc().

DragonFlyBSD — sys/vfs/hammer2 hammer2_io.c hammer2_chain.c

hammer2 - Stabilization, optimization

* Increase the hammer2_io.refs field to 64 bits so we can add a few more
  control bits.

* Track whether invalidation is ok at the DIO level for full-sized (64KB)
  data blocks.  We continue to use the slightly less-capable CHAIN_DEDUP
  flag for smaller data blocks (this flag gets set on frontend->backend
  flush whereas the DIO level flag is only cleared when a block is actually
  reused for deduplication).

* Separate vfs.hammer2.cluster_enable into cluster_read and cluster_write.
  Leave cluster_read enabled with a read-ahead of 4 blocks.  Disable
  cluster_write for now, but still set B_CLUSTEROK in the bdwrite().

  This allows the frontend to 'flush' data to the backend without
  initiating disk I/O on the block device, giving us a chance to discard
  the data later if it winds up being temporary.

* Remove an improper BUF_KERNPROC(dio->bp) in the case where a different
  thread owns the in-progress DIO.

* Defer setting of B_INVAL | B_RELBUF to when the DIO is in lastdrop.

* Add missing brelse() in the hammer2_read_file() error path.  Add missing

    [5 lines not shown]

DragonFlyBSD — gnu/usr.bin/groff/src/preproc Makefile, gnu/usr.bin/groff/src/preproc/soelim Makefile

Stop building/installing groff's soelim(1).

We have a version in usr.bin which we use since ages, so groff's
version got built/installed just to get overwritten again when
usr.bin was installed afterwards.

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

drm/linux: Implement some spin_lock_irq* functions

They are not just simple spin_lock/spin_unlock() variants but
disable hardware interrupt processing on the current cpu.

Suggested-by: Matt Macy <mmacy at nextbsd.org>
Delta File
+22 -1 sys/dev/drm/include/linux/spinlock.h
+22 -1 1 file

DragonFlyBSD — sys/vfs/hammer hammer.h hammer_vfsops.c

sys/vfs/hammer: Remove DEDUP_CACHE_SIZE and wrong comment

It is a tunable sysctl since e2ef7a95.

DragonFlyBSD — sys/dev/disk/nvme nvme_admin.c nvme.c

nvme: Use high frequency interrupt for CQ processing

Suggested-by: dillon@
Reviewed-by: dillon@

DragonFlyBSD — sys/kern kern_intr.c, sys/sys bus.h

intr: Allow drivers to register high frequency interrupt.

Only unshared interrupts will be considered, e.g. MSI, MSI-X or
unshared line interrupt.
Delta File
+26 -3 sys/kern/kern_intr.c
+1 -0 sys/sys/bus.h
+27 -3 2 files

DragonFlyBSD — contrib/gcc-5.0/gcc varasm.c, contrib/mpfr/src vasprintf.c

Fix a couple of logic issues in contributed code (gcc, mpfr, tre).

* The mpfr bug was fixed in mpfr's trunk (r8705).
  Report: (https://sympa.inria.fr/sympa/arc/mpfr/2013-11/msg00009.html)

* The GCC bug was fixed too. This commit applies GCC's 51aab39345ae.

* The TRE bug came in with Apple's code. No idea if there is a simple way
  to report a bug in their libc to them. I've not found any.

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

drm/linux: Really implement local_irq_disable/enable

Suggested-by: Matt Macy <mmacy at nextbsd.org>

DragonFlyBSD — sys/net/ipfw3_nat ip_fw3_nat.c

ipfw3_nat: kmalloc netmsg from M_LWKTMSG
Delta File
+2 -2 sys/net/ipfw3_nat/ip_fw3_nat.c
+2 -2 1 file

DragonFlyBSD — sys/kern kern_intr.c

intr: Force unshareble interrupt setting
Delta File
+27 -9 sys/kern/kern_intr.c
+27 -9 1 file

DragonFlyBSD — lib/libc/sys poll.2

poll.2: Adjust NAME section for ppoll().
Delta File
+2 -1 lib/libc/sys/poll.2
+2 -1 1 file

DragonFlyBSD — sys/sys poll.h

<sys/poll.h>: Some namespace cleanup.

Include <sys/signal.h> and <sys/time.h> only when necessary.

While here, cleanup whitespace a bit.
Delta File
+5 -3 sys/sys/poll.h
+5 -3 1 file

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

kern: Also detect KVM via the Hypervisor vendor ID signature.
Delta File
+14 -4 sys/platform/pc64/x86_64/initcpu.c
+14 -4 1 file

DragonFlyBSD — lib/libipfw3/basic ipfw3_basic.c ipfw3_basic.h, lib/libipfw3/dummynet ipfw3_dummynet.c ipfw3_dummynet.h

ipfw3: lockless in-kernel NAT

The libalias is used in kernel space for in-kernel NAT, and its alias_link
entries are stored with LIST. so all the packets which need to be NAT will scan
against the LIST and trying to find the matched alias_link. by seperating the
libalias into context of different CPUs, the lock can be removed. and due to the
nature of NAT, the outgoing and incoming packets are possible to be handled by
different CPUs, to ensure the returning packet can be translated properly, the
newly created alias_link is required to be duplicated and inserted into contexts
of both CPUs.

e.g.
ipfw3 nat 1 config if em0
ipfw3 nat 1 all via em0
ipfw3 nat 1 show state
Delta File
+1,017 -0 sbin/ipfw3/ipfw3nat.c
+33 -976 sbin/ipfw3/ipfw3.c
+438 -232 sys/net/ipfw3_nat/ip_fw3_nat.c
+131 -0 sbin/ipfw3/ipfw3.h
+77 -44 sys/net/libalias/alias.c
+13 -39 sys/net/ipfw3/ip_fw3.c
+69 -57 26 files not shown
+1,778 -1,348 32 files

DragonFlyBSD — usr.bin/basename basename.1 Makefile, usr.bin/dirname dirname.c Makefile

usr.bin/dirname: Accept multiple arguments as basename(1)

While there, expand examples section.

DragonFlyBSD — sys/vfs/hammer2 hammer2_vnops.c hammer2_chain.c

hammer2 - stabilization pass

* Fix a shared/exclusive deadlock.  When adding a ref to a shared lock
  that has already been obtained we must make a slightly different call
  than the normal one because the normal one will block on a pending
  exclusive request, causing a deadlock.

* Add a missing BUF_KERNPROC().  Will hopefully fix a lock ownership
  assertion in the kernel that I've been hitting on heavy use.

* Looks like NFS needs to do inode number lookups on softlinks, so
  add inode indexing to the softlink (and the mknod) code instead
  of embedding the softlink in the directory entry.

DragonFlyBSD — sys/vfs/hammer2 hammer2_vnops.c

hammer2 - Update directory mtime

* Update directory mtime on nmkdir, nlink, ncreate, nmknod, nsymlink,
  nremove, nrmdir, and nrename.
Delta File
+116 -41 sys/vfs/hammer2/hammer2_vnops.c
+116 -41 1 file

DragonFlyBSD — sys/vfs/hammer2 hammer2_inode.c hammer2_chain.c

hammer2 - Stabilization pass

* Fix incorrect ip->meta.iparent initializations that were messing up
  NFS.  These fixes are primarily in the hammer2_inode_create() path.
  The 'dip' passed in is not the correct inode to retrieve ip->meta.inum
  from for the new inode's iparent.  Pass a second inode indicating the
  proper parent directory linkage for iparent.

* Remove ip->pip entirely.  Since the actual file/directory inodes are
  no longer heirarchical this field only creates confusion.  The two
  places where we really need it can simply use ip->meta.iparent.

  Also clean-out a considerable amount of code that previously dealt with
  ip->pip linkages and adjustments.

* Do not try to drop data on a 1->0 transition failure, this can race
  increments and cause the data to be improperly dropped.

* Do not try to drop data on lockcnt == 0 unless persist_refs is also 0.
  Fixes several SMP races where chain->data was being lost improperly.

* Cleanup the APIs for recent changes in how inodes work.

* Now passes buildworld test with /usr/src and /usr/obj mounted with NFS
  from a hammer2 volume.

DragonFlyBSD — sys/kern vfs_cache.c

kernel - Enhance debug.ncvp_debug debugging

* Enhance a debug kprintf for debugging a specific server-side situation
  with NFS.
Delta File
+2 -1 sys/kern/vfs_cache.c
+2 -1 1 file

DragonFlyBSD — sbin/mountd mountd.c

mountd - Turn on SO_REUSEADDR

* Turn on SO_REUSEADDR because its kinda silly to not have it on.

* Fixes startup errors if mountd is restarted, or initially fails
  due to /etc/exports issues and is then restarted a little later.
Delta File
+7 -0 sbin/mountd/mountd.c
+7 -0 1 file

DragonFlyBSD — sys/kern syscalls.master

kernel - Fix typo in ppoll entry in sys/kern/syscalls.master.
Delta File
+2 -2 sys/kern/syscalls.master
+2 -2 1 file

DragonFlyBSD — sys/kern kern_intr.c

intr: Avoid implicit padding
Delta File
+1 -1 sys/kern/kern_intr.c
+1 -1 1 file

DragonFlyBSD — sys/vfs/procfs procfs_vnops.c

procfs - Try to workaround issue to fix truss

* If PIOCWAIT is called and no process stops are present, silently return
  0 rather then EINVAL.

* Appears to fix the truss issue.

Reported-by: tkusumi
Delta File
+1 -1 sys/vfs/procfs/procfs_vnops.c
+1 -1 1 file

DragonFlyBSD — sys/kern imgact_elf.c

kernel - Implement PIE (place independent executables)

* Implement PIE placement and sysctl.  Currently disabled by default.
  If the sysctl kern.elf64.pie_base_mmap is set to 1, executable code
  will be mapped with a random shift.

* Also support fixed addresses if requested in the ELF header.

Submitted-by: shamaz
Testing-by: shamaz, dillon, with help from marino
Delta File
+37 -12 sys/kern/imgact_elf.c
+37 -12 1 file

DragonFlyBSD — sys/vfs/hammer2 hammer2_vfsops.c hammer2_inode.c

hammer2 - Implement NFS export support

* Allow a hammer2 mount to be exported.  Implement required functionality:
  The export structure, fhtovp, vptofh, checkexp, and hammer2_vfs_vget.
  Uses the recent inode indexing changes.

* Also had to write some code to reconstruct the ip->pip linkages using
  iparent.

  Note that if possible I would like to remove the ip->pip stuff now that
  we have iparent, at least for files.  It won't work for hardlinks so...
  but its still in as of this writing.

DragonFlyBSD — sys/vfs/hammer2 hammer2_xops.c hammer2_disk.h

hammer2 - Implement hammer2_inode_meta.iparent

* Implement the iparent field, which points to the inode number of
  the parent directory.  Remove the comment as this will be used
  by NFS (at least for directory inodes).

DragonFlyBSD — sys/vfs/hammer2 hammer2_chain.c hammer2_admin.c

hammer2 - Change XOP feed/collect locking

* Change the way the backend passes chains back to the frontend.  Instead
  of requiring that the chain maintain a shared lock and bumping the lock
  count we use the new data retention feature to pass the chain back
  unlocked.

  This fixes a whole slew of deadlock issues related to multi-node
  synchronization.  Concurrent XOPs could previously obtain and hold
  locks on chains related to different nodes in any order, depending on
  when their related threads were scheduled.  Now that we no longer hold
  a lock in the XOP feed, the potential deadlocks should not be possible.

* Add new hammer2_chain_*() API functions for manipulating the data hold
  count and remove shims that were previously used to deal with the shared
  lock hacks.

* Also fix a chain->flags adjustment that wasn't atomic, fixing a tsleep()
  loop that was not breaking out.

DragonFlyBSD — lib/libc/locale collate.c

libc/_collate_lookup: Fix segfault seen on ISO-8859-5 locales

The fix for the Russian collation issue seemed to have bug in it.
Segfault was discovered by Lauri Tirkkonen of Illumos and confirmed by
Bapt at FreeBSD.org.  Lauri suggested this as a fix, but as of this writing
Bapt hasn't confirmed that this is final solution for FreeBSD.  Due to
personal reasons, I cannot wait for this confirmation longer.  I believe
this fix is better than what is currently in place, even if it is not
the final solution.
Delta File
+1 -1 lib/libc/locale/collate.c
+1 -1 1 file

DragonFlyBSD — lib/libc/locale ascii.c none.c

mbsnrtowcs/wcsnrtombs: Fix EILSEQ handling

Originally reported on FreeBSD (PR 209907) by Roel Standaert, RockinRoel
noticed that DragonFly suffered the same bug.  When the title functions
encounter a character that cannot be converted, they should change the
src pointer to point to the character positioned immediately after the
failed character, but no such change was performed.

YellowRabbit improved on the FreeBSD patch addressing the bug with a
new version that eliminates possible NULL pointer dereferences.

Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2920>
Delta File
+10 -5 lib/libc/locale/ascii.c
+1 -0 lib/libc/locale/none.c
+11 -5 2 files

DragonFlyBSD — sys/vfs/hammer2 hammer2_vnops.c hammer2_inode.c

hammer2 - Start work on inode indexing - MAJOR CHANGE

A major change to how inodes work is required to allow NFS exports to be
supported and also to make mirroring operations optimal.  Both needs are
met by indexing most inodes so they can be looked up by inode number.  I've
tried to avoid having to do this for well over 2 years now but I finally
came to the conclusion that necessary features and efficiencies are
impossible without it.

+ For NFS exports we have to be able to lookup a file by inode number in
  order to be able to translate NFS file handles.

+ Mirroring, Multi-Master, and other Multi-Node operations are extremely
  inefficient when a large file or (even worse) some high-level directory
  is renamed, because the synchronization code cannot be made aware of the
  rename.  The synchronizer winds up making a copy of the file or the
  directory subhierarchy and that can be disaster if it winds up being
  terrabytes.

To solve these problems we treat nearly ALL directory entries as hardlink
targets and place the hardlink target at the root of the PFS.  This puts
nearly all inodes in a readily accessible place indexed by inode number.
This means we can now implement inode number lookups for NFS, and it also
means that the synchronizer does not have to copy anything when a file or
directory is renamed.

    [22 lines not shown]

DragonFlyBSD — sys/dev/disk/nvme nvme_ioctl.c

nvme - Remove debugging

* Remove some debugging output.
Delta File
+0 -1 sys/dev/disk/nvme/nvme_ioctl.c
+0 -1 1 file