svn commit: r310106 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

2016-12-15 Thread Alexander Motin
Author: mav
Date: Thu Dec 15 08:11:32 2016
New Revision: 310106
URL: https://svnweb.freebsd.org/changeset/base/310106

Log:
  MFC 309714: Fix spa_alloc_tree sorting by offset in r305331.
  
  Original commit "7090 zfs should improve allocation order" declares alloc
  queue sorted by time and offset.  But in practice io_offset is always zero,
  so sorting happened only by time, while order of writes with equal time was
  completely random.  On Illumos this did not affected much thanks to using
  high resolution timestamps.  On FreeBSD due to using much faster but low
  resolution timestamps it caused bad data placement on disks, affecting
  further read performance.
  
  This change switches zio_timestamp_compare() from comparing uninitialized
  io_offset to really populated io_bookmark values.  I haven't decided yet
  what to do with timestampts, but on simple tests this change gives the
  same peformance results by just making code to work as declared.

Modified:
  stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
==
--- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c  Thu Dec 
15 08:10:47 2016(r310105)
+++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c  Thu Dec 
15 08:11:32 2016(r310106)
@@ -568,9 +568,24 @@ zio_timestamp_compare(const void *x1, co
if (z1->io_queued_timestamp > z2->io_queued_timestamp)
return (1);
 
-   if (z1->io_offset < z2->io_offset)
+   if (z1->io_bookmark.zb_objset < z2->io_bookmark.zb_objset)
return (-1);
-   if (z1->io_offset > z2->io_offset)
+   if (z1->io_bookmark.zb_objset > z2->io_bookmark.zb_objset)
+   return (1);
+
+   if (z1->io_bookmark.zb_object < z2->io_bookmark.zb_object)
+   return (-1);
+   if (z1->io_bookmark.zb_object > z2->io_bookmark.zb_object)
+   return (1);
+
+   if (z1->io_bookmark.zb_level < z2->io_bookmark.zb_level)
+   return (-1);
+   if (z1->io_bookmark.zb_level > z2->io_bookmark.zb_level)
+   return (1);
+
+   if (z1->io_bookmark.zb_blkid < z2->io_bookmark.zb_blkid)
+   return (-1);
+   if (z1->io_bookmark.zb_blkid > z2->io_bookmark.zb_blkid)
return (1);
 
if (z1 < z2)
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r310110 - stable/10/sys/vm

2016-12-15 Thread Konstantin Belousov
Author: kib
Date: Thu Dec 15 10:47:35 2016
New Revision: 310110
URL: https://svnweb.freebsd.org/changeset/base/310110

Log:
  MFC r309708:
  Style.

Modified:
  stable/10/sys/vm/phys_pager.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/vm/phys_pager.c
==
--- stable/10/sys/vm/phys_pager.c   Thu Dec 15 10:44:45 2016
(r310109)
+++ stable/10/sys/vm/phys_pager.c   Thu Dec 15 10:47:35 2016
(r310110)
@@ -56,9 +56,6 @@ phys_pager_init(void)
mtx_init(&phys_pager_mtx, "phys_pager list", NULL, MTX_DEF);
 }
 
-/*
- * MPSAFE
- */
 static vm_object_t
 phys_pager_alloc(void *handle, vm_ooffset_t size, vm_prot_t prot,
 vm_ooffset_t foff, struct ucred *cred)
