Displaying 1 50 of 37,294 commits (0.010s)

DragonFlyBSD — sbin/hammer cmd_stats.c

sbin/hammer: Fix whitespace alignment changed by e0d7dd09

d_read needs one more space.
Delta File
+1 -1 sbin/hammer/cmd_stats.c
+1 -1 1 file

DragonFlyBSD — sbin/hammer cmd_recover.c hammer.8

    sbin/hammer: Add quick mode for hammer recover
    
    Since hammer recover command tries to recover filesystem data
    based on assumption on ondisk data bytes that look like B-Tree
    nodes/elms, the command can tell the recovery process is done
    once scanning offset gets to the point where there is no more
    big-blocks for B-Tree zone, without scanning through the whole
    address space of all volumes (provided B-Tree zone is alive).
    
    By specifying quick option after the target directory option,
    this command makes use of B-Tree big-block info prefetched before
    recovery process, and stops recovery once all B-Tree big-blocks
    are scanned. As shown in below example, this makes recovery
    much faster by cutting unnecessary I/Os.
    
    The drawback is that quick mode is based on assumption that
    B-Tree zone isn't corrupted. If B-Tree zone is somehow corrupted,
    prefetched info is incomplete or totally wrong, so one needs
    to linearly scan the whole address space of all volumes to
    check every possible B-Tree nodes/elms without using quick mode
    which is what's been done by default.
    
    -- example of default and quick mode
     # newfs_hammer -L TEST /dev/da1 > /dev/null
     # mount_hammer /dev/da1 /HAMMER

    [22 lines not shown]

DragonFlyBSD — sbin/hammer cmd_blockmap.c

sbin/hammer: Minor cleanup for hammer blockmap
Delta File
+3 -5 sbin/hammer/cmd_blockmap.c
+3 -5 1 file

DragonFlyBSD — sys/conf files, sys/dev/drm drm_dp_mst_topology.c drm_atomic_helper.c

drm/i915: Update to Linux 4.5

* Mostly bugfixes. Lots and lots of bugfixes.

* Skylake and Broxton support improvements

* Initial Kabylake support
Delta File
+1,414 -1,407 sys/dev/drm/i915/i915_reg.h
+877 -476 sys/dev/drm/i915/intel_display.c
+520 -666 sys/dev/drm/i915/intel_dp.c
+544 -256 sys/dev/drm/i915/intel_runtime_pm.c
+372 -373 sys/dev/drm/i915/intel_fbc.c
+314 -389 sys/dev/drm/i915/intel_pm.c
+6,015 -2,799 111 files not shown
+10,056 -6,366 117 files

DragonFlyBSD — sbin/hammer cmd_recover.c

sbin/hammer: Use HAMMER_OBJID_ROOT
Delta File
+7 -1 sbin/hammer/cmd_recover.c
+7 -1 1 file

DragonFlyBSD — share/man/man8 swapcache.8

docs - Modernize swapcache(8)

* Give swapcache(8) an update taking into account our growing knowledge of
  the capabilities and limitations of flash storage.
Delta File
+95 -77 share/man/man8/swapcache.8
+95 -77 1 file

DragonFlyBSD — sys/vfs/hammer hammer_ioctl.c hammer_prune.c

hammer - Disallow modifying ioctls when filesystem is read-only

* Disallow modifying ioctls if the filesystem has been mounted read-only
  or gone into read-only mode due to an I/O error.

* This is only a partial fix.  There are still error-pathing problems
  in numerous procedures, particularly the node locking code, that might
  result in a token life-lock.

Reported-by: Peter Avalos

DragonFlyBSD — lib/libc/net linkaddr.c

libc - Take care of minor buffer overrun in link_ntoa()

* Take care of a minor buffer overrun in link_ntoa().  It is unlikely
  that any program produces the conditions required to trigger the
  problem.

