Re: svn commit: r356348 - in head/sys: kern vm

2020-01-05 Thread Jeff Roberson

On Sun, 5 Jan 2020, Mark Linimon wrote:


On Sat, Jan 04, 2020 at 03:15:34AM +, Jeff Roberson wrote:

  Use a separate lock for the zone and keg.


Out of curiosity, will there be measurable real-world speedups from
this an similar work, or will this mostly apply to edge cases, or ... ?


It depends on which real world.  A lot of workloads don't really show much 
allocator activity.  For very high speed networking, and especially very 
high speed networking on big NUMA machines, the speedup is considerable. 
Netflix reported the earlier round of work cut the time spent in uma by 
about 30%.  For non-numa machines the last ~6 patches cut another 30% off 
of that in my tests.  Even for Netflix, uma was not in the top 5 of their 
profile before this work.


The major perf upshot was somewhere around an 8x improvement when freeing 
on a different NUMA domain than you allocated from when the allocation 
policy is first-touch.  This is called a cross-domain or 'xdomain' free in 
the code.  This made it possible to enable first-touch for UMA by default 
on all NUMA machines.


I wrote a simple allocator perf test that loops allocating 2k mbufs and 
appending them to a random remote core's queue after which it drains its 
local queue.  10 million iterations across 32 cores in two numa domains 
gives 320,000,000 packets allocated and freed.  The time within the same 
domain was about 4 seconds, before this patch series going to a different 
domain was around 40 seconds and after it was around 5 seconds.  So only 
a ~25% penalty when doing 2 million packets-per-second-per-core.


Many of the recent changes were really as much about code organization and 
readability as performance.  After 18 years of features coming and going, 
reorganizations, etc. it was getting a bit crufty.


Jeff



mcl


___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r356373 - head/sys/kern

2020-01-05 Thread Mateusz Guzik
Author: mjg
Date: Sun Jan  5 12:46:35 2020
New Revision: 356373
URL: https://svnweb.freebsd.org/changeset/base/356373

Log:
  Mark mtxpool_sleep as read mostly, not frequently.
  
  The latter is not justified.

Modified:
  head/sys/kern/kern_mtxpool.c

