Re: svn commit: r232901 - head/usr.sbin/pc-sysinstall/backend
On 03/12/12 23:41, Josh Paetzel wrote: Author: jpaetzel Date: Mon Mar 12 21:41:29 2012 New Revision: 232901 URL: http://svn.freebsd.org/changeset/base/232901 Log: Use gpart "-a" flag to 4k alignment. Submitted by:kris Obtained from: PC-BSD Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh head/usr.sbin/pc-sysinstall/backend/functions-disk.sh Modified: head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh == --- head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon Mar 12 21:34:10 2012(r232900) +++ head/usr.sbin/pc-sysinstall/backend/functions-bsdlabel.sh Mon Mar 12 21:41:29 2012(r232901) @@ -314,7 +314,7 @@ setup_gpart_partitions() if [ "$CURPART" = "2" ] ; then # If this is GPT, make sure first partition is aligned to 4k sleep 2 - rc_halt "gpart add -b 2016 ${SOUT} -t ${PARTYPE} ${_pDisk}" + rc_halt "gpart add -a 4k ${SOUT} -t ${PARTYPE} ${_pDisk}" else sleep 2 rc_halt "gpart add ${SOUT} -t ${PARTYPE} ${_pDisk}" Just to note: if neither -b, nor -a is specified, gpart should now use stripe size/offset values provided by GEOM. So, for example, if partition is created on top of GEOM_STRIPE with 64K strip size, gpart would automatically align to that value. Forcing 4K alignment is a safety measure in case if device with 4K sectors wasn't detected as such, but it can be a pessimization for devices with stripes bigger then 4K. -- Alexander Motin ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232917 - head/sys/kern
Author: mav Date: Tue Mar 13 08:18:54 2012 New Revision: 232917 URL: http://svn.freebsd.org/changeset/base/232917 Log: Rewrite thread CPU usage percentage math to not depend on periodic calls with HZ rate through the sched_tick() calls from hardclock(). Potentially it can be used to improve precision, but now it is just minus one more reason to call hardclock() for every HZ tick on every active CPU. SCHED_4BSD never used sched_tick(), but keep it in place for now, as at least SCHED_FBFS existing in patches out of the tree depends on it. MFC after:1 month Modified: head/sys/kern/sched_ule.c Modified: head/sys/kern/sched_ule.c == --- head/sys/kern/sched_ule.c Tue Mar 13 06:50:56 2012(r232916) +++ head/sys/kern/sched_ule.c Tue Mar 13 08:18:54 2012(r232917) @@ -99,7 +99,6 @@ struct td_sched { u_int ts_slptime; /* Number of ticks we vol. slept */ u_int ts_runtime; /* Number of ticks we were running */ int ts_ltick; /* Last tick that we were running on */ - int ts_incrtick;/* Last tick that we incremented on */ int ts_ftick; /* First tick that we were running on */ int ts_ticks; /* Tick count */ #ifdef KTR @@ -291,7 +290,7 @@ static void sched_thread_priority(struct static int sched_interact_score(struct thread *); static void sched_interact_update(struct thread *); static void sched_interact_fork(struct thread *); -static void sched_pctcpu_update(struct td_sched *); +static void sched_pctcpu_update(struct td_sched *, int); /* Operations on per processor queues */ static struct thread *tdq_choose(struct tdq *); @@ -671,7 +670,7 @@ cpu_search(const struct cpu_group *cg, s } } if (match & CPU_SEARCH_HIGHEST) - if (hgroup.cs_load != -1 && + if (hgroup.cs_load >= 0 && (load > hload || (load == hload && hgroup.cs_load > high->cs_load))) { hload = load; @@ -1590,24 +1589,21 @@ sched_rr_interval(void) * mechanism since it happens with less regular and frequent events. */ static void -sched_pctcpu_update(struct td_sched *ts) +sched_pctcpu_update(struct td_sched *ts, int run) { + int t = ticks; - if (ts->ts_ticks == 0) - return; - if (ticks - (hz / 10) < ts->ts_ltick && - SCHED_TICK_TOTAL(ts) < SCHED_TICK_MAX) - return; - /* -* Adjust counters and watermark for pctcpu calc. -*/ - if (ts->ts_ltick > ticks - SCHED_TICK_TARG) - ts->ts_ticks = (ts->ts_ticks / (ticks - ts->ts_ftick)) * - SCHED_TICK_TARG; - else + if (t - ts->ts_ltick >= SCHED_TICK_TARG) { ts->ts_ticks = 0; - ts->ts_ltick = ticks; - ts->ts_ftick = ts->ts_ltick - SCHED_TICK_TARG; + ts->ts_ftick = t - SCHED_TICK_TARG; + } else if (t - ts->ts_ftick >= SCHED_TICK_MAX) { + ts->ts_ticks = (ts->ts_ticks / (ts->ts_ltick - ts->ts_ftick)) * + (ts->ts_ltick - (t - SCHED_TICK_TARG)); + ts->ts_ftick = t - SCHED_TICK_TARG; + } + if (run) + ts->ts_ticks += (t - ts->ts_ltick) << SCHED_TICK_SHIFT; + ts->ts_ltick = t; } /* @@ -1826,6 +1822,7 @@ sched_switch(struct thread *td, struct t tdq = TDQ_CPU(cpuid); ts = td->td_sched; mtx = td->td_lock; + sched_pctcpu_update(ts, 1); ts->ts_rltick = ticks; td->td_lastcpu = td->td_oncpu; td->td_oncpu = NOCPU; @@ -1880,6 +1877,7 @@ sched_switch(struct thread *td, struct t #endif lock_profile_release_lock(&TDQ_LOCKPTR(tdq)->lock_object); TDQ_LOCKPTR(tdq)->mtx_lock = (uintptr_t)newtd; + sched_pctcpu_update(newtd->td_sched, 0); #ifdef KDTRACE_HOOKS /* @@ -1974,12 +1972,9 @@ sched_wakeup(struct thread *td) slptick = td->td_slptick; td->td_slptick = 0; if (slptick && slptick != ticks) { - u_int hzticks; - - hzticks = (ticks - slptick) << SCHED_TICK_SHIFT; - ts->ts_slptime += hzticks; + ts->ts_slptime += (ticks - slptick) << SCHED_TICK_SHIFT; sched_interact_update(td); - sched_pctcpu_update(ts); + sched_pctcpu_update(ts, 0); } /* Reset the slice value after we sleep. */ ts->ts_slice = sched_slice; @@ -1994,6 +1989,7 @@ void sched_fork(struct thread *td, struct thread *child) { THREAD_LOCK_ASSERT(td, MA_OWNED); + sched_pctcpu_update(td->td_sched, 1); sched_fork_thread(td, child); /* * Penalize the parent and chil
svn commit: r232918 - in head/sys/fs: fdescfs nullfs portalfs unionfs
Author: kevlo Date: Tue Mar 13 10:04:13 2012 New Revision: 232918 URL: http://svn.freebsd.org/changeset/base/232918 Log: Use NULL instead of 0 Modified: head/sys/fs/fdescfs/fdesc_vfsops.c head/sys/fs/nullfs/null_vfsops.c head/sys/fs/portalfs/portal_vfsops.c head/sys/fs/unionfs/union_vfsops.c Modified: head/sys/fs/fdescfs/fdesc_vfsops.c == --- head/sys/fs/fdescfs/fdesc_vfsops.c Tue Mar 13 08:18:54 2012 (r232917) +++ head/sys/fs/fdescfs/fdesc_vfsops.c Tue Mar 13 10:04:13 2012 (r232918) @@ -98,7 +98,7 @@ fdesc_mount(struct mount *mp) error = fdesc_allocvp(Froot, -1, FD_ROOT, mp, &rvp); if (error) { free(fmp, M_FDESCMNT); - mp->mnt_data = 0; + mp->mnt_data = NULL; return (error); } rvp->v_type = VDIR; @@ -152,7 +152,7 @@ fdesc_unmount(mp, mntflags) */ mtx_lock(&fdesc_hashmtx); data = mp->mnt_data; - mp->mnt_data = 0; + mp->mnt_data = NULL; mtx_unlock(&fdesc_hashmtx); free(data, M_FDESCMNT); /* XXX */ Modified: head/sys/fs/nullfs/null_vfsops.c == --- head/sys/fs/nullfs/null_vfsops.cTue Mar 13 08:18:54 2012 (r232917) +++ head/sys/fs/nullfs/null_vfsops.cTue Mar 13 10:04:13 2012 (r232918) @@ -188,7 +188,7 @@ nullfs_mount(struct mount *mp) mp->mnt_kern_flag |= lowerrootvp->v_mount->mnt_kern_flag & (MNTK_MPSAFE | MNTK_SHARED_WRITES); MNT_IUNLOCK(mp); - mp->mnt_data = xmp; + mp->mnt_data = xmp; vfs_getnewfsid(mp); vfs_mountedfrom(mp, target); @@ -224,7 +224,7 @@ nullfs_unmount(mp, mntflags) * Finally, throw away the null_mount structure */ mntdata = mp->mnt_data; - mp->mnt_data = 0; + mp->mnt_data = NULL; free(mntdata, M_NULLFSMNT); return 0; } Modified: head/sys/fs/portalfs/portal_vfsops.c == --- head/sys/fs/portalfs/portal_vfsops.cTue Mar 13 08:18:54 2012 (r232917) +++ head/sys/fs/portalfs/portal_vfsops.cTue Mar 13 10:04:13 2012 (r232918) @@ -164,7 +164,7 @@ portal_mount(struct mount *mp) MNT_ILOCK(mp); mp->mnt_flag |= MNT_LOCAL; MNT_IUNLOCK(mp); - mp->mnt_data = fmp; + mp->mnt_data = fmp; vfs_getnewfsid(mp); vfs_mountedfrom(mp, p); @@ -213,7 +213,7 @@ portal_unmount(mp, mntflags) * Finally, throw away the portalmount structure */ free(mp->mnt_data, M_PORTALFSMNT); /* XXX */ - mp->mnt_data = 0; + mp->mnt_data = NULL; return (0); } Modified: head/sys/fs/unionfs/union_vfsops.c == --- head/sys/fs/unionfs/union_vfsops.c Tue Mar 13 08:18:54 2012 (r232917) +++ head/sys/fs/unionfs/union_vfsops.c Tue Mar 13 10:04:13 2012 (r232918) @@ -352,7 +352,7 @@ unionfs_unmount(struct mount *mp, int mn return (error); free(ump, M_UNIONFSMNT); - mp->mnt_data = 0; + mp->mnt_data = NULL; return (0); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232919 - in head: share/man/man4 sys/kern
Author: mav Date: Tue Mar 13 10:21:08 2012 New Revision: 232919 URL: http://svn.freebsd.org/changeset/base/232919 Log: Add kern.eventtimer.activetick tunable/sysctl, specifying whether each hardclock() tick should be run on every active CPU, or on only one. On my tests, avoiding extra interrupts because of this on 8-CPU Core i7 system with HZ=1 saves about 2% of performance. At this moment option implemented only for global timers, as reprogramming per-CPU timers is too expensive now to be compensated by this benefit, especially since we still have to regularly run hardclock() on at least one active CPU to update system uptime. For global timer it is quite trivial: timer runs always, but we just skip IPIs to other CPUs when possible. Option is enabled by default now, keeping previous behavior, as periodic hardclock() calls are still used at least to implement setitimer(2) with ITIMER_VIRTUAL and ITIMER_PROF arguments. But since default schedulers don't depend on it since r232917, we are much more free to experiment with it. MFC after:1 month Modified: head/share/man/man4/eventtimers.4 head/sys/kern/kern_clocksource.c Modified: head/share/man/man4/eventtimers.4 == --- head/share/man/man4/eventtimers.4 Tue Mar 13 10:04:13 2012 (r232918) +++ head/share/man/man4/eventtimers.4 Tue Mar 13 10:21:08 2012 (r232919) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 15, 2010 +.Dd March 13, 2012 .Dt EVENTTIMERS 4 .Os .Sh NAME @@ -143,6 +143,12 @@ By default this options is disabled. If chosen timer is per-CPU and runs in periodic mode, this option has no effect - all interrupts are always generating. +.It Va kern.eventtimer.activetick +makes each CPU to receive all kinds of timer interrupts when they are busy. +Disabling it allows to skip some hardclock() calls in some cases. +By default this options is enabled. +If chosen timer is per-CPU, this option has no effect - all interrupts are +always generating, as timer reprogramming is too expensive for that case. .El .Sh SEE ALSO .Xr apic 4 , Modified: head/sys/kern/kern_clocksource.c == --- head/sys/kern/kern_clocksource.cTue Mar 13 10:04:13 2012 (r232918) +++ head/sys/kern/kern_clocksource.cTue Mar 13 10:21:08 2012 (r232919) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2010 Alexander Motin + * Copyright (c) 2010-2012 Alexander Motin * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -99,6 +99,7 @@ static struct bintime hardperiod; /* har static struct bintime statperiod; /* statclock() events period. */ static struct bintime profperiod; /* profclock() events period. */ static struct bintime nexttick; /* Next global timer tick time. */ +static struct bintime nexthard; /* Next global hardlock() event. */ static u_int busy = 0; /* Reconfiguration is in progress. */ static int profiling = 0; /* Profiling events enabled. */ @@ -110,11 +111,16 @@ TUNABLE_INT("kern.eventtimer.singlemul", SYSCTL_INT(_kern_eventtimer, OID_AUTO, singlemul, CTLFLAG_RW, &singlemul, 0, "Multiplier for periodic mode"); -static u_int idletick = 0; /* Idle mode allowed. */ +static u_int idletick = 0; /* Run periodic events when idle. */ TUNABLE_INT("kern.eventtimer.idletick", &idletick); SYSCTL_UINT(_kern_eventtimer, OID_AUTO, idletick, CTLFLAG_RW, &idletick, 0, "Run periodic events when idle"); +static u_int activetick = 1; /* Run all periodic events when active. */ +TUNABLE_INT("kern.eventtimer.activetick", &activetick); +SYSCTL_UINT(_kern_eventtimer, OID_AUTO, activetick, CTLFLAG_RW, &activetick, +0, "Run all periodic events when active"); + static int periodic = 0; /* Periodic or one-shot mode. */ static int want_periodic = 0; /* What mode to prefer. */ TUNABLE_INT("kern.eventtimer.periodic", &want_periodic); @@ -202,6 +208,9 @@ handleevents(struct bintime *now, int fa bintime_add(&state->nexthard, &hardperiod); runs++; } + if ((timer->et_flags & ET_FLAGS_PERCPU) == 0 && + bintime_cmp(&state->nexthard, &nexthard, >)) + nexthard = state->nexthard; if (runs && fake < 2) { hardclock_cnt(runs, usermode); done = 1; @@ -263,9 +272,11 @@ getnextcpuevent(struct bintime *event, i int skip; state = DPCPU_PTR(timerstate); + /* Handle hardclock() events. */ *event = state->nexthard; - if (idle) { /* If CPU is idle - ask callouts for how long. */ - skip = 4; + if (idle || (!activetick && !profiling && + (timer->et_flags & ET_FLAGS_PERCPU) == 0)) { + skip = idle ? 4 :
svn commit: r232920 - head/share/man/man4
Author: mav Date: Tue Mar 13 10:54:14 2012 New Revision: 232920 URL: http://svn.freebsd.org/changeset/base/232920 Log: Some formatting for r232919. Submitted by: pluknet Modified: head/share/man/man4/eventtimers.4 Modified: head/share/man/man4/eventtimers.4 == --- head/share/man/man4/eventtimers.4 Tue Mar 13 10:21:08 2012 (r232919) +++ head/share/man/man4/eventtimers.4 Tue Mar 13 10:54:14 2012 (r232920) @@ -145,7 +145,9 @@ and runs in periodic mode, this option h always generating. .It Va kern.eventtimer.activetick makes each CPU to receive all kinds of timer interrupts when they are busy. -Disabling it allows to skip some hardclock() calls in some cases. +Disabling it allows to skip some +.Fn hardclock +calls in some cases. By default this options is enabled. If chosen timer is per-CPU, this option has no effect - all interrupts are always generating, as timer reprogramming is too expensive for that case. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232921 - in head/sys: modules/netgraph/netflow netgraph/netflow
Author: melifaro Date: Tue Mar 13 11:08:40 2012 New Revision: 232921 URL: http://svn.freebsd.org/changeset/base/232921 Log: Use rt_numfibs variable instead of compile-time RT_NUMFIBS. Reviewed by:glebius (previous version) Approved by:kib(mentor), ae(mentor) Modified: head/sys/modules/netgraph/netflow/Makefile head/sys/netgraph/netflow/netflow.c head/sys/netgraph/netflow/ng_netflow.c head/sys/netgraph/netflow/ng_netflow.h Modified: head/sys/modules/netgraph/netflow/Makefile == --- head/sys/modules/netgraph/netflow/Makefile Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/modules/netgraph/netflow/Makefile Tue Mar 13 11:08:40 2012 (r232921) @@ -17,8 +17,6 @@ opt_inet6.h: echo "#define INET6 1" > ${.TARGET} .endif -opt_route.h: - echo "#define ROUTETABLES RT_MAXFIBS" > ${.TARGET} .endif .include Modified: head/sys/netgraph/netflow/netflow.c == --- head/sys/netgraph/netflow/netflow.c Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/netgraph/netflow/netflow.c Tue Mar 13 11:08:40 2012 (r232921) @@ -630,7 +630,7 @@ ng_netflow_cache_flush(priv_p priv) free(priv->hash6, M_NETFLOW_HASH); #endif - for (i = 0; i < RT_NUMFIBS; i++) { + for (i = 0; i < priv->maxfibs; i++) { if ((fe = priv_to_fib(priv, i)) == NULL) continue; Modified: head/sys/netgraph/netflow/ng_netflow.c == --- head/sys/netgraph/netflow/ng_netflow.c Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/netgraph/netflow/ng_netflow.c Tue Mar 13 11:08:40 2012 (r232921) @@ -225,6 +225,11 @@ ng_netflow_constructor(node_p node) /* Initialize private data */ priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); + /* Initialize fib data */ + priv->maxfibs = rt_numfibs; + priv->fib_data = malloc(sizeof(fib_export_p) * priv->maxfibs, + M_NETGRAPH, M_WAITOK | M_ZERO); + /* Make node and its data point at each other */ NG_NODE_SET_PRIVATE(node, priv); priv->node = node; @@ -901,8 +906,10 @@ loopend: /* Check packet FIB */ fib = M_GETFIB(m); - if (fib >= RT_NUMFIBS) { - CTR2(KTR_NET, "ng_netflow_rcvdata(): packet fib %d is out of range of available fibs: 0 .. %d", fib, RT_NUMFIBS); + if (fib >= priv->maxfibs) { + CTR2(KTR_NET, "ng_netflow_rcvdata(): packet fib %d is out of " + "range of available fibs: 0 .. %d", + fib, priv->maxfibs); goto bypass; } @@ -973,6 +980,7 @@ ng_netflow_rmnode(node_p node) NG_NODE_SET_PRIVATE(node, NULL); NG_NODE_UNREF(priv->node); + free(priv->fib_data, M_NETGRAPH); free(priv, M_NETGRAPH); return (0); Modified: head/sys/netgraph/netflow/ng_netflow.h == --- head/sys/netgraph/netflow/ng_netflow.h Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/netgraph/netflow/ng_netflow.h Tue Mar 13 11:08:40 2012 (r232921) @@ -413,7 +413,8 @@ struct netflow { struct flow_hash_entry *hash6; #endif /* Multiple FIB support */ - fib_export_pfib_data[RT_NUMFIBS]; /* array of pointers to fib-specific data */ + fib_export_p*fib_data; /* array of pointers to per-fib data */ + uint16_tmaxfibs; /* number of allocated fibs */ /* * RFC 3954 clause 7.3 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r232921 - in head/sys: modules/netgraph/netflow netgraph/netflow
On 13. Mar 2012, at 11:08 , Alexander V. Chernikov wrote: > Author: melifaro > Date: Tue Mar 13 11:08:40 2012 > New Revision: 232921 > URL: http://svn.freebsd.org/changeset/base/232921 > > Log: > Use rt_numfibs variable instead of compile-time RT_NUMFIBS. Thanks a lot for doing this! This will allow us to go ahead and get rid of the mandatory kernel option now. I'll try to find my patch from last year and post it for your review. Are you intending to MFC this? Requested by: bz (a while ago with low prio) > Reviewed by:glebius (previous version) > Approved by:kib(mentor), ae(mentor) > > Modified: > head/sys/modules/netgraph/netflow/Makefile > head/sys/netgraph/netflow/netflow.c > head/sys/netgraph/netflow/ng_netflow.c > head/sys/netgraph/netflow/ng_netflow.h > > Modified: head/sys/modules/netgraph/netflow/Makefile > == > --- head/sys/modules/netgraph/netflow/MakefileTue Mar 13 10:54:14 > 2012(r232920) > +++ head/sys/modules/netgraph/netflow/MakefileTue Mar 13 11:08:40 > 2012(r232921) > @@ -17,8 +17,6 @@ opt_inet6.h: > echo "#define INET6 1" > ${.TARGET} > .endif > > -opt_route.h: > - echo "#define ROUTETABLES RT_MAXFIBS" > ${.TARGET} > .endif > > .include > > Modified: head/sys/netgraph/netflow/netflow.c > == > --- head/sys/netgraph/netflow/netflow.c Tue Mar 13 10:54:14 2012 > (r232920) > +++ head/sys/netgraph/netflow/netflow.c Tue Mar 13 11:08:40 2012 > (r232921) > @@ -630,7 +630,7 @@ ng_netflow_cache_flush(priv_p priv) > free(priv->hash6, M_NETFLOW_HASH); > #endif > > - for (i = 0; i < RT_NUMFIBS; i++) { > + for (i = 0; i < priv->maxfibs; i++) { > if ((fe = priv_to_fib(priv, i)) == NULL) > continue; > > > Modified: head/sys/netgraph/netflow/ng_netflow.c > == > --- head/sys/netgraph/netflow/ng_netflow.cTue Mar 13 10:54:14 2012 > (r232920) > +++ head/sys/netgraph/netflow/ng_netflow.cTue Mar 13 11:08:40 2012 > (r232921) > @@ -225,6 +225,11 @@ ng_netflow_constructor(node_p node) > /* Initialize private data */ > priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); > > + /* Initialize fib data */ > + priv->maxfibs = rt_numfibs; > + priv->fib_data = malloc(sizeof(fib_export_p) * priv->maxfibs, > + M_NETGRAPH, M_WAITOK | M_ZERO); > + > /* Make node and its data point at each other */ > NG_NODE_SET_PRIVATE(node, priv); > priv->node = node; > @@ -901,8 +906,10 @@ loopend: > > /* Check packet FIB */ > fib = M_GETFIB(m); > - if (fib >= RT_NUMFIBS) { > - CTR2(KTR_NET, "ng_netflow_rcvdata(): packet fib %d is out of > range of available fibs: 0 .. %d", fib, RT_NUMFIBS); > + if (fib >= priv->maxfibs) { > + CTR2(KTR_NET, "ng_netflow_rcvdata(): packet fib %d is out of " > + "range of available fibs: 0 .. %d", > + fib, priv->maxfibs); > goto bypass; > } > > @@ -973,6 +980,7 @@ ng_netflow_rmnode(node_p node) > NG_NODE_SET_PRIVATE(node, NULL); > NG_NODE_UNREF(priv->node); > > + free(priv->fib_data, M_NETGRAPH); > free(priv, M_NETGRAPH); > > return (0); > > Modified: head/sys/netgraph/netflow/ng_netflow.h > == > --- head/sys/netgraph/netflow/ng_netflow.hTue Mar 13 10:54:14 2012 > (r232920) > +++ head/sys/netgraph/netflow/ng_netflow.hTue Mar 13 11:08:40 2012 > (r232921) > @@ -413,7 +413,8 @@ struct netflow { > struct flow_hash_entry *hash6; > #endif > /* Multiple FIB support */ > - fib_export_pfib_data[RT_NUMFIBS]; /* array of pointers to > fib-specific data */ > + fib_export_p*fib_data; /* array of pointers to per-fib data > */ > + uint16_tmaxfibs; /* number of allocated fibs */ > > /* >* RFC 3954 clause 7.3 -- Bjoern A. Zeeb You have to have visions! It does not matter how good you are. It matters what good you do! ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r232921 - in head/sys: modules/netgraph/netflow netgraph/netflow
On 13.03.2012 16:51, Bjoern A. Zeeb wrote: On 13. Mar 2012, at 11:08 , Alexander V. Chernikov wrote: Author: melifaro Date: Tue Mar 13 11:08:40 2012 New Revision: 232921 URL: http://svn.freebsd.org/changeset/base/232921 Log: Use rt_numfibs variable instead of compile-time RT_NUMFIBS. Thanks a lot for doing this! Sorry for doing this for too long. This will allow us to go ahead and get rid of the mandatory kernel option now. I'll try to find my patch from last year and post it for your review. Are you intending to MFC this? netflow v9 stuff is still not MFCed to 8/7 (And I forgot 9 contains it). So it should be 2w for 9 Requested by: bz (a while ago with low prio) Reviewed by:glebius (previous version) Approved by:kib(mentor), ae(mentor) Modified: head/sys/modules/netgraph/netflow/Makefile head/sys/netgraph/netflow/netflow.c head/sys/netgraph/netflow/ng_netflow.c head/sys/netgraph/netflow/ng_netflow.h Modified: head/sys/modules/netgraph/netflow/Makefile == --- head/sys/modules/netgraph/netflow/Makefile Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/modules/netgraph/netflow/Makefile Tue Mar 13 11:08:40 2012 (r232921) @@ -17,8 +17,6 @@ opt_inet6.h: echo "#define INET6 1"> ${.TARGET} .endif -opt_route.h: - echo "#define ROUTETABLES RT_MAXFIBS"> ${.TARGET} .endif .include Modified: head/sys/netgraph/netflow/netflow.c == --- head/sys/netgraph/netflow/netflow.c Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/netgraph/netflow/netflow.c Tue Mar 13 11:08:40 2012 (r232921) @@ -630,7 +630,7 @@ ng_netflow_cache_flush(priv_p priv) free(priv->hash6, M_NETFLOW_HASH); #endif - for (i = 0; i< RT_NUMFIBS; i++) { + for (i = 0; i< priv->maxfibs; i++) { if ((fe = priv_to_fib(priv, i)) == NULL) continue; Modified: head/sys/netgraph/netflow/ng_netflow.c == --- head/sys/netgraph/netflow/ng_netflow.c Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/netgraph/netflow/ng_netflow.c Tue Mar 13 11:08:40 2012 (r232921) @@ -225,6 +225,11 @@ ng_netflow_constructor(node_p node) /* Initialize private data */ priv = malloc(sizeof(*priv), M_NETGRAPH, M_WAITOK | M_ZERO); + /* Initialize fib data */ + priv->maxfibs = rt_numfibs; + priv->fib_data = malloc(sizeof(fib_export_p) * priv->maxfibs, + M_NETGRAPH, M_WAITOK | M_ZERO); + /* Make node and its data point at each other */ NG_NODE_SET_PRIVATE(node, priv); priv->node = node; @@ -901,8 +906,10 @@ loopend: /* Check packet FIB */ fib = M_GETFIB(m); - if (fib>= RT_NUMFIBS) { - CTR2(KTR_NET, "ng_netflow_rcvdata(): packet fib %d is out of range of available fibs: 0 .. %d", fib, RT_NUMFIBS); + if (fib>= priv->maxfibs) { + CTR2(KTR_NET, "ng_netflow_rcvdata(): packet fib %d is out of " + "range of available fibs: 0 .. %d", + fib, priv->maxfibs); goto bypass; } @@ -973,6 +980,7 @@ ng_netflow_rmnode(node_p node) NG_NODE_SET_PRIVATE(node, NULL); NG_NODE_UNREF(priv->node); + free(priv->fib_data, M_NETGRAPH); free(priv, M_NETGRAPH); return (0); Modified: head/sys/netgraph/netflow/ng_netflow.h == --- head/sys/netgraph/netflow/ng_netflow.h Tue Mar 13 10:54:14 2012 (r232920) +++ head/sys/netgraph/netflow/ng_netflow.h Tue Mar 13 11:08:40 2012 (r232921) @@ -413,7 +413,8 @@ struct netflow { struct flow_hash_entry *hash6; #endif /* Multiple FIB support */ - fib_export_pfib_data[RT_NUMFIBS]; /* array of pointers to fib-specific data */ + fib_export_p*fib_data; /* array of pointers to per-fib data */ + uint16_tmaxfibs; /* number of allocated fibs */ /* * RFC 3954 clause 7.3 -- WBR, Alexander ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r232832 - in head/lib/csu: . amd64 arm common i386-elf mips powerpc powerpc64 sparc64
On 03/11/12 15:04, Konstantin Belousov wrote: Author: kib Date: Sun Mar 11 20:04:09 2012 New Revision: 232832 URL: http://svn.freebsd.org/changeset/base/232832 Log: Stop calling _init/_fini methods from crt1 for dynamic binaries. Do call preinit, init and fini arrays methods from crt1 for static binaries. Mark new crt1 with FreeBSD-specific ELF note. Move some common crt1 code into new MI file ignore_init.c, to reduce duplication. Also, conservatively adjust nearby sources for style. Reviewed by: kan Tested by: andrew (arm), flo (sparc64) MFC after: 3 weeks This change makes /usr/libexec/cc1 seg fault on init on powerpc64. Dynamically linked (and most statically linked) binaries seem to work, but there is some remaining problem. -Nathan ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232926 - in head: include/xlocale lib/libc/locale
Author: theraven Date: Tue Mar 13 14:14:13 2012 New Revision: 232926 URL: http://svn.freebsd.org/changeset/base/232926 Log: More xlocale cleanups. Approved by: dim (mentor) Modified: head/include/xlocale/_ctype.h head/lib/libc/locale/Symbol.map Modified: head/include/xlocale/_ctype.h == --- head/include/xlocale/_ctype.h Tue Mar 13 14:10:33 2012 (r232925) +++ head/include/xlocale/_ctype.h Tue Mar 13 14:14:13 2012 (r232926) @@ -68,19 +68,19 @@ _RuneLocale *__runes_for_locale(locale_t #endif /* _XLOCALE_INLINE */ #ifdef _XLOCALE_WCTYPES -static __inline int -__maskrune_l(__ct_rune_t _c, unsigned long _f, locale_t locale) +_XLOCALE_INLINE int +__maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { - int mb_sb_limit; - _RuneLocale *runes = __runes_for_locale(locale, &mb_sb_limit); - return (_c < 0 || _c >= _CACHED_RUNES) ? ___runetype_l(_c, locale) : - runes->__runetype[_c] & _f; + int __limit; + _RuneLocale *runes = __runes_for_locale(__loc, &__limit); + return (__c < 0 || __c >= _CACHED_RUNES) ? ___runetype_l(__c, __loc) : + runes->__runetype[__c] & __f; } -static __inline int -__istype_l(__ct_rune_t _c, unsigned long _f, locale_t locale) +_XLOCALE_INLINE __inline int +__istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { - return (!!__maskrune_l(_c, _f, locale)); + return (!!__maskrune_l(__c, __f, __loc)); } #define XLOCALE_ISCTYPE(fname, cat) \ @@ -88,25 +88,25 @@ __istype_l(__ct_rune_t _c, unsigned long _XLOCALE_INLINE int isw##fname##_l(int __c, locale_t __l)\ { return __istype_l(__c, cat, __l); } #else -static __inline int -__sbmaskrune_l(__ct_rune_t _c, unsigned long _f, locale_t locale) +_XLOCALE_INLINE int +__sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { - int mb_sb_limit; - _RuneLocale *runes = __runes_for_locale(locale, &mb_sb_limit); - return (_c < 0 || _c >= mb_sb_limit) ? 0 : - runes->__runetype[_c] & _f; + int __limit; + _RuneLocale *runes = __runes_for_locale(__loc, &__limit); + return (__c < 0 || __c >= __limit) ? 0 : + runes->__runetype[__c] & __f; } -static __inline int -__sbistype_l(__ct_rune_t _c, unsigned long _f, locale_t locale) +_XLOCALE_INLINE int +__sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { - return (!!__sbmaskrune_l(_c, _f, locale)); + return (!!__sbmaskrune_l(__c, __f, __loc)); } -#define XLOCALE_ISCTYPE(fname, cat) \ - _XLOCALE_INLINE int is##fname##_l(int c, locale_t l); \ - _XLOCALE_INLINE int is##fname##_l(int c, locale_t l)\ - { return __sbistype_l(c, cat, l); } +#define XLOCALE_ISCTYPE(__fname, __cat) \ + _XLOCALE_INLINE int is##__fname##_l(int, locale_t); \ + _XLOCALE_INLINE int is##__fname##_l(int __c, locale_t __l)\ + { return __sbistype_l(__c, __cat, __l); } #endif XLOCALE_ISCTYPE(alnum, _CTYPE_A|_CTYPE_D) @@ -136,15 +136,15 @@ _XLOCALE_INLINE int towupper_l(int, loca _XLOCALE_INLINE int towlower_l(int __c, locale_t __l) { - int mb_sb_limit; - _RuneLocale *__runes = __runes_for_locale(__l, &mb_sb_limit); + int __limit; + _RuneLocale *__runes = __runes_for_locale(__l, &__limit); return (__c < 0 || __c >= _CACHED_RUNES) ? ___tolower_l(__c, __l) : __runes->__maplower[__c]; } _XLOCALE_INLINE int towupper_l(int __c, locale_t __l) { - int mb_sb_limit; - _RuneLocale *__runes = __runes_for_locale(__l, &mb_sb_limit); + int __limit; + _RuneLocale *__runes = __runes_for_locale(__l, &__limit); return (__c < 0 || __c >= _CACHED_RUNES) ? ___toupper_l(__c, __l) : __runes->__mapupper[__c]; } Modified: head/lib/libc/locale/Symbol.map == --- head/lib/libc/locale/Symbol.map Tue Mar 13 14:10:33 2012 (r232925) +++ head/lib/libc/locale/Symbol.map Tue Mar 13 14:14:13 2012 (r232926) @@ -60,9 +60,13 @@ FBSD_1.0 { nextwctype; nl_langinfo; __maskrune; + __maskrune_l; __sbmaskrune; + __sbmaskrune_l; __istype; + __istype_l; __sbistype; + __sbistype_l; __isctype; __toupper; __sbtoupper; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232927 - head/include/xlocale
Author: theraven Date: Tue Mar 13 15:21:14 2012 New Revision: 232927 URL: http://svn.freebsd.org/changeset/base/232927 Log: Add missing prototypes. Approved by: dim (mentor) Modified: head/include/xlocale/_ctype.h Modified: head/include/xlocale/_ctype.h == --- head/include/xlocale/_ctype.h Tue Mar 13 14:14:13 2012 (r232926) +++ head/include/xlocale/_ctype.h Tue Mar 13 15:21:14 2012 (r232927) @@ -89,6 +89,11 @@ __istype_l(__ct_rune_t __c, unsigned lon { return __istype_l(__c, cat, __l); } #else _XLOCALE_INLINE int +__sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); +_XLOCALE_INLINE int +__sbistype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); + +_XLOCALE_INLINE int __sbmaskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { int __limit; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r232582 - head/lib/libc/gen
On Mar 5, 2012, at 7:42 PM, Oleksandr Tymoshenko wrote: > @@ -308,6 +308,13 @@ _init_tls() > } > } > > +#ifdef TLS_VARIANT_I > + /* > + * tls_static_space should include space for TLS structure > + */ > + tls_static_space += TLS_TCB_SIZE; > +#endif > + How does this change behaviour on ia64 or powerpc? -- Marcel Moolenaar mar...@xcllnt.net ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232929 - head/include/xlocale
Author: theraven Date: Tue Mar 13 17:32:55 2012 New Revision: 232929 URL: http://svn.freebsd.org/changeset/base/232929 Log: Fix the other missing prototypes. Approved by: dim (mentor) Modified: head/include/xlocale/_ctype.h Modified: head/include/xlocale/_ctype.h == --- head/include/xlocale/_ctype.h Tue Mar 13 16:42:39 2012 (r232928) +++ head/include/xlocale/_ctype.h Tue Mar 13 17:32:55 2012 (r232929) @@ -69,6 +69,11 @@ _RuneLocale *__runes_for_locale(locale_t #ifdef _XLOCALE_WCTYPES _XLOCALE_INLINE int +__maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); +_XLOCALE_INLINE __inline int +__istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); + +_XLOCALE_INLINE int __maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { int __limit; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r232929 - head/include/xlocale
On 13.03.12 18:32, David Chisnall wrote: Author: theraven Date: Tue Mar 13 17:32:55 2012 New Revision: 232929 URL: http://svn.freebsd.org/changeset/base/232929 Log: Fix the other missing prototypes. Approved by: dim (mentor) Modified: head/include/xlocale/_ctype.h Modified: head/include/xlocale/_ctype.h == --- head/include/xlocale/_ctype.h Tue Mar 13 16:42:39 2012 (r232928) +++ head/include/xlocale/_ctype.h Tue Mar 13 17:32:55 2012 (r232929) @@ -69,6 +69,11 @@ _RuneLocale *__runes_for_locale(locale_t #ifdef _XLOCALE_WCTYPES _XLOCALE_INLINE int +__maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); +_XLOCALE_INLINE __inline int Duplicate inline. +__istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); + +_XLOCALE_INLINE int __maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { int __limit; Around line 85 too. I build with the below diff now. Gruss, Andreas Index: _ctype.h === --- _ctype.h(revision 232929) +++ _ctype.h(working copy) @@ -70,7 +70,7 @@ #ifdef _XLOCALE_WCTYPES _XLOCALE_INLINE int __maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); -_XLOCALE_INLINE __inline int +_XLOCALE_INLINE int __istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); _XLOCALE_INLINE int @@ -82,7 +82,7 @@ runes->__runetype[__c] & __f; } -_XLOCALE_INLINE __inline int +_XLOCALE_INLINE int __istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { return (!!__maskrune_l(__c, __f, __loc)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232931 - head/include/xlocale
Author: theraven Date: Tue Mar 13 18:53:28 2012 New Revision: 232931 URL: http://svn.freebsd.org/changeset/base/232931 Log: And remove the duplicate inlines... Approved by: dim (mentor) Modified: head/include/xlocale/_ctype.h Modified: head/include/xlocale/_ctype.h == --- head/include/xlocale/_ctype.h Tue Mar 13 18:39:57 2012 (r232930) +++ head/include/xlocale/_ctype.h Tue Mar 13 18:53:28 2012 (r232931) @@ -70,7 +70,7 @@ _RuneLocale *__runes_for_locale(locale_t #ifdef _XLOCALE_WCTYPES _XLOCALE_INLINE int __maskrune_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); -_XLOCALE_INLINE __inline int +_XLOCALE_INLINE int __istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc); _XLOCALE_INLINE int @@ -82,7 +82,7 @@ __maskrune_l(__ct_rune_t __c, unsigned l runes->__runetype[__c] & __f; } -_XLOCALE_INLINE __inline int +_XLOCALE_INLINE int __istype_l(__ct_rune_t __c, unsigned long __f, locale_t __loc) { return (!!__maskrune_l(__c, __f, __loc)); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232932 - head/lib/csu/powerpc64
Author: nwhitehorn Date: Tue Mar 13 18:59:19 2012 New Revision: 232932 URL: http://svn.freebsd.org/changeset/base/232932 Log: Work around a binutils bug on powerpc64 where the TOC would not be properly reloaded when calling _fini() in large binaries with multiple TOC sections (e.g. GCC), leading to a segmentation fault. Adding -mlongcall to crt1 flags causes the compiler to emit explicit TOC load instructions for all function calls, including _fini(). Reviewed by: kib Pointy hat to:kib Modified: head/lib/csu/powerpc64/Makefile Modified: head/lib/csu/powerpc64/Makefile == --- head/lib/csu/powerpc64/Makefile Tue Mar 13 18:53:28 2012 (r232931) +++ head/lib/csu/powerpc64/Makefile Tue Mar 13 18:59:19 2012 (r232932) @@ -6,7 +6,8 @@ SRCS= crt1.c crti.S crtn.S OBJS= ${SRCS:N*.h:R:S/$/.o/g} OBJS+= Scrt1.o gcrt1.o CFLAGS+= -I${.CURDIR}/../common \ - -I${.CURDIR}/../../libc/include + -I${.CURDIR}/../../libc/include \ + -mlongcall all: ${OBJS} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232933 - head/sys/conf
Author: dim Date: Tue Mar 13 19:18:34 2012 New Revision: 232933 URL: http://svn.freebsd.org/changeset/base/232933 Log: Update comments and CFLAGS in sys/conf/kern.mk, introduced in r221879, to match reality: clang does _not_ disable SSE automatically when -mno-mmx is used, you have to specify -mno-sse explicitly. Note this was the case even before r232894, which only makes a change in the 'positive' flag case; e.g. when you specify -msse, MMX gets enabled too. MFC after:1 week Modified: head/sys/conf/kern.mk Modified: head/sys/conf/kern.mk == --- head/sys/conf/kern.mk Tue Mar 13 18:59:19 2012(r232932) +++ head/sys/conf/kern.mk Tue Mar 13 19:18:34 2012(r232933) @@ -46,16 +46,16 @@ CWARNEXTRA?=-Wno-error-tautological-com # Setting -mno-sse implies -mno-sse2, -mno-sse3 and -mno-ssse3 # # clang: -# Setting -mno-mmx implies -mno-3dnow, -mno-3dnowa, -mno-sse, -mno-sse2, -# -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 +# Setting -mno-mmx implies -mno-3dnow and -mno-3dnowa +# Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 # .if ${MACHINE_CPUARCH} == "i386" .if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang" -CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-sse +CFLAGS+= -mno-align-long-strings -mpreferred-stack-boundary=2 .else CFLAGS+= -mno-aes -mno-avx .endif -CFLAGS+= -mno-mmx -msoft-float +CFLAGS+= -mno-mmx -mno-sse -msoft-float INLINE_LIMIT?= 8000 .endif @@ -93,17 +93,15 @@ INLINE_LIMIT?= 15000 # Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3 and -mfpmath=387 # # clang: -# Setting -mno-mmx implies -mno-3dnow, -mno-3dnowa, -mno-sse, -mno-sse2, -# -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 +# Setting -mno-mmx implies -mno-3dnow and -mno-3dnowa +# Setting -mno-sse implies -mno-sse2, -mno-sse3, -mno-ssse3, -mno-sse41 and -mno-sse42 # (-mfpmath= is not supported) # .if ${MACHINE_CPUARCH} == "amd64" -.if ${MK_CLANG_IS_CC} == "no" && ${CC:T:Mclang} != "clang" -CFLAGS+= -mno-sse -.else +.if ${MK_CLANG_IS_CC} != "no" || ${CC:T:Mclang} == "clang" CFLAGS+= -mno-aes -mno-avx .endif -CFLAGS+= -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float \ +CFLAGS+= -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float \ -fno-asynchronous-unwind-tables INLINE_LIMIT?= 8000 .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r232894 - head/contrib/llvm/tools/clang/lib/Basic
On 2012-03-13 03:15, Alexander Best wrote: > On Mon Mar 12 12, Dimitry Andric wrote: >> Author: dim >> Date: Mon Mar 12 21:07:22 2012 >> New Revision: 232894 >> URL: http://svn.freebsd.org/changeset/base/232894 >> >> Log: >> Pull in r145194 from upstream clang trunk: >> >> Make our handling of MMX x SSE closer to what gcc does: >> >> * Enabling sse enables mmx. >> * Disabling (-mno-mmx) mmx, doesn't disable sse (we got this right >> already). >> * The order in not important. -msse -mno-mmx is the same as -mno-mmx >> -msse. > > are you sure that sys/conf/kern.mk doesn't need updating after this commit? if > now setting -mno-mmx doesn't imply -mno-sse, i think the i386 and amd64 > sections in kern.mk needs to be updated (along with the comments). Setting -mno-mmx never implied -mno-sse, even before r232894. I have updated the comments and CFLAGS in r232933. Note that clang's default arch setting on 32-bit x86 is i486, so it would not have been using SSE anyway. That is, unless people set CPUTYPE to anything that does support it. :) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232934 - head/contrib/gdb/gdb
Author: dim Date: Tue Mar 13 19:40:56 2012 New Revision: 232934 URL: http://svn.freebsd.org/changeset/base/232934 Log: Pull in a fix (still under GPLv2) for a double free in gdb, leading to an assert, which can occur if you repeatedly dlopen() and dlclose() a .so file in a tight loop. This was reported on freebsd-current@ by Alexandre Martins, with a sample to reproduce the behaviour. Obtained from: http://sourceware.org/git/?p=gdb.git;a=commit;h=a6f2cbb341520f8e100f4b8305979dd6207a79e8 Modified: head/contrib/gdb/gdb/target.c Modified: head/contrib/gdb/gdb/target.c == --- head/contrib/gdb/gdb/target.c Tue Mar 13 19:18:34 2012 (r232933) +++ head/contrib/gdb/gdb/target.c Tue Mar 13 19:40:56 2012 (r232934) @@ -1425,6 +1425,13 @@ target_resize_to_sections (struct target (*t)->to_sections_end = target->to_sections_end; } } + /* There is a flattened view of the target stack in current_target, +so its to_sections pointer might also need updating. */ + if (current_target.to_sections == old_value) + { + current_target.to_sections = target->to_sections; + current_target.to_sections_end = target->to_sections_end; + } } return old_count; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232935 - head/lib/libc/locale
Author: theraven Date: Tue Mar 13 20:02:41 2012 New Revision: 232935 URL: http://svn.freebsd.org/changeset/base/232935 Log: First set of xlocale man pages. More to follow... Approved by: dim (mentor) Added: head/lib/libc/locale/ctype_l.3 - copied, changed from r232600, head/lib/libc/locale/ctype.3 Modified: head/lib/libc/locale/Makefile.inc head/lib/libc/locale/btowc.3 head/lib/libc/locale/ctype.3 head/lib/libc/locale/digittoint.3 head/lib/libc/locale/isalnum.3 head/lib/libc/locale/isalpha.3 head/lib/libc/locale/isblank.3 head/lib/libc/locale/iscntrl.3 head/lib/libc/locale/isdigit.3 Modified: head/lib/libc/locale/Makefile.inc == --- head/lib/libc/locale/Makefile.inc Tue Mar 13 19:40:56 2012 (r232934) +++ head/lib/libc/locale/Makefile.inc Tue Mar 13 20:02:41 2012 (r232935) @@ -26,6 +26,7 @@ SRCS+=ascii.c big5.c btowc.c collate.c SYM_MAPS+=${.CURDIR}/locale/Symbol.map MAN+= btowc.3 \ + ctype_l.3 \ ctype.3 digittoint.3 isalnum.3 isalpha.3 isascii.3 isblank.3 iscntrl.3 \ isdigit.3 isgraph.3 isideogram.3 islower.3 isphonogram.3 isprint.3 \ ispunct.3 isrune.3 isspace.3 isspecial.3 \ Modified: head/lib/libc/locale/btowc.3 == --- head/lib/libc/locale/btowc.3Tue Mar 13 19:40:56 2012 (r232934) +++ head/lib/libc/locale/btowc.3Tue Mar 13 20:02:41 2012 (r232935) @@ -39,6 +39,12 @@ .Fn btowc "int c" .Ft int .Fn wctob "wint_t c" +.In wchar.h +.In xlocale.h +.Ft wint_t +.Fn btowc "int c" +.Ft int +.Fn wctob "wint_t c" .Sh DESCRIPTION The .Fn btowc @@ -59,6 +65,9 @@ or not able to be represented as a singl .Fn wctob returns .Dv EOF . +.Pp +The _l-suffixed versions take an explicit locale argument, while the +non-suffixed versions use the current global or per-thread locale. .Sh SEE ALSO .Xr mbrtowc 3 , .Xr multibyte 3 , Modified: head/lib/libc/locale/ctype.3 == --- head/lib/libc/locale/ctype.3Tue Mar 13 19:40:56 2012 (r232934) +++ head/lib/libc/locale/ctype.3Tue Mar 13 20:02:41 2012 (r232935) @@ -55,7 +55,7 @@ .Nm toascii , .Nm tolower , .Nm toupper -.Nd character classification macros +.Nd character classification functions .Sh LIBRARY .Lb libc .Sh SYNOPSIS Copied and modified: head/lib/libc/locale/ctype_l.3 (from r232600, head/lib/libc/locale/ctype.3) == --- head/lib/libc/locale/ctype.3Tue Mar 6 12:20:37 2012 (r232600, copy source) +++ head/lib/libc/locale/ctype_l.3 Tue Mar 13 20:02:41 2012 (r232935) @@ -1,5 +1,8 @@ -.\" Copyright (c) 1991, 1993 -.\"The Regents of the University of California. All rights reserved. +.\" Copyright (c) 2011 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This documentation was written by David Chisnall under sponsorship from +.\" the FreeBSD Foundation. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -9,9 +12,6 @@ .\" 2. Redistributions in binary form must reproduce the above copyright .\"notice, this list of conditions and the following disclaimer in the .\"documentation and/or other materials provided with the distribution. -.\" 4. Neither the name of the University nor the names of its contributors -.\"may be used to endorse or promote products derived from this software -.\"without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE @@ -25,89 +25,88 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)ctype.38.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd March 30, 2004 -.Dt CTYPE 3 +.Dd March 6, 2012 +.Dt CTYPE_L 3 .Os .Sh NAME -.Nm digittoint , -.Nm isalnum , -.Nm isalpha , -.Nm isascii , -.Nm isblank , -.Nm iscntrl , -.Nm isdigit , -.Nm isgraph , -.Nm ishexnumber , -.Nm isideogram , -.Nm islower , -.Nm isnumber , -.Nm isphonogram , -.Nm isprint , -.Nm ispunct , -.Nm isrune , -.Nm isspace , -.Nm isspecial , -.Nm isupper , -.Nm isxdigit , -.Nm toascii , -.Nm tolower , -.Nm toupper -.Nd character classification macros +.Nm digittoint_l , +.Nm isalnum_l , +.Nm isalpha_l , +.Nm isascii_l , +.Nm isblank_l , +.Nm iscntrl_l , +.Nm isdigit_l , +.Nm isgraph_l , +.Nm ishexnumber_l , +.Nm isideogram_l , +.Nm islower_l , +.Nm isnumber_l , +.Nm isphonogram_l , +.Nm isprint_l , +.Nm ispunct_l , +.Nm isrune_l , +.Nm isspace_l , +.Nm isspecial_l , +.Nm isupper_l , +.Nm isxdigit_l , +.Nm tolower_l , +.Nm toupper_l +.Nd character classification functi
svn commit: r232936 - head/sys/kern
Author: adrian Date: Tue Mar 13 20:27:48 2012 New Revision: 232936 URL: http://svn.freebsd.org/changeset/base/232936 Log: Add module load/unload stubs. Modified: head/sys/kern/subr_acl_nfs4.c head/sys/kern/subr_acl_posix1e.c Modified: head/sys/kern/subr_acl_nfs4.c == --- head/sys/kern/subr_acl_nfs4.c Tue Mar 13 20:02:41 2012 (r232935) +++ head/sys/kern/subr_acl_nfs4.c Tue Mar 13 20:27:48 2012 (r232936) @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include #include @@ -1367,3 +1369,46 @@ acl_nfs4_check(const struct acl *aclp, i return (0); } + +#ifdef _KERNEL +static int +acl_nfs4_modload(module_t module, int what, void *arg) +{ + int ret; + + ret = 0; + + switch (what) { + case MOD_LOAD: + case MOD_SHUTDOWN: + break; + + case MOD_QUIESCE: + /* XXX TODO */ + ret = 0; + break; + + case MOD_UNLOAD: + /* XXX TODO */ + ret = 0; + break; + default: + ret = EINVAL; + break; + } + + return (ret); +} + +static moduledata_t acl_nfs4_mod = { + "acl_nfs4", + acl_nfs4_modload, + NULL +}; + +/* + * XXX TODO: which subsystem, order? + */ +DECLARE_MODULE(acl_nfs4, acl_nfs4_mod, SI_SUB_VFS, SI_ORDER_FIRST); +MODULE_VERSION(acl_nfs4, 1); +#endif /* _KERNEL */ Modified: head/sys/kern/subr_acl_posix1e.c == --- head/sys/kern/subr_acl_posix1e.cTue Mar 13 20:02:41 2012 (r232935) +++ head/sys/kern/subr_acl_posix1e.cTue Mar 13 20:27:48 2012 (r232936) @@ -37,6 +37,8 @@ __FBSDID("$FreeBSD$"); #include +#include +#include #include #include #include @@ -648,3 +650,42 @@ acl_posix1e_newfilemode(mode_t cmode, st return (mode); } + + +static int +acl_posix1e_modload(module_t mod, int what, void *arg) +{ + int ret; + + ret = 0; + + switch (what) { + case MOD_LOAD: + case MOD_SHUTDOWN: + break; + + case MOD_QUIESCE: + /* XXX TODO */ + ret = 0; + break; + + case MOD_UNLOAD: + /* XXX TODO */ + ret = 0; + break; + default: + ret = EINVAL; + break; + } + + return (ret); +} + +static moduledata_t acl_posix1e_mod = { + "acl_posix1e", + acl_posix1e_modload, + NULL +}; + +DECLARE_MODULE(acl_posix1e, acl_posix1e_mod, SI_SUB_VFS, SI_ORDER_FIRST); +MODULE_VERSION(acl_posix1e, 1); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232937 - in head/sys/modules: . acl_nfs4 acl_posix1e
Author: adrian Date: Tue Mar 13 20:28:42 2012 New Revision: 232937 URL: http://svn.freebsd.org/changeset/base/232937 Log: Add module building Makefile entries for NFSv4 and POSIX.1e ACL handling. Added: head/sys/modules/acl_nfs4/ head/sys/modules/acl_nfs4/Makefile (contents, props changed) head/sys/modules/acl_posix1e/ head/sys/modules/acl_posix1e/Makefile (contents, props changed) Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Tue Mar 13 20:27:48 2012(r232936) +++ head/sys/modules/Makefile Tue Mar 13 20:28:42 2012(r232937) @@ -11,6 +11,8 @@ SUBDIR= ${_3dfx} \ accf_data \ accf_dns \ accf_http \ + acl_nfs4 \ + acl_posix1e \ ${_acpi} \ ae \ ${_aesni} \ Added: head/sys/modules/acl_nfs4/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/acl_nfs4/Makefile Tue Mar 13 20:28:42 2012 (r232937) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.include + +.PATH: ${.CURDIR}/../../kern +KMOD= acl_nfs4 +SRCS= vnode_if.h subr_acl_nfs4.c + +.include Added: head/sys/modules/acl_posix1e/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/acl_posix1e/Makefile Tue Mar 13 20:28:42 2012 (r232937) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.include + +.PATH: ${.CURDIR}/../../kern +KMOD= acl_posix1e +SRCS= vnode_if.h subr_acl_posix1e.c + +.include ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232938 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: adrian Date: Tue Mar 13 20:29:04 2012 New Revision: 232938 URL: http://svn.freebsd.org/changeset/base/232938 Log: Add dependencies onto acl_posix1e and acl_nfs4. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Mar 13 20:28:42 2012(r232937) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Mar 13 20:29:04 2012(r232938) @@ -5423,3 +5423,5 @@ static moduledata_t zfs_mod = { DECLARE_MODULE(zfsctrl, zfs_mod, SI_SUB_VFS, SI_ORDER_ANY); MODULE_DEPEND(zfsctrl, opensolaris, 1, 1, 1); MODULE_DEPEND(zfsctrl, krpc, 1, 1, 1); +MODULE_DEPEND(zfsctrl, acl_nfs4, 1, 1, 1); +MODULE_DEPEND(zfsctrl, acl_posix1e, 1, 1, 1); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232939 - head/sys/conf
Author: adrian Date: Tue Mar 13 20:29:56 2012 New Revision: 232939 URL: http://svn.freebsd.org/changeset/base/232939 Log: (Re)-make these ACL routines optional. They're only currently used by ZFS and UFS_ACL. They're just wasting space on embedded platforms with neither enabled. Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Tue Mar 13 20:29:04 2012(r232938) +++ head/sys/conf/files Tue Mar 13 20:29:56 2012(r232939) @@ -2419,8 +2419,8 @@ kern/sched_ule.c optional sched_ule kern/serdev_if.m standard kern/stack_protector.c standard \ compile-with "${NORMAL_C:N-fstack-protector*}" -kern/subr_acl_nfs4.c standard -kern/subr_acl_posix1e.cstandard +kern/subr_acl_nfs4.c optional ufs_acl +kern/subr_acl_posix1e.coptional ufs_acl kern/subr_autoconf.c standard kern/subr_blist.c standard kern/subr_bus.cstandard ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232940 - in head/tools/tools/wtap: vis_map wtap
Author: adrian Date: Tue Mar 13 20:30:23 2012 New Revision: 232940 URL: http://svn.freebsd.org/changeset/base/232940 Log: Add a BINDIR so "make install" works. Modified: head/tools/tools/wtap/vis_map/Makefile head/tools/tools/wtap/wtap/Makefile Modified: head/tools/tools/wtap/vis_map/Makefile == --- head/tools/tools/wtap/vis_map/Makefile Tue Mar 13 20:29:56 2012 (r232939) +++ head/tools/tools/wtap/vis_map/Makefile Tue Mar 13 20:30:23 2012 (r232940) @@ -1,5 +1,6 @@ # $FreeBSD$ +BINDIR?= /usr/local/bin/ PROG= vis_map SRC= vis_map.c NO_MAN=1 Modified: head/tools/tools/wtap/wtap/Makefile == --- head/tools/tools/wtap/wtap/Makefile Tue Mar 13 20:29:56 2012 (r232939) +++ head/tools/tools/wtap/wtap/Makefile Tue Mar 13 20:30:23 2012 (r232940) @@ -1,5 +1,6 @@ # $FreeBSD$ +BINDIR?= /usr/local/bin PROG= wtap SRC= wtap.c NO_MAN=1 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r232582 - head/lib/libc/gen
On 13/03/2012 9:21 AM, Marcel Moolenaar wrote: On Mar 5, 2012, at 7:42 PM, Oleksandr Tymoshenko wrote: @@ -308,6 +308,13 @@ _init_tls() } } +#ifdef TLS_VARIANT_I + /* +* tls_static_space should include space for TLS structure +*/ + tls_static_space += TLS_TCB_SIZE; +#endif + How does this change behaviour on ia64 or powerpc? I believe it doesn't. nathanw@ performed some sanity tests on powerpc recently, and they passed. ia64 has not been tested. This issue manifested itself only with statically linked binaries. Juli presented some corner case test for MIPS that caused crash: binary compiled with "-static -pthread" without any actual thread- specific variables that tries to get TP pointer. This test case leads to crash and I used it for tracking down the root cause. For binaries with actual TLS data this issue would manifest itself as memory corruption. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232946 - in head/sys: contrib/dev/ral modules/ralfw modules/ralfw/rt2860
Author: bschmidt Date: Tue Mar 13 21:25:25 2012 New Revision: 232946 URL: http://svn.freebsd.org/changeset/base/232946 Log: Update the rt2860's firmware and add a Makefile for the module. While here remove the ucode header file which was used to generate the fw files but by now is outdated. Reviewed by: ray Obtained from:OpenBSD Added: head/sys/modules/ralfw/rt2860/ head/sys/modules/ralfw/rt2860/Makefile (contents, props changed) Deleted: head/sys/contrib/dev/ral/rt2661_ucode.h Modified: head/sys/contrib/dev/ral/rt2860.fw.uu head/sys/modules/ralfw/Makefile Modified: head/sys/contrib/dev/ral/rt2860.fw.uu == --- head/sys/contrib/dev/ral/rt2860.fw.uu Tue Mar 13 20:37:57 2012 (r232945) +++ head/sys/contrib/dev/ral/rt2860.fw.uu Tue Mar 13 21:25:25 2012 (r232946) @@ -15,30 +15,27 @@ # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. begin 644 rt2860.fw -M`@#B`@+L(B+___\"`;W__P(`'O__`@%NP.#`\,"#P(+`T'70&,*O -M,$4#$A`)D`06X##C#70(\.558`9D`V`"T@.0!!3@(.<#`@#5=(#PD'`2X/4V -MD`0$X"3/8#`48$(DXF!'%&!5)"%P8.55)/Y@!Q1@""0"<`A]`8`H?0*`))!P -M$.#U4(4V0-(!@#[E560#8`3E57`$?0*`"84V0=("@"FM5:\V$@+(@""003]KS82`LC2!)!P$^3PTJ_0T-""T(/0\-#@ -M,GA_Y/;8_76!?0(!*0(""^23H_CDDZ-``_:``?((W_2`*>23H_A4!R0,R,,S -MQ%0/1"#(@T`$]%:``4;VW^2`"P$"!`@0($"`D`.:Y'X!DV"\H_]4/S#E"50? -M_N23HV`!#L]4P"7@8*A`N.23H_KDDZ/XY).CR,6"R,K%@\KPH\C%@LC*Q8/* -MW^G>YX"^P.#`\,"#P(+`T.C`X.G`X.K`X.O`X.S`X.W`X.[`X._`X,*O,$4# -M$A`2TJ_0X/_0X/[0X/W0X/S0X/O0X/K0X/G0X/C0T-""T(/0\-#@,L#@P/#` -M@\""P-!UT!#"KS!%`Q(0##!8"N548`055(`"PE@P60KE4&`$%5"``L)9U5,' -M,&`$%4;2!#!%`Q(0#\*-TJ_0T-""T(/0\-#@,A(##C!%`Q(0`S`!!B`)`Q(0 -M'#`"!B`*`Q(0'S`#!B`+`Q(0'S`$!B`,`Q(0(B`3"2`1!N4K12Q@`].``<.2 -MJ1(#/H"_T(/0@OCDDW`2=`&3<`VCHY/X=`&3]8*(@^1S=`*3:OHZ.C@-^* -M@XF"Y'/([\CF^@CF2F`,R._(".86&'`!%L,B[23__>PT_\COR/8(QNW&TR+" -M0])%Y/4@]2'U4_5&]2OU+,)"]5'U4O55D`08=(#PD`0:=`CP(N_T8!_D_A(# -M?>"T_Q(2`WWO\'0<+O6"Y#1P]8/M\"(.O@3C(L#@P/#`@\""P-!UT`C"KS!% -M`Q(0!M*OT-#0@M"#T/#0X#+"KQ(`!A("HA(#)^3U(O5'D`0`=(#PTJ\B=8D" -MY/6,]8KUB/6X]>AUD!C2C'6H!2(P10,2$!7E('`#(!`#,!$#0X#U1!(0 +M)8`&D'`0X/5%Y/VO-A("@M($D'`3Y/"0X"#A\Y`0'."0<"CPD!`=X)!P*?"0$![@D'`J\,(% +MTJ\B$@+(,$4#$A`#,`$&(`D#$A`<,`(&(`H#$A`?,`,&(`L#$A`?,`0&(`P# +M$A`B(!,)(!$&Y2M%+&`#TX`!PY*I$@,<@+_"0])%Y/4@]2'U4_5&]2OU+,)" +M]5'U4O55D`08=(#PD`0:=`CPPAK"&,(;(LCOR.;Z".9*8`S([\@(YA88<`$6 +MPR+M)/_][#3_R._(]@C&[<;3(M"#T(+XY)-P$G0!DW`-HZ.3^'0!D_6"B(/D +M0!`!T@/#2KR)UB0+D]8SUBO6(];CUZ'60&-*,=:@%(N]@`Q^` +M^B+_P"9T`\#@P(+`@W4F"B+`)G0#P.#`@L"#=288(C!%`Q(0%>4@<`,@$`,P +M$0-#AP$BSN_.[F`(?_\2`O@>@/4BR._(YF`#%L,B[13VTR+([\CF8`86YB3_ +MLR+#(GA_Y/;8_76!7P(!Q704+O6"Y#1P]8,B[Y`#>Y.0`P!S"AC_ M -M_\`F=`3`X,""P(-U -M)@HBP"9T!,#@P(+`@W4F&"+_ M M M @@ -106,81 +103,84 @@ M___ M M M -M_P(0*`(01`(010(2J0(2J@(310(31L,B__\"%4@"%AX"$_T"$TAP$A)Q$CQR$FZ2 -MG"`"`S`#'7T"KU82`LB0!!1T@/#DD'`3\.56]'`#`A*<`A*/A59!T@("$IR0 -M0!48,035`<4]6-U98!U9B-U9P9U:!AU:16M5Z]6$@+(D`04=(#PY)!P$_#E -M5O1P`P(2G`(2CY!P$>!4'_5ND'`0X/5KD'`1X%1@)/^2+.!48,035`<4]6]U -M<4!U>M5Z]6$@+(D`04=(#PY)!P$_#E5O1P`P(2G`(2CY!P -M$.!@!-(:@`+2(JU7KU82`LB0!!1T@/#DD'`3\.56]'`#`A*<`A*/D'`0X/Z0 -MWXYO57_:]6$@+(D`04=(#PY)!P$_#E5O1P`P(2G(!]D'`0X/Z0WU@HZ#X/57_:]6$@+(D`04=(#PY)!P$_#E5O1@8H!3Y/5Z=7L!]6K"+?4C -M]3O2+O5WPBSU)'5V&*U7KU82`LB0!!1T@/#DD'`3\.56]&`P@"&0O5A("R)`$%'2`\.205W8`?E>[0#`M(C -MY2,D_Y(&Y20D_Y('D'!@Y7OPH^5J\*/E(/"CY2/PY6RC\*/E;?"B+>0SH_"C -MY6+PD'!KY7;PY5-P#N5/14Y@".5/%4]P`A5.(B(BPDO"3.5$$@)/$VD`$\0$ -M$\`($Z@0$W0@$X9@$Y&@```3QH5(0X5*0H5,7H!2Y4C$5`_U0^5*Q%0/]4+E -M3(`;A4E#A4M"A4U>@#7E2<14#_5#Y4O$5`_U0N5-Q%0/]5Z`'N5'M`0&4U[[ -M=4()Y4>T!0Y#7@1U0@F`!M)+@`+23.3U3O5/]2?E0L14\/_E0U0/3_5?D'!$ -M\*/E7O"CY4KPH^5(\*/E3/"CY43PH^5"\*/E0_#28"*0<$#@!/"0<$+E1_#E -M1V`0),!P`Q(5*!(4'L*OP@32KR+"KY`$%.!4#F`4Y4>T`@OE1+0@!G5."'5/ -M`-(H@`CE3D5/)/^2*-*OD`04X*+DDBET'O#E7U0/]2WE)W`3,"@%Y5\@Y0LP -M*1GE7U0P_[\P$>4G<`5U)PR``A4GTFS2;8`/Y5\PY@;";-)M@`32;,)MY4=D -M`W`A,$L&PFS2;8`8Y2=P`S!,$<),Y2=P!74G!X`"%2?2;-)MD'!&Y2WP(&D' -MY5X@X`*R:"!K!^5>(.$"LFH@;0?E7B#B`K)LD'!'Y2WP=2Y`(&D$HFB`"N5& -M,&@$HN.``3.20`@C@(.,\D`0WX&0B<#20$@1T"O"0 -M$RC@5/#PH^!4\/"CX%3Z\)`$`>!$$/#@5/GPD!($X$0$\'4X`755`N3U48`) -MY5!P!74X`_51Y3A@%<(!Y/51PEFM.*]`$@+(Y3BT`P+2`]*O(L*O,`$.Y/51 -MPEG"`7T"KT`2`LCE4A1@%P1P79`2!.!4^_!_(!(50W52`755`X!)Y51P19`$ -M`>!$#O#@5._PD!,HX$0/\*/@1`_PH^!$!?"0$@1T`_"0`@C@1
svn commit: r232947 - head/sys/kern
Author: kib Date: Tue Mar 13 22:00:46 2012 New Revision: 232947 URL: http://svn.freebsd.org/changeset/base/232947 Log: Lock the process around manipulations with p_flag. Reported and reviewed by: jh MFC after:3 days Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c == --- head/sys/kern/kern_exit.c Tue Mar 13 21:25:25 2012(r232946) +++ head/sys/kern/kern_exit.c Tue Mar 13 22:00:46 2012(r232947) @@ -738,10 +738,12 @@ proc_reap(struct thread *td, struct proc LIST_REMOVE(p, p_list); /* off zombproc */ sx_xunlock(&allproc_lock); LIST_REMOVE(p, p_sibling); + PROC_LOCK(p); if (p->p_flag & P_ORPHAN) { LIST_REMOVE(p, p_orphan); p->p_flag &= ~P_ORPHAN; } + PROC_UNLOCK(p); leavepgrp(p); #ifdef PROCDESC if (p->p_procdesc != NULL) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232948 - head/sys/ufs/ffs
Author: kib Date: Tue Mar 13 22:04:27 2012 New Revision: 232948 URL: http://svn.freebsd.org/changeset/base/232948 Log: Supply boolean as the second argument to ffs_update(), and not a MNT_[NO]WAIT constants, which in fact always caused sync operation. Based on the submission by: bde Reviewed by: mckusick MFC after:2 weeks Modified: head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/ffs_vnops.c Modified: head/sys/ufs/ffs/ffs_softdep.c == --- head/sys/ufs/ffs/ffs_softdep.c Tue Mar 13 22:00:46 2012 (r232947) +++ head/sys/ufs/ffs/ffs_softdep.c Tue Mar 13 22:04:27 2012 (r232948) @@ -6311,7 +6311,7 @@ softdep_journal_freeblocks(ip, cred, len DIP_SET(ip, i_size, length); ip->i_flag |= IN_CHANGE | IN_UPDATE; allocbuf(bp, frags); - ffs_update(vp, MNT_NOWAIT); + ffs_update(vp, 0); bawrite(bp); } else if (lastoff != 0 && vp->v_type != VDIR) { int size; @@ -12346,7 +12346,7 @@ flush_newblk_dep(vp, mp, lbn) * point at the newdirblk before the dependency * will go away. */ - error = ffs_update(vp, MNT_WAIT); + error = ffs_update(vp, 1); if (error) break; ACQUIRE_LOCK(&lk); @@ -12382,7 +12382,7 @@ restart: */ if (dap->da_state & MKDIR_PARENT) { FREE_LOCK(&lk); - if ((error = ffs_update(pvp, MNT_WAIT)) != 0) + if ((error = ffs_update(pvp, 1)) != 0) break; ACQUIRE_LOCK(&lk); /* @@ -12424,7 +12424,7 @@ restart: * disk. */ if (error == 0 && dap == LIST_FIRST(diraddhdp)) - error = ffs_update(vp, MNT_WAIT); + error = ffs_update(vp, 1); vput(vp); if (error != 0) break; @@ -12481,7 +12481,7 @@ retry: if ((error = ffs_vgetf(mp, inum, LK_EXCLUSIVE, &vp, FFSV_FORCEINSMQ))) break; - error = ffs_update(vp, MNT_WAIT); + error = ffs_update(vp, 1); vput(vp); if (error) break; Modified: head/sys/ufs/ffs/ffs_vnops.c == --- head/sys/ufs/ffs/ffs_vnops.cTue Mar 13 22:00:46 2012 (r232947) +++ head/sys/ufs/ffs/ffs_vnops.cTue Mar 13 22:04:27 2012 (r232948) @@ -324,7 +324,7 @@ next: /* Write the inode after sync passes to flush deps. */ if (wait && DOINGSOFTDEP(vp) && noupdate == 0) { BO_UNLOCK(bo); - ffs_update(vp, MNT_WAIT); + ffs_update(vp, 1); BO_LOCK(bo); } /* switch between sync/async. */ @@ -339,7 +339,7 @@ next: BO_UNLOCK(bo); error = 0; if (noupdate == 0) - error = ffs_update(vp, MNT_WAIT); + error = ffs_update(vp, 1); if (DOINGSUJ(vp)) softdep_journal_fsync(VTOI(vp)); return (error); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232950 - in head: contrib/libc++/include contrib/libc++/include/ext contrib/libc++/src contrib/libcxxrt lib/libc++
Author: theraven Date: Wed Mar 14 00:09:36 2012 New Revision: 232950 URL: http://svn.freebsd.org/changeset/base/232950 Log: Import new versions of libcxxrt and libc++. Please tests any C++ code you care about with -stdlib=libc++! Approved by: dim (mentor) Added: head/contrib/libc++/include/__undef_min_max - copied unchanged from r232925, vendor/libc++/dist/include/__undef_min_max Modified: head/contrib/libc++/include/__bit_reference head/contrib/libc++/include/__config head/contrib/libc++/include/__debug head/contrib/libc++/include/__functional_03 head/contrib/libc++/include/__functional_base head/contrib/libc++/include/__functional_base_03 head/contrib/libc++/include/__hash_table head/contrib/libc++/include/__locale head/contrib/libc++/include/__mutex_base head/contrib/libc++/include/__split_buffer head/contrib/libc++/include/__sso_allocator head/contrib/libc++/include/__std_stream head/contrib/libc++/include/__tree head/contrib/libc++/include/__tuple head/contrib/libc++/include/algorithm head/contrib/libc++/include/atomic head/contrib/libc++/include/bitset head/contrib/libc++/include/chrono head/contrib/libc++/include/cmath head/contrib/libc++/include/complex head/contrib/libc++/include/cstddef head/contrib/libc++/include/cstdlib head/contrib/libc++/include/cstring head/contrib/libc++/include/deque head/contrib/libc++/include/exception head/contrib/libc++/include/ext/hash_map head/contrib/libc++/include/forward_list head/contrib/libc++/include/fstream head/contrib/libc++/include/functional head/contrib/libc++/include/future head/contrib/libc++/include/initializer_list head/contrib/libc++/include/iomanip head/contrib/libc++/include/ios head/contrib/libc++/include/istream head/contrib/libc++/include/iterator head/contrib/libc++/include/limits head/contrib/libc++/include/list head/contrib/libc++/include/locale head/contrib/libc++/include/map head/contrib/libc++/include/memory head/contrib/libc++/include/mutex head/contrib/libc++/include/ostream head/contrib/libc++/include/random head/contrib/libc++/include/ratio head/contrib/libc++/include/regex head/contrib/libc++/include/sstream head/contrib/libc++/include/streambuf head/contrib/libc++/include/string head/contrib/libc++/include/system_error head/contrib/libc++/include/thread head/contrib/libc++/include/tuple head/contrib/libc++/include/type_traits head/contrib/libc++/include/unordered_map head/contrib/libc++/include/utility head/contrib/libc++/include/valarray head/contrib/libc++/include/vector head/contrib/libc++/src/chrono.cpp head/contrib/libc++/src/condition_variable.cpp head/contrib/libc++/src/debug.cpp head/contrib/libc++/src/exception.cpp head/contrib/libc++/src/future.cpp head/contrib/libc++/src/hash.cpp head/contrib/libc++/src/locale.cpp head/contrib/libc++/src/memory.cpp head/contrib/libc++/src/mutex.cpp head/contrib/libc++/src/new.cpp head/contrib/libc++/src/random.cpp head/contrib/libc++/src/regex.cpp head/contrib/libc++/src/stdexcept.cpp head/contrib/libc++/src/string.cpp head/contrib/libc++/src/strstream.cpp head/contrib/libc++/src/thread.cpp head/contrib/libc++/src/typeinfo.cpp head/contrib/libcxxrt/auxhelper.cc head/contrib/libcxxrt/cxxabi.h head/contrib/libcxxrt/dwarf_eh.h head/contrib/libcxxrt/dynamic_cast.cc head/contrib/libcxxrt/exception.cc head/contrib/libcxxrt/guard.cc head/contrib/libcxxrt/memory.cc head/contrib/libcxxrt/stdexcept.cc head/contrib/libcxxrt/stdexcept.h head/contrib/libcxxrt/terminate.cc head/contrib/libcxxrt/typeinfo.cc head/contrib/libcxxrt/typeinfo.h head/contrib/libcxxrt/unwind-arm.h head/contrib/libcxxrt/unwind.h head/lib/libc++/Makefile Directory Properties: head/contrib/libc++/ (props changed) head/contrib/libcxxrt/ (props changed) Modified: head/contrib/libc++/include/__bit_reference == --- head/contrib/libc++/include/__bit_reference Tue Mar 13 23:45:30 2012 (r232949) +++ head/contrib/libc++/include/__bit_reference Wed Mar 14 00:09:36 2012 (r232950) @@ -14,14 +14,16 @@ #include <__config> #include +#include <__undef_min_max> + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_STD -template class __bit_iterator; -template class __bit_const_reference; +template class __bit_iterator; +template class __bit_const_reference; template struct __has_storage_type @@ -29,22 +31,22 @@ struct __has_storage_type static const bool value = false; }; -template ::value> +template ::value> class __bit_reference { -typedef typename _C::__storage_type__storage_type; -typedef typename _C::__storage_pointer __storage_pointer; +typedef typename _Cp::__storage_type__storage_type; +typedef typename _Cp::__storage_pointer __storage_poi
svn commit: r232951 - head/sys/dev/fxp
Author: yongari Date: Wed Mar 14 00:26:36 2012 New Revision: 232951 URL: http://svn.freebsd.org/changeset/base/232951 Log: fxp(4) does not handle deferred dma map loading. Tell bus_dmamap_load(9) that it should return immediately with error when there are insufficient mapping resources. Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c == --- head/sys/dev/fxp/if_fxp.c Wed Mar 14 00:09:36 2012(r232950) +++ head/sys/dev/fxp/if_fxp.c Wed Mar 14 00:26:36 2012(r232951) @@ -681,7 +681,8 @@ fxp_attach(device_t dev) goto fail; } error = bus_dmamap_load(sc->fxp_stag, sc->fxp_smap, sc->fxp_stats, - sizeof(struct fxp_stats), fxp_dma_map_addr, &sc->stats_addr, 0); + sizeof(struct fxp_stats), fxp_dma_map_addr, &sc->stats_addr, + BUS_DMA_NOWAIT); if (error) { device_printf(dev, "could not load the stats DMA buffer\n"); goto fail; @@ -705,7 +706,7 @@ fxp_attach(device_t dev) error = bus_dmamap_load(sc->cbl_tag, sc->cbl_map, sc->fxp_desc.cbl_list, FXP_TXCB_SZ, fxp_dma_map_addr, - &sc->fxp_desc.cbl_addr, 0); + &sc->fxp_desc.cbl_addr, BUS_DMA_NOWAIT); if (error) { device_printf(dev, "could not load TxCB DMA buffer\n"); goto fail; @@ -729,7 +730,8 @@ fxp_attach(device_t dev) goto fail; } error = bus_dmamap_load(sc->mcs_tag, sc->mcs_map, sc->mcsp, - sizeof(struct fxp_cb_mcs), fxp_dma_map_addr, &sc->mcs_addr, 0); + sizeof(struct fxp_cb_mcs), fxp_dma_map_addr, &sc->mcs_addr, + BUS_DMA_NOWAIT); if (error) { device_printf(dev, "can't load the multicast setup DMA buffer\n"); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r232953 - head/sys/dev/fxp
Author: yongari Date: Wed Mar 14 00:54:37 2012 New Revision: 232953 URL: http://svn.freebsd.org/changeset/base/232953 Log: Fix white space nits. Modified: head/sys/dev/fxp/if_fxp.c Modified: head/sys/dev/fxp/if_fxp.c == --- head/sys/dev/fxp/if_fxp.c Wed Mar 14 00:41:37 2012(r232952) +++ head/sys/dev/fxp/if_fxp.c Wed Mar 14 00:54:37 2012(r232953) @@ -236,11 +236,11 @@ static intfxp_ioctl(struct ifnet *ifp, caddr_t data); static voidfxp_watchdog(struct fxp_softc *sc); static voidfxp_add_rfabuf(struct fxp_softc *sc, - struct fxp_rx *rxp); + struct fxp_rx *rxp); static voidfxp_discard_rfabuf(struct fxp_softc *sc, - struct fxp_rx *rxp); + struct fxp_rx *rxp); static int fxp_new_rfabuf(struct fxp_softc *sc, - struct fxp_rx *rxp); + struct fxp_rx *rxp); static int fxp_mc_addrs(struct fxp_softc *sc); static voidfxp_mc_setup(struct fxp_softc *sc); static uint16_tfxp_eeprom_getword(struct fxp_softc *sc, int offset, @@ -272,7 +272,7 @@ static int sysctl_hw_fxp_int_delay(SYSC static voidfxp_scb_wait(struct fxp_softc *sc); static voidfxp_scb_cmd(struct fxp_softc *sc, int cmd); static voidfxp_dma_wait(struct fxp_softc *sc, - volatile uint16_t *status, bus_dma_tag_t dmat, + volatile uint16_t *status, bus_dma_tag_t dmat, bus_dmamap_t map); static device_method_t fxp_methods[] = { @@ -1543,7 +1543,7 @@ fxp_encap(struct fxp_softc *sc, struct m } *m_head = m; error = bus_dmamap_load_mbuf_sg(sc->fxp_txmtag, txp->tx_map, - *m_head, segs, &nseg, 0); + *m_head, segs, &nseg, 0); if (error != 0) { m_freem(*m_head); *m_head = NULL; @@ -2050,7 +2050,7 @@ fxp_update_stats(struct fxp_softc *sc) */ sc->rx_idle_secs++; } - ifp->if_ierrors += + ifp->if_ierrors += le32toh(sp->rx_crc_errors) + le32toh(sp->rx_alignment_errors) + le32toh(sp->rx_rnr_errors) + @@ -2177,7 +2177,7 @@ fxp_stop(struct fxp_softc *sc) txp = sc->fxp_desc.tx_list; if (txp != NULL) { for (i = 0; i < FXP_NTXCB; i++) { - if (txp[i].tx_mbuf != NULL) { + if (txp[i].tx_mbuf != NULL) { bus_dmamap_sync(sc->fxp_txmtag, txp[i].tx_map, BUS_DMASYNC_POSTWRITE); bus_dmamap_unload(sc->fxp_txmtag, ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"