Taken-from: FreeBSD-SA-16:37.libc
Reported-by: swildner, zrj, others
Delta File
+34 -17 lib/libc/net/linkaddr.c
+34 -17 1 file

DragonFlyBSD — lib/libc/net linkaddr.c

libc - Take care of minor buffer overrun in link_ntoa()

* Take care of a minor buffer overrun in link_ntoa().  It is unlikely
  that any program produces the conditions required to trigger the
  problem.

Taken-from: FreeBSD-SA-16:37.libc
Reported-by: swildner, zrj, others
Delta File
+34 -17 lib/libc/net/linkaddr.c
+34 -17 1 file

DragonFlyBSD — sbin/hammer cmd_recover.c

sbin/hammer: Fix direntry message in hammer recover

name could have already been free'd, so move it to the beginning.
Also enable it only on -v, just like inode/data rectype cases.
Delta File
+8 -6 sbin/hammer/cmd_recover.c
+8 -6 1 file

DragonFlyBSD — usr.sbin/dntpd log.c

dntpd - Fix memory leak

* Every log line leaked a bit of memory.  Fixed.
Delta File
+1 -0 usr.sbin/dntpd/log.c
+1 -0 1 file

DragonFlyBSD — usr.sbin/dntpd log.c

dntpd - Fix memory leak

* Every log line leaked a bit of memory.  Fixed.
Delta File
+1 -0 usr.sbin/dntpd/log.c
+1 -0 1 file

DragonFlyBSD — sbin/hammer cmd_recover.c

sbin/hammer: Fix inode/data messages in hammer recover

Based on other printf messages where "file" indicates regfile,
the first one should be "inode" rather than "file" because it
could be both directory and regfile.

The second one could be "file" because it's for file data, but
just sync with the first format.
Delta File
+2 -2 sbin/hammer/cmd_recover.c
+2 -2 1 file

DragonFlyBSD — sbin/hammer cmd_recover.c

sbin/hammer: Minor cleanup for hammer recover

The reason for moving "info.pfs_id = dict->pfs_id;" is because
PT_FIGURE only requires strlen of "PFS%05d" (max 65535), and
dict->pfs_id never changes during path lookup by design.
Delta File
+17 -10 sbin/hammer/cmd_recover.c
+17 -10 1 file

DragonFlyBSD — sys/platform/vkernel64/platform init.c

vkernel: Add a dummy cpu_smp_stopped() function (unbreaks build).

Follow-up to 63cff0361caa40216fcb16f79855de833431274b

DragonFlyBSD — sys/kern kern_proc.c, test/sysperf exec1.c

kernel - Increase worst-case maximum exec rate

* The pid reuse algorithm limits the maximum fork rate.  This limit
  was set too low.  Increase the limit from 10000/sec to 100000/sec.
  Currently our opteron maxes out at 43000/sec.

  Note that with 999999 pids and a 10-second mandatory reuse time
  floor there isn't much of a point increasing the limit beyond
  100000/sec.

  100,000/sec.  Currently our opteron maxes out at around
  43,000/sec (vfork/exec/wait3/exit of a small static binary).

* The domain reuse array was increased to 1MB to accomodate this
  change.  In addition, update the array in a cache-friendly manner.

* Modify test/sysperf/exec1 to take a nprocesses argument for the
  timing run.
Delta File
+28 -7 test/sysperf/exec1.c
+22 -7 sys/kern/kern_proc.c
+50 -14 2 files

DragonFlyBSD — sys/kern imgact_elf.c kern_exit.c, sys/sys eventhandler.h

kernel - Remove unused process_exit and process_exec eventhandlers

* Remove these two eventhandlers.  They are not used in DragonFly.

* Fixes an unnecessary global lock bottleneck in exec and exit.

Suggested-by: Mateusz Guzik (mjg_)

DragonFlyBSD — sys/kern kern_spinlock.c vfs_syscalls.c, sys/sys spinlock2.h

kernel - Spiff up locks a bit

* Do a little optimization of _spin_lock_contested().  The critical path
  is able to avoid two atomic ops in the initialization portion of the
  contested path.

* Optimize _spin_lock_shared_contested() to use atomic_fetchadd_long()
  to add a shared-lock count instead of atomic_cmpset_long().  Shared
  spinlocks are used heavily and this will prevent a lot of unnecessary
  spinning when many cpus are using the same lock at the same time.

* Hold fdp->fd_spin across fdp->fd_cdir and fdp->fd_ncdir modifications.
  This completes other work which caches fdp->fd_ncdir and avoids having
  to obtain the spin-lock when the cache matches.

Discussed-with: Mateusz Guzik (mjg_)

DragonFlyBSD — lib/libkvm kvm_proc.c, sys/kern kern_proc.c

kernel - Make kern_proc cache-friendly

* Make the proc_tokens[], allprocs[], allpgrps[], and allsessn[]
  arrays cache-friendly by aggregating them into a cache-aligned
  struct procglob.

* Doesn't do much for the token array, but should help
  allprocs/allpgrps/allsessn scans whos structures were previously
  8-byte aligned.
Delta File
+108 -73 sys/kern/kern_proc.c
+7 -3 lib/libkvm/kvm_proc.c
+8 -0 sys/sys/proc.h
+123 -76 3 files

DragonFlyBSD — . Makefile.inc1, etc/defaults make.conf

Revamp alt compiler handling for clang 3.9.1 import.

Many users are still constantly asking weather llvm/clang compiler could be
added into a base as an alternative to current used ones (gcc50 and gcc47).
There are few issues in doing that:
 * It is very hard to keep both compiler flavors in harmony while one or the
   other is being updated. There were always two base compilers in base system
   in DragonFly and common practice still is to replace previous alternative
   compiler with an updated version, performing tests and then flip them up.
 * With clang introduction, this scheme would break badly due to both using
   slightly different c++ capabilities, flags support (WARNS mechanism), etc.
 * Different incompatible libraries libLLVM + libc++ vs libstdc++, also clang
   requiring a lot of effort to rewrite cmake logic into Makefiles for make(1).
 * SBU costs, gcc47 only has ~4min buildtime overhead at -j5 level(i7 laptop)
   while even clang38 tests has shown two-fold increase in buildworld time.
 * How DPorts infrastructure would handle both flavors? License roadmap?

So to make compromise it was chosen to provide a way for users and developers
to select the alternative compiler they like while keeping all groups happy,
ones continuing to enjoy the very fast world rebuilds and others having a way
to further develop and integrate clang into the infrastructure. Since DragonFly
is currently x86_64 only, we might as well experiment more with compilers.

This changeset adds some flexibility when it comes to handling base system
compilers. Even if it would be decided that clang does not fit very well in

    [13 lines not shown]

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

kernel - Remove debugging kprintf

* Remove the 'exit race handled' debugging kprintf.

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

kernel - Try to idle cpus when in panic()

* Try to use MONITOR/MWAIT to idle cpus while they are stopped in a panic(),
  instead of hard-looping.  This significantly reduces power consumption while
  in a paniced state and is particularly helpful on laptops.

Reported-by: tuxillo

DragonFlyBSD — sys/kern vfs_cache.c vfs_nlookup.c, sys/sys malloc.h namecache.h

kernel - more kmalloc and nlookup performance optimizations

* Give the pcpu counters in struct malloc_type their own cache line per
  cpu.  This removes a large kmalloc/kfree bottleneck on multi-socket
  systems

* Avoid having to ref, lock, and GETATTR intermediate directory components
  in nlookup() by adding the NCF_WXOK flag.  This flag is set in the ncp
  when the directory permissions are at least 555.  This saves significant
  overhead in all situations, including single-threaded.