Modified: head/sys/kern/kern_mtxpool.c
==
--- head/sys/kern/kern_mtxpool.cSun Jan  5 04:06:40 2020
(r356372)
+++ head/sys/kern/kern_mtxpool.cSun Jan  5 12:46:35 2020
(r356373)
@@ -82,7 +82,7 @@ struct mtx_pool {
 #define mtx_pool_shift mtx_pool_header.mtxpool_shift
 #define mtx_pool_next  mtx_pool_header.mtxpool_next
 
-struct mtx_pool __read_frequently *mtxpool_sleep;
+struct mtx_pool __read_mostly *mtxpool_sleep;
 
 #if UINTPTR_MAX == UINT64_MAX  /* 64 bits */
 # define POINTER_BITS  64
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r356374 - in head/sys: kern sys

2020-01-05 Thread Mateusz Guzik
Author: mjg
Date: Sun Jan  5 12:47:29 2020
New Revision: 356374
URL: https://svnweb.freebsd.org/changeset/base/356374

Log:
  locks: convert delay times to u_short
  
  int is just a waste of space for this purpose.

Modified:
  head/sys/kern/kern_mutex.c
  head/sys/kern/kern_rwlock.c
  head/sys/kern/kern_sx.c
  head/sys/kern/subr_lock.c
  head/sys/sys/lock.h

Modified: head/sys/kern/kern_mutex.c
==
--- head/sys/kern/kern_mutex.c  Sun Jan  5 12:46:35 2020(r356373)
+++ head/sys/kern/kern_mutex.c  Sun Jan  5 12:47:29 2020(r356374)
@@ -144,9 +144,9 @@ static SYSCTL_NODE(_debug, OID_AUTO, mtx, CTLFLAG_RD, 
 
 static struct lock_delay_config __read_frequently mtx_delay;
 
-SYSCTL_INT(_debug_mtx, OID_AUTO, delay_base, CTLFLAG_RW, &mtx_delay.base,
+SYSCTL_U16(_debug_mtx, OID_AUTO, delay_base, CTLFLAG_RW, &mtx_delay.base,
 0, "");
-SYSCTL_INT(_debug_mtx, OID_AUTO, delay_max, CTLFLAG_RW, &mtx_delay.max,
+SYSCTL_U16(_debug_mtx, OID_AUTO, delay_max, CTLFLAG_RW, &mtx_delay.max,
 0, "");
 
 LOCK_DELAY_SYSINIT_DEFAULT(mtx_delay);

Modified: head/sys/kern/kern_rwlock.c
==
--- head/sys/kern/kern_rwlock.c Sun Jan  5 12:46:35 2020(r356373)
+++ head/sys/kern/kern_rwlock.c Sun Jan  5 12:47:29 2020(r356374)
@@ -94,18 +94,18 @@ struct lock_class lock_class_rw = {
 };
 
 #ifdef ADAPTIVE_RWLOCKS
-static int __read_frequently rowner_retries;
-static int __read_frequently rowner_loops;
+static u_short __read_frequently rowner_retries;
+static u_short __read_frequently rowner_loops;
 static SYSCTL_NODE(_debug, OID_AUTO, rwlock, CTLFLAG_RD, NULL,
 "rwlock debugging");
-SYSCTL_INT(_debug_rwlock, OID_AUTO, retry, CTLFLAG_RW, &rowner_retries, 0, "");
-SYSCTL_INT(_debug_rwlock, OID_AUTO, loops, CTLFLAG_RW, &rowner_loops, 0, "");
+SYSCTL_U16(_debug_rwlock, OID_AUTO, retry, CTLFLAG_RW, &rowner_retries, 0, "");
+SYSCTL_U16(_debug_rwlock, OID_AUTO, loops, CTLFLAG_RW, &rowner_loops, 0, "");
 
 static struct lock_delay_config __read_frequently rw_delay;
 
-SYSCTL_INT(_debug_rwlock, OID_AUTO, delay_base, CTLFLAG_RW, &rw_delay.base,
+SYSCTL_U16(_debug_rwlock, OID_AUTO, delay_base, CTLFLAG_RW, &rw_delay.base,
 0, "");
-SYSCTL_INT(_debug_rwlock, OID_AUTO, delay_max, CTLFLAG_RW, &rw_delay.max,
+SYSCTL_U16(_debug_rwlock, OID_AUTO, delay_max, CTLFLAG_RW, &rw_delay.max,
 0, "");
 
 static void

Modified: head/sys/kern/kern_sx.c
==
--- head/sys/kern/kern_sx.c Sun Jan  5 12:46:35 2020(r356373)
+++ head/sys/kern/kern_sx.c Sun Jan  5 12:47:29 2020(r356374)
@@ -143,17 +143,17 @@ struct lock_class lock_class_sx = {
 #endif
 
 #ifdef ADAPTIVE_SX
-static __read_frequently u_int asx_retries;
-static __read_frequently u_int asx_loops;
+static u_short __read_frequently asx_retries;
+static u_short __read_frequently asx_loops;
 static SYSCTL_NODE(_debug, OID_AUTO, sx, CTLFLAG_RD, NULL, "sxlock debugging");
-SYSCTL_UINT(_debug_sx, OID_AUTO, retries, CTLFLAG_RW, &asx_retries, 0, "");
-SYSCTL_UINT(_debug_sx, OID_AUTO, loops, CTLFLAG_RW, &asx_loops, 0, "");
+SYSCTL_U16(_debug_sx, OID_AUTO, retries, CTLFLAG_RW, &asx_retries, 0, "");
+SYSCTL_U16(_debug_sx, OID_AUTO, loops, CTLFLAG_RW, &asx_loops, 0, "");
 
 static struct lock_delay_config __read_frequently sx_delay;
 
-SYSCTL_INT(_debug_sx, OID_AUTO, delay_base, CTLFLAG_RW, &sx_delay.base,
+SYSCTL_U16(_debug_sx, OID_AUTO, delay_base, CTLFLAG_RW, &sx_delay.base,
 0, "");
-SYSCTL_INT(_debug_sx, OID_AUTO, delay_max, CTLFLAG_RW, &sx_delay.max,
+SYSCTL_U16(_debug_sx, OID_AUTO, delay_max, CTLFLAG_RW, &sx_delay.max,
 0, "");
 
 static void

Modified: head/sys/kern/subr_lock.c
==
--- head/sys/kern/subr_lock.c   Sun Jan  5 12:46:35 2020(r356373)
+++ head/sys/kern/subr_lock.c   Sun Jan  5 12:47:29 2020(r356374)
@@ -123,7 +123,7 @@ void
 lock_delay(struct lock_delay_arg *la)
 {
struct lock_delay_config *lc = la->config;
-   u_int i;
+   u_short i;
 
la->delay <<= 1;
if (__predict_false(la->delay > lc->max))

Modified: head/sys/sys/lock.h
==
--- head/sys/sys/lock.h Sun Jan  5 12:46:35 2020(r356373)
+++ head/sys/sys/lock.h Sun Jan  5 12:47:29 2020(r356374)
@@ -183,13 +183,13 @@ extern struct lock_class lock_class_lockmgr;
 extern struct lock_class *lock_classes[];
 
 struct lock_delay_config {
-   u_int base;
-   u_int max;
+   u_short base;
+   u_short max;
 };
 
 struct lock_delay_arg {
struct lock_delay_config *config;
-   u_int delay;
+   u_short delay;
u_int spin_cnt;
 };
 
___
svn-src-head@freebsd.org mailing list
https://lis

svn commit: r356375 - in head/sys: amd64/amd64 kern sys

2020-01-05 Thread Mateusz Guzik
Author: mjg
Date: Sun Jan  5 12:48:19 2020
New Revision: 356375
URL: https://svnweb.freebsd.org/changeset/base/356375

Log:
  locks: add default delay struct
  
  Use it for all primitives. This makes everything fit in 8 bytes.

Modified:
  head/sys/amd64/amd64/pmap.c
  head/sys/kern/kern_mutex.c
  head/sys/kern/kern_rwlock.c
  head/sys/kern/kern_sx.c
  head/sys/kern/subr_lock.c
  head/sys/sys/lock.h

Modified: head/sys/amd64/amd64/pmap.c
==
--- head/sys/amd64/amd64/pmap.c Sun Jan  5 12:47:29 2020(r356374)
+++ head/sys/amd64/amd64/pmap.c Sun Jan  5 12:48:19 2020(r356375)
@@ -763,8 +763,7 @@ SYSCTL_INT(_vm_pmap, OID_AUTO, invl_max_qlen, CTLFLAG_
 "");
 #endif
 
-static struct lock_delay_config __read_frequently di_delay;
-LOCK_DELAY_SYSINIT_DEFAULT(di_delay);
+#define di_delay   locks_delay
 
 static void
 pmap_delayed_invl_start_u(void)

Modified: head/sys/kern/kern_mutex.c
==
--- head/sys/kern/kern_mutex.c  Sun Jan  5 12:47:29 2020(r356374)
+++ head/sys/kern/kern_mutex.c  Sun Jan  5 12:48:19 2020(r356375)
@@ -140,6 +140,7 @@ struct lock_class lock_class_mtx_spin = {
 };
 
 #ifdef ADAPTIVE_MUTEXES
+#ifdef MUTEX_CUSTOM_BACKOFF
 static SYSCTL_NODE(_debug, OID_AUTO, mtx, CTLFLAG_RD, NULL, "mtx debugging");
 
 static struct lock_delay_config __read_frequently mtx_delay;
@@ -150,8 +151,12 @@ SYSCTL_U16(_debug_mtx, OID_AUTO, delay_max, CTLFLAG_RW
 0, "");
 
 LOCK_DELAY_SYSINIT_DEFAULT(mtx_delay);
+#else
+#define mtx_delay  locks_delay
 #endif
+#endif
 
+#ifdef MUTEX_SPIN_CUSTOM_BACKOFF
 static SYSCTL_NODE(_debug, OID_AUTO, mtx_spin, CTLFLAG_RD, NULL,
 "mtx spin debugging");
 
@@ -163,6 +168,9 @@ SYSCTL_INT(_debug_mtx_spin, OID_AUTO, delay_max, CTLFL
 &mtx_spin_delay.max, 0, "");
 
 LOCK_DELAY_SYSINIT_DEFAULT(mtx_spin_delay);
+#else
+#define mtx_spin_delay locks_delay
+#endif
 
 /*
  * System-wide mutexes

Modified: head/sys/kern/kern_rwlock.c
==
--- head/sys/kern/kern_rwlock.c Sun Jan  5 12:47:29 2020(r356374)
+++ head/sys/kern/kern_rwlock.c Sun Jan  5 12:48:19 2020(r356375)
@@ -94,6 +94,7 @@ struct lock_class lock_class_rw = {
 };
 
 #ifdef ADAPTIVE_RWLOCKS
+#ifdef RWLOCK_CUSTOM_BACKOFF
 static u_short __read_frequently rowner_retries;
 static u_short __read_frequently rowner_loops;
 static SYSCTL_NODE(_debug, OID_AUTO, rwlock, CTLFLAG_RD, NULL,
@@ -117,6 +118,11 @@ rw_lock_delay_init(void *arg __unused)
rowner_loops = max(1, rw_delay.max);
 }
 LOCK_DELAY_SYSINIT(rw_lock_delay_init);
+#else
+#define rw_delay   locks_delay
+#define rowner_retries locks_delay_retries
+#define rowner_loops   locks_delay_loops
+#endif
 #endif
 
 /*

Modified: head/sys/kern/kern_sx.c
==
--- head/sys/kern/kern_sx.c Sun Jan  5 12:47:29 2020(r356374)
+++ head/sys/kern/kern_sx.c Sun Jan  5 12:48:19 2020(r356375)
@@ -143,6 +143,7 @@ struct lock_class lock_class_sx = {
 #endif
 
 #ifdef ADAPTIVE_SX
+#ifdef SX_CUSTOM_BACKOFF
 static u_short __read_frequently asx_retries;
 static u_short __read_frequently asx_loops;
 static SYSCTL_NODE(_debug, OID_AUTO, sx, CTLFLAG_RD, NULL, "sxlock debugging");
@@ -165,6 +166,11 @@ sx_lock_delay_init(void *arg __unused)
asx_loops = max(1, sx_delay.max);
 }
 LOCK_DELAY_SYSINIT(sx_lock_delay_init);
+#else
+#define sx_delay   locks_delay
+#define asx_retrieslocks_delay_retries
+#define asx_loops  locks_delay_loops
+#endif
 #endif
 
 void

Modified: head/sys/kern/subr_lock.c
==
--- head/sys/kern/subr_lock.c   Sun Jan  5 12:47:29 2020(r356374)
+++ head/sys/kern/subr_lock.c   Sun Jan  5 12:48:19 2020(r356375)
@@ -161,6 +161,29 @@ lock_delay_default_init(struct lock_delay_config *lc)
lc->max = 32678;
 }
 
+struct lock_delay_config __read_frequently locks_delay;
+u_short __read_frequently locks_delay_retries;
+u_short __read_frequently locks_delay_loops;
+
+SYSCTL_U16(_debug_lock, OID_AUTO, delay_base, CTLFLAG_RW, &locks_delay.base,
+0, "");
+SYSCTL_U16(_debug_lock, OID_AUTO, delay_max, CTLFLAG_RW, &locks_delay.max,
+0, "");
+SYSCTL_U16(_debug_lock, OID_AUTO, delay_retries, CTLFLAG_RW, 
&locks_delay_retries,
+0, "");
+SYSCTL_U16(_debug_lock, OID_AUTO, delay_loops, CTLFLAG_RW, &locks_delay_loops,
+0, "");
+
+static void
+locks_delay_init(void *arg __unused)
+{
+
+   lock_delay_default_init(&locks_delay);
+   locks_delay_retries = 10;
+   locks_delay_loops = max(1, locks_delay.max);
+}
+LOCK_DELAY_SYSINIT(locks_delay_init);
+
 #ifdef DDB
 DB_SHOW_COMMAND(lock, db_show_lock)
 {

Modified: head/sys/sys/lock.h

svn commit: r356376 - head/sys/netinet

2020-01-05 Thread Michael Tuexen
Author: tuexen
Date: Sun Jan  5 13:56:32 2020
New Revision: 356376
URL: https://svnweb.freebsd.org/changeset/base/356376

Log:
  Ensure that we don't miss a trigger for kicking off the SCTP iterator.
  
  Reported by:  nwhitehorn@
  MFC after:1 week

Modified:
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctputil.c
==
--- head/sys/netinet/sctputil.c Sun Jan  5 12:48:19 2020(r356375)
+++ head/sys/netinet/sctputil.c Sun Jan  5 13:56:32 2020(r356376)
@@ -1475,12 +1475,11 @@ no_stcb:
 void
 sctp_iterator_worker(void)
 {
-   struct sctp_iterator *it, *nit;
+   struct sctp_iterator *it;
 
/* This function is called with the WQ lock in place */
-
sctp_it_ctl.iterator_running = 1;
-   TAILQ_FOREACH_SAFE(it, &sctp_it_ctl.iteratorhead, sctp_nxt_itr, nit) {
+   while ((it = TAILQ_FIRST(&sctp_it_ctl.iteratorhead)) != NULL) {
/* now lets work on this one */
TAILQ_REMOVE(&sctp_it_ctl.iteratorhead, it, sctp_nxt_itr);
SCTP_IPI_ITERATOR_WQ_UNLOCK();
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r356377 - head/sys/netinet

2020-01-05 Thread Michael Tuexen
Author: tuexen
Date: Sun Jan  5 14:06:40 2020
New Revision: 356377
URL: https://svnweb.freebsd.org/changeset/base/356377

Log:
  Return -1 consistently if an error occurs.
  
  MFC after:1 week

Modified:
  head/sys/netinet/sctp_pcb.c

Modified: head/sys/netinet/sctp_pcb.c
==
--- head/sys/netinet/sctp_pcb.c Sun Jan  5 13:56:32 2020(r356376)
+++ head/sys/netinet/sctp_pcb.c Sun Jan  5 14:06:40 2020(r356377)
@@ -7131,7 +7131,7 @@ sctp_initiate_iterator(inp_func inpf,
SCTP_M_ITER);
if (it == NULL) {
SCTP_LTRACE_ERR_RET(NULL, NULL, NULL, SCTP_FROM_SCTP_PCB, 
ENOMEM);
-   return (ENOMEM);
+   return (-1);
}
memset(it, 0, sizeof(*it));
it->function_assoc = af;
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r356378 - head/sys/netinet

2020-01-05 Thread Michael Tuexen
Author: tuexen
Date: Sun Jan  5 14:08:01 2020
New Revision: 356378
URL: https://svnweb.freebsd.org/changeset/base/356378

Log:
  Don't make the sendall iterator as being up if it could not be started.
  
  MFC after:1 week

Modified:
  head/sys/netinet/sctp_output.c

Modified: head/sys/netinet/sctp_output.c
==
--- head/sys/netinet/sctp_output.c  Sun Jan  5 14:06:40 2020
(r356377)
+++ head/sys/netinet/sctp_output.c  Sun Jan  5 14:08:01 2020
(r356378)
@@ -6932,7 +6932,7 @@ sctp_sendall(struct sctp_inpcb *inp, struct uio *uio, 
(void *)ca, 0,
sctp_sendall_completes, inp, 1);
if (ret) {
-   SCTP_PRINTF("Failed to initiate iterator for sendall\n");
+   inp->sctp_flags &= ~SCTP_PCB_FLAGS_SND_ITERATOR_UP;
SCTP_FREE(ca, SCTP_M_COPYAL);
SCTP_LTRACE_ERR_RET_PKT(m, inp, NULL, NULL, 
SCTP_FROM_SCTP_OUTPUT, EFAULT);
return (EFAULT);
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r356241 - in head/sys: amd64/linux amd64/linux32 arm64/linux compat/linux i386/linux

2020-01-05 Thread Edward Tomasz Napierala
HNY, and sorry for the late response.

Now... I don't know.  Looking at sys/amd64/linux/linux_locore.asm,
it looks like __vdso_getcpu() should return ENOSYS, but for some
reason the getcpu(2) syscall works just fine.  The VDSO symbol
doesn't get used for some reason?

On 0101T0116, Dmitry Chagin wrote:
> Hi, HNY! What about vdso?
> 
> ср, 1 янв. 2020 г. в 01:01, Edward Tomasz Napierala :
> 
> > Author: trasz
> > Date: Tue Dec 31 22:01:08 2019
> > New Revision: 356241
> > URL: https://svnweb.freebsd.org/changeset/base/356241
> >
> > Log:
> >   Add basic getcpu(2) support to linuxulator.  The purpose of this
> >   syscall is to query the CPU number and the NUMA domain the calling
> >   thread is currently running on.  The third argument is ignored.
> >   It doesn't do anything regarding scheduling - it's literally
> >   just a way to query the current state, without any guarantees
> >   you won't get rescheduled an opcode later.
> >
> >   This unbreaks Java from CentOS 8
> >   (java-11-openjdk-11.0.5.10-0.el8_0.x86_64).
> >
> >   Reviewed by:  kib
> >   MFC after:2 weeks
> >   Sponsored by: The FreeBSD Foundation
> >   Differential Revision:https://reviews.freebsd.org/D22972
> >
> > Modified:
> >   head/sys/amd64/linux/linux_dummy.c
> >   head/sys/amd64/linux32/linux32_dummy.c
> >   head/sys/arm64/linux/linux_dummy.c
> >   head/sys/compat/linux/linux_misc.c
> >   head/sys/i386/linux/linux_dummy.c
> >
> > Modified: head/sys/amd64/linux/linux_dummy.c
> >
> > ==
> > --- head/sys/amd64/linux/linux_dummy.c  Tue Dec 31 18:58:29 2019
> > (r356240)
> > +++ head/sys/amd64/linux/linux_dummy.c  Tue Dec 31 22:01:08 2019
> > (r356241)
> > @@ -102,8 +102,6 @@ DUMMY(tee);
> >  DUMMY(vmsplice);
> >  /* Linux 2.6.18: */
> >  DUMMY(move_pages);
> > -/* Linux 2.6.19: */
> > -DUMMY(getcpu);
> >  /* Linux 2.6.22: */
> >  DUMMY(signalfd);
> >  /* Linux 2.6.27: */
> >
> > Modified: head/sys/amd64/linux32/linux32_dummy.c
> >
> > ==
> > --- head/sys/amd64/linux32/linux32_dummy.c  Tue Dec 31 18:58:29 2019
> >   (r356240)
> > +++ head/sys/amd64/linux32/linux32_dummy.c  Tue Dec 31 22:01:08 2019
> >   (r356241)
> > @@ -108,8 +108,6 @@ DUMMY(tee);
> >  DUMMY(vmsplice);
> >  /* Linux 2.6.18: */
> >  DUMMY(move_pages);
> > -/* Linux 2.6.19: */
> > -DUMMY(getcpu);
> >  /* Linux 2.6.22: */
> >  DUMMY(signalfd);
> >  /* Linux 2.6.27: */
> >
> > Modified: head/sys/arm64/linux/linux_dummy.c
> >
> > ==
> > --- head/sys/arm64/linux/linux_dummy.c  Tue Dec 31 18:58:29 2019
> > (r356240)
> > +++ head/sys/arm64/linux/linux_dummy.c  Tue Dec 31 22:01:08 2019
> > (r356241)
> > @@ -104,8 +104,6 @@ DUMMY(tee);
> >  DUMMY(vmsplice);
> >  /* Linux 2.6.18: */
> >  DUMMY(move_pages);
> > -/* Linux 2.6.19: */
> > -DUMMY(getcpu);
> >  /* Linux 2.6.27: */
> >  DUMMY(signalfd4);
> >  DUMMY(inotify_init1);
> >
> > Modified: head/sys/compat/linux/linux_misc.c
> >
> > ==
> > --- head/sys/compat/linux/linux_misc.c  Tue Dec 31 18:58:29 2019
> > (r356240)
> > +++ head/sys/compat/linux/linux_misc.c  Tue Dec 31 22:01:08 2019
> > (r356241)
> > @@ -2353,3 +2353,19 @@ out:
> > td->td_retval[0] = dst - args->buf;
> > return (error);
> >  }
> > +
> > +int
> > +linux_getcpu(struct thread *td, struct linux_getcpu_args *args)
> > +{
> > +   int cpu, error, node;
> > +
> > +   cpu = td->td_oncpu; /* Make sure it doesn't change during
> > copyout(9) */
> > +   error = 0;
> > +   node = 0; /* XXX: Fake NUMA node 0 for now */
> > +
> > +   if (args->cpu != NULL)
> > +   error = copyout(&cpu, args->cpu, sizeof(l_int));
> > +   if (args->node != NULL)
> > +   error = copyout(&node, args->node, sizeof(l_int));
> > +   return (error);
> > +}
> >
> > Modified: head/sys/i386/linux/linux_dummy.c
> >
> > ==
> > --- head/sys/i386/linux/linux_dummy.c   Tue Dec 31 18:58:29 2019
> > (r356240)
> > +++ head/sys/i386/linux/linux_dummy.c   Tue Dec 31 22:01:08 2019
> > (r356241)
> > @@ -104,8 +104,6 @@ DUMMY(tee);
> >  DUMMY(vmsplice);
> >  /* Linux 2.6.18: */
> >  DUMMY(move_pages);
> > -/* Linux 2.6.19: */
> > -DUMMY(getcpu);
> >  /* Linux 2.6.22: */
> >  DUMMY(signalfd);
> >  /* Linux 2.6.27: */
> >
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r356367 - in head: . share/mk

2020-01-05 Thread Ed Maste
On Sat, 4 Jan 2020 at 21:48, Ed Maste  wrote:
>
> Author: emaste
> Date: Sun Jan  5 02:47:56 2020
> New Revision: 356367
> URL: https://svnweb.freebsd.org/changeset/base/356367
>
> Log:
>   Do not build GCC 4.2.1 by default for any CPU architecture

mips.mips64 is currently failing on ci.freebsd.org (but not tinderbox) with:
09:23:51 --- libcxxrt.a ---
09:23:51 building static cxxrt library
09:23:51 ar -crD libcxxrt.a `NM='nm' NMFLAGS=''  lorder
libelftc_dem_gnu3.o terminate.o dynamic_cast.o memory.o auxhelper.o
exception.o stdexcept.o typeinfo.o guard.o  | tsort -q`
09:23:51 --- libcxxrt.so.1.full ---
09:23:51 /usr/obj/usr/src/mips.mips64/tmp/usr/bin/ld: BFD 2.17.50
[FreeBSD] 2007-07-03 assertion fail
/usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/elf64-mips.c:2297
09:23:51 /usr/obj/usr/src/mips.mips64/tmp/usr/bin/ld: BFD 2.17.50
[FreeBSD] 2007-07-03 internal error, aborting at
/usr/src/gnu/usr.bin/binutils/libbfd/../../../../contrib/binutils/bfd/reloc.c
line 445 in unsigned int bfd_get_reloc_size(reloc_howto_type *)
09:23:51
09:23:51 /usr/obj/usr/src/mips.mips64/tmp/usr/bin/ld: Please report this bug.
09:23:51
09:23:51 cc: error: linker command failed with exit code 1 (use -v to
see invocation)
09:23:51 *** [libcxxrt.so.1.full] Error code 1

It looks like this is just using external GCC, not full external
toolchain, and needs to switch.

sparc64 is failing with:
09:12:41 --- lib/libssp_nonshared__PL ---
09:12:41 /tmp/libssp_nonshared-e776f8.s: Assembler messages:
09:12:41 /tmp/libssp_nonshared-e776f8.s:15: Error: unknown pseudo-op:
`.cfi_sections'
09:12:41 cc: error: assembler command failed with exit code 1 (use -v
to see invocation)
09:12:41 *** [libssp_nonshared.o] Error code 1

This might be the same problem as above, for CI.

Running in tinderbox sparc64 fails with:
collect2: fatal error: ld terminated with signal 11 [Segmentation
fault], core dumped
compilation terminated.
/usr/local/bin/sparc64-unknown-freebsd12.0-ld: BFD (GNU Binutils)
2.33.1 assertion fail elfxx-sparc.c:763
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r356379 - head/share/mk

2020-01-05 Thread Ed Maste
Author: emaste
Date: Sun Jan  5 16:59:24 2020
New Revision: 356379
URL: https://svnweb.freebsd.org/changeset/base/356379

Log:
  src.opts.mk: disable BINUTILS_BOOTSTRAP on mips64*
  
  After GCC was disabled by default in r356367, mips and sparc64 started
  relying external GCC.  However, the in-tree Binutils ld 2.17.50 is not
  compatible with GCC for some mips64 targets, so turn off
  BINUTILS_BOOTSTRAP and rely on external binutils (linker) as well.

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Sun Jan  5 14:08:01 2020(r356378)
+++ head/share/mk/src.opts.mk   Sun Jan  5 16:59:24 2020(r356379)
@@ -489,6 +489,10 @@ MK_BSDINSTALL:=no
 MK_SVNLITE:=   no
 .endif
 
+.if ${__T:Mmips64*} && ${MK_GCC} == "no"
+MK_BINUTILS_BOOTSTRAP:=no
+.endif
+
 .if ${MK_MAIL} == "no"
 MK_MAILWRAPPER:= no
 MK_SENDMAIL:=  no
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r356380 - head/share/man/man5

2020-01-05 Thread Ed Maste
Author: emaste
Date: Sun Jan  5 17:12:41 2020
New Revision: 356380
URL: https://svnweb.freebsd.org/changeset/base/356380

Log:
  src.conf.5: regen after r356379, disable BINUTILS_BOOTSTRAP on mips64*

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Sun Jan  5 16:59:24 2020
(r356379)
+++ head/share/man/man5/src.conf.5  Sun Jan  5 17:12:41 2020
(r356380)
@@ -1,6 +1,6 @@
 .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
 .\" $FreeBSD$
-.Dd January 4, 2020
+.Dd January 5, 2020
 .Dt SRC.CONF 5
 .Os
 .Sh NAME
@@ -207,13 +207,13 @@ toolchain is provided.
 .Ef
 .Pp
 This is a default setting on
-arm64/aarch64 and riscv/riscv64.
+arm64/aarch64, riscv/riscv64, mips/mips64el, mips/mips64, mips/mips64elhf and 
mips/mips64hf.
 .It Va WITH_BINUTILS_BOOTSTRAP
 Set build binutils (as, ld, and objdump)
 as part of the bootstrap process.
 .Pp
 This is a default setting on
-amd64/amd64, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, 
mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, 
mips/mips64elhf, mips/mips64hf and sparc64/sparc64.
+amd64/amd64, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, 
mips/mipsn32, mips/mipselhf, mips/mipshf and sparc64/sparc64.
 .It Va WITHOUT_BLACKLIST
 Set this if you do not want to build
 .Xr blacklistd 8
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r356379 - head/share/mk

2020-01-05 Thread Ed Maste
On Sun, 5 Jan 2020 at 11:59, Ed Maste  wrote:
>
> Author: emaste
> Date: Sun Jan  5 16:59:24 2020
> New Revision: 356379
> URL: https://svnweb.freebsd.org/changeset/base/356379
>
> Log:
>   src.opts.mk: disable BINUTILS_BOOTSTRAP on mips64*

I should probably make this the case for all of mips* and sparc64.
Using a decade-old binutils with a contemporary compiler (either Clang
or GCC) isn't likely to be a combination used by anyone else and it's
not going to be a good use of our time investigating and addressing
any issues that arise.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r356379 - head/share/mk

2020-01-05 Thread Warner Losh
On Sun, Jan 5, 2020, 10:22 AM Ed Maste  wrote:

> On Sun, 5 Jan 2020 at 11:59, Ed Maste  wrote:
> >
> > Author: emaste
> > Date: Sun Jan  5 16:59:24 2020
> > New Revision: 356379
> > URL: https://svnweb.freebsd.org/changeset/base/356379
> >
> > Log:
> >   src.opts.mk: disable BINUTILS_BOOTSTRAP on mips64*
>
> I should probably make this the case for all of mips* and sparc64.
> Using a decade-old binutils with a contemporary compiler (either Clang
> or GCC) isn't likely to be a combination used by anyone else and it's
> not going to be a good use of our time investigating and addressing
> any issues that arise.
>

I'd agree. There are lots of bugs or missing features in our binutils that
will bite people...

Warner

>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r356379 - head/share/mk

2020-01-05 Thread Yasuhiro KIMURA
From: Warner Losh 
Subject: Re: svn commit: r356379 - head/share/mk
Date: Sun, 5 Jan 2020 11:26:07 -0600

>> > Author: emaste
>> > Date: Sun Jan  5 16:59:24 2020
>> > New Revision: 356379
>> > URL: https://svnweb.freebsd.org/changeset/base/356379
>> >
>> > Log:
>> >   src.opts.mk: disable BINUTILS_BOOTSTRAP on mips64*
>>
>> I should probably make this the case for all of mips* and sparc64.
>> Using a decade-old binutils with a contemporary compiler (either Clang
>> or GCC) isn't likely to be a combination used by anyone else and it's
>> not going to be a good use of our time investigating and addressing
>> any issues that arise.
>>
> I'd agree. There are lots of bugs or missing features in our binutils that
> will bite people...

Just out of curiosity, is there any retirement plan for binutils in
base system at the moment?

---
Yasuhiro KIMURA
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r356381 - head/share/mk

2020-01-05 Thread Ed Maste
Author: emaste
Date: Sun Jan  5 18:01:15 2020
New Revision: 356381
URL: https://svnweb.freebsd.org/changeset/base/356381

Log:
  src.opts.mk: disable BINUTILS_BOOTSTRAP on all mips* and sparc64
  
  Extend r356379 to include 32-bit mips and sparc64.  Using a decade-old
  binutils linker with a contemporary compiler (either Clang or GCC) is
  a combination unlikely to be used by anyone else, and it's not going
  to be a good use of our time investigating and addressing any issues
  that arise.  Expect that all architectures newly migrated to external
  GCC will also use external binutils.

Modified:
  head/share/mk/src.opts.mk

Modified: head/share/mk/src.opts.mk
==
--- head/share/mk/src.opts.mk   Sun Jan  5 17:12:41 2020(r356380)
+++ head/share/mk/src.opts.mk   Sun Jan  5 18:01:15 2020(r356381)
@@ -489,7 +489,7 @@ MK_BSDINSTALL:= no
 MK_SVNLITE:=   no
 .endif
 
-.if ${__T:Mmips64*} && ${MK_GCC} == "no"
+.if (${__TT} == "mips" || ${__TT} == "sparc64") && ${MK_GCC} == "no"
 MK_BINUTILS_BOOTSTRAP:=no
 .endif
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r356382 - head/share/man/man5

2020-01-05 Thread Ed Maste
Author: emaste
Date: Sun Jan  5 18:01:52 2020
New Revision: 356382
URL: https://svnweb.freebsd.org/changeset/base/356382

Log:
  src.conf.5: regen after r356381, disable BINUTILS_BOOTSTRAP more widely

Modified:
  head/share/man/man5/src.conf.5

Modified: head/share/man/man5/src.conf.5
==
--- head/share/man/man5/src.conf.5  Sun Jan  5 18:01:15 2020
(r356381)
+++ head/share/man/man5/src.conf.5  Sun Jan  5 18:01:52 2020
(r356382)
@@ -207,13 +207,13 @@ toolchain is provided.
 .Ef
 .Pp
 This is a default setting on
-arm64/aarch64, riscv/riscv64, mips/mips64el, mips/mips64, mips/mips64elhf and 
mips/mips64hf.
+arm64/aarch64, riscv/riscv64, mips/mipsel, mips/mips, mips/mips64el, 
mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, 
mips/mips64hf and sparc64/sparc64.
 .It Va WITH_BINUTILS_BOOTSTRAP
 Set build binutils (as, ld, and objdump)
 as part of the bootstrap process.
 .Pp
 This is a default setting on
-amd64/amd64, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, 
mips/mipsn32, mips/mipselhf, mips/mipshf and sparc64/sparc64.
+amd64/amd64, arm/armv6, arm/armv7 and i386/i386.
 .It Va WITHOUT_BLACKLIST
 Set this if you do not want to build
 .Xr blacklistd 8
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r356379 - head/share/mk

2020-01-05 Thread Justin Hibbits
On Sun, 5 Jan 2020 12:21:53 -0500
Ed Maste  wrote:

> On Sun, 5 Jan 2020 at 11:59, Ed Maste  wrote:
> >
> > Author: emaste
> > Date: Sun Jan  5 16:59:24 2020
> > New Revision: 356379
> > URL: https://svnweb.freebsd.org/changeset/base/356379
> >
> > Log:
> >   src.opts.mk: disable BINUTILS_BOOTSTRAP on mips64*  
> 
> I should probably make this the case for all of mips* and sparc64.
> Using a decade-old binutils with a contemporary compiler (either Clang
> or GCC) isn't likely to be a combination used by anyone else and it's
> not going to be a good use of our time investigating and addressing
> any issues that arise.

powerpc and powerpcspe still use in-tree binutils (or external
binutils...  but in-tree works well enough, until we start adding
ifuncs), until such a time that lld is fully functional.

- Justin
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r356383 - head/share/man/man7

2020-01-05 Thread Ed Maste
Author: emaste
Date: Sun Jan  5 18:03:53 2020
New Revision: 356383
URL: https://svnweb.freebsd.org/changeset/base/356383

Log:
  arch.7: update toolchain table for external ld use
  
  As of r356379 and r356381 mips* and sparc64 now use external Binutils
  ld as their linker.

Modified:
  head/share/man/man7/arch.7

Modified: head/share/man/man7/arch.7
==
--- head/share/man/man7/arch.7  Sun Jan  5 18:01:52 2020(r356382)
+++ head/share/man/man7/arch.7  Sun Jan  5 18:03:53 2020(r356383)
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd January 4, 2020
+.Dd January 5, 2020
 .Dt ARCH 7
 .Os
 .Sh NAME
@@ -307,21 +307,21 @@ This table shows the default tool chain for each archi
 .It armv6   Ta Clang Ta lld
 .It armv7   Ta Clang Ta lld
 .It i386Ta Clang Ta lld
-.It mipsTa GCC(1)Ta GNU ld 2.17.50
-.It mipsel  Ta GCC(1)Ta GNU ld 2.17.50
-.It mipselhfTa GCC(1)Ta GNU ld 2.17.50
-.It mipshf  Ta GCC(1)Ta GNU ld 2.17.50
-.It mipsn32 Ta GCC(1)Ta GNU ld 2.17.50
-.It mips64  Ta GCC(1)Ta GNU ld 2.17.50
-.It mips64elTa GCC(1)Ta GNU ld 2.17.50
-.It mips64elhf  Ta GCC(1)Ta GNU ld 2.17.50
-.It mips64hfTa GCC(1)Ta GNU ld 2.17.50
-.It powerpc Ta Clang Ta GNU ld 2.17.50
-.It powerpcspe  Ta Clang Ta GNU ld 2.17.50
+.It mipsTa GCC(1)Ta GNU ld(1)
+.It mipsel  Ta GCC(1)Ta GNU ld(1)
+.It mipselhfTa GCC(1)Ta GNU ld(1)
+.It mipshf  Ta GCC(1)Ta GNU ld(1)
+.It mipsn32 Ta GCC(1)Ta GNU ld(1)
+.It mips64  Ta GCC(1)Ta GNU ld(1)
+.It mips64elTa GCC(1)Ta GNU ld(1)
+.It mips64elhf  Ta GCC(1)Ta GNU ld(1)
+.It mips64hfTa GCC(1)Ta GNU ld(1)
+.It powerpc Ta Clang Ta GNU ld(1)
+.It powerpcspe  Ta Clang Ta GNU ld(1)
 .It powerpc64   Ta Clang Ta lld
 .It riscv64 Ta GCC(1)Ta GNU ld(1)
 .It riscv64sf   Ta GCC(1)Ta GNU ld(1)
-.It sparc64 Ta GCC(1)Ta GNU ld 2.17.50
+.It sparc64 Ta GCC(1)Ta GNU ld(1)
 .El
 .Pp
 (1) External toolchain provided by ports/packages.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r356384 - head/share/man/man7

2020-01-05 Thread Ed Maste
Author: emaste
Date: Sun Jan  5 18:06:32 2020
New Revision: 356384
URL: https://svnweb.freebsd.org/changeset/base/356384

Log:
  arch.7: correct overzealous claims of external binutils use
  
  powerpc and powerpcspe still use in-tree ld 2.17.50

Modified:
  head/share/man/man7/arch.7

Modified: head/share/man/man7/arch.7
==
--- head/share/man/man7/arch.7  Sun Jan  5 18:03:53 2020(r356383)
+++ head/share/man/man7/arch.7  Sun Jan  5 18:06:32 2020(r356384)
@@ -316,8 +316,8 @@ This table shows the default tool chain for each archi
 .It mips64elTa GCC(1)Ta GNU ld(1)
 .It mips64elhf  Ta GCC(1)Ta GNU ld(1)
 .It mips64hfTa GCC(1)Ta GNU ld(1)
-.It powerpc Ta Clang Ta GNU ld(1)
-.It powerpcspe  Ta Clang Ta GNU ld(1)
+.It powerpc Ta Clang Ta GNU ld 2.17.50
+.It powerpcspe  Ta Clang Ta GNU ld 2.17.50
 .It powerpc64   Ta Clang Ta lld
 .It riscv64 Ta GCC(1)Ta GNU ld(1)
 .It riscv64sf   Ta GCC(1)Ta GNU ld(1)
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r356367 - in head: . share/mk

2020-01-05 Thread Pedro Giffuni

FWIW,

On 04/01/2020 21:47, Ed Maste wrote:

Author: emaste
Date: Sun Jan  5 02:47:56 2020
New Revision: 356367
URL: https://svnweb.freebsd.org/changeset/base/356367

Log:
   Do not build GCC 4.2.1 by default for any CPU architecture



 It's really nice how the compiler warning trend went down.

On FreeBSD-head-mips-build* it went from 7691 warnings to 473 + 83.

Cheers,

Pedro.

*https://ci.freebsd.org/job/FreeBSD-head-mips-build/

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r356379 - head/share/mk

2020-01-05 Thread Ed Maste
On Sun, 5 Jan 2020 at 12:53, Yasuhiro KIMURA  wrote:
>
> Just out of curiosity, is there any retirement plan for binutils in
> base system at the moment?

There's no specific plan, but it is an ongoing goal. Only three
binutils tools are used (for bootstrapping and in the installed
system): as, ld, and objdump.

BINUTILS_BOOTSTRAP is enabled on x86, 32-bit arm, and powerpc. At
least both x86 archs still use GNU as for a few files; there's work in
progress to migrate to Clang's IAS for all assembly files. I am not
sure if bootstrap as actually gets used on arm or powerpc. objdump is
also built, but not used on any arch. ld is built on powerpc and still
being used there; it's not built on x86 or 32-bit arm.

Making further progress depends on lld maturing (for powerpc) and
addressing the assembler issue. There's no commitment to removing
binutils for 13.0 but there is a reasonable probability we'll be able
to do so.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r356379 - head/share/mk

2020-01-05 Thread Warner Losh
On Sun, Jan 5, 2020, 10:53 AM Yasuhiro KIMURA  wrote:

> From: Warner Losh 
> Subject: Re: svn commit: r356379 - head/share/mk
> Date: Sun, 5 Jan 2020 11:26:07 -0600
>
> >> > Author: emaste
> >> > Date: Sun Jan  5 16:59:24 2020
> >> > New Revision: 356379
> >> > URL: https://svnweb.freebsd.org/changeset/base/356379
> >> >
> >> > Log:
> >> >   src.opts.mk: disable BINUTILS_BOOTSTRAP on mips64*
> >>
> >> I should probably make this the case for all of mips* and sparc64.
> >> Using a decade-old binutils with a contemporary compiler (either Clang
> >> or GCC) isn't likely to be a combination used by anyone else and it's
> >> not going to be a good use of our time investigating and addressing
> >> any issues that arise.
> >>
> > I'd agree. There are lots of bugs or missing features in our binutils
> that
> > will bite people...
>
> Just out of curiosity, is there any retirement plan for binutils in
> base system at the moment?
>

There are no firm plans at the moment. However, it looks like it's not used
except for powerpc. I'd expect that once the issues there are resolved with
clang, or that platform migrates to an external toolchain, binutils in
base's days will be numbered since it is GPL and the project has a long
term goal of being GPL free where possible.

Warner

---
> Yasuhiro KIMURA
>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r356367 - in head: . share/mk

2020-01-05 Thread Ed Maste
On Sun, 5 Jan 2020 at 13:16, Pedro Giffuni  wrote:
>
>   It's really nice how the compiler warning trend went down.
>
> On FreeBSD-head-mips-build* it went from 7691 warnings to 473 + 83.

Thanks for mentioning that. Continuing to support ancient GCC is a
drag on everyone using a contemporary compiler for development
(in-tree or external toolchain) and thus I stuck with Warner's
original timeline even though there are a few warts to resolve on some
archs still.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r356379 - head/share/mk

2020-01-05 Thread Yasuhiro KIMURA
From: Warner Losh 
Subject: Re: svn commit: r356379 - head/share/mk
Date: Sun, 5 Jan 2020 12:17:21 -0600

> There are no firm plans at the moment. However, it looks like it's not used
> except for powerpc. I'd expect that once the issues there are resolved with
> clang, or that platform migrates to an external toolchain, binutils in
> base's days will be numbered since it is GPL and the project has a long
> term goal of being GPL free where possible.

From: Ed Maste 
Subject: Re: svn commit: r356379 - head/share/mk
Date: Sun, 5 Jan 2020 13:17:32 -0500

> There's no specific plan, but it is an ongoing goal. Only three
> binutils tools are used (for bootstrapping and in the installed
> system): as, ld, and objdump.
> 
> BINUTILS_BOOTSTRAP is enabled on x86, 32-bit arm, and powerpc. At
> least both x86 archs still use GNU as for a few files; there's work in
> progress to migrate to Clang's IAS for all assembly files. I am not
> sure if bootstrap as actually gets used on arm or powerpc. objdump is
> also built, but not used on any arch. ld is built on powerpc and still
> being used there; it's not built on x86 or 32-bit arm.
> 
> Making further progress depends on lld maturing (for powerpc) and
> addressing the assembler issue. There's no commitment to removing
> binutils for 13.0 but there is a reasonable probability we'll be able
> to do so.

Thank you for reply. I understand current status and hope binutils is
successfully removed from base system before the release of 13.0.

---
Yasuhiro KIMURA
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r356367 - in head: . share/mk

2020-01-05 Thread Warner Losh
On Sun, Jan 5, 2020, 11:21 AM Ed Maste  wrote:

> On Sun, 5 Jan 2020 at 13:16, Pedro Giffuni  wrote:
> >
> >   It's really nice how the compiler warning trend went down.
> >
> > On FreeBSD-head-mips-build* it went from 7691 warnings to 473 + 83.
>
> Thanks for mentioning that. Continuing to support ancient GCC is a
> drag on everyone using a contemporary compiler for development
> (in-tree or external toolchain) and thus I stuck with Warner's
> original timeline even though there are a few warts to resolve on some
> archs still.
>

And the warts are generally adequately resolved by external toolchain.
Except for sparc64, for which nobody has done any nontrivial work on for
this transition. All the other architects have had most of this issues
identified with process resolved, or well on the way to resolution. This
total lack of work on sparc64 may result in an accelerated timeline for its
removal.

Warner

>
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r356386 - head/sys/netgraph

2020-01-05 Thread Bjoern A. Zeeb
Author: bz
Date: Sun Jan  5 19:14:16 2020
New Revision: 356386
URL: https://svnweb.freebsd.org/changeset/base/356386

Log:
  netgraph/ng_bridge: Reestablish old ABI
  
  In order to be able to merge r353026 bring back support for the old
  cookie API for a transition period in 12.x releases (and possibly 13)
  before the old API can be removed again entirely.
  
  Suggested by: julian
  Submitted by: Lutz Donnerhacke (lutz donnerhacke.de)
  PR:   240787
  Reviewed by:  julian
  MFC after:2 weeks
  X-MFC with:   r353026
  Differential Revision:https://reviews.freebsd.org/D21961

Modified:
  head/sys/netgraph/ng_bridge.c
  head/sys/netgraph/ng_bridge.h

Modified: head/sys/netgraph/ng_bridge.c
==
--- head/sys/netgraph/ng_bridge.c   Sun Jan  5 18:15:41 2020
(r356385)
+++ head/sys/netgraph/ng_bridge.c   Sun Jan  5 19:14:16 2020
(r356386)
@@ -393,6 +393,72 @@ ng_bridge_rcvmsg(node_p node, item_p item, hook_p last
 
NGI_GET_MSG(item, msg);
switch (msg->header.typecookie) {
+#ifdef NGM_BRIDGE_TABLE_ABI
+   case NGM_BRIDGE_COOKIE_TBL:
+   switch (msg->header.cmd) {
+   case NGM_BRIDGE_GET_CONFIG:
+   {
+   struct ng_bridge_config_tbl *conf;
+
+   NG_MKRESPONSE(resp, msg, sizeof(*conf),
+   M_NOWAIT|M_ZERO);
+   if (resp == NULL) {
+   error = ENOMEM;
+   break;
+   }
+   conf = (struct ng_bridge_config_tbl *)resp->data;
+   conf->cfg = priv->conf;
+   break;
+   }
+   case NGM_BRIDGE_SET_CONFIG:
+   {
+   struct ng_bridge_config_tbl *conf;
+
+   if (msg->header.arglen != sizeof(*conf)) {
+   error = EINVAL;
+   break;
+   }
+   conf = (struct ng_bridge_config_tbl *)msg->data;
+   priv->conf = conf->cfg;
+   break;
+   }
+   case NGM_BRIDGE_GET_TABLE:
+   {
+   struct ng_bridge_host_tbl_ary *ary;
+   struct ng_bridge_hent *hent;
+   int i, bucket;
+
+   NG_MKRESPONSE(resp, msg, sizeof(*ary) +
+   (priv->numHosts * sizeof(*ary->hosts)), M_NOWAIT);
+   if (resp == NULL) {
+   error = ENOMEM;
+   break;
+   }
+   ary = (struct ng_bridge_host_tbl_ary *)resp->data;
+   ary->numHosts = priv->numHosts;
+   i = 0;
+   for (bucket = 0; bucket < priv->numBuckets; bucket++) {
+   SLIST_FOREACH(hent, &priv->tab[bucket], next) {
+   memcpy(ary->hosts[i].addr,
+   hent->host.addr,
+   sizeof(ary->hosts[i].addr));
+   ary->hosts[i].age = hent->host.age;
+   ary->hosts[i].staleness =
+hent->host.staleness;
+   ary->hosts[i].linkNum = strtol(
+   NG_HOOK_NAME(hent->host.link->hook) 
+
+   strlen(NG_BRIDGE_HOOK_LINK_PREFIX),
+   NULL, 10);
+   i++;
+   }
+   }
+   break;
+   }
+   }
+   /* If already handled break, otherwise use new ABI. */
+   if (resp != NULL || error != 0)
+   break;
+#endif /* NGM_BRIDGE_TABLE_ABI */
case NGM_BRIDGE_COOKIE:
switch (msg->header.cmd) {
case NGM_BRIDGE_GET_CONFIG:

Modified: head/sys/netgraph/ng_bridge.h
==
--- head/sys/netgraph/ng_bridge.h   Sun Jan  5 18:15:41 2020
(r356385)
+++ head/sys/netgraph/ng_bridge.h   Sun Jan  5 19:14:16 2020
(r356386)
@@ -43,10 +43,24 @@
 #ifndef _NETGRAPH_NG_BRIDGE_H_
 #define _NETGRAPH_NG_BRIDGE_H_
 
+/*
+ * Support the older ABI based on fixed size tables.
+ * ABI is deprecated, to be removed in releases > 12
+ * Please note: There is no API support!
+ * You canno create new messages using the old API but messages conforming the
+ * old ABI are understood.
+ */
+#defineNGM_BRIDGE_TABLE_ABI
+
 /* Node type name and magic 

Re: svn commit: r356379 - head/share/mk

2020-01-05 Thread Mark Millard via svn-src-head
Justin Hibbits chmeeedalf at gmail.com  wrote on
Sun Jan 5 18:03:59 UTC 2020 :

> On Sun, 5 Jan 2020 12:21:53 -0500 Ed Maste  wrote: > 
> On Sun, 5 Jan 2020 at 11:59, Ed Maste  wrote: 
> > > 
> > > Author: emaste 
> > > Date: Sun Jan 5 16:59:24 2020 
> > > New Revision: 356379 
> > > URL: https://svnweb.freebsd.org/changeset/base/356379
> > > 
> > > Log: 
> > > src.opts.mk: disable BINUTILS_BOOTSTRAP on mips64* 
> > 
> > I should probably make this the case for all of mips* and sparc64. 
> > Using a decade-old binutils with a contemporary compiler (either Clang 
> > or GCC) isn't likely to be a combination used by anyone else and it's 
> > not going to be a good use of our time investigating and addressing 
> > any issues that arise. 
> powerpc and powerpcspe still use in-tree binutils (or external binutils... 
> but in-tree works well enough, until we start adding ifuncs), until such a 
> time that lld is fully functional. 

FYI:

I've tried the following combinations involving
devel/binutils@powerpc for 32-bit powerpc, either
the kernel crashed extremely early or the build
fails to complete.

system-clang and devel/binutils@powerpc (the crashing case)
devel/gcc9@powerpc and devel/binutils@powerpc (fails to build)

(These were cross builds.)

On the old 32-bit PowerMacs the crash is before
Apple's displayed material is replaced and it
gets back to Apple's prompt after the error
message.

The only combination that I've had success with
so far for 32-bit powerpc has been system-clang
for buildkernel with the in-tree-binutils used.

This may not matter much until ifuncs additions
are desired --or ever if lld becomes sufficient
first.

The build failure is for:

--- libc.so.7.full ---
/usr/local/bin/powerpc-unknown-freebsd13.0-ld: bss-plt forced due to 
/usr/obj/powerpcvtsc_xtoolchain-gcc/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/usr/lib/crtbeginS.o
collect2: error: ld returned 1 exit status
*** [libc.so.7.full] Error code 1

As for the crashing case, looking at the kernel
produced show significant differences in where
ABS is used and some other differences. (I do
not claim anything like a complete comparison.)

Without work on one or both sides,
devel/binutils@powerpc does not seem to be
an alternative.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r356367 - in head: . share/mk

2020-01-05 Thread Mark Linimon
On Sun, Jan 05, 2020 at 01:11:30PM -0600, Warner Losh wrote:
> This total lack of work on sparc64 may result in an accelerated
> timeline for its removal.

IMHO it's time to just let it go.

mcl
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r356379 - head/share/mk

2020-01-05 Thread Mark Linimon
On Sun, Jan 05, 2020 at 12:17:21PM -0600, Warner Losh wrote:
> I'd expect that once the issues [on powerpc] are resolved with clang,
> or that platform migrates to an external toolchain

AFAIK there never was a fallback plan to migrate powerpc to an external
toolchain; powerpc64-head (at least) has already been switched to clang.
You'll have to ask jhibbits about 32-bit.

mcl
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r356379 - head/share/mk

2020-01-05 Thread Ian Lepore
On Sun, 2020-01-05 at 13:17 -0500, Ed Maste wrote:
> On Sun, 5 Jan 2020 at 12:53, Yasuhiro KIMURA 
> wrote:
> > 
> > Just out of curiosity, is there any retirement plan for binutils in
> > base system at the moment?
> 
> There's no specific plan, but it is an ongoing goal. Only three
> binutils tools are used (for bootstrapping and in the installed
> system): as, ld, and objdump.
> 
> BINUTILS_BOOTSTRAP is enabled on x86, 32-bit arm, and powerpc. At
> least both x86 archs still use GNU as for a few files; there's work
> in
> progress to migrate to Clang's IAS for all assembly files. I am not
> sure if bootstrap as actually gets used on arm or powerpc. objdump is
> also built, but not used on any arch. ld is built on powerpc and
> still
> being used there; it's not built on x86 or 32-bit arm.
> 

I just set WITHOUT_BINUTILS_BOOTSTRAP in src.conf and did an arm32
crossbuild from amd64 after an rm -rf in $objdir, and both kernel and
world built successfully.

-- Ian

> Making further progress depends on lld maturing (for powerpc) and
> addressing the assembler issue. There's no commitment to removing
> binutils for 13.0 but there is a reasonable probability we'll be able
> to do so.

___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r356389 - head/sys/vm

2020-01-05 Thread Jeff Roberson
Author: jeff
Date: Sun Jan  5 22:54:25 2020
New Revision: 356389
URL: https://svnweb.freebsd.org/changeset/base/356389

Log:
  The fix in r356353 was insufficient.  Not every architecture returns 0 for
  EARLY_COUNTER.  Only amd64 seems to.
  
  Suggested by: markj
  Reported by:  lwhsu
  Reviewed by:  markj
  PR:   243117

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==
--- head/sys/vm/uma_core.c  Sun Jan  5 21:35:02 2020(r356388)
+++ head/sys/vm/uma_core.c  Sun Jan  5 22:54:25 2020(r356389)
@@ -4153,8 +4153,10 @@ uma_zone_get_cur(uma_zone_t zone)
int64_t nitems;
u_int i;
 
-   nitems = counter_u64_fetch(zone->uz_allocs) -
-   counter_u64_fetch(zone->uz_frees);
+   nitems = 0;
+   if (zone->uz_allocs != EARLY_COUNTER && zone->uz_frees != EARLY_COUNTER)
+   nitems = counter_u64_fetch(zone->uz_allocs) -
+   counter_u64_fetch(zone->uz_frees);
CPU_FOREACH(i)
nitems += atomic_load_64(&zone->uz_cpu[i].uc_allocs) -
atomic_load_64(&zone->uz_cpu[i].uc_frees);
@@ -4168,7 +4170,9 @@ uma_zone_get_allocs(uma_zone_t zone)
uint64_t nitems;
u_int i;
 
-   nitems = counter_u64_fetch(zone->uz_allocs);
+   nitems = 0;
+   if (zone->uz_allocs != EARLY_COUNTER)
+   nitems = counter_u64_fetch(zone->uz_allocs);
CPU_FOREACH(i)
nitems += atomic_load_64(&zone->uz_cpu[i].uc_allocs);
 
@@ -4181,7 +4185,9 @@ uma_zone_get_frees(uma_zone_t zone)
uint64_t nitems;
u_int i;
 
-   nitems = counter_u64_fetch(zone->uz_frees);
+   nitems = 0;
+   if (zone->uz_frees != EARLY_COUNTER)
+   nitems = counter_u64_fetch(zone->uz_frees);
CPU_FOREACH(i)
nitems += atomic_load_64(&zone->uz_cpu[i].uc_frees);
 
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r356367 - in head: . share/mk

2020-01-05 Thread Rodney W. Grimes
[ Charset UTF-8 unsupported, converting... ]
> On Sat, 4 Jan 2020 at 21:57, Mark Linimon  wrote:
> >
> > On Sun, Jan 05, 2020 at 02:47:56AM +, Ed Maste wrote:
> > > Do not build GCC 4.2.1 by default for any CPU architecture
> >
> > And there was much rejoicing :-)
> >
> > (but plz not to MFC tnx)
> 
> Indeed, I should have tagged it with:
> 
> Relnotes: YES

You can still add a entry to RELNOTES.

> MFC after: never

-- 
Rod Grimes rgri...@freebsd.org
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r356392 - head/sbin/nvmecontrol

2020-01-05 Thread Alexander Motin
Author: mav
Date: Mon Jan  6 01:51:23 2020
New Revision: 356392
URL: https://svnweb.freebsd.org/changeset/base/356392

Log:
  Fix host memory buffer sizes reporting.
  
  Hardware reports values in 4KB units, not in bytes.
  
  MFC after:3 days

Modified:
  head/sbin/nvmecontrol/identify_ext.c

Modified: head/sbin/nvmecontrol/identify_ext.c
==
--- head/sbin/nvmecontrol/identify_ext.cMon Jan  6 01:15:35 2020
(r356391)
+++ head/sbin/nvmecontrol/identify_ext.cMon Jan  6 01:51:23 2020
(r356392)
@@ -192,8 +192,10 @@ nvme_print_controller(struct nvme_controller_data *cda
uint128_to_str(to128(cdata->untncap.unvmcap),
cbuf, sizeof(cbuf)));
}
-   printf("Host Buffer Preferred Size:  %d bytes\n", cdata->hmpre);
-   printf("Host Buffer Minimum Size:%d bytes\n", cdata->hmmin);
+   printf("Host Buffer Preferred Size:  %llu bytes\n",
+   (long long unsigned)cdata->hmpre * 4096);
+   printf("Host Buffer Minimum Size:%llu bytes\n",
+   (long long unsigned)cdata->hmmin * 4096);
 
printf("\n");
printf("NVM Command Set Attributes\n");
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


svn commit: r356393 - head/sys/vm

2020-01-05 Thread Jeff Roberson
Author: jeff
Date: Mon Jan  6 02:51:19 2020
New Revision: 356393
URL: https://svnweb.freebsd.org/changeset/base/356393

Log:
  Fix uma boot pages calculations on NUMA machines that also don't have
  MD_UMA_SMALL_ALLOC.  This is unusual but not impossible.  Fix the alignemnt
  of zones while here.  This was already correct because uz_cpu strongly
  aligned the zone structure but the specified alignment did not match
  reality and involved redundant defines.
  
  Reviewed by:  markj, rlibby
  Differential Revision:https://reviews.freebsd.org/D23046

Modified:
  head/sys/vm/uma_core.c
  head/sys/vm/uma_int.h
  head/sys/vm/vm_page.c

Modified: head/sys/vm/uma_core.c
==
--- head/sys/vm/uma_core.c  Mon Jan  6 01:51:23 2020(r356392)
+++ head/sys/vm/uma_core.c  Mon Jan  6 02:51:19 2020(r356393)
@@ -2508,27 +2508,28 @@ zone_foreach(void (*zfunc)(uma_zone_t, void *arg), voi
  * zone of zones and zone of kegs are accounted separately.
  */
 #defineUMA_BOOT_ZONES  11
-/* Zone of zones and zone of kegs have arbitrary alignment. */
-#defineUMA_BOOT_ALIGN  32
 static int zsize, ksize;
 int
 uma_startup_count(int vm_zones)
 {
int zones, pages;
+   u_int zppera, zipers;
+   u_int kppera, kipers;
size_t space, size;
 
ksize = sizeof(struct uma_keg) +
(sizeof(struct uma_domain) * vm_ndomains);
+   ksize = roundup(ksize, UMA_SUPER_ALIGN);
zsize = sizeof(struct uma_zone) +
(sizeof(struct uma_cache) * (mp_maxid + 1)) +
(sizeof(struct uma_zone_domain) * vm_ndomains);
+   zsize = roundup(zsize, UMA_SUPER_ALIGN);
 
/*
-* Memory for the zone of kegs and its keg,
-* and for zone of zones.
+* Memory for the zone of kegs and its keg, and for zone
+* of zones.  Allocated directly in uma_startup().
 */
-   pages = howmany(roundup(zsize, CACHE_LINE_SIZE) * 2 +
-   roundup(ksize, CACHE_LINE_SIZE), PAGE_SIZE);
+   pages = howmany(zsize * 2 + ksize, PAGE_SIZE);
 
 #ifdef UMA_MD_SMALL_ALLOC
zones = UMA_BOOT_ZONES;
@@ -2542,23 +2543,33 @@ uma_startup_count(int vm_zones)
/* Memory for the rest of startup zones, UMA and VM, ... */
if (zsize > space) {
/* See keg_large_init(). */
-   u_int ppera;
+   zppera = howmany(zsize + slab_sizeof(1), PAGE_SIZE);
+   zipers = 1;
+   zones += vm_zones;
+   } else {
+   zppera = 1;
+   zipers = space / zsize;
+   }
+   pages += howmany(zones, zipers) * zppera;
 
-   ppera = howmany(roundup2(zsize, UMA_BOOT_ALIGN), PAGE_SIZE);
-   if (PAGE_SIZE * ppera - roundup2(zsize, UMA_BOOT_ALIGN) < size)
-   ppera++;
-   pages += (zones + vm_zones) * ppera;
-   } else if (roundup2(zsize, UMA_BOOT_ALIGN) > space)
-   /* See keg_small_init() special case for uk_ppera = 1. */
-   pages += zones;
-   else
-   pages += howmany(zones,
-   space / roundup2(zsize, UMA_BOOT_ALIGN));
-
/* ... and their kegs. Note that zone of zones allocates a keg! */
-   pages += howmany(zones + 1,
-   space / roundup2(ksize, UMA_BOOT_ALIGN));
+   if (ksize > space) {
+   /* See keg_large_init(). */
+   kppera = howmany(ksize + slab_sizeof(1), PAGE_SIZE);
+   kipers = 1;
+   } else {
+   kppera = 1;
+   kipers = space / ksize;
+   }
+   pages += howmany(zones + 1, kipers) * kppera;
 
+   /*
+* Allocate an additional slab for zones and kegs on NUMA
+* systems.  The round-robin allocation policy will populate at
+* least one slab per-domain.
+*/
+   pages += (vm_ndomains - 1) * (zppera + kppera);
+
return (pages);
 }
 
@@ -2578,11 +2589,11 @@ uma_startup(void *mem, int npages)
/* Use bootpages memory for the zone of zones and zone of kegs. */
m = (uintptr_t)mem;
zones = (uma_zone_t)m;
-   m += roundup(zsize, CACHE_LINE_SIZE);
+   m += zsize;
kegs = (uma_zone_t)m;
-   m += roundup(zsize, CACHE_LINE_SIZE);
+   m += zsize;
masterkeg = (uma_keg_t)m;
-   m += roundup(ksize, CACHE_LINE_SIZE);
+   m += ksize;
m = roundup(m, PAGE_SIZE);
npages -= (m - (uintptr_t)mem) / PAGE_SIZE;
mem = (void *)m;
@@ -2596,7 +2607,7 @@ uma_startup(void *mem, int npages)
args.uminit = zero_init;
args.fini = NULL;
args.keg = masterkeg;
-   args.align = UMA_BOOT_ALIGN - 1;
+   args.align = UMA_SUPER_ALIGN - 1;
args.flags = UMA_ZFLAG_INTERNAL;
zone_ctor(kegs, zsize, &args, M_WAITOK);
 
@@ -2610,7 +2621,7 @@ uma_startup(void *mem, int npages)
args.uminit = zero_init;
args.fini = NULL;