@@ -101,8 +98,8 @@ phys_pager_alloc(void *handle, vm_ooffse
object = object1;
object1 = NULL;
object->handle = handle;
-   TAILQ_INSERT_TAIL(&phys_pager_object_list, 
object,
-   pager_object_list);
+   TAILQ_INSERT_TAIL(&phys_pager_object_list,
+   object, pager_object_list);
}
} else {
if (pindex > object->size)
@@ -117,9 +114,6 @@ phys_pager_alloc(void *handle, vm_ooffse
return (object);
 }
 
-/*
- * MPSAFE
- */
 static void
 phys_pager_dealloc(vm_object_t object)
 {
@@ -167,7 +161,7 @@ phys_pager_getpages(vm_object_t object, 
 
 static void
 phys_pager_putpages(vm_object_t object, vm_page_t *m, int count, boolean_t 
sync,
-   int *rtvals)
+int *rtvals)
 {
 
panic("phys_pager_putpage called");
@@ -185,7 +179,7 @@ phys_pager_putpages(vm_object_t object, 
 #endif
 static boolean_t
 phys_pager_haspage(vm_object_t object, vm_pindex_t pindex, int *before,
-  int *after)
+int *after)
 {
vm_pindex_t base, end;
 
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r310111 - stable/10/sys/vm

2016-12-15 Thread Konstantin Belousov
Author: kib
Date: Thu Dec 15 10:51:35 2016
New Revision: 310111
URL: https://svnweb.freebsd.org/changeset/base/310111

Log:
  MFC r309709:
  Move map_generation snapshot value into struct faultstate.

Modified:
  stable/10/sys/vm/vm_fault.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/vm/vm_fault.c
==
--- stable/10/sys/vm/vm_fault.c Thu Dec 15 10:47:35 2016(r310110)
+++ stable/10/sys/vm/vm_fault.c Thu Dec 15 10:51:35 2016(r310111)
@@ -124,6 +124,7 @@ struct faultstate {
vm_map_t map;
vm_map_entry_t entry;
int lookup_still_valid;
+   int map_generation;
struct vnode *vp;
 };
 
@@ -336,7 +337,6 @@ vm_fault_hold(vm_map_t map, vm_offset_t 
long ahead, behind;
int alloc_req, era, faultcount, nera, reqpage, result;
boolean_t dead, growstack, is_first_object_locked, wired;
-   int map_generation;
vm_object_t next_object;
vm_page_t marray[VM_FAULT_READ_MAX];
int hardfault;
@@ -372,7 +372,7 @@ RetryFault:;
return (result);
}
 
-   map_generation = fs.map->timestamp;
+   fs.map_generation = fs.map->timestamp;
 
if (fs.entry->eflags & MAP_ENTRY_NOFAULT) {
panic("vm_fault: fault on nofault entry, addr: %lx",
@@ -950,7 +950,7 @@ readrest:
goto RetryFault;
}
fs.lookup_still_valid = TRUE;
-   if (fs.map->timestamp != map_generation) {
+   if (fs.map->timestamp != fs.map_generation) {
result = vm_map_lookup_locked(&fs.map, vaddr, 
fault_type,
&fs.entry, &retry_object, &retry_pindex, 
&retry_prot, &wired);
 
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r310121 - in stable/10: bin/ps lib/libkvm sys/compat/freebsd32 sys/kern sys/sys usr.bin/procstat usr.bin/top

2016-12-15 Thread Eric van Gyzen
Author: vangyzen
Date: Thu Dec 15 16:52:17 2016
New Revision: 310121
URL: https://svnweb.freebsd.org/changeset/base/310121

Log:
  MFC r309676
  
  Export the whole thread name in kinfo_proc
  
  kinfo_proc::ki_tdname is three characters shorter than
  thread::td_name.  Add a ki_moretdname field for these three
  extra characters.  Add the new field to kinfo_proc32, as well.
  Update all in-tree consumers to read the new field and assemble
  the full name, except for lldb's HostThreadFreeBSD.cpp, which
  I will handle separately.  Bump __FreeBSD_version.
  
  Sponsored by: Dell EMC

Modified:
  stable/10/bin/ps/print.c
  stable/10/lib/libkvm/kvm_proc.c
  stable/10/sys/compat/freebsd32/freebsd32.h
  stable/10/sys/kern/kern_proc.c
  stable/10/sys/sys/param.h
  stable/10/sys/sys/user.h
  stable/10/usr.bin/procstat/procstat.c
  stable/10/usr.bin/procstat/procstat.h
  stable/10/usr.bin/procstat/procstat_cs.c
  stable/10/usr.bin/procstat/procstat_kstack.c
  stable/10/usr.bin/procstat/procstat_threads.c
  stable/10/usr.bin/top/machine.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/bin/ps/print.c
==
--- stable/10/bin/ps/print.cThu Dec 15 16:51:33 2016(r310120)
+++ stable/10/bin/ps/print.cThu Dec 15 16:52:17 2016(r310121)
@@ -119,11 +119,12 @@ command(KINFO *k, VARENT *ve)
if (cflag) {
/* If it is the last field, then don't pad */
if (STAILQ_NEXT(ve, next_ve) == NULL) {
-   asprintf(&str, "%s%s%s%s",
+   asprintf(&str, "%s%s%s%s%s",
k->ki_d.prefix ? k->ki_d.prefix : "",
k->ki_p->ki_comm,
(showthreads && k->ki_p->ki_numthreads > 1) ? "/" : 
"",
-   (showthreads && k->ki_p->ki_numthreads > 1) ? 
k->ki_p->ki_tdname : "");
+   (showthreads && k->ki_p->ki_numthreads > 1) ? 
k->ki_p->ki_tdname : "",
+   (showthreads && k->ki_p->ki_numthreads > 1) ? 
k->ki_p->ki_moretdname : "");
} else
str = strdup(k->ki_p->ki_comm);
 
@@ -171,14 +172,16 @@ ucomm(KINFO *k, VARENT *ve)
char *str;
 
if (STAILQ_NEXT(ve, next_ve) == NULL) { /* last field, don't pad */
-   asprintf(&str, "%s%s%s%s",
+   asprintf(&str, "%s%s%s%s%s",
k->ki_d.prefix ? k->ki_d.prefix : "",
k->ki_p->ki_comm,
(showthreads && k->ki_p->ki_numthreads > 1) ? "/" : "",
-   (showthreads && k->ki_p->ki_numthreads > 1) ? 
k->ki_p->ki_tdname : "");
+   (showthreads && k->ki_p->ki_numthreads > 1) ? 
k->ki_p->ki_tdname : "",
+   (showthreads && k->ki_p->ki_numthreads > 1) ? 
k->ki_p->ki_moretdname : "");
} else {
if (showthreads && k->ki_p->ki_numthreads > 1)
-   asprintf(&str, "%s/%s", k->ki_p->ki_comm, 
k->ki_p->ki_tdname);
+   asprintf(&str, "%s/%s%s", k->ki_p->ki_comm,
+   k->ki_p->ki_tdname, k->ki_p->ki_moretdname);
else
str = strdup(k->ki_p->ki_comm);
}
@@ -191,7 +194,8 @@ tdnam(KINFO *k, VARENT *ve __unused)
char *str;
 
if (showthreads && k->ki_p->ki_numthreads > 1)
-   str = strdup(k->ki_p->ki_tdname);
+   asprintf(&str, "%s%s", k->ki_p->ki_tdname,
+   k->ki_p->ki_moretdname);
else
str = strdup("  ");
 

Modified: stable/10/lib/libkvm/kvm_proc.c
==
--- stable/10/lib/libkvm/kvm_proc.c Thu Dec 15 16:51:33 2016
(r310120)
+++ stable/10/lib/libkvm/kvm_proc.c Thu Dec 15 16:52:17 2016
(r310121)
@@ -424,8 +424,6 @@ nopgrp:
kp->ki_pri.pri_native = mtd.td_base_pri;
kp->ki_lastcpu = mtd.td_lastcpu;
kp->ki_wchan = mtd.td_wchan;
-   if (mtd.td_name[0] != 0)
-   strlcpy(kp->ki_tdname, mtd.td_name, MAXCOMLEN);
kp->ki_oncpu = mtd.td_oncpu;
if (mtd.td_name[0] != '\0')
strlcpy(kp->ki_tdname, mtd.td_name, 
sizeof(kp->ki_tdname));

Modified: stable/10/sys/compat/freebsd32/freebsd32.h
==
--- stable/10/sys/compat/freebsd32/freebsd32.h  Thu Dec 15 16:51:33 2016
(r310120)
+++ stable/10/sys/compat/freebsd32/freebsd32.h  Thu Dec 15 16:52:17 2016
(r310121)
@@ -315,7 +315,8 @@ struct kinfo_proc32 {
charki_comm[COMMLEN+1];
charki_emul[KI_EMULNAMELEN+1];
charki_loginclass[LOGINCLASSLEN+1];
-   charki_sparestrin

svn commit: r310127 - stable/10/tools/build/mk

2016-12-15 Thread Ngie Cooper
Author: ngie
Date: Thu Dec 15 20:13:40 2016
New Revision: 310127
URL: https://svnweb.freebsd.org/changeset/base/310127

Log:
  MFstable/11 r310126:
  
  MFC r309602:
  
  Remove svn[lite]{bench,fsfs} if either MK_SVN == no or MK_SVNLITE == no

Modified:
  stable/10/tools/build/mk/OptionalObsoleteFiles.inc
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc
==
--- stable/10/tools/build/mk/OptionalObsoleteFiles.inc  Thu Dec 15 20:10:20 
2016(r310126)
+++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc  Thu Dec 15 20:13:40 
2016(r310127)
@@ -5511,7 +5511,9 @@ OLD_FILES+=usr/share/man/man8/wpa_suppli
 .if ${MK_SVNLITE} == no || ${MK_SVN} == yes
 OLD_FILES+=usr/bin/svnlite
 OLD_FILES+=usr/bin/svnliteadmin
+OLD_FILES+=usr/bin/svnlitebench
 OLD_FILES+=usr/bin/svnlitedumpfilter
+OLD_FILES+=usr/bin/svnlitefsfs
 OLD_FILES+=usr/bin/svnlitelook
 OLD_FILES+=usr/bin/svnlitemucc
 OLD_FILES+=usr/bin/svnliterdump
@@ -5524,7 +5526,9 @@ OLD_FILES+=usr/share/man/man1/svnlite.1.
 .if ${MK_SVN} == no
 OLD_FILES+=usr/bin/svn
 OLD_FILES+=usr/bin/svnadmin
+OLD_FILES+=usr/bin/svnbench
 OLD_FILES+=usr/bin/svndumpfilter
+OLD_FILES+=usr/bin/svnfsfs
 OLD_FILES+=usr/bin/svnlook
 OLD_FILES+=usr/bin/svnmucc
 OLD_FILES+=usr/bin/svnrdump
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r310133 - in stable: 10/sys/mips/mips 11/sys/mips/mips

2016-12-15 Thread John Baldwin
Author: jhb
Date: Fri Dec 16 01:06:35 2016
New Revision: 310133
URL: https://svnweb.freebsd.org/changeset/base/310133

Log:
  MFC 308690: Sync instruction cache's after writing user breakpoints on MIPS.
  
  Add an implementation for pmaps_sync_icache() on MIPS that sync's the
  instruction cache on all CPUs via smp_rendezvous() after a debugger
  inserts a breakpoint via ptrace(PT_IO).

Modified:
  stable/10/sys/mips/mips/pmap.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/sys/mips/mips/pmap.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/sys/mips/mips/pmap.c
==
--- stable/10/sys/mips/mips/pmap.c  Fri Dec 16 00:35:59 2016
(r310132)
+++ stable/10/sys/mips/mips/pmap.c  Fri Dec 16 01:06:35 2016
(r310133)
@@ -74,11 +74,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#ifdef SMP
 #include 
-#else
-#include 
-#endif
 #include 
 #include 
 
@@ -3203,9 +3199,19 @@ pmap_activate(struct thread *td)
critical_exit();
 }
 
+static void
+pmap_sync_icache_one(void *arg __unused)
+{
+
+   mips_icache_sync_all();
+   mips_dcache_wbinv_all();
+}
+
 void
 pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz)
 {
+
+   smp_rendezvous(NULL, pmap_sync_icache_one, NULL, NULL);
 }
 
 /*
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"


svn commit: r310134 - in stable: 10/include 11/include

2016-12-15 Thread John Baldwin
Author: jhb
Date: Fri Dec 16 01:14:00 2016
New Revision: 310134
URL: https://svnweb.freebsd.org/changeset/base/310134

Log:
  MFC 309274:
  Use the correct name for the GCC macro indicating max_align_t is defined.

Modified:
  stable/10/include/stddef.h
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/include/stddef.h
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/include/stddef.h
==
--- stable/10/include/stddef.h  Fri Dec 16 01:06:35 2016(r310133)
+++ stable/10/include/stddef.h  Fri Dec 16 01:14:00 2016(r310134)
@@ -63,7 +63,7 @@ typedef   ___wchar_t  wchar_t;
 #ifndef __CLANG_MAX_ALIGN_T_DEFINED
 typedef__max_align_t   max_align_t;
 #define __CLANG_MAX_ALIGN_T_DEFINED
-#define __GCC_MAX_ALIGN_T
+#define _GCC_MAX_ALIGN_T
 #endif
 #endif
 
___
svn-src-stable-10@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10
To unsubscribe, send any mail to "svn-src-stable-10-unsubscr...@freebsd.org"