Discussed-with: Mateusz Guzik (mjg_)
Delta File
+83 -0 sys/kern/vfs_cache.c
+63 -11 sys/kern/vfs_nlookup.c
+12 -12 sys/kern/kern_slaballoc.c
+17 -5 usr.bin/vmstat/vmstat.c
+8 -4 sys/sys/malloc.h
+5 -1 sys/sys/namecache.h
+2 -1 2 files not shown
+190 -34 8 files

DragonFlyBSD — lib/libncurses/libncurses Makefile

ncurses: Fix parallel buildworld race.

* MKexpanded.sh uses cc -E on source having curses.priv.h -> term.h chain.
  Be safe and delay until all GENHDRS are created first.

No funtional change for final libprivate_ncurses{,w}.a,
just for reproducibility of buildworld intermediates.

DragonFlyBSD — sys/platform/pc64/vmm vmm.c

kernel - Skip vmm_shutdown() when in a panic

* vmm_shutdown() calls cpusync and assumes that the system is basically
  in working order.  This is definitely not the case from a panic.
  Conditionalize the code to be skipped if shutting-down due to a panic.

* Fixes a number of situations where the panic code locks up and refuses
  to dump when called with debug.debugger_on_panic=0.
Delta File
+1 -1 sys/platform/pc64/vmm/vmm.c
+1 -1 1 file

DragonFlyBSD — contrib/smbfs/lib/smb ctx.c

kernel - set default locale name for smbfs

* Set default locale name for smbfs to "ISO8859-1".
Delta File
+1 -1 contrib/smbfs/lib/smb/ctx.c
+1 -1 1 file

DragonFlyBSD — test/sysperf syscall1.c blib.c

test - Adjust blib and sc1

* convert loops to loops/sec, and add a parameter to syscall1.c to
  allow the number of threads to be specified.

DragonFlyBSD — sys/kern vfs_cache.c vfs_lock.c, sys/sys nchstats.h globaldata.h

kernel - Overhaul namecache operations to reduce SMP contention

* Overhaul the namecache code to remove a significant amount of cacheline
  ping-ponging from the namecache paths.  This primarily effects
  multi-socket systems but also improves multi-core single-socket systems.

  Cacheline ping-ponging in the critical path can constrict a multi-core
  system to roughly ~1-2M operations per second running through that path.
  For example, even if looking up different paths or stating different
  files, even something as simple as a non-atomic ++global_counter
  seriously derates performance when it is being executed on all cores at
  once.

  In the simple non-conflicting single-component stat() case, this improves
  performance from ~2.5M/second to ~25M/second on a 4-socket 48-core opteron
  and has a similar improvement on a 2-socket 32-thread xeon, as well as
  significantly improves namecache perf on single-socket multi-core systems.

* Remove the vfs.cache.numcalls and vfs.cache.numchecks debugging counters.
  These global counters caused significant cache ping-ponging and were only
  being used for debugging.

* Implement a poor-man's referenced-structure pcpu cache for struct mount
  and struct namecache.  This allows atomic ops on the ref-count for these
  structures to be avoided in certain critical path cases.  For now limit

    [24 lines not shown]
Delta File
+171 -45 sys/kern/vfs_cache.c
+29 -7 sys/kern/vfs_lock.c
+14 -6 sys/kern/vfs_nlookup.c
+8 -4 sys/kern/vfs_mount.c
+8 -0 sys/kern/vfs_syscalls.c
+3 -1 sys/sys/nchstats.h
+7 -4 5 files not shown
+240 -67 11 files

DragonFlyBSD — sys/kern kern_spinlock.c, sys/sys spinlock2.h

kernel - Reduce spinning on shared spinlocks

* Improve spinlock performance by removing unnecessary extra reads,
  using atomic_fetchadd_int() to avoid a cmpxchg loop, and allowing
  the SHARED flag to remain soft-set on the 1->0 transition.

* The primary improvement here is that multiple cpu's obtaining the
  same shared spinlock can now do so via a single atomic_fetchadd_int(),
  whereas before we had multiple atomics and cmpxchg loops.  This does not
  remove the cacheline ping-pong but it significantly reduces unnecessary
  looping when multiple cpu cores are heavily loading the same shared spin
  lock.

