Re: svn commit: r209119 - head/sys/sys
On Thu, Jun 17, 2010 at 12:38:08PM +1000, Lawrence Stewart wrote: On 06/14/10 20:43, Kostik Belousov wrote: On Mon, Jun 14, 2010 at 08:34:15PM +1000, Lawrence Stewart wrote: On 06/14/10 18:52, Kostik Belousov wrote: On Mon, Jun 14, 2010 at 11:52:49AM +1000, Lawrence Stewart wrote: On 06/13/10 20:10, Pawel Jakub Dawidek wrote: On Sun, Jun 13, 2010 at 02:39:55AM +, Lawrence Stewart wrote: [snip] Modified: head/sys/sys/pcpu.h == --- head/sys/sys/pcpu.h Sun Jun 13 01:27:29 2010(r209118) +++ head/sys/sys/pcpu.h Sun Jun 13 02:39:55 2010(r209119) @@ -106,6 +106,17 @@ extern uintptr_t dpcpu_off[]; #define DPCPU_ID_GET(i, n) (*DPCPU_ID_PTR(i, n)) #define DPCPU_ID_SET(i, n, v) (*DPCPU_ID_PTR(i, n) = v) +/* + * Utility macros. + */ +#define DPCPU_SUM(n, var, sum) \ +do {\ + (sum) = 0; \ + u_int i; \ + CPU_FOREACH(i) \ + (sum) += (DPCPU_ID_PTR(i, n))-var; \ +} while (0) I'd suggest first swapping variable declaration and '(sum) = 0;'. Also using 'i' as a counter in macro can easly lead to name collision. If you need to do it, I'd suggest '_i' or something. Given that the DPCPU variable name space is flat and variable names have to be unique, perhaps something like the following would address the concerns raised? #define DPCPU_SUM(n, var, sum) \ do { \ u_int _##n##_i; \ (sum) = 0; \ CPU_FOREACH(_##n##_i) \ (sum) += (DPCPU_ID_PTR(_##n##_i, n))-var; \ } while (0) You do not have to jump through this. Mostly by convention, in our kernel sources, names with _ prefix are reserved for the infrastructure (cannot say implementation). I think it is quite safe to use _i for the iteration variable. As an example of this, look at sys/sys/mount.h, implementation of VFS_NEEDGIANT, VFS_LOCK_GIANT etc macros. They do use gcc ({}) extension to provide function-like macros, but this is irrelevant. Or, look at the VFS_ASSERT_GIANT that is exactly like what you need. Ok cool, thanks for the info and pointers (I didn't know about the ({}) extension or that _ prefix was definitely reserved). I'm happy to use _i. Does the following diff against head look suitable to commit? --- a/sys/sys/pcpu.hSun Jun 13 02:39:55 2010 + +++ b/sys/sys/pcpu.hMon Jun 14 20:12:27 2010 +1000 @@ -111,10 +111,10 @@ */ #define DPCPU_SUM(n, var, sum)\ do { \ + u_int _i; \ (sum) = 0; \ - u_int i; \ - CPU_FOREACH(i) \ - (sum) += (DPCPU_ID_PTR(i, n))-var;\ + CPU_FOREACH(_i)\ + (sum) += (DPCPU_ID_PTR(_i, n))-var; \ } while (0) You might want to introduce local accumulator to prevent several evaluations of sum, to avoid possible side-effects. Then, after, the loop, do single asignment to the the sum. Or, you could ditch the sum at all, indeed using ({}) and returning the result. __typeof is your friend to select proper type of accumulator. So, something like this? #define DPCPU_SUM(n, var) __extension__\ ({ \ u_int _i; \ __typeof((DPCPU_PTR(n))-var) sum; \ \ sum = 0; \ CPU_FOREACH(_i) { \ sum += (DPCPU_ID_PTR(_i, n))-var; \ } \ sum; \ }) Which can be used like this: totalss.n_in = DPCPU_SUM(ss, n_in); Yes, exactly. I've tested the above and it works. I also prefer the idea of having DPCPU_SUM return the
Re: svn commit: r209106 - in head/sys: kern sys
On Thu, Jun 17, 2010 at 12:16:12AM +0200, Ed Schouten wrote: Hi Kostik, * Konstantin Belousov k...@freebsd.org wrote: Log: Add another variation of make_dev(9), make_dev_p(9), that is allowed to fail and can return useful error code. While we're at it, couldn't we consider removing the `unit' argument from this function? Nowadays unit numbers are mainly useful when using clone lists, which have been almost entirely obsoleted by cdevpriv. We could just call make_dev_credv with unit == 0. Feel free to change it, I have no objections. pgp2sSMapQhq2.pgp Description: PGP signature
svn commit: r209244 - in head/sys: kern sys
Author: ed Date: Thu Jun 17 08:49:31 2010 New Revision: 209244 URL: http://svn.freebsd.org/changeset/base/209244 Log: Remove the unit argument from the recently added make_dev_p(). New code that creates character devices shouldn't use device unit numbers, but only si_drv[12] to hold pointer to per-device data. Make this function more future proof by removing the unit number argument. Discussed with: kib Modified: head/sys/kern/kern_conf.c head/sys/sys/conf.h Modified: head/sys/kern/kern_conf.c == --- head/sys/kern/kern_conf.c Thu Jun 17 05:03:01 2010(r209243) +++ head/sys/kern/kern_conf.c Thu Jun 17 08:49:31 2010(r209244) @@ -766,14 +766,14 @@ make_dev_credf(int flags, struct cdevsw } int -make_dev_p(int flags, struct cdev **cdev, struct cdevsw *devsw, int unit, +make_dev_p(int flags, struct cdev **cdev, struct cdevsw *devsw, struct ucred *cr, uid_t uid, gid_t gid, int mode, const char *fmt, ...) { va_list ap; int res; va_start(ap, fmt); - res = make_dev_credv(flags, cdev, devsw, unit, cr, uid, gid, mode, + res = make_dev_credv(flags, cdev, devsw, 0, cr, uid, gid, mode, fmt, ap); va_end(ap); Modified: head/sys/sys/conf.h == --- head/sys/sys/conf.h Thu Jun 17 05:03:01 2010(r209243) +++ head/sys/sys/conf.h Thu Jun 17 08:49:31 2010(r209244) @@ -271,8 +271,8 @@ struct cdev *make_dev_credf(int _flags, struct ucred *_cr, uid_t _uid, gid_t _gid, int _mode, const char *_fmt, ...) __printflike(8, 9); intmake_dev_p(int _flags, struct cdev **_cdev, struct cdevsw *_devsw, - int _unit, struct ucred *_cr, uid_t _uid, gid_t _gid, int _mode, - const char *_fmt, ...) __printflike(9, 10); + struct ucred *_cr, uid_t _uid, gid_t _gid, int _mode, + const char *_fmt, ...) __printflike(8, 9); struct cdev *make_dev_alias(struct cdev *_pdev, const char *_fmt, ...) __printflike(2, 3); void dev_lock(void); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r209221 - head/bin/sh
On Wed, 16 Jun 2010 03:30:45 +0200 Dag-Erling Smørgrav d...@des.no wrote: Jilles Tjoelker jil...@freebsd.org writes: Log: sh: Add filename completion. Wonderful! Now I'll never have to use csh again :) Is there a plan to change root's shell from csh to sh? If not, should there be? I've been doing this locally for 17 years. -- Brian Somers br...@awfulhak.org Don't _EVER_ lose your sense of humour ! br...@freebsd.org ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209247 - head/sys/kern
Author: avg Date: Thu Jun 17 10:15:13 2010 New Revision: 209247 URL: http://svn.freebsd.org/changeset/base/209247 Log: lock_profile_release_lock: do not compare unsigned with zero Found by: Coverity Prevent CID: 3660 Reviewed by: jhb MFC after:2 weeks Modified: head/sys/kern/subr_lock.c Modified: head/sys/kern/subr_lock.c == --- head/sys/kern/subr_lock.c Thu Jun 17 09:43:07 2010(r209246) +++ head/sys/kern/subr_lock.c Thu Jun 17 10:15:13 2010(r209247) @@ -598,7 +598,7 @@ lock_profile_release_lock(struct lock_ob struct lock_profile_object *l; struct lock_prof_type *type; struct lock_prof *lp; - u_int64_t holdtime; + u_int64_t curtime, holdtime; struct lpohead *head; int spin; @@ -626,9 +626,11 @@ lock_profile_release_lock(struct lock_ob lp = lock_profile_lookup(lo, spin, l-lpo_file, l-lpo_line); if (lp == NULL) goto release; - holdtime = nanoseconds() - l-lpo_acqtime; - if (holdtime 0) + curtime = nanoseconds(); + if (curtime l-lpo_acqtime) goto release; + holdtime = curtime - l-lpo_acqtime; + /* * Record if the lock has been held longer now than ever * before. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209248 - in head/sys: amd64/amd64 amd64/conf amd64/include conf i386/i386
Author: mav Date: Thu Jun 17 11:54:49 2010 New Revision: 209248 URL: http://svn.freebsd.org/changeset/base/209248 Log: Merge COUNT_XINVLTLB_HITS and COUNT_IPIS kernel options from i386 to amd64. This information can be very valuable for CPU sleep-time (and respectively idle power consumption) optimization. Add counters for timer-related IPIs. Reviewed by: jhb@ (previous version) Modified: head/sys/amd64/amd64/apic_vector.S head/sys/amd64/amd64/mp_machdep.c head/sys/amd64/conf/NOTES head/sys/amd64/include/smp.h head/sys/conf/options.amd64 head/sys/i386/i386/mp_machdep.c Modified: head/sys/amd64/amd64/apic_vector.S == --- head/sys/amd64/amd64/apic_vector.S Thu Jun 17 10:15:13 2010 (r209247) +++ head/sys/amd64/amd64/apic_vector.S Thu Jun 17 11:54:49 2010 (r209248) @@ -36,6 +36,8 @@ * as well as IPI handlers. */ +#include opt_smp.h + #include machine/asmacros.h #include machine/apicreg.h @@ -135,6 +137,19 @@ IDTVEC(errorint) .text SUPERALIGN_TEXT IDTVEC(invltlb) +#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) + PUSH_FRAME + movlPCPU(CPUID), %eax +#ifdef COUNT_XINVLTLB_HITS + inclxhits_gbl(,%rax,4) +#endif +#ifdef COUNT_IPIS + movqipi_invltlb_counts(,%rax,8),%rax + incq(%rax) +#endif + POP_FRAME +#endif + pushq %rax movq%cr3, %rax /* invalidate the TLB */ @@ -155,6 +170,19 @@ IDTVEC(invltlb) .text SUPERALIGN_TEXT IDTVEC(invlpg) +#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) + PUSH_FRAME + movlPCPU(CPUID), %eax +#ifdef COUNT_XINVLTLB_HITS + inclxhits_pg(,%rax,4) +#endif +#ifdef COUNT_IPIS + movqipi_invlpg_counts(,%rax,8),%rax + incq(%rax) +#endif + POP_FRAME +#endif + pushq %rax movqsmp_tlb_addr1, %rax @@ -175,6 +203,19 @@ IDTVEC(invlpg) .text SUPERALIGN_TEXT IDTVEC(invlrng) +#if defined(COUNT_XINVLTLB_HITS) || defined(COUNT_IPIS) + PUSH_FRAME + movlPCPU(CPUID), %eax +#ifdef COUNT_XINVLTLB_HITS + inclxhits_rng(,%rax,4) +#endif +#ifdef COUNT_IPIS + movqipi_invlrng_counts(,%rax,8),%rax + incq(%rax) +#endif + POP_FRAME +#endif + pushq %rax pushq %rdx @@ -201,6 +242,14 @@ IDTVEC(invlrng) .text SUPERALIGN_TEXT IDTVEC(invlcache) +#ifdef COUNT_IPIS + PUSH_FRAME + movlPCPU(CPUID), %eax + movqipi_invlcache_counts(,%rax,8),%rax + incq(%rax) + POP_FRAME +#endif + pushq %rax wbinvd @@ -270,6 +319,11 @@ IDTVEC(cpususpend) SUPERALIGN_TEXT IDTVEC(rendezvous) PUSH_FRAME +#ifdef COUNT_IPIS + movlPCPU(CPUID), %eax + movqipi_rendezvous_counts(,%rax,8), %rax + incq(%rax) +#endif callsmp_rendezvous_action movqlapic, %rax movl$0, LA_EOI(%rax)/* End Of Interrupt to APIC */ Modified: head/sys/amd64/amd64/mp_machdep.c == --- head/sys/amd64/amd64/mp_machdep.c Thu Jun 17 10:15:13 2010 (r209247) +++ head/sys/amd64/amd64/mp_machdep.c Thu Jun 17 11:54:49 2010 (r209248) @@ -31,6 +31,7 @@ __FBSDID($FreeBSD$); #include opt_kstack_pages.h #include opt_mp_watchdog.h #include opt_sched.h +#include opt_smp.h #include sys/param.h #include sys/systm.h @@ -106,6 +107,20 @@ vm_offset_t smp_tlb_addr1; vm_offset_t smp_tlb_addr2; volatile int smp_tlb_wait; +#ifdef COUNT_IPIS +/* Interrupt counts. */ +static u_long *ipi_preempt_counts[MAXCPU]; +static u_long *ipi_ast_counts[MAXCPU]; +u_long *ipi_invltlb_counts[MAXCPU]; +u_long *ipi_invlrng_counts[MAXCPU]; +u_long *ipi_invlpg_counts[MAXCPU]; +u_long *ipi_invlcache_counts[MAXCPU]; +u_long *ipi_rendezvous_counts[MAXCPU]; +u_long *ipi_lazypmap_counts[MAXCPU]; +static u_long *ipi_hardclock_counts[MAXCPU]; +static u_long *ipi_statclock_counts[MAXCPU]; +#endif + extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32); /* @@ -970,6 +985,42 @@ start_ap(int apic_id) return 0; /* return FAILURE */ } +#ifdef COUNT_XINVLTLB_HITS +u_int xhits_gbl[MAXCPU]; +u_int xhits_pg[MAXCPU]; +u_int xhits_rng[MAXCPU]; +SYSCTL_NODE(_debug, OID_AUTO, xhits, CTLFLAG_RW, 0, ); +SYSCTL_OPAQUE(_debug_xhits, OID_AUTO, global, CTLFLAG_RW, xhits_gbl, +sizeof(xhits_gbl), IU, ); +SYSCTL_OPAQUE(_debug_xhits, OID_AUTO, page, CTLFLAG_RW, xhits_pg, +sizeof(xhits_pg), IU, ); +SYSCTL_OPAQUE(_debug_xhits, OID_AUTO, range, CTLFLAG_RW, xhits_rng, +sizeof(xhits_rng), IU, ); + +u_int ipi_global; +u_int ipi_page; +u_int ipi_range; +u_int ipi_range_size; +SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_global, CTLFLAG_RW, ipi_global, 0, ); +SYSCTL_INT(_debug_xhits, OID_AUTO, ipi_page, CTLFLAG_RW, ipi_page, 0,
svn commit: r209249 - head/share/man/man7
Author: gabor Date: Thu Jun 17 12:05:47 2010 New Revision: 209249 URL: http://svn.freebsd.org/changeset/base/209249 Log: - Add c99(7) manual page - Add MLINKS to c.7, c79.7, c89.7, c90.7 Added: head/share/man/man7/c99.7 (contents, props changed) Modified: head/share/man/man7/Makefile Modified: head/share/man/man7/Makefile == --- head/share/man/man7/MakefileThu Jun 17 11:54:49 2010 (r209248) +++ head/share/man/man7/MakefileThu Jun 17 12:05:47 2010 (r209249) @@ -7,6 +7,7 @@ MAN=adding_user.7 \ bsd.snmpmod.mk.7 \ build.7 \ clocks.7 \ + c99.7 \ development.7 \ environ.7 \ ffs.7 \ @@ -27,5 +28,9 @@ MAN= adding_user.7 \ MLINKS=intro.7 miscellaneous.7 MLINKS+= security.7 securelevel.7 +MLINKS+= c99.7 c.7 +MLINKS+= c99.7 c79.7 +MLINKS+= c99.7 c89.7 +MLINKS+= c99.7 c90.7 .include bsd.prog.mk Added: head/share/man/man7/c99.7 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man7/c99.7 Thu Jun 17 12:05:47 2010(r209249) @@ -0,0 +1,183 @@ +.\ Copyright (C) 2007, 2010 Gabor Kovesdan. All rights reserved. +.\ +.\ Redistribution and use in source and binary forms, with or without +.\ modification, are permitted provided that the following conditions +.\ are met: +.\ 1. Redistributions of source code must retain the above copyright +.\notice, this list of conditions and the following disclaimer. +.\ 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. +.\ +.\ THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\ ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE +.\ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\ SUCH DAMAGE. +.\ +.\ $FreeBSD$ +.\ +.Dd June 17, 2010 +.Dt C 7 +.Os +.Sh NAME +.Nm c, c78, c89, c90, c99 +.Nd The C programming language +.Sh DESCRIPTION +C is a general purpose programming language, which has a strong connection +with the UNIX operating system and its derivatives, since the vast +majority of those systems were written in the C language. +The C language contains some basic ideas from the BCPL language through +the B language written by Ken Thompson in 1970 for the DEC PDP-7 machines. +The development of the UNIX operating system was started on a PDP-7 +machine in assembly language, but it made very difficult to port the existing +code to other systems. +.Pp +In 1972 Dennis M. Ritchie worked out the C programming language for +further development of the UNIX operating system. +The idea was to implement only the C compiler for different +platforms, and implement most part of the operating system +in the new programming language to simplify the portability between +different architectures. +It follows that C is very eligible for (but not limited to) writing +operating systems and low-level applications. +.Pp +The C language did not have a specification or standardized version for +a long time. +It went through a lot of changes and improvements for ages. +In 1978, Brian W. Kernighan and Dennis M. Ritchie published the +first book about C under the title The C Programming Language. +We can think of this book as the first specification of the language. +This version is often referred as KR C after the names of the authors. +Sometimes it is referred as C78, as well, after the publishing year of +the first edition of the book. +.Pp +It is important to notice, that the instruction set of the language is +limited to the most fundamental elements for simplicity. +Handling of the standard I/O and such common functions are implemented in +the libraries shipped with the compiler. +As these functions are also widely used, it was demanded to include into +the description what requisites the library should conform to, not just +strictly the language itself. +Accordingly, the aforementioned standards cover the library elements, as well. +The elements of this standard library is still not enough for more +complicated tasks. +In this case the provided system calls of the given operating system can be +used. +To not loose the portability by
Re: svn commit: r209249 - head/share/man/man7
On 17 June 2010 16:05, Gabor Kovesdan ga...@freebsd.org wrote: Author: gabor Date: Thu Jun 17 12:05:47 2010 New Revision: 209249 URL: http://svn.freebsd.org/changeset/base/209249 Log: - Add c99(7) manual page - Add MLINKS to c.7, c79.7, c89.7, c90.7 Added: head/share/man/man7/c99.7 (contents, props changed) Modified: head/share/man/man7/Makefile Modified: head/share/man/man7/Makefile == --- head/share/man/man7/Makefile Thu Jun 17 11:54:49 2010 (r209248) +++ head/share/man/man7/Makefile Thu Jun 17 12:05:47 2010 (r209249) @@ -7,6 +7,7 @@ MAN= adding_user.7 \ bsd.snmpmod.mk.7 \ build.7 \ clocks.7 \ + c99.7 \ development.7 \ environ.7 \ ffs.7 \ @@ -27,5 +28,9 @@ MAN= adding_user.7 \ MLINKS= intro.7 miscellaneous.7 MLINKS+= security.7 securelevel.7 +MLINKS+= c99.7 c.7 +MLINKS+= c99.7 c79.7 Hi, should it be MLINKS+= c99.7 c78.7 instead? You cite c78 in manpage, but link to c79 here in Makefile. -- wbr, pluknet ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209250 - head/etc/periodic/daily
Author: netchild Date: Thu Jun 17 12:25:47 2010 New Revision: 209250 URL: http://svn.freebsd.org/changeset/base/209250 Log: - add the zfs scrub script - move the zfs status script into the MK_ZFS conditional to respect WITHOUT_ZFS Noticed by: Andrzej Tobola a...@iem.pw.edu.pl Modified: head/etc/periodic/daily/Makefile Modified: head/etc/periodic/daily/Makefile == --- head/etc/periodic/daily/MakefileThu Jun 17 12:05:47 2010 (r209249) +++ head/etc/periodic/daily/MakefileThu Jun 17 12:25:47 2010 (r209250) @@ -8,7 +8,6 @@ FILES= 100.clean-disks \ 200.backup-passwd \ 330.news \ 400.status-disks \ - 404.status-zfs \ 405.status-ata-raid \ 406.status-gmirror \ 407.status-graid3 \ @@ -53,4 +52,9 @@ FILES+= 150.clean-hoststat \ 500.queuerun .endif +.if ${MK_ZFS} != no +FILES+=404.status-zfs \ + 800.scrub-zfs +.endif + .include bsd.prog.mk ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209252 - head/sys/amd64/ia32
Author: kib Date: Thu Jun 17 12:35:17 2010 New Revision: 209252 URL: http://svn.freebsd.org/changeset/base/209252 Log: In the ia32_{get,set}_fpcontext(), use fpu{get,set}userregs instead of fpu{get,set}regs. Noted by: bde MFC after:1 month Modified: head/sys/amd64/ia32/ia32_signal.c Modified: head/sys/amd64/ia32/ia32_signal.c == --- head/sys/amd64/ia32/ia32_signal.c Thu Jun 17 12:30:41 2010 (r209251) +++ head/sys/amd64/ia32/ia32_signal.c Thu Jun 17 12:35:17 2010 (r209252) @@ -98,7 +98,8 @@ ia32_get_fpcontext(struct thread *td, st * 64bit instruction and data pointers. Ignore the difference * for now, it should be irrelevant for most applications. */ - mcp-mc_ownedfp = fpugetregs(td, (struct savefpu *)mcp-mc_fpstate); + mcp-mc_ownedfp = fpugetuserregs(td, + (struct savefpu *)mcp-mc_fpstate); mcp-mc_fpformat = fpuformat(); } @@ -115,7 +116,7 @@ ia32_set_fpcontext(struct thread *td, co fpstate_drop(td); else if (mcp-mc_ownedfp == _MC_FPOWNED_FPU || mcp-mc_ownedfp == _MC_FPOWNED_PCB) { - fpusetregs(td, (struct savefpu *)mcp-mc_fpstate); + fpusetuserregs(td, (struct savefpu *)mcp-mc_fpstate); } else return (EINVAL); return (0); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209253 - head/tools/build/mk
Author: netchild Date: Thu Jun 17 12:37:50 2010 New Revision: 209253 URL: http://svn.freebsd.org/changeset/base/209253 Log: Add the ZFS periodic daily scripts to the ZFS part. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc == --- head/tools/build/mk/OptionalObsoleteFiles.inc Thu Jun 17 12:35:17 2010(r209252) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Thu Jun 17 12:37:50 2010(r209253) @@ -596,6 +596,8 @@ OLD_FILES+=usr/share/man/man1/dtrace.1.g OLD_FILES+=boot/gptzfsboot OLD_FILES+=boot/zfsboot OLD_FILES+=boot/zfsloader +OLD_FILES+=etc/periodic/daily/404.status-zfs +OLD_FILES+=etc/periodic/daily/800.scrub-zfs OLD_LIBS+=lib/libzfs.so.2 OLD_LIBS+=lib/libzpool.so.2 OLD_FILES+=rescue/zfs ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r209119 - head/sys/sys
On Thu, 17 Jun 2010, Kostik Belousov wrote: On Thu, Jun 17, 2010 at 12:38:08PM +1000, Lawrence Stewart wrote: I've tested the above and it works. I also prefer the idea of having DPCPU_SUM return the sum so that you can do var = DPCPU_SUM(...). My only concern with this method is that the caller no longer has the choice to make the sum variable a larger type to avoid overflow. It would be nice to be able to have the DPCPU vars be uint32_t but be able to sum them into a uint64_t accumulator for example. Perhaps this isn't really an issue though... I'm not sure. You are worried about overflow in the sum of 32 or 64 variables, but if this is the case, then each member of the sum can overflow as well, IMO. Either ignore the issue, or use a uintmax_t. Or use int variables so that the overflow trap can work, and fix the overflow trap to work (gcc -ftapv, but this is unusable in the kernel), and get a nice panic on all overflows, not just here :-). Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209254 - head/share/man/man7
Author: gabor Date: Thu Jun 17 13:59:41 2010 New Revision: 209254 URL: http://svn.freebsd.org/changeset/base/209254 Log: - Fix typo, it should have been c78.7 Submitted by: pluknet pluk...@gmail.com Modified: head/share/man/man7/Makefile Modified: head/share/man/man7/Makefile == --- head/share/man/man7/MakefileThu Jun 17 12:37:50 2010 (r209253) +++ head/share/man/man7/MakefileThu Jun 17 13:59:41 2010 (r209254) @@ -29,7 +29,7 @@ MAN= adding_user.7 \ MLINKS=intro.7 miscellaneous.7 MLINKS+= security.7 securelevel.7 MLINKS+= c99.7 c.7 -MLINKS+= c99.7 c79.7 +MLINKS+= c99.7 c78.7 MLINKS+= c99.7 c89.7 MLINKS+= c99.7 c90.7 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r209249 - head/share/man/man7
Hi, should it be MLINKS+= c99.7 c78.7 instead? You cite c78 in manpage, but link to c79 here in Makefile. Oh, yes, I just made a typo. Fixed, thanks. -- Gabor Kovesdan FreeBSD Volunteer EMAIL: ga...@freebsd.org .:|:. ga...@kovesdan.org WEB: http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209255 - head/usr.bin/c99
Author: gabor Date: Thu Jun 17 14:37:47 2010 New Revision: 209255 URL: http://svn.freebsd.org/changeset/base/209255 Log: - Update GCC reference from 3.3 to 4.2 [1] - Add reference to c99(7) Submitted by: stefanf Modified: head/usr.bin/c99/c99.1 Modified: head/usr.bin/c99/c99.1 == --- head/usr.bin/c99/c99.1 Thu Jun 17 13:59:41 2010(r209254) +++ head/usr.bin/c99/c99.1 Thu Jun 17 14:37:47 2010(r209255) @@ -26,7 +26,7 @@ .\ From FreeBSD: src/usr.bin/c89/c89.1,v 1.11 2007/03/10 07:10:01 ru Exp .\ $FreeBSD$ .\ -.Dd October 7, 2002 +.Dd June 17, 2010 .Dt C99 1 .Os .Sh NAME @@ -181,7 +181,8 @@ operand is significant. .Sh SEE ALSO .Xr ar 1 , .Xr c89 1 , -.Xr cc 1 +.Xr cc 1 , +.Xr c99 7 .Sh STANDARDS The .Nm @@ -195,4 +196,4 @@ features that .Tn GCC actually implements. See -.Pa http://gcc.gnu.org/gcc-3.3/c99status.html . +.Pa http://gcc.gnu.org/gcc-4.2/c99status.html . ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209256 - head/sys/kern
Author: jh Date: Thu Jun 17 16:12:06 2010 New Revision: 209256 URL: http://svn.freebsd.org/changeset/base/209256 Log: - Fix compilation of the subr_unit.c user space test program. - Use %zu for size_t in a few format strings. Modified: head/sys/kern/subr_unit.c Modified: head/sys/kern/subr_unit.c == --- head/sys/kern/subr_unit.c Thu Jun 17 14:37:47 2010(r209255) +++ head/sys/kern/subr_unit.c Thu Jun 17 16:12:06 2010(r209256) @@ -153,6 +153,7 @@ mtx_assert(struct mtx *mp, int flag) } #define CTASSERT(foo) +#define WITNESS_WARN(flags, lock, fmt, ...)(void)0 #endif /* USERLAND */ @@ -825,9 +826,9 @@ main(int argc __unused, const char **arg memset(a, 0, sizeof a); - fprintf(stderr, sizeof(struct unr) %d\n, sizeof (struct unr)); - fprintf(stderr, sizeof(struct unrb) %d\n, sizeof (struct unrb)); - fprintf(stderr, sizeof(struct unrhdr) %d\n, sizeof (struct unrhdr)); + fprintf(stderr, sizeof(struct unr) %zu\n, sizeof(struct unr)); + fprintf(stderr, sizeof(struct unrb) %zu\n, sizeof(struct unrb)); + fprintf(stderr, sizeof(struct unrhdr) %zu\n, sizeof(struct unrhdr)); fprintf(stderr, NBITS %d\n, NBITS); x = 1; for (m = 0; m NN * 100; m++) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209257 - svnadmin/conf
Author: kensmith Date: Thu Jun 17 17:06:52 2010 New Revision: 209257 URL: http://svn.freebsd.org/changeset/base/209257 Log: Release the code freeze on stable/8. Approved by: core (implicit) Modified: svnadmin/conf/approvers Modified: svnadmin/conf/approvers == --- svnadmin/conf/approvers Thu Jun 17 16:12:06 2010(r209256) +++ svnadmin/conf/approvers Thu Jun 17 17:06:52 2010(r209257) @@ -17,7 +17,7 @@ # $FreeBSD$ # #^head/re -^stable/8/ re +#^stable/8/re #^stable/7/re ^releng/8.1/ re ^releng/8.0/ (security-officer|so) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209259 - head/sys/dev/e1000
Author: jfv Date: Thu Jun 17 17:38:39 2010 New Revision: 209259 URL: http://svn.freebsd.org/changeset/base/209259 Log: Two stats were duplicated, thanks to Andrew Boyer for pointing this out. Modified: head/sys/dev/e1000/if_em.c Modified: head/sys/dev/e1000/if_em.c == --- head/sys/dev/e1000/if_em.c Thu Jun 17 17:34:45 2010(r209258) +++ head/sys/dev/e1000/if_em.c Thu Jun 17 17:38:39 2010(r209259) @@ -4960,12 +4960,6 @@ em_add_hw_stats(struct adapter *adapter) SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, xoff_txd, CTLFLAG_RD, adapter-stats.xofftxc, XOFF Transmitted); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, good_pkts_recvd, - CTLFLAG_RD, adapter-stats.gprc, - Good Packets Received); - SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, good_pkts_txd, - CTLFLAG_RD, adapter-stats.gptc, - Good Packets Transmitted); /* Packet Reception Stats */ SYSCTL_ADD_QUAD(ctx, stat_list, OID_AUTO, total_pkts_recvd, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209260 - head/sys/kern
Author: pjd Date: Thu Jun 17 17:39:51 2010 New Revision: 209260 URL: http://svn.freebsd.org/changeset/base/209260 Log: Backout r207970 for now, it can lead to deadlocks. Reported by: kan MFC after:3 days Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cThu Jun 17 17:38:39 2010(r209259) +++ head/sys/kern/vfs_subr.cThu Jun 17 17:39:51 2010(r209260) @@ -822,19 +822,6 @@ static struct kproc_desc vnlru_kp = { SYSINIT(vnlru, SI_SUB_KTHREAD_UPDATE, SI_ORDER_FIRST, kproc_start, vnlru_kp); -static void -vfs_lowmem(void *arg __unused) -{ - - /* -* On low memory condition free 1/8th of the free vnodes. -*/ - mtx_lock(vnode_free_list_mtx); - vnlru_free(freevnodes / 8); - mtx_unlock(vnode_free_list_mtx); -} -EVENTHANDLER_DEFINE(vm_lowmem, vfs_lowmem, NULL, 0); - /* * Routines having to do with the management of the vnode table. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209261 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: pjd Date: Thu Jun 17 17:41:42 2010 New Revision: 209261 URL: http://svn.freebsd.org/changeset/base/209261 Log: Turn off UMA allocations on all archs by default. It isn't stable even on amd64. Reported by: many MFC after:3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Jun 17 17:39:51 2010(r209260) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Jun 17 17:41:42 2010(r209261) @@ -33,13 +33,9 @@ #include sys/zio_compress.h #include sys/zio_checksum.h -#if defined(__amd64__) -static int zio_use_uma = 1; -#else -static int zio_use_uma = 0; -#endif SYSCTL_DECL(_vfs_zfs); SYSCTL_NODE(_vfs_zfs, OID_AUTO, zio, CTLFLAG_RW, 0, ZFS ZIO); +static int zio_use_uma = 0; TUNABLE_INT(vfs.zfs.zio.use_uma, zio_use_uma); SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, use_uma, CTLFLAG_RDTUN, zio_use_uma, 0, Use uma(9) for ZIO allocations); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r209259 - head/sys/dev/e1000
On Jun 17, 2010, at 13:38 , Jack F Vogel wrote: Author: jfv Date: Thu Jun 17 17:38:39 2010 New Revision: 209259 URL: http://svn.freebsd.org/changeset/base/209259 Log: Two stats were duplicated, thanks to Andrew Boyer for pointing this out. And thanks to you for fixing it! Best, George ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209262 - stable/8/sys/geom/gate
Author: pjd Date: Thu Jun 17 19:06:11 2010 New Revision: 209262 URL: http://svn.freebsd.org/changeset/base/209262 Log: MFC r209186,r209187: r209186: BIO_DELETE contains range we want to delete and doesn't provide any useful data, so there is no need to copy it to userland. r209187: 'unit' can be negative, so use signed type for it. Found by: Coverity Prevent CID: 3731 Modified: stable/8/sys/geom/gate/g_gate.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/geom/gate/g_gate.c == --- stable/8/sys/geom/gate/g_gate.c Thu Jun 17 17:41:42 2010 (r209261) +++ stable/8/sys/geom/gate/g_gate.c Thu Jun 17 19:06:11 2010 (r209262) @@ -210,7 +210,7 @@ g_gate_start(struct bio *bp) } static struct g_gate_softc * -g_gate_hold(u_int unit, const char *name) +g_gate_hold(int unit, const char *name) { struct g_gate_softc *sc = NULL; @@ -572,8 +572,8 @@ g_gate_ioctl(struct cdev *dev, u_long cm switch (bp-bio_cmd) { case BIO_READ: - break; case BIO_DELETE: + break; case BIO_WRITE: error = copyout(bp-bio_data, ggio-gctl_data, bp-bio_length); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209263 - stable/8/sbin/hastd
Author: pjd Date: Thu Jun 17 19:17:31 2010 New Revision: 209263 URL: http://svn.freebsd.org/changeset/base/209263 Log: MFC r209175,r209177,r209179,r209180,r209181,r209182,r209183,r209184,r209185: r209175: Eliminate dead code. Found by: Coverity Prevent CID: 5158 r209177: Remove macros that are not really needed. The idea was to have them in case we grow more descriptors, but I'll reconsider readding them once we get there. Passing (a = b) expression to FD_ISSET() is bad idea, as FD_ISSET() evaluates its argument twice. Found by: Coverity Prevent CID: 5243 r209179: Plug memory leaks. Found by: Coverity Prevent CID: 7052, 7053, 7054, 7055 r209180: Plug memory leak. Found by: Coverity Prevent CID: 7051 r209181: Plug memory leak. Found by: Coverity Prevent CID: 7056 r209182: Plug memory leak. Found by: Coverity Prevent CID: 7057 r209183: Initialize gctl_seq for synchronization requests. Reported by: hiro...@soupacific.com Analysed by: Mikolaj Golub to.my.troc...@gmail.com Tested by:hiro...@soupacific.com, Mikolaj Golub to.my.troc...@gmail.com r209184: Fix typos. r209185: Correct various log messages. Submitted by: Mikolaj Golub to.my.troc...@gmail.com Modified: stable/8/sbin/hastd/ebuf.c stable/8/sbin/hastd/hast_proto.c stable/8/sbin/hastd/hastd.c stable/8/sbin/hastd/metadata.c stable/8/sbin/hastd/nv.c stable/8/sbin/hastd/primary.c stable/8/sbin/hastd/secondary.c Directory Properties: stable/8/sbin/hastd/ (props changed) Modified: stable/8/sbin/hastd/ebuf.c == --- stable/8/sbin/hastd/ebuf.c Thu Jun 17 19:06:11 2010(r209262) +++ stable/8/sbin/hastd/ebuf.c Thu Jun 17 19:17:31 2010(r209263) @@ -55,8 +55,8 @@ struct ebuf { size_t eb_size; }; -static int ebuf_head_extent(struct ebuf *eb, size_t size); -static int ebuf_tail_extent(struct ebuf *eb, size_t size); +static int ebuf_head_extend(struct ebuf *eb, size_t size); +static int ebuf_tail_extend(struct ebuf *eb, size_t size); struct ebuf * ebuf_alloc(size_t size) @@ -110,7 +110,7 @@ ebuf_add_head(struct ebuf *eb, const voi * We can't add more entries at the front, so we have to extend * our buffer. */ - if (ebuf_head_extent(eb, size) 0) + if (ebuf_head_extend(eb, size) 0) return (-1); } assert(size = (size_t)(eb-eb_used - eb-eb_start)); @@ -137,13 +137,13 @@ ebuf_add_tail(struct ebuf *eb, const voi * We can't add more entries at the back, so we have to extend * our buffer. */ - if (ebuf_tail_extent(eb, size) 0) + if (ebuf_tail_extend(eb, size) 0) return (-1); } assert(size = (size_t)(eb-eb_end - (eb-eb_used + eb-eb_size))); /* -* If data is NULL the caller just wants to reserve place. +* If data is NULL the caller just wants to reserve space. */ if (data != NULL) bcopy(data, eb-eb_used + eb-eb_size, size); @@ -203,7 +203,7 @@ ebuf_size(struct ebuf *eb) * Function adds size + (PAGE_SIZE / 4) bytes at the front of the buffer.. */ static int -ebuf_head_extent(struct ebuf *eb, size_t size) +ebuf_head_extend(struct ebuf *eb, size_t size) { unsigned char *newstart, *newused; size_t newsize; @@ -231,7 +231,7 @@ ebuf_head_extent(struct ebuf *eb, size_t * Function adds size + ((3 * PAGE_SIZE) / 4) bytes at the back. */ static int -ebuf_tail_extent(struct ebuf *eb, size_t size) +ebuf_tail_extend(struct ebuf *eb, size_t size) { unsigned char *newstart; size_t newsize; Modified: stable/8/sbin/hastd/hast_proto.c == --- stable/8/sbin/hastd/hast_proto.cThu Jun 17 19:06:11 2010 (r209262) +++ stable/8/sbin/hastd/hast_proto.cThu Jun 17 19:17:31 2010 (r209263) @@ -329,9 +329,7 @@ hast_proto_recv_hdr(struct proto_conn *c *nvp = nv; return (0); fail: - if (nv != NULL) - nv_free(nv); - else if (eb != NULL) + if (eb != NULL) ebuf_free(eb); return (-1); } Modified: stable/8/sbin/hastd/hastd.c == --- stable/8/sbin/hastd/hastd.c Thu Jun 17 19:06:11 2010(r209262) +++ stable/8/sbin/hastd/hastd.c Thu Jun 17 19:17:31 2010(r209263) @@ -200,7 +200,7 @@ listen_accept(void) proto_local_address(conn, laddr, sizeof(laddr)); proto_remote_address(conn, raddr, sizeof(raddr)); - pjdlog_info(Connection
svn commit: r209264 - stable/8/sys/netinet
Author: tuexen Date: Thu Jun 17 19:17:50 2010 New Revision: 209264 URL: http://svn.freebsd.org/changeset/base/209264 Log: MFC 209178 * Fix a bug where the length of the ASCONF-ACK was calculated wrong due to using an uninitialized variable. * Fix a bug where a NULL pointer was dereferenced when interfaces come and go at a high rate. * Fix a bug where inps where not deregistered from iterators. * Fix a race condition in freeing an association. * Fix a refcount problem related to the iterator. Each of the above bug results in a panic. It shows up when interfaces come and go at a high rate. Modified: stable/8/sys/netinet/sctp_asconf.c stable/8/sys/netinet/sctp_pcb.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/netinet/sctp_asconf.c == --- stable/8/sys/netinet/sctp_asconf.c Thu Jun 17 19:17:31 2010 (r209263) +++ stable/8/sys/netinet/sctp_asconf.c Thu Jun 17 19:17:50 2010 (r209264) @@ -826,6 +826,7 @@ send_reply: ack-serial_number = serial_num; ack-last_sent_to = NULL; ack-data = m_ack; + ack-len = 0; n = m_ack; while (n) { ack-len += SCTP_BUF_LEN(n); @@ -1025,7 +1026,8 @@ sctp_asconf_nets_cleanup(struct sctp_tcb * address. */ if (SCTP_ROUTE_HAS_VALID_IFN(net-ro) - SCTP_GET_IF_INDEX_FROM_ROUTE(net-ro) != ifn-ifn_index) { + ((ifn == NULL) || + (SCTP_GET_IF_INDEX_FROM_ROUTE(net-ro) != ifn-ifn_index))) { /* clear any cached route */ RTFREE(net-ro.ro_rt); net-ro.ro_rt = NULL; Modified: stable/8/sys/netinet/sctp_pcb.c == --- stable/8/sys/netinet/sctp_pcb.c Thu Jun 17 19:17:31 2010 (r209263) +++ stable/8/sys/netinet/sctp_pcb.c Thu Jun 17 19:17:50 2010 (r209264) @@ -3074,6 +3074,9 @@ sctp_iterator_inp_being_freed(struct sct SCTP_FREE(it, SCTP_M_ITER); } else { it-inp = LIST_NEXT(it-inp, sctp_list); + if (it-inp) { + SCTP_INP_INCR_REF(it-inp); + } } /* * When its put in the refcnt is incremented so decr @@ -3114,17 +3117,10 @@ sctp_inpcb_free(struct sctp_inpcb *inp, #ifdef SCTP_LOG_CLOSING sctp_log_closing(inp, NULL, 0); #endif - if (from == SCTP_CALLED_AFTER_CMPSET_OFCLOSE) { - /* -* Once we are in we can remove the flag from = 1 is only -* passed from the actual closing routines that are called -* via the sockets layer. -*/ - SCTP_ITERATOR_LOCK(); - /* mark any iterators on the list or being processed */ - sctp_iterator_inp_being_freed(inp); - SCTP_ITERATOR_UNLOCK(); - } + SCTP_ITERATOR_LOCK(); + /* mark any iterators on the list or being processed */ + sctp_iterator_inp_being_freed(inp); + SCTP_ITERATOR_UNLOCK(); so = inp-sctp_socket; if (inp-sctp_flags SCTP_PCB_FLAGS_SOCKET_ALLGONE) { /* been here before.. eeks.. get out of here */ @@ -4637,7 +4633,6 @@ sctp_free_assoc(struct sctp_inpcb *inp, atomic_add_int(stcb-asoc.refcnt, 1); SCTP_TCB_UNLOCK(stcb); - SCTP_INP_INFO_WLOCK(); SCTP_INP_WLOCK(inp); SCTP_TCB_LOCK(stcb); @@ -4680,6 +4675,16 @@ sctp_free_assoc(struct sctp_inpcb *inp, if (from_inpcbfree == SCTP_NORMAL_PROC) { atomic_add_int(stcb-asoc.refcnt, -1); } + if (stcb-asoc.refcnt) { + stcb-asoc.state = ~SCTP_STATE_IN_ACCEPT_QUEUE; + sctp_timer_start(SCTP_TIMER_TYPE_ASOCKILL, inp, stcb, NULL); + if (from_inpcbfree == SCTP_NORMAL_PROC) { + SCTP_INP_INFO_WUNLOCK(); + SCTP_INP_WUNLOCK(inp); + } + SCTP_TCB_UNLOCK(stcb); + return (0); + } asoc-state = 0; if (inp-sctp_tcbhash) { LIST_REMOVE(stcb, sctp_tcbhash); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail
svn commit: r209265 - in stable/8/sys: cddl/contrib/opensolaris/uts/common/fs/zfs kern
Author: pjd Date: Thu Jun 17 19:25:05 2010 New Revision: 209265 URL: http://svn.freebsd.org/changeset/base/209265 Log: MFC r209260,r209261: r209260: Backout r207970 for now, it can lead to deadlocks. Reported by: kan r209261: Turn off UMA allocations on all archs by default. It isn't stable even on amd64. Reported by: many Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c stable/8/sys/kern/vfs_subr.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Jun 17 19:17:50 2010(r209264) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Thu Jun 17 19:25:05 2010(r209265) @@ -33,13 +33,9 @@ #include sys/zio_compress.h #include sys/zio_checksum.h -#if defined(__amd64__) -static int zio_use_uma = 1; -#else -static int zio_use_uma = 0; -#endif SYSCTL_DECL(_vfs_zfs); SYSCTL_NODE(_vfs_zfs, OID_AUTO, zio, CTLFLAG_RW, 0, ZFS ZIO); +static int zio_use_uma = 0; TUNABLE_INT(vfs.zfs.zio.use_uma, zio_use_uma); SYSCTL_INT(_vfs_zfs_zio, OID_AUTO, use_uma, CTLFLAG_RDTUN, zio_use_uma, 0, Use uma(9) for ZIO allocations); Modified: stable/8/sys/kern/vfs_subr.c == --- stable/8/sys/kern/vfs_subr.cThu Jun 17 19:17:50 2010 (r209264) +++ stable/8/sys/kern/vfs_subr.cThu Jun 17 19:25:05 2010 (r209265) @@ -822,19 +822,6 @@ static struct kproc_desc vnlru_kp = { SYSINIT(vnlru, SI_SUB_KTHREAD_UPDATE, SI_ORDER_FIRST, kproc_start, vnlru_kp); -static void -vfs_lowmem(void *arg __unused) -{ - - /* -* On low memory condition free 1/8th of the free vnodes. -*/ - mtx_lock(vnode_free_list_mtx); - vnlru_free(freevnodes / 8); - mtx_unlock(vnode_free_list_mtx); -} -EVENTHANDLER_DEFINE(vm_lowmem, vfs_lowmem, NULL, 0); - /* * Routines having to do with the management of the vnode table. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209266 - head/usr.sbin/mptutil
Author: sbruno Date: Thu Jun 17 19:28:56 2010 New Revision: 209266 URL: http://svn.freebsd.org/changeset/base/209266 Log: Expand man page to document the fact that mptutil/mpt doesn't support RAID volumes in excess of 2TB. Document workaround via geom or zfs Modified submitter's original patch to reference why this is broken and what to do to work around the issue. Submitted by: hub...@tournier.org PR: bin/147572 Reviewed by: jhb MFC after:2 weeks Modified: head/usr.sbin/mptutil/mptutil.8 Modified: head/usr.sbin/mptutil/mptutil.8 == --- head/usr.sbin/mptutil/mptutil.8 Thu Jun 17 19:25:05 2010 (r209265) +++ head/usr.sbin/mptutil/mptutil.8 Thu Jun 17 19:28:56 2010 (r209266) @@ -384,3 +384,15 @@ configurations may not work reliably. .Pp Drive configuration commands result in an excessive flood of messages on the console. +.Pp +The mpt version 1 API that is used by +.Nm +and +.Xr mpt 4 +doesn't support volumes above two terabytes. +This is a limitation of the API. +If you are using this adapter with volumes larger than two terabytes, use the adapter in JBOD mode. +Utilize +.Xr geom 8 +.Xr zfs 1M +or another software volume manager to work around this limitation. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r209221 - head/bin/sh
On 06/17/10 03:03, Andrey Chernov wrote: On Thu, Jun 17, 2010 at 02:34:41AM -0700, Brian Somers wrote: On Wed, 16 Jun 2010 03:30:45 +0200 Dag-Erling Sm??rgravd...@des.no wrote: Jilles Tjoelkerjil...@freebsd.org writes: Log: sh: Add filename completion. Wonderful! Now I'll never have to use csh again :) Is there a plan to change root's shell from csh to sh? If not, should there be? I've been doing this locally for 17 years. Me too (as in, always changing it), but every time this is discussed it's the bikeshed from $CULTURALLY_RELEVANT_PLACE_OF_TORMENT. FWIW, what I actually do is set the shell for both root and my unprivileged user to sh, compile bash static, and put a copy of the static shell in /root. Then my .profile tests for the existence of bash and execs it if available. sh completion works very strange at now moment. These are basically bourne-type shell behaviors that are different from *csh. Just two things: 1) $^I Display all 973 possibilities? (y or n) (tcsh - beep) bash also beeps here, FWIW, although I think there is a knob to twist to make it do what sh is doing here. 2) $ll^I beep second ^I completion, including non-program files. This is a libedit thing. libreadline (which is what bash uses) has a flag to control this behavior that you can add to ~/.inputrc which makes it show all of the options the first time. The inclusion of non-program files in the current directory as input to a command is a feature, since it allows you to do things like: cd /etc vi make^I Having the shell include non-{program|alias} stuff as the first completion is dubious (bash does not do this). (tcsh - completeion, programs aliases only) I don't remember other strange places right now. Verdict - not usable yet. I've been very supportive of Jilles work up to this point, and I think he's done a great job of making our sh functional and compliant as a scripting shell. However in my mind adding completion (and his suggested inclusion of the kill builtin) tips the balance from good system shell to more of an interactive shell, and that makes me wonder if this is the right direction to go in. If we want a good interactive bourne-based shell in the base I'd rather have the discussion about which one to import, rather than trying to have our sh catch up with the last 15 years of development in this area. Doug -- ... and that's just a little bit of history repeating. -- Propellerheads Improve the effectiveness of your Internet presence with a domain name makeover!http://SupersetSolutions.com/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209267 - stable/8/usr.sbin/arp
Author: mlaier Date: Thu Jun 17 19:46:36 2010 New Revision: 209267 URL: http://svn.freebsd.org/changeset/base/209267 Log: MFC r209063: Cache the last result from if_indextoname for printing. This speeds up arp -an when using a lot of aliases (on a single interface). A better fix would include a better interface for if_indextoname than getting the whole address list from the kernel just to find the one index-name mapping. Modified: stable/8/usr.sbin/arp/arp.c Directory Properties: stable/8/usr.sbin/arp/ (props changed) Modified: stable/8/usr.sbin/arp/arp.c == --- stable/8/usr.sbin/arp/arp.c Thu Jun 17 19:28:56 2010(r209266) +++ stable/8/usr.sbin/arp/arp.c Thu Jun 17 19:46:36 2010(r209267) @@ -555,6 +555,9 @@ search(u_long addr, action_fn *action) /* * Display an arp entry */ +static char lifname[IF_NAMESIZE]; +static int64_t lifindex = -1; + static void print_entry(struct sockaddr_dl *sdl, struct sockaddr_inarp *addr, struct rt_msghdr *rtm) @@ -562,7 +565,6 @@ print_entry(struct sockaddr_dl *sdl, const char *host; struct hostent *hp; struct iso88025_sockaddr_dl_data *trld; - char ifname[IF_NAMESIZE]; int seg; if (nflag == 0) @@ -591,8 +593,12 @@ print_entry(struct sockaddr_dl *sdl, } } else printf((incomplete)); - if (if_indextoname(sdl-sdl_index, ifname) != NULL) - printf( on %s, ifname); + if (sdl-sdl_index != lifindex + if_indextoname(sdl-sdl_index, lifname) != NULL) { + lifindex = sdl-sdl_index; + printf( on %s, lifname); +} else if (sdl-sdl_index == lifindex) + printf( on %s, lifname); if (rtm-rtm_rmx.rmx_expire == 0) printf( permanent); else { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209269 - stable/8/sys/sparc64/sparc64
Author: marius Date: Thu Jun 17 20:10:39 2010 New Revision: 209269 URL: http://svn.freebsd.org/changeset/base/209269 Log: MFC: r209138 Update a branch missed in r207537 (committed to stable/8 in r207890). Modified: stable/8/sys/sparc64/sparc64/mp_locore.S Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/sparc64/sparc64/mp_locore.S == --- stable/8/sys/sparc64/sparc64/mp_locore.SThu Jun 17 19:48:03 2010 (r209268) +++ stable/8/sys/sparc64/sparc64/mp_locore.SThu Jun 17 20:10:39 2010 (r209269) @@ -207,7 +207,7 @@ ENTRY(mp_startup) bl %icc, 2f nop cmp %l1, CPU_IMPL_ULTRASPARCIII - bl %icc, 3f + bl %icc, 4f nop 2: mov CPU_STICKSYNC, %l2 membar #StoreLoad ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209271 - stable/7/usr.sbin/arp
Author: mlaier Date: Thu Jun 17 20:38:18 2010 New Revision: 209271 URL: http://svn.freebsd.org/changeset/base/209271 Log: MFC r209063: Cache the last result from if_indextoname for printing. This speeds up arp -an when using a lot of aliases (on a single interface). A better fix would include a better interface for if_indextoname than getting the whole address list from the kernel just to find the one index-name mapping. Description of fields to fill in above: 76 columns --| PR:If a GNATS PR is affected by the change. Submitted by: If someone else sent in the change. Reviewed by: If someone else reviewed your modification. Approved by: If you needed approval for this commit. Obtained from: If the change is from a third party. MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. Security: Vulnerability reference (one per line) or description. Empty fields above will be automatically removed. _M arp Marp/arp.c Modified: stable/7/usr.sbin/arp/arp.c Directory Properties: stable/7/usr.sbin/arp/ (props changed) Modified: stable/7/usr.sbin/arp/arp.c == --- stable/7/usr.sbin/arp/arp.c Thu Jun 17 20:10:41 2010(r209270) +++ stable/7/usr.sbin/arp/arp.c Thu Jun 17 20:38:18 2010(r209271) @@ -523,6 +523,9 @@ search(u_long addr, action_fn *action) /* * Display an arp entry */ +static char lifname[IF_NAMESIZE]; +static int64_t lifindex = -1; + static void print_entry(struct sockaddr_dl *sdl, struct sockaddr_inarp *addr, struct rt_msghdr *rtm) @@ -530,7 +533,6 @@ print_entry(struct sockaddr_dl *sdl, const char *host; struct hostent *hp; struct iso88025_sockaddr_dl_data *trld; - char ifname[IF_NAMESIZE]; int seg; if (nflag == 0) @@ -559,8 +561,12 @@ print_entry(struct sockaddr_dl *sdl, } } else printf((incomplete)); - if (if_indextoname(sdl-sdl_index, ifname) != NULL) - printf( on %s, ifname); + if (sdl-sdl_index != lifindex + if_indextoname(sdl-sdl_index, lifname) != NULL) { + lifindex = sdl-sdl_index; + printf( on %s, lifname); +} else if (sdl-sdl_index == lifindex) + printf( on %s, lifname); if (rtm-rtm_rmx.rmx_expire == 0) printf( permanent); if (addr-sin_other SIN_PROXY) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209272 - releng/8.1/sys/sparc64/sparc64
Author: marius Date: Thu Jun 17 20:53:56 2010 New Revision: 209272 URL: http://svn.freebsd.org/changeset/base/209272 Log: MFC: r209138 Update a branch missed in r207537 (committed to stable/8 in r207890). Approved by: re (kib) Modified: releng/8.1/sys/sparc64/sparc64/mp_locore.S Directory Properties: releng/8.1/sys/ (props changed) releng/8.1/sys/amd64/include/xen/ (props changed) releng/8.1/sys/cddl/contrib/opensolaris/ (props changed) releng/8.1/sys/contrib/dev/acpica/ (props changed) releng/8.1/sys/contrib/pf/ (props changed) releng/8.1/sys/dev/xen/xenpci/ (props changed) releng/8.1/sys/geom/sched/ (props changed) Modified: releng/8.1/sys/sparc64/sparc64/mp_locore.S == --- releng/8.1/sys/sparc64/sparc64/mp_locore.S Thu Jun 17 20:38:18 2010 (r209271) +++ releng/8.1/sys/sparc64/sparc64/mp_locore.S Thu Jun 17 20:53:56 2010 (r209272) @@ -207,7 +207,7 @@ ENTRY(mp_startup) bl %icc, 2f nop cmp %l1, CPU_IMPL_ULTRASPARCIII - bl %icc, 3f + bl %icc, 4f nop 2: mov CPU_STICKSYNC, %l2 membar #StoreLoad ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209273 - stable/8/usr.sbin/sysinstall
Author: randi Date: Thu Jun 17 21:17:35 2010 New Revision: 209273 URL: http://svn.freebsd.org/changeset/base/209273 Log: MFC r209004: Fix uninitialized variables that cause a crash when the network is initialized and sysinstall is not running as init. Submitted by: Nick Mills Approved by: cperciva (mentor) Modified: stable/8/usr.sbin/sysinstall/tcpip.c Directory Properties: stable/8/usr.sbin/sysinstall/ (props changed) Modified: stable/8/usr.sbin/sysinstall/tcpip.c == --- stable/8/usr.sbin/sysinstall/tcpip.cThu Jun 17 20:53:56 2010 (r209272) +++ stable/8/usr.sbin/sysinstall/tcpip.cThu Jun 17 21:17:35 2010 (r209273) @@ -732,6 +732,9 @@ tcpDeviceSelect(void) return (NULL); } +devs = deviceFind(NULL, DEVICE_TYPE_NETWORK); +cnt = deviceCount(devs); + if ((!RunningAsInit) (variable_check(NETWORK_CONFIGURED=NO) != TRUE)) { if (!msgYesNo(Running multi-user, assume that the network is already configured?)) return devs[0]; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r209271 - stable/7/usr.sbin/arp
On Thursday 17 June 2010 22:38:18 Max Laier wrote: Author: mlaier Date: Thu Jun 17 20:38:18 2010 New Revision: 209271 URL: http://svn.freebsd.org/changeset/base/209271 Log: MFC r209063: Cache the last result from if_indextoname for printing. This speeds up arp -an when using a lot of aliases (on a single interface). A better fix would include a better interface for if_indextoname than getting the whole address list from the kernel just to find the one index-name mapping. Description of fields to fill in above: 76 columns --| PR:If a GNATS PR is affected by the change. Submitted by: If someone else sent in the change. Reviewed by: If someone else reviewed your modification. Approved by: If you needed approval for this commit. Obtained from: If the change is from a third party. MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. Security: Vulnerability reference (one per line) or description. Empty fields above will be automatically removed. Woops ... sorry 'bout that. _M arp Marp/arp.c Modified: stable/7/usr.sbin/arp/arp.c Directory Properties: stable/7/usr.sbin/arp/ (props changed) Modified: stable/7/usr.sbin/arp/arp.c === === --- stable/7/usr.sbin/arp/arp.c Thu Jun 17 20:10:41 2010 (r209270) +++ stable/7/usr.sbin/arp/arp.c Thu Jun 17 20:38:18 2010(r209271) @@ -523,6 +523,9 @@ search(u_long addr, action_fn *action) /* * Display an arp entry */ +static char lifname[IF_NAMESIZE]; +static int64_t lifindex = -1; + static void print_entry(struct sockaddr_dl *sdl, struct sockaddr_inarp *addr, struct rt_msghdr *rtm) @@ -530,7 +533,6 @@ print_entry(struct sockaddr_dl *sdl, const char *host; struct hostent *hp; struct iso88025_sockaddr_dl_data *trld; - char ifname[IF_NAMESIZE]; int seg; if (nflag == 0) @@ -559,8 +561,12 @@ print_entry(struct sockaddr_dl *sdl, } } else printf((incomplete)); - if (if_indextoname(sdl-sdl_index, ifname) != NULL) - printf( on %s, ifname); + if (sdl-sdl_index != lifindex + if_indextoname(sdl-sdl_index, lifname) != NULL) { + lifindex = sdl-sdl_index; + printf( on %s, lifname); +} else if (sdl-sdl_index == lifindex) + printf( on %s, lifname); if (rtm-rtm_rmx.rmx_expire == 0) printf( permanent); if (addr-sin_other SIN_PROXY) !DSPAM:4c1a87f6420841209311444! ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r209221 - head/bin/sh
In message: 4c1a7953.4080...@freebsd.org Doug Barton do...@freebsd.org writes: : I've been very supportive of Jilles work up to this point, and I think : he's done a great job of making our sh functional and compliant as a : scripting shell. However in my mind adding completion (and his : suggested inclusion of the kill builtin) tips the balance from good : system shell to more of an interactive shell, and that makes me : wonder if this is the right direction to go in. If we want a good : interactive bourne-based shell in the base I'd rather have the : discussion about which one to import, rather than trying to have our : sh catch up with the last 15 years of development in this area. My main objection to sh growing lots of new functionality is the embedded world. It is so much smaller than csh, like 1/3 the size. I'd prefer we keep it small, or at least keep it buildable in the small... Warner ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r209221 - head/bin/sh
On Thu, Jun 17, 2010 at 12:36:51PM -0700, Doug Barton wrote: On 06/17/10 03:03, Andrey Chernov wrote: Jilles Tjoelkerjil...@freebsd.org writes: Log: sh: Add filename completion. FWIW, what I actually do is set the shell for both root and my unprivileged user to sh, compile bash static, and put a copy of the static shell in /root. Then my .profile tests for the existence of bash and execs it if available. Hmm, I see no problems with setting the shell of my unprivileged user to something dynamically linked in /usr/local/bin. sh completion works very strange at now moment. These are basically bourne-type shell behaviors that are different from *csh. Just two things: 1) $^I Display all 973 possibilities? (y or n) (tcsh - beep) bash also beeps here, FWIW, although I think there is a knob to twist to make it do what sh is doing here. It beeps first, then asks with the second tab. As said elsewhere in the thread, it may be useful to allow initial tabs to indent, like zsh and ksh93 do, to allow pasting script fragments indented with tabs. 2) $ll^I beep second ^I completion, including non-program files. This is a libedit thing. libreadline (which is what bash uses) has a flag to control this behavior that you can add to ~/.inputrc which makes it show all of the options the first time. The inclusion of non-program files in the current directory as input to a command is a feature, since it allows you to do things like: cd /etc vi make^I Having the shell include non-{program|alias} stuff as the first completion is dubious (bash does not do this). (tcsh - completeion, programs aliases only) Yes, many other shells complete command names at appropriate places in the line. However, at this time, it doesn't really fit in my idea of what sh(1) should be. Listing all possible command names is a fair bit of functionality not present yet (sh only caches command pathnames that have been used, it does not readdir all of $PATH like tcsh does). A somewhat related consideration is that this widens the interface between sh and libedit. Currently, sh only relies on _el_fn_sh_complete being a libedit key action function for its completion support; all the magic is in libedit. I don't remember other strange places right now. Verdict - not usable yet. I've been very supportive of Jilles work up to this point, and I think he's done a great job of making our sh functional and compliant as a scripting shell. However in my mind adding completion (and his suggested inclusion of the kill builtin) tips the balance from good system shell to more of an interactive shell, and that makes me wonder if this is the right direction to go in. If we want a good interactive bourne-based shell in the base I'd rather have the discussion about which one to import, rather than trying to have our sh catch up with the last 15 years of development in this area. Adding a few interactive features does not mean I want sh(1) to be a bash or zsh clone. Rather, I think that they can improve the sh(1) interactive user experience considerably while adding little code. This is useful for installations where it is desirable to minimize the number of ports installed and make buildenv type shells, for instance. More demanding users will want to use a more powerful interactive shell, and I think most operating systems based on FreeBSD should provide some (this does not mean they should be in the base system). -- Jilles Tjoelker ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209274 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mm Date: Thu Jun 17 22:38:23 2010 New Revision: 209274 URL: http://svn.freebsd.org/changeset/base/209274 Log: MFC r209093-r209101: MFC r209093: Fix unable to remove a file over NFS after hitting refquota limit OpenSolaris onnv rev: 8890:8c2bd5f17bf2 OpenSolaris Bug ID: 6798878 MFC r209094: Fix zfs destroy fails to free object in open context, stops up txg train OpenSolaris onnv rev: 9409:9dc3f17354ed OpenSolaris Bug ID: 6809683 MFC r209095: Fix incomplete resilvering after disk replacement (raidz) OpenSolaris onnv rev: 9434:3bebded7c76a OpenSolaris Bug ID: 6794570 MFC r209096: Fix vdev_probe() starvation brings txg train to a screeching halt OpenSolaris onnv rev: 9722:e3866bad4e96 OpenSolaris Bug ID: 6844069 MFC r209097: Fix ZFS panic deadlock: cycle in blocking chain via zfs_zget OpenSolaris onnv rev: 9774:0bb234ab2287 OpenSolaris Bug ID: 6788152 MFC r209098: Fix zpool resilver stalls with spa_scrub_thread in a 3 way deadlock OpenSolaris onnv rev: 9997:174d75a29a1c OpenSolaris Bug ID: 6843235 MFC r209099: Fix possible zfs panic on zpool import OpenSolaris onnv rev: 10040:38b25aeeaf7a OpenSolaris Bug ID: 6857012 MFC r209100: Fix panic in zfs_getsecattr OpenSolaris onnv rev: 10295:f7a18a1e9610 OpenSolaris Bug ID: 6870564 MFC r209101: Fix arc_read_done may try to byteswap undefined data (sparc related) OpenSolaris onnv rev: 10839:cf83b553a2ab OpenSolaris Bug ID: 6836714 Obtained from:OpenSolaris (multiple Bug IDs) Approved by: pjd, delphij (mentor) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scrub.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Jun 17 21:17:35 2010(r209273) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Thu Jun 17 22:38:23 2010(r209274) @@ -2687,7 +2687,7 @@ arc_read_done(zio_t *zio) /* byteswap if necessary */ callback_list = hdr-b_acb; ASSERT(callback_list != NULL); - if (BP_SHOULD_BYTESWAP(zio-io_bp)) { + if (BP_SHOULD_BYTESWAP(zio-io_bp) zio-io_error == 0) { arc_byteswap_func_t *func = BP_GET_LEVEL(zio-io_bp) 0 ? byteswap_uint64_array : dmu_ot[BP_GET_TYPE(zio-io_bp)].ot_byteswap; Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.cThu Jun 17 21:17:35 2010(r209273) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.cThu Jun 17 22:38:23 2010(r209274) @@ -582,9 +582,9 @@ dmu_tx_hold_zap(dmu_tx_t *tx, uint64_t o txh-txh_space_tooverwrite += SPA_MAXBLOCKSIZE; } else { txh-txh_space_towrite += SPA_MAXBLOCKSIZE; - txh-txh_space_tounref += - BP_GET_ASIZE(dn-dn_phys-dn_blkptr); } + if (dn-dn_phys-dn_blkptr[0].blk_birth) + txh-txh_space_tounref += SPA_MAXBLOCKSIZE; return; } Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c == --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Thu Jun 17 21:17:35 2010(r209273) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Thu Jun 17 22:38:23 2010(r209274) @@ -1317,16 +1317,7 @@ dnode_next_offset_level(dnode_t *dn, int for (i = (*offset span) (blkfill - 1); i = 0 i blkfill; i += inc) { - boolean_t newcontents = B_TRUE; - if (txg) { -
Re: svn commit: r209221 - head/bin/sh
On Thu, Jun 17, 2010 at 12:36:51PM -0700, Doug Barton wrote: every time this is discussed it's the bikeshed from $CULTURALLY_RELEVANT_PLACE_OF_TORMENT. On occasion I'm attempted to close incoming PRs with the following text: Administer your system. The upside of FreeBSD being so configurable is that you can make it behave exactly as you like. The downside is that this takes extra work. IMHO we'll never achieve consensus on this issue, so we should just let it go. Me? I don't use tcsh for root, I use sh. mcl ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209276 - head/lib/libkvm
Author: sbruno Date: Fri Jun 18 01:17:16 2010 New Revision: 209276 URL: http://svn.freebsd.org/changeset/base/209276 Log: Much closer approximation of the kernel's calculation of this value. Reviewed by: alc Obtained from:Yahoo Inc. Modified: head/lib/libkvm/kvm_proc.c Modified: head/lib/libkvm/kvm_proc.c == --- head/lib/libkvm/kvm_proc.c Thu Jun 17 22:47:44 2010(r209275) +++ head/lib/libkvm/kvm_proc.c Fri Jun 18 01:17:16 2010(r209276) @@ -323,7 +323,12 @@ nopgrp: (void)kvm_read(kd, (u_long)proc.p_vmspace, (char *)vmspace, sizeof(vmspace)); kp-ki_size = vmspace.vm_map.size; - kp-ki_rssize = vmspace.vm_swrss; /* XXX */ + /* +* Approximate the kernel's method of calculating +* this field. +*/ +#definepmap_resident_count(pm) ((pm)-pm_stats.resident_count) + kp-ki_rssize = pmap_resident_count(vmspace.vm_pmap); kp-ki_swrss = vmspace.vm_swrss; kp-ki_tsize = vmspace.vm_tsize; kp-ki_dsize = vmspace.vm_dsize; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r209119 - head/sys/sys
On 06/17/10 17:13, Kostik Belousov wrote: On Thu, Jun 17, 2010 at 12:38:08PM +1000, Lawrence Stewart wrote: On 06/14/10 20:43, Kostik Belousov wrote: [snip] Or, you could ditch the sum at all, indeed using ({}) and returning the result. __typeof is your friend to select proper type of accumulator. So, something like this? #define DPCPU_SUM(n, var) __extension__\ ({ \ u_int _i; \ __typeof((DPCPU_PTR(n))-var) sum; \ \ sum = 0; \ CPU_FOREACH(_i) { \ sum += (DPCPU_ID_PTR(_i, n))-var; \ } \ sum; \ }) Which can be used like this: totalss.n_in = DPCPU_SUM(ss, n_in); Yes, exactly. I've tested the above and it works. I also prefer the idea of having DPCPU_SUM return the sum so that you can do var = DPCPU_SUM(...). My only concern with this method is that the caller no longer has the choice to make the sum variable a larger type to avoid overflow. It would be nice to be able to have the DPCPU vars be uint32_t but be able to sum them into a uint64_t accumulator for example. Perhaps this isn't really an issue though... I'm not sure. You are worried about overflow in the sum of 32 or 64 variables, but if this is the case, then each member of the sum can overflow as well, IMO. Either ignore the issue, or use a uintmax_t. True but I figured on large SMP systems where the potential to process more is likely, 32bit counters per cpu may be enough to avoid overflow but the aggregate number of events may exceed a 32bit variable. I suspect you're right though and that if there's a likely chance the aggregate could overflow, then the DPCPU var should simply be made 64bit to also remove any possibility of individual PCPU counters overflowing. I'll commit the above version of the macro this evening (GMT+10) unless I hear any objections. Thanks to all of you for your input. Cheers, Lawrence ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209277 - in stable/8/sys: net netinet
Author: qingli Date: Fri Jun 18 03:31:33 2010 New Revision: 209277 URL: http://svn.freebsd.org/changeset/base/209277 Log: MFC r208553 This patch fixes the problem where proxy ARP entries cannot be added over the if_ng interface. Modified: stable/8/sys/net/if.c stable/8/sys/net/if_var.h stable/8/sys/net/route.c stable/8/sys/net/rtsock.c stable/8/sys/netinet/in.c stable/8/sys/netinet/in_pcb.c stable/8/sys/netinet/ip_options.c stable/8/sys/netinet/ip_output.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/net/if.c == --- stable/8/sys/net/if.c Fri Jun 18 01:17:16 2010(r209276) +++ stable/8/sys/net/if.c Fri Jun 18 03:31:33 2010(r209277) @@ -1636,7 +1636,7 @@ done: * is most specific found. */ struct ifaddr * -ifa_ifwithnet(struct sockaddr *addr) +ifa_ifwithnet(struct sockaddr *addr, int ignore_ptp) { struct ifnet *ifp; struct ifaddr *ifa; @@ -1668,7 +1668,8 @@ ifa_ifwithnet(struct sockaddr *addr) if (ifa-ifa_addr-sa_family != af) next: continue; - if (af == AF_INET ifp-if_flags IFF_POINTOPOINT) { + if (af == AF_INET + ifp-if_flags IFF_POINTOPOINT !ignore_ptp) { /* * This is a bit broken as it doesn't * take into account that the remote end may Modified: stable/8/sys/net/if_var.h == --- stable/8/sys/net/if_var.h Fri Jun 18 01:17:16 2010(r209276) +++ stable/8/sys/net/if_var.h Fri Jun 18 03:31:33 2010(r209277) @@ -875,7 +875,7 @@ struct ifaddr *ifa_ifwithaddr(struct soc intifa_ifwithaddr_check(struct sockaddr *); struct ifaddr *ifa_ifwithbroadaddr(struct sockaddr *); struct ifaddr *ifa_ifwithdstaddr(struct sockaddr *); -struct ifaddr *ifa_ifwithnet(struct sockaddr *); +struct ifaddr *ifa_ifwithnet(struct sockaddr *, int); struct ifaddr *ifa_ifwithroute(int, struct sockaddr *, struct sockaddr *); struct ifaddr *ifa_ifwithroute_fib(int, struct sockaddr *, struct sockaddr *, u_int); Modified: stable/8/sys/net/route.c == --- stable/8/sys/net/route.cFri Jun 18 01:17:16 2010(r209276) +++ stable/8/sys/net/route.cFri Jun 18 03:31:33 2010(r209277) @@ -519,7 +519,7 @@ rtredirect_fib(struct sockaddr *dst, } /* verify the gateway is directly reachable */ - if ((ifa = ifa_ifwithnet(gateway)) == NULL) { + if ((ifa = ifa_ifwithnet(gateway, 0)) == NULL) { error = ENETUNREACH; goto out; } @@ -686,7 +686,7 @@ ifa_ifwithroute_fib(int flags, struct so ifa = ifa_ifwithdstaddr(gateway); } if (ifa == NULL) - ifa = ifa_ifwithnet(gateway); + ifa = ifa_ifwithnet(gateway, 0); if (ifa == NULL) { struct rtentry *rt = rtalloc1_fib(gateway, 0, RTF_RNH_LOCKED, fibnum); if (rt == NULL) @@ -797,7 +797,7 @@ rt_getifa_fib(struct rt_addrinfo *info, */ if (info-rti_ifp == NULL ifpaddr != NULL ifpaddr-sa_family == AF_LINK - (ifa = ifa_ifwithnet(ifpaddr)) != NULL) { + (ifa = ifa_ifwithnet(ifpaddr, 0)) != NULL) { info-rti_ifp = ifa-ifa_ifp; ifa_free(ifa); } Modified: stable/8/sys/net/rtsock.c == --- stable/8/sys/net/rtsock.c Fri Jun 18 01:17:16 2010(r209276) +++ stable/8/sys/net/rtsock.c Fri Jun 18 03:31:33 2010(r209277) @@ -55,6 +55,7 @@ #include net/if.h #include net/if_dl.h #include net/if_llatbl.h +#include net/if_types.h #include net/netisr.h #include net/raw_cb.h #include net/route.h @@ -673,12 +674,22 @@ route_output(struct mbuf *m, struct sock * another search to retrieve the prefix route of * the local end point of the PPP link. */ - if ((rtm-rtm_flags RTF_ANNOUNCE) - (rt-rt_ifp-if_flags IFF_POINTOPOINT)) { + if (rtm-rtm_flags RTF_ANNOUNCE) { struct sockaddr laddr; - rt_maskedcopy(rt-rt_ifa-ifa_addr, - laddr, - rt-rt_ifa-ifa_netmask); + +
svn commit: r209278 - stable/8/sys/geom/multipath
Author: mjacob Date: Fri Jun 18 03:59:07 2010 New Revision: 209278 URL: http://svn.freebsd.org/changeset/base/209278 Log: This is an MFC of 208082 Make sure to check that the active provider pointer points to something before dereferencing the pointer. Modified: stable/8/sys/geom/multipath/g_multipath.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/geom/multipath/g_multipath.c == --- stable/8/sys/geom/multipath/g_multipath.c Fri Jun 18 03:31:33 2010 (r209277) +++ stable/8/sys/geom/multipath/g_multipath.c Fri Jun 18 03:59:07 2010 (r209278) @@ -795,7 +795,7 @@ g_multipath_ctl_getactive(struct gctl_re return; } sc = gp-softc; - if (sc-cp_active) { + if (sc-cp_active sc-cp_active-provider) { sbuf_printf(sb, %s\n, sc-cp_active-provider-name); } else { sbuf_printf(sb, none\n); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209279 - stable/8/sys/geom/multipath
Author: mjacob Date: Fri Jun 18 04:01:59 2010 New Revision: 209279 URL: http://svn.freebsd.org/changeset/base/209279 Log: This is an MFC of 208101 Yet another potential dereference of a dead provider. Modified: stable/8/sys/geom/multipath/g_multipath.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/geom/multipath/g_multipath.c == --- stable/8/sys/geom/multipath/g_multipath.c Fri Jun 18 03:59:07 2010 (r209278) +++ stable/8/sys/geom/multipath/g_multipath.c Fri Jun 18 04:01:59 2010 (r209279) @@ -196,7 +196,7 @@ g_multipath_done_error(struct bio *bp) break; } } - if (sc-cp_active == NULL) { + if (sc-cp_active == NULL || sc-cp_active-provider == NULL) { printf(GEOM_MULTIPATH: out of providers for %s\n, sc-sc_name); g_topology_unlock(); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209280 - stable/8/sys/cam/scsi
Author: mjacob Date: Fri Jun 18 04:43:22 2010 New Revision: 209280 URL: http://svn.freebsd.org/changeset/base/209280 Log: This is an MFC of 207933 Deal sensibly with more than 26 sg devices. It isn't a complete solution. Modified: stable/8/sys/cam/scsi/scsi_sg.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cam/scsi/scsi_sg.c == --- stable/8/sys/cam/scsi/scsi_sg.c Fri Jun 18 04:01:59 2010 (r209279) +++ stable/8/sys/cam/scsi/scsi_sg.c Fri Jun 18 04:43:22 2010 (r209280) @@ -303,7 +303,12 @@ sgregister(struct cam_periph *periph, vo softc-dev = make_dev(sg_cdevsw, periph-unit_number, UID_ROOT, GID_OPERATOR, 0600, %s%d, periph-periph_name, periph-unit_number); - (void)make_dev_alias(softc-dev, sg%c, 'a' + periph-unit_number); + if (periph-unit_number 26) { + (void)make_dev_alias(softc-dev, sg%c, periph-unit_number + 'a'); + } else { + (void)make_dev_alias(softc-dev, sg%c%c, + ((periph-unit_number / 26) - 1) + 'a', periph-unit_number + 'a'); + } cam_periph_lock(periph); softc-dev-si_drv1 = periph; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209281 - stable/8/sys/cam/scsi
Author: mjacob Date: Fri Jun 18 04:45:06 2010 New Revision: 209281 URL: http://svn.freebsd.org/changeset/base/209281 Log: This is an MFC of 207938 Pick up the right change, not it's close cousin. The one previously submitted was wrong. Modified: stable/8/sys/cam/scsi/scsi_sg.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/cam/scsi/scsi_sg.c == --- stable/8/sys/cam/scsi/scsi_sg.c Fri Jun 18 04:43:22 2010 (r209280) +++ stable/8/sys/cam/scsi/scsi_sg.c Fri Jun 18 04:45:06 2010 (r209281) @@ -304,10 +304,12 @@ sgregister(struct cam_periph *periph, vo UID_ROOT, GID_OPERATOR, 0600, %s%d, periph-periph_name, periph-unit_number); if (periph-unit_number 26) { - (void)make_dev_alias(softc-dev, sg%c, periph-unit_number + 'a'); + (void)make_dev_alias(softc-dev, sg%c, + periph-unit_number + 'a'); } else { (void)make_dev_alias(softc-dev, sg%c%c, - ((periph-unit_number / 26) - 1) + 'a', periph-unit_number + 'a'); + ((periph-unit_number / 26) - 1) + 'a', + (periph-unit_number % 26) + 'a'); } cam_periph_lock(periph); softc-dev-si_drv1 = periph; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r209282 - stable/8/sys/dev/mpt
Author: mjacob Date: Fri Jun 18 04:51:17 2010 New Revision: 209282 URL: http://svn.freebsd.org/changeset/base/209282 Log: This is an MFC of 207543 Print IR_RESYNC updates informatively. Obtained from:pluknet Modified: stable/8/sys/dev/mpt/mpt_cam.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/mpt/mpt_cam.c == --- stable/8/sys/dev/mpt/mpt_cam.c Fri Jun 18 04:45:06 2010 (r209281) +++ stable/8/sys/dev/mpt/mpt_cam.c Fri Jun 18 04:51:17 2010 (r209282) @@ -2575,6 +2575,10 @@ mpt_cam_event(struct mpt_softc *mpt, req CAMLOCK_2_MPTLOCK(mpt); break; } + case MPI_EVENT_IR_RESYNC_UPDATE: + mpt_prt(mpt, IR resync update %d completed\n, + (data0 16) 0xff); + break; case MPI_EVENT_EVENT_CHANGE: case MPI_EVENT_INTEGRATED_RAID: case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org