* Trade-off is against the case where a spinlock's use-case switches from
  shared to exclusive or back again, which requires an extra atomic op to
  deal with.  This is not a common case.

* Remove spin->countb debug code, it interferes with hw cacheline operations
  and is no longer desireable.

Discussed-with: Mateusz Guzik (mjg_)
Delta File
+14 -26 sys/kern/kern_spinlock.c
+21 -16 sys/sys/spinlock2.h
+35 -42 2 files

DragonFlyBSD — sbin/hammer cmd_stats.c, sys/vfs/hammer hammer_vnops.c hammer_vfsops.c

hammer - Remove global VOP counters

* Remove global VOP counters.  These were only used for debugging.
  Removing these globals significantly improves concurrent VOP operations
  on multi-core systems, particularly multi-socket systems, by removing
  a cache ping-pong bottleneck.

Discussed-with: Mateusz Guzik (mjg_)

DragonFlyBSD — sbin/hammer cmd_pfs.c cmd_mirror.c

sbin/hammer: Add "[y/n]" before getyn()

DragonFlyBSD — . Makefile_upgrade.inc, share/man/man9 Makefile

Rename cpumask.9 -> CPUMASK.9
Delta File
+32 -32 share/man/man9/Makefile
+1 -0 Makefile_upgrade.inc
+33 -32 2 files

DragonFlyBSD — sbin/hammer cmd_strip.c hammer.8, sys/vfs/hammer hammer_ondisk.c

sbin/hammer: Add hammer strip command

This command is inspired by hammer recover command, and does
opposite of what recover command does.

This command zero clears zone-8(B-Tree) big-blocks, zone-9(meta)
big-blocks, and then the whole volume header, except that volume
signature field is overwritten with "STRIPPED" instead of zeros.
After running, a filesystem is no longer mountable or recoverable
with hammer recover command. This command is also fast as it only
zero clears good enough ondisk data to make it unmountable and
unrecoverable.

Keep in mind that this command does _not_ zero clear user data.
Users would normally use a software designed to completely shred
a filesystem. This command is not designed to shred a filesystem.
The name "strip" gives better idea of what it really does than
using "shred"/etc.

-- example
 # newfs_hammer -L TEST /dev/da1 /dev/da2 /dev/da3 > /dev/null
 # mount_hammer /dev/da1:/dev/da2:/dev/da3 /HAMMER
 # cd /HAMMER
 # dd if=/dev/urandom of=./out bs=1M count=120000
 120000+0 records in

    [36 lines not shown]

DragonFlyBSD — sbin/hammer hammer.c

sbin/hammer: Make hammer_parsedevs() take open(2) flag

This is for the next commit.
No functional change.
Delta File
+14 -14 sbin/hammer/hammer.c
+14 -14 1 file

DragonFlyBSD — sbin/hammer hammer.c

sbin/hammer: Fix recursively called hammer_parsedevs()

c2b74c42 had to change recursively called hammer_parsedevs() as well.
Delta File
+1 -1 sbin/hammer/hammer.c
+1 -1 1 file

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

kernel: Fix stop_cpus()/restart_cpus() usages when panicing.

* If we are panicing (i.e. panicstr != NULL), Debugger() should make sure
  that cpus are stopped when it returns. So call stop_cpus() explicitly
  if Debugger() does an early return (i.e. in the cons_unavail case), and
  don't call restart_cpus() at the end if we are panicing.

* This should make sure that Debugger()'s behaviour matches the
  expectations of panic() in sys/kern/kern_shutdown.c.
Delta File
+22 -13 sys/platform/pc64/x86_64/db_interface.c
+22 -13 1 file

DragonFlyBSD — sys/dev/misc/syscons syscons.c syscons.h

syscons - Set cons_unavail when blanking framebuffer screen from syscons.

* This makes us treat panics while the screen is blanked in KMS mode
  similar to panics while X is running. In both cases we have no
  possibility left to display the syscons console.

* This also sets the cons_unavail flag, when the KMS driver is unloaded
  and the framebuffer console becomes unusable, until a new framebuffer
  is registered for syscons (which will clear cons_unavail again).

DragonFlyBSD — . Makefile_upgrade.inc, lib/libefivar Makefile

libefivar: Fix wrong MLINKS.
Delta File
+1 -1 lib/libefivar/Makefile
+1 -0 Makefile_upgrade.inc
+2 -1 2 files

DragonFlyBSD — sbin/nvmectl nvmectl.8 Makefile, share/man/man4 nvme.4

Add a minimal nvmectl(8) manual page.

DragonFlyBSD — lib/libu4bhid descr_compat.c descr.c

libusbhid: Remove some unneeded compat code.

DragonFlyBSD — sys/vfs/smbfs smbfs_vfsops.c smbfs_vnops.c

kernel - Fix smbfs readdir and umount

* Fix a bug in smbfs's readdir that was causing an empty list and also
  a later deadlock.

* Fix a bug in smbfs's umount that was panicing the machine.

DragonFlyBSD — sys/vfs/smbfs smbfs_vfsops.c smbfs_vnops.c

kernel - Fix smbfs readdir and umount

* Fix a bug in smbfs's readdir that was causing an empty list and also
  a later deadlock.

* Fix a bug in smbfs's umount that was panicing the machine.

DragonFlyBSD — sys/dev/netif/elink_layer elink.c elink.h, sys/platform/pc64/conf files

kernel: Remove some ep(4) driver remains.

It was removed in August (3a609f3dbc).

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

kernel - Remove NETSMBCRYPTO option (make it the default)

* Remove the NETSMBCRYPTO option entirely, and make its function the
  default.

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

kernel - Remove NETSMBCRYPTO option (make it the default)

* Remove the NETSMBCRYPTO option entirely, and make its function the
  default.

DragonFlyBSD — sys/netproto/smb smb_crypt.c smb_rq.c

smbfs - Fix mount_smbfs authentication error (but 'ls' still broken)

* Fixes an authentication error with mount_smbfs.  Most windows file servers
  require a later crypto rev and man-in-the-middle protection.

* Note however that while mounting works, and files can be copied by name,
  'ls' currently returns empty and the mount appears to get stuck, so more
  work is needed.

DragonFlyBSD — sys/netproto/smb smb_crypt.c smb_rq.c

smbfs - Fix mount_smbfs authentication error (but 'ls' still broken)

* Fixes an authentication error with mount_smbfs.  Most windows file servers
  require a later crypto rev and man-in-the-middle protection.

* Note however that while mounting works, and files can be copied by name,
  'ls' currently returns empty and the mount appears to get stuck, so more
  work is needed.

DragonFlyBSD — sys/sys socketvar.h

kernel - Cleanup macros

* Fix ssb_insert_knote() and friends to use do { ... } while(0) intead
  of { }, which fixes a double-statement issue with the macro.
Delta File
+4 -4 sys/sys/socketvar.h
+4 -4 1 file

DragonFlyBSD — sys/sys socketvar.h

kernel - Cleanup macros

* Fix ssb_insert_knote() and friends to use do { ... } while(0) intead
  of { }, which fixes a double-statement issue with the macro.
Delta File
+4 -4 sys/sys/socketvar.h
+4 -4 1 file

DragonFlyBSD — sys/kern sys_generic.c

kernel - Fix bug in socket_wait() (used by samba)

* socket_wait() was not properly initializing the temporary kqueue
  structure, resulting in corruption that prevented the event from being
  properly deleted.

* Fixes mount_smbfs panic.

Reported-by: dflyum
Delta File
+3 -1 sys/kern/sys_generic.c
+3 -1 1 file