svn commit: r248696 - head/sys/geom/multipath
Author: mav Date: Mon Mar 25 07:24:58 2013 New Revision: 248696 URL: http://svnweb.freebsd.org/changeset/base/248696 Log: Make GEOM MULTIPATH to report unmapped bio support if underling path report it. GEOM MULTIPATH itself never touches the data and so transparent. Modified: head/sys/geom/multipath/g_multipath.c Modified: head/sys/geom/multipath/g_multipath.c == --- head/sys/geom/multipath/g_multipath.c Mon Mar 25 06:31:17 2013 (r248695) +++ head/sys/geom/multipath/g_multipath.c Mon Mar 25 07:24:58 2013 (r248696) @@ -522,6 +522,8 @@ g_multipath_add_disk(struct g_geom *gp, sc->sc_pp->stripesize = pp->stripesize; sc->sc_pp->stripeoffset = pp->stripeoffset; } + if (sc->sc_pp != NULL) + sc->sc_pp->flags |= pp->flags & G_PF_ACCEPT_UNMAPPED; mtx_lock(&sc->sc_mtx); cp->index = 0; sc->sc_ndisks++; ___ 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: r248697 - head/sys/netpfil/ipfw
Author: ae Date: Mon Mar 25 07:43:46 2013 New Revision: 248697 URL: http://svnweb.freebsd.org/changeset/base/248697 Log: When we are removing a specific set, call ipfw_expire_dyn_rules only once. Obtained from:Yandex LLC MFC after:1 week Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c == --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Mar 25 07:24:58 2013 (r248696) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Mar 25 07:43:46 2013 (r248697) @@ -373,14 +373,15 @@ del_entry(struct ip_fw_chain *chain, uin /* 4. swap the maps (under BH_LOCK) */ map = swap_map(chain, map, chain->n_rules - n); /* 5. now remove the rules deleted from the old map */ + if (cmd == 1) + ipfw_expire_dyn_rules(chain, NULL, new_set); for (i = start; i < end; i++) { - int l; rule = map[i]; if (keep_rule(rule, cmd, new_set, num)) continue; - l = RULESIZE(rule); - chain->static_len -= l; - ipfw_expire_dyn_rules(chain, rule, RESVD_SET); + chain->static_len -= RULESIZE(rule); + if (cmd != 1) + ipfw_expire_dyn_rules(chain, rule, RESVD_SET); rule->x_next = chain->reap; chain->reap = rule; } ___ 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: r248698 - head/sys/dev/ahci
Author: mav Date: Mon Mar 25 08:50:51 2013 New Revision: 248698 URL: http://svnweb.freebsd.org/changeset/base/248698 Log: Depending on combination of running commands (NCQ/non-NCQ) try to avoid extra read from PxCI/PxSACT registers. If only NCQ commands are running, we don't really need PxCI. If only non-NCQ commands are running we don't need PxSACT. Mixed set may happen only on controllers with FIS-based switching when port multiplier is attached, and then we have to read both registers. MFC after:1 month Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c == --- head/sys/dev/ahci/ahci.cMon Mar 25 07:43:46 2013(r248697) +++ head/sys/dev/ahci/ahci.cMon Mar 25 08:50:51 2013(r248698) @@ -1449,7 +1449,7 @@ ahci_ch_intr(void *data) { device_t dev = (device_t)data; struct ahci_channel *ch = device_get_softc(dev); - uint32_t istatus, sstatus, cstatus, serr = 0, sntf = 0, ok, err; + uint32_t istatus, cstatus, serr = 0, sntf = 0, ok, err; enum ahci_err_type et; int i, ccs, port, reset = 0; @@ -1459,8 +1459,13 @@ ahci_ch_intr(void *data) return; ATA_OUTL(ch->r_mem, AHCI_P_IS, istatus); /* Read command statuses. */ - sstatus = ATA_INL(ch->r_mem, AHCI_P_SACT); - cstatus = ATA_INL(ch->r_mem, AHCI_P_CI); + if (ch->numtslots != 0) + cstatus = ATA_INL(ch->r_mem, AHCI_P_SACT); + else + cstatus = 0; + if (ch->numrslots != ch->numtslots) + cstatus |= ATA_INL(ch->r_mem, AHCI_P_CI); + /* Read SNTF in one of possible ways. */ if (istatus & AHCI_P_IX_SDB) { if (ch->caps & AHCI_CAP_SSNTF) sntf = ATA_INL(ch->r_mem, AHCI_P_SNTF); @@ -1520,14 +1525,14 @@ ahci_ch_intr(void *data) } } } - err = ch->rslots & (cstatus | sstatus); + err = ch->rslots & cstatus; } else { ccs = 0; err = 0; port = -1; } /* Complete all successfull commands. */ - ok = ch->rslots & ~(cstatus | sstatus); + ok = ch->rslots & ~cstatus; for (i = 0; i < ch->numslots; i++) { if ((ok >> i) & 1) ahci_end_transaction(&ch->slot[i], AHCI_ERR_NONE); ___ 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: r248699 - head/sys/kern
Author: davide Date: Mon Mar 25 09:43:50 2013 New Revision: 248699 URL: http://svnweb.freebsd.org/changeset/base/248699 Log: Cache the callout precision argument as part of the informations required for migrating callouts to new CPU. This value is passed to callout_cc_add() in order to update properly precision field in case of rescheduling/migration. Reviewed by: mav Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c == --- head/sys/kern/kern_timeout.cMon Mar 25 08:50:51 2013 (r248698) +++ head/sys/kern/kern_timeout.cMon Mar 25 09:43:50 2013 (r248699) @@ -131,6 +131,7 @@ struct cc_exec { void*ce_migration_arg; int ce_migration_cpu; sbintime_t ce_migration_time; + sbintime_t ce_migration_prec; #endif boolcc_cancel; boolcc_waiting; @@ -167,10 +168,12 @@ struct callout_cpu { #definecc_migration_argcc_exec_entity[0].ce_migration_arg #definecc_migration_cpucc_exec_entity[0].ce_migration_cpu #definecc_migration_time cc_exec_entity[0].ce_migration_time +#definecc_migration_prec cc_exec_entity[0].ce_migration_prec #definecc_migration_func_dir cc_exec_entity[1].ce_migration_func #definecc_migration_arg_dircc_exec_entity[1].ce_migration_arg #definecc_migration_cpu_dircc_exec_entity[1].ce_migration_cpu #definecc_migration_time_dir cc_exec_entity[1].ce_migration_time +#definecc_migration_prec_dir cc_exec_entity[1].ce_migration_prec struct callout_cpu cc_cpu[MAXCPU]; #defineCPUBLOCKMAXCPU @@ -227,6 +230,7 @@ cc_cce_cleanup(struct callout_cpu *cc, i #ifdef SMP cc->cc_exec_entity[direct].ce_migration_cpu = CPUBLOCK; cc->cc_exec_entity[direct].ce_migration_time = 0; + cc->cc_exec_entity[direct].ce_migration_prec = 0; cc->cc_exec_entity[direct].ce_migration_func = NULL; cc->cc_exec_entity[direct].ce_migration_arg = NULL; #endif @@ -605,7 +609,7 @@ softclock_call_cc(struct callout *c, str void (*new_func)(void *); void *new_arg; int flags, new_cpu; - sbintime_t new_time; + sbintime_t new_prec, new_time; #endif #if defined(DIAGNOSTIC) || defined(CALLOUT_PROFILING) sbintime_t sbt1, sbt2; @@ -721,6 +725,7 @@ skip: */ new_cpu = cc->cc_exec_entity[direct].ce_migration_cpu; new_time = cc->cc_exec_entity[direct].ce_migration_time; + new_prec = cc->cc_exec_entity[direct].ce_migration_prec; new_func = cc->cc_exec_entity[direct].ce_migration_func; new_arg = cc->cc_exec_entity[direct].ce_migration_arg; cc_cce_cleanup(cc, direct); @@ -742,7 +747,7 @@ skip: new_cc = callout_cpu_switch(c, cc, new_cpu); flags = (direct) ? C_DIRECT_EXEC : 0; - callout_cc_add(c, new_cc, new_time, c->c_precision, new_func, + callout_cc_add(c, new_cc, new_time, new_prec, new_func, new_arg, new_cpu, flags); CC_UNLOCK(new_cc); CC_LOCK(cc); @@ -996,6 +1001,8 @@ callout_reset_sbt_on(struct callout *c, cc->cc_exec_entity[direct].ce_migration_cpu = cpu; cc->cc_exec_entity[direct].ce_migration_time = to_sbt; + cc->cc_exec_entity[direct].ce_migration_prec + = precision; cc->cc_exec_entity[direct].ce_migration_func = ftn; cc->cc_exec_entity[direct].ce_migration_arg = arg; c->c_flags |= CALLOUT_DFRMIGRATION; ___ 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: r248417 - head/sys/sys
Andre, sorry for delay. On Sun, Mar 17, 2013 at 11:45:39AM +0100, Andre Oppermann wrote: A> On 17.03.2013 10:33, Gleb Smirnoff wrote: A> > On Sun, Mar 17, 2013 at 10:02:09AM +0100, Andre Oppermann wrote: A> > A> On 17.03.2013 08:39, Gleb Smirnoff wrote: A> > A> > Author: glebius A> > A> > Date: Sun Mar 17 07:39:45 2013 A> > A> > New Revision: 248417 A> > A> > URL: http://svnweb.freebsd.org/changeset/base/248417 A> > A> > A> > A> > Log: A> > A> >Add MEXT_ALIGN() macro, similar to M_ALIGN() and MH_ALIGN(), but for A> > A> >mbufs with external buffer. A> > A> A> > A> While you are cleaning up the mbuf usage wouldn't it make sense to remove A> > A> these macros, instead of adding new ones, and use m_align() which handles A> > A> all these cases internally? A> > A> > I'm thinking about this. Maybe it is worth to request tail alignment as A> > a flag to the allocating function itself? A> A> IMHO that would overload the allocation function(s). The explicit step of A> doing m_align() for those who need it is fine and alerts the reader of what A> is going on. I'm all for simplification and unification, on the other hand A> it shouldn't be taken too far creating new complexity on the other side. That would be one less function call and one less branching, that was my point. Actually we can extend that later w/o API breakage. -- Totus tuus, Glebius. ___ 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: r248700 - head/sbin/geom/class/eli
Author: maxim Date: Mon Mar 25 12:38:45 2013 New Revision: 248700 URL: http://svnweb.freebsd.org/changeset/base/248700 Log: o Typo: IEE -> IEEE. PR: docs/173069 Submitted by: Bjorn Heidotting MFC after:1 week Modified: head/sbin/geom/class/eli/geli.8 Modified: head/sbin/geom/class/eli/geli.8 == --- head/sbin/geom/class/eli/geli.8 Mon Mar 25 09:43:50 2013 (r248699) +++ head/sbin/geom/class/eli/geli.8 Mon Mar 25 12:38:45 2013 (r248700) @@ -970,7 +970,7 @@ Enter passphrase: supports two encryption modes: .Nm XTS , which was standardized as -.Nm IEE P1619 +.Nm IEEE P1619 and .Nm CBC with unpredictable IV. ___ 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: r248704 - head/sys/dev/ahci
Author: mav Date: Mon Mar 25 13:58:17 2013 New Revision: 248704 URL: http://svnweb.freebsd.org/changeset/base/248704 Log: Read Asynchronous Notification statuses only if Port Multiplier or ATAPI device are connected. ATA disks are not using ANs, while the extra register read operation is quite expensive. Modified: head/sys/dev/ahci/ahci.c Modified: head/sys/dev/ahci/ahci.c == --- head/sys/dev/ahci/ahci.cMon Mar 25 13:33:06 2013(r248703) +++ head/sys/dev/ahci/ahci.cMon Mar 25 13:58:17 2013(r248704) @@ -1466,7 +1466,8 @@ ahci_ch_intr(void *data) if (ch->numrslots != ch->numtslots) cstatus |= ATA_INL(ch->r_mem, AHCI_P_CI); /* Read SNTF in one of possible ways. */ - if (istatus & AHCI_P_IX_SDB) { + if ((istatus & AHCI_P_IX_SDB) && + (ch->pm_present || ch->curr[0].atapi != 0)) { if (ch->caps & AHCI_CAP_SSNTF) sntf = ATA_INL(ch->r_mem, AHCI_P_SNTF); else if (ch->fbs_enabled) { ___ 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: r248705 - head/sys/dev/ipmi
Author: melifaro Date: Mon Mar 25 14:30:34 2013 New Revision: 248705 URL: http://svnweb.freebsd.org/changeset/base/248705 Log: Unlock IPMI sc while performing requests via KCS and SMIC interfaces. It is already done in SSIF interface code. This reduces contention/spinning reported by many users. PR: kern/172166 Submitted by: Eric van Gyzen MFC after:2 weeks Modified: head/sys/dev/ipmi/ipmi_kcs.c head/sys/dev/ipmi/ipmi_smic.c Modified: head/sys/dev/ipmi/ipmi_kcs.c == --- head/sys/dev/ipmi/ipmi_kcs.cMon Mar 25 13:58:17 2013 (r248704) +++ head/sys/dev/ipmi/ipmi_kcs.cMon Mar 25 14:30:34 2013 (r248705) @@ -456,6 +456,7 @@ kcs_loop(void *arg) IPMI_LOCK(sc); while ((req = ipmi_dequeue_request(sc)) != NULL) { + IPMI_UNLOCK(sc); ok = 0; for (i = 0; i < 3 && !ok; i++) ok = kcs_polled_request(sc, req); @@ -463,6 +464,7 @@ kcs_loop(void *arg) req->ir_error = 0; else req->ir_error = EIO; + IPMI_LOCK(sc); ipmi_complete_request(sc, req); } IPMI_UNLOCK(sc); Modified: head/sys/dev/ipmi/ipmi_smic.c == --- head/sys/dev/ipmi/ipmi_smic.c Mon Mar 25 13:58:17 2013 (r248704) +++ head/sys/dev/ipmi/ipmi_smic.c Mon Mar 25 14:30:34 2013 (r248705) @@ -362,6 +362,7 @@ smic_loop(void *arg) IPMI_LOCK(sc); while ((req = ipmi_dequeue_request(sc)) != NULL) { + IPMI_UNLOCK(sc); ok = 0; for (i = 0; i < 3 && !ok; i++) ok = smic_polled_request(sc, req); @@ -369,6 +370,7 @@ smic_loop(void *arg) req->ir_error = 0; else req->ir_error = EIO; + IPMI_LOCK(sc); ipmi_complete_request(sc, req); } IPMI_UNLOCK(sc); ___ 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: r248706 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs cddl/contrib/opensolaris/lib/libdtrace/common sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/contri...
Author: pfg Date: Mon Mar 25 15:40:57 2013 New Revision: 248706 URL: http://svnweb.freebsd.org/changeset/base/248706 Log: Dtrace: add toupper()/tolower() and enhancements to lltostr(). Merge changes from illumos: 1451 DTrace needs toupper()/tolower() subroutines 1457 lltostr() D subroutine should take an optional base This change bumps the DT_VERS_* number to 1.8.1 in accordance to what is done in illumos. The test suite we currently include is outdated and doesnt support some updates in tst.subr.d which had to be left out for now. Illumos Revisions:r13458 5e394d8db762 r13459 c3454574dd1a Reference: https://www.illumos.org/issues/1451 https://www.illumos.org/issues/1457 Tested by:Fabian Keil Obtained from:Illumos MFC after:1 month Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d - copied unchanged from r248705, vendor/illumos/dist/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d - copied unchanged from r248705, vendor/illumos/dist/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolower.d - copied unchanged from r248705, vendor/illumos/dist/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolower.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolowertoomany.d - copied unchanged from r248705, vendor/illumos/dist/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.tolowertoomany.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.toupper.d - copied unchanged from r248705, vendor/illumos/dist/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.toupper.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.touppertoomany.d - copied unchanged from r248705, vendor/illumos/dist/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_LEN.touppertoomany.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d - copied unchanged from r248705, vendor/illumos/dist/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d.out - copied unchanged from r248705, vendor/illumos/dist/cmd/dtrace/test/tst/common/funcs/tst.lltostrbase.d.out head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.tolower.d - copied unchanged from r248705, vendor/illumos/dist/cmd/dtrace/test/tst/common/funcs/tst.tolower.d head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/tst.toupper.d - copied unchanged from r248705, vendor/illumos/dist/cmd/dtrace/test/tst/common/funcs/tst.toupper.d Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d (from r248705, vendor/illumos/dist/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d Mon Mar 25 15:40:57 2013(r248706, copy of r248705, vendor/illumos/dist/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.tolower.d) @@ -0,0 +1,30 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + +BEGIN +{ + trace(tolower(2152006)); + exit(1); +} Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d (from r248705, vendor/illumos/dist/cmd/dtrace/test/tst/common/funcs/err.D_PROTO_ARG.toupper.d) == --- /dev/null 00:00:00 1970 (empty, because file i
svn commit: r248707 - head/usr.sbin/bsnmpd/modules/snmp_hostres
Author: trociny Date: Mon Mar 25 19:12:36 2013 New Revision: 248707 URL: http://svnweb.freebsd.org/changeset/base/248707 Log: hrStorageSize and hrStorageUsed are 32 bit integers, reporting a fs size and usage in hrStorageAllocationUnits. If the file system has more than 2^31 allocations it can not be shown correctly and the meters are useless. In such cases follow net-snmp behaviour and increase hrStorageAllocationUnits so the values fit under INT_MAX. PR: bin/177183 Submitted by: Eugene Grosbein egrosbein rdtc.ru MFC after:2 weeks Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c == --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c Mon Mar 25 15:40:57 2013(r248706) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_storage_tbl.c Mon Mar 25 19:12:36 2013(r248707) @@ -442,10 +442,9 @@ static void storage_OS_get_fs(void) { struct storage_entry *entry; - uint64_t used_blocks_count = 0; + uint64_t size, used; + int i, mounted_fs_count, units; char fs_string[SE_DESC_MLEN]; - int mounted_fs_count; - int i = 0; if ((mounted_fs_count = getfsstat(NULL, 0, MNT_NOWAIT)) < 0) { syslog(LOG_ERR, "hrStorageTable: getfsstat() failed: %m"); @@ -488,22 +487,17 @@ storage_OS_get_fs(void) entry->flags |= HR_STORAGE_FOUND; entry->type = fs_get_type(&fs_buf[i]); /*XXX - This is wrong*/ - if (fs_buf[i].f_bsize > INT_MAX) - entry->allocationUnits = INT_MAX; - else - entry->allocationUnits = fs_buf[i].f_bsize; - - if (fs_buf[i].f_blocks > INT_MAX) - entry->size = INT_MAX; - else - entry->size = fs_buf[i].f_blocks; - - used_blocks_count = fs_buf[i].f_blocks - fs_buf[i].f_bfree; - - if (used_blocks_count > INT_MAX) - entry->used = INT_MAX; - else - entry->used = used_blocks_count; + units = fs_buf[i].f_bsize; + size = fs_buf[i].f_blocks; + used = fs_buf[i].f_blocks - fs_buf[i].f_bfree; + while (size > INT_MAX) { + units <<= 1; + size >>= 1; + used >>= 1; + } + entry->allocationUnits = units; + entry->size = size; + entry->used = used; entry->allocationFailures = 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: r248708 - in head: cddl/contrib/opensolaris/lib/libdtrace/common cddl/lib/libdtrace sys/cddl/contrib/opensolaris/uts/common/dtrace
Author: pfg Date: Mon Mar 25 20:38:09 2013 New Revision: 248708 URL: http://svnweb.freebsd.org/changeset/base/248708 Log: Dtrace: Add SUN MDB-like type-aware print() action. Merge change from illumos: 1694 Add type-aware print() action This is a very nice feature implemented in upstream Dtrace. A complete description is available here: http://dtrace.org/blogs/eschrock/2011/10/26/your-mdb-fell-into-my-dtrace/ This change bumps the DT_VERS_* number to 1.9.0 in accordance to what is done in illumos. While here also include some minor cleanups to ease further merging and appease clang with a fix by Fabian Keil. Illumos Revisions:13501:c3a7090dbc16 13483:f413e6c5d297 Reference: https://www.illumos.org/issues/1560 https://www.illumos.org/issues/1694 Tested by:Fabian Keil Obtained from:Illumos MFC after:1 month Added: - copied from r248707, vendor/illumos/20120614/cmd/dtrace/test/tst/common/print/ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_print.c - copied unchanged from r248707, vendor/illumos/dist/lib/libdtrace/common/dt_print.c Directory Properties: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_dof.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_errtags.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_map.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_program.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dtrace.h head/cddl/lib/libdtrace/Makefile head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c == --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Mon Mar 25 19:12:36 2013(r248707) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c Mon Mar 25 20:38:09 2013(r248708) @@ -22,6 +22,7 @@ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, Joyent Inc. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ /* @@ -679,6 +680,51 @@ dt_action_trace(dtrace_hdl_t *dtp, dt_no ap->dtad_kind = DTRACEACT_DIFEXPR; } +/* + * The print() action behaves identically to trace(), except that it stores the + * CTF type of the argument (if present) within the DOF for the DIFEXPR action. + * To do this, we set the 'dtsd_strdata' to point to the fully-qualified CTF + * type ID for the result of the DIF action. We use the ID instead of the name + * to handles complex types like arrays and function pointers that can't be + * resolved by ctf_type_lookup(). This is later processed by + * dtrace_dof_create() and turned into a reference into the string table so + * that we can get the type information when we process the data after the + * fact. + */ +static void +dt_action_print(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) +{ + dtrace_actdesc_t *ap = dt_stmt_action(dtp, sdp); + dt_node_t *dret; + size_t len; + dt_module_t *dmp; + + if (dt_node_is_void(dnp->dn_args)) { + dnerror(dnp->dn_args, D_PRINT_VOID, + "print( ) may not be applied to a void expression\n"); + } + + if (dt_node_is_dynamic(dnp->dn_args)) { + dnerror(dnp->dn_args, D_PRINT_DYN, + "print( ) may not be applied to a dynamic expression\n"); + } + + dt_cg(yypcb, dnp->dn_args); + + dret = yypcb->pcb_dret; + dmp = dt_module_lookup_by_ctf(dtp, dret->dn_ctfp); + + len = snprintf(NULL, 0, "%s`%ld", dmp->dm_name, dret->dn_type) + 1; + sdp->dtsd_strdata = dt_alloc(dtp, len); + if (sdp->dtsd_strdata == NULL) + longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); + (void) snprintf(sdp->dtsd_strdata, len, "%s`%ld", dmp->dm_name, + dret->dn_type); + + ap->dtad_difo = dt_as(yypcb); + ap->dtad_kind = DTRACEACT_DIFEXPR; +} + static void dt_action_tracemem(dtrace_hdl_t *dtp, dt_node_t *dnp, dtrace_stmtdesc_t *sdp) { @@ -1135,6 +1181,9 @@ dt_compile_fun(dtrace_hdl_t *dtp, dt_nod case DT_ACT_TRACE: dt_action_trace(dtp, dnp->dn_expr, sdp); break; + case DT_ACT_PRINT: + dt_action_print(dtp, dnp->dn_expr, sdp); + break; case DT_ACT_TRACEMEM: dt_action_tracemem(dtp, dnp->dn_expr, sdp); break; Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c ===
svn commit: r248712 - in head/sys: geom kern sys
Author: kan Date: Tue Mar 26 01:17:06 2013 New Revision: 248712 URL: http://svnweb.freebsd.org/changeset/base/248712 Log: Do not pass unmapped buffers to drivers that cannot handle them In physio, check if device can handle unmapped IO and pass an appropriately mapped buffer to the driver strategy routine. The only driver in the tree that can handle unmapped buffers is one exposed by GEOM, so mark it as such with the new flag in the driver cdevsw structure. This fixes insta-panics on hosts, running dconschat, as /dev/fwmem is an example of the driver that makes use of physio routine, but bypasses the g_down thread, where the buffer gets mapped normally. Discussed with: kib (earlier version) Modified: head/sys/geom/geom_dev.c head/sys/kern/kern_physio.c head/sys/sys/conf.h Modified: head/sys/geom/geom_dev.c == --- head/sys/geom/geom_dev.cMon Mar 25 23:38:01 2013(r248711) +++ head/sys/geom/geom_dev.cTue Mar 26 01:17:06 2013(r248712) @@ -78,7 +78,7 @@ static struct cdevsw g_dev_cdevsw = { .d_ioctl = g_dev_ioctl, .d_strategy = g_dev_strategy, .d_name = "g_dev", - .d_flags = D_DISK | D_TRACKCLOSE, + .d_flags = D_DISK | D_TRACKCLOSE | D_UNMAPPED_IO, }; static g_taste_t g_dev_taste; Modified: head/sys/kern/kern_physio.c == --- head/sys/kern/kern_physio.c Mon Mar 25 23:38:01 2013(r248711) +++ head/sys/kern/kern_physio.c Tue Mar 26 01:17:06 2013(r248712) @@ -91,11 +91,21 @@ physio(struct cdev *dev, struct uio *uio bp->b_blkno = btodb(bp->b_offset); - if (uio->uio_segflg == UIO_USERSPACE) - if (vmapbuf(bp, 0) < 0) { + if (uio->uio_segflg == UIO_USERSPACE) { + struct cdevsw *csw; + int mapped; + + csw = dev->si_devsw; + if (csw != NULL && +(csw->d_flags & D_UNMAPPED_IO) != 0) + mapped = 0; + else + mapped = 1; + if (vmapbuf(bp, mapped) < 0) { error = EFAULT; goto doerror; } + } dev_strategy(dev, bp); if (uio->uio_rw == UIO_READ) Modified: head/sys/sys/conf.h == --- head/sys/sys/conf.h Mon Mar 25 23:38:01 2013(r248711) +++ head/sys/sys/conf.h Tue Mar 26 01:17:06 2013(r248712) @@ -167,6 +167,7 @@ typedef int dumper_t( #defineD_MMAP_ANON 0x0010 /* special treatment in vm_mmap.c */ #defineD_NEEDGIANT 0x0040 /* driver want Giant */ #defineD_NEEDMINOR 0x0080 /* driver uses clone_create() */ +#defineD_UNMAPPED_IO 0x0100 /* d_strategy can accept unmapped IO */ /* * Version numbers. ___ 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: r248713 - head/sys/dev/ath
Author: adrian Date: Tue Mar 26 04:47:40 2013 New Revision: 248713 URL: http://svnweb.freebsd.org/changeset/base/248713 Log: Migrate the multicast queue assembly code to not use the axq_link pointer and instead use the HAL method to set the link pointer. Tested: * AR9280, hostap mode, CABQ frames being queued and transmitted Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c == --- head/sys/dev/ath/if_ath_tx.cTue Mar 26 01:17:06 2013 (r248712) +++ head/sys/dev/ath/if_ath_tx.cTue Mar 26 04:47:40 2013 (r248713) @@ -704,18 +704,20 @@ ath_tx_handoff_mcast(struct ath_softc *s ("%s: busy status 0x%x", __func__, bf->bf_flags)); ATH_TXQ_LOCK(txq); - if (txq->axq_link != NULL) { - struct ath_buf *last = ATH_TXQ_LAST(txq, axq_q_s); + if (ATH_TXQ_LAST(txq, axq_q_s) != NULL) { + struct ath_buf *bf_last = ATH_TXQ_LAST(txq, axq_q_s); struct ieee80211_frame *wh; /* mark previous frame */ - wh = mtod(last->bf_m, struct ieee80211_frame *); + wh = mtod(bf_last->bf_m, struct ieee80211_frame *); wh->i_fc[1] |= IEEE80211_FC1_MORE_DATA; - bus_dmamap_sync(sc->sc_dmat, last->bf_dmamap, + bus_dmamap_sync(sc->sc_dmat, bf_last->bf_dmamap, BUS_DMASYNC_PREWRITE); /* link descriptor */ - *txq->axq_link = bf->bf_daddr; + ath_hal_settxdesclink(sc->sc_ah, + bf_last->bf_lastds, + bf->bf_daddr); } ATH_TXQ_INSERT_TAIL(txq, bf, bf_list); ath_hal_gettxdesclinkptr(sc->sc_ah, bf->bf_lastds, &txq->axq_link); ___ 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: r248714 - head/sys/dev/ath
Author: adrian Date: Tue Mar 26 04:48:58 2013 New Revision: 248714 URL: http://svnweb.freebsd.org/changeset/base/248714 Log: Convert the EDMA multicast queue code over to use the HAL method to set the descriptor link pointer, rather than directly. This is needed on AR9380 and later (ie, EDMA) NICs so the multicast queue has a chance in hell of being put together right. Tested: * AR9380, AR9580 in hostap mode, CABQ traffic (but with other patches..) Modified: head/sys/dev/ath/if_ath_tx_edma.c Modified: head/sys/dev/ath/if_ath_tx_edma.c == --- head/sys/dev/ath/if_ath_tx_edma.c Tue Mar 26 04:47:40 2013 (r248713) +++ head/sys/dev/ath/if_ath_tx_edma.c Tue Mar 26 04:48:58 2013 (r248714) @@ -249,7 +249,7 @@ ath_edma_xmit_handoff_mcast(struct ath_s struct ath_buf *bf) { - ATH_TXQ_LOCK_ASSERT(txq); + ATH_TX_LOCK_ASSERT(sc); KASSERT((bf->bf_flags & ATH_BUF_BUSY) == 0, ("%s: busy status 0x%x", __func__, bf->bf_flags)); @@ -257,7 +257,7 @@ ath_edma_xmit_handoff_mcast(struct ath_s /* * XXX this is mostly duplicated in ath_tx_handoff_mcast(). */ - if (ATH_TXQ_FIRST(txq) != NULL) { + if (ATH_TXQ_LAST(txq, axq_q_s) != NULL) { struct ath_buf *bf_last = ATH_TXQ_LAST(txq, axq_q_s); struct ieee80211_frame *wh; @@ -270,7 +270,9 @@ ath_edma_xmit_handoff_mcast(struct ath_s BUS_DMASYNC_PREWRITE); /* link descriptor */ - *txq->axq_link = bf->bf_daddr; + ath_hal_settxdesclink(sc->sc_ah, + bf_last->bf_lastds, + bf->bf_daddr); } #ifdef ATH_DEBUG_ALQ ___ 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: r248715 - head/sys/dev/ath
Author: adrian Date: Tue Mar 26 04:52:16 2013 New Revision: 248715 URL: http://svnweb.freebsd.org/changeset/base/248715 Log: Convert the CABQ queue code over to use the HAL link pointer method instead of axq_link. This (among a bunch of uncommitted work) is required for EDMA chips to correctly transmit frames on the CABQ. Tested: * AR9280, hostap mode * AR9380/AR9580, hostap mode (staggered beacons) TODO: * This code only really gets called when burst beacons are used; it glues multiple CABQ queues together when sending to the hardware. * More thorough bursted beacon testing! (first requires some work with the beacon queue code for bursted beacons, as that currently uses the link pointer and will fail on EDMA chips.) Modified: head/sys/dev/ath/if_ath_beacon.c Modified: head/sys/dev/ath/if_ath_beacon.c == --- head/sys/dev/ath/if_ath_beacon.cTue Mar 26 04:48:58 2013 (r248714) +++ head/sys/dev/ath/if_ath_beacon.cTue Mar 26 04:52:16 2013 (r248715) @@ -632,7 +632,7 @@ ath_beacon_generate(struct ath_softc *sc /* NB: only at DTIM */ ATH_TXQ_LOCK(&avp->av_mcastq); if (nmcastq) { - struct ath_buf *bfm; + struct ath_buf *bfm, *bfc_last; /* * Move frames from the s/w mcast q to the h/w cab q. @@ -645,16 +645,23 @@ ath_beacon_generate(struct ath_softc *sc * MORE data bit set on the last frame of each * intermediary VAP (ie, only clear the MORE * bit of the last frame on the last vap?) -* -* XXX TODO: once we append this, what happens -* to cabq->axq_link? It'll point at the avp -* mcastq link pointer, so things should be OK. -* Just double-check this is what actually happens. */ bfm = TAILQ_FIRST(&avp->av_mcastq.axq_q); ATH_TXQ_LOCK(cabq); - if (cabq->axq_link != NULL) - *cabq->axq_link = bfm->bf_daddr; + + /* +* If there's already a frame on the CABQ, we +* need to link to the end of the last frame. +* We can't use axq_link here because +* EDMA descriptors require some recalculation +* (checksum) to occur. +*/ + bfc_last = ATH_TXQ_LAST(cabq, axq_q_s); + if (bfc_last != NULL) { + ath_hal_settxdesclink(sc->sc_ah, + bfc_last->bf_lastds, + bfm->bf_daddr); + } ath_txqmove(cabq, &avp->av_mcastq); ATH_TXQ_UNLOCK(cabq); /* ___ 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: r248716 - head/sys/dev/ath
Author: adrian Date: Tue Mar 26 04:53:40 2013 New Revision: 248716 URL: http://svnweb.freebsd.org/changeset/base/248716 Log: Remove this dead code - it's no longer relevant (as yes, we do actually support TX on EDMA chips.) Modified: head/sys/dev/ath/if_ath_tx_edma.c Modified: head/sys/dev/ath/if_ath_tx_edma.c == --- head/sys/dev/ath/if_ath_tx_edma.c Tue Mar 26 04:52:16 2013 (r248715) +++ head/sys/dev/ath/if_ath_tx_edma.c Tue Mar 26 04:53:40 2013 (r248716) @@ -318,14 +318,6 @@ ath_edma_xmit_handoff(struct ath_softc * ath_edma_xmit_handoff_mcast(sc, txq, bf); else ath_edma_xmit_handoff_hw(sc, txq, bf); - -#if 0 - /* -* XXX For now this is a placeholder; free the buffer -* and inform the stack that the TX failed. -*/ - ath_tx_default_comp(sc, bf, 1); -#endif } static int ___ 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: r248717 - head/sys/dev/ath
Author: adrian Date: Tue Mar 26 04:56:54 2013 New Revision: 248717 URL: http://svnweb.freebsd.org/changeset/base/248717 Log: Remove the mcast path calls to ath_hal_gettxdesclinkptr() for axq_link - they're no longer needed for the legacy path and they're not wanted for the EDMA path. Tested: * AR9280, hostap + CABQ * AR9380/AR9580, hostap + CABQ Modified: head/sys/dev/ath/if_ath_tx.c head/sys/dev/ath/if_ath_tx_edma.c Modified: head/sys/dev/ath/if_ath_tx.c == --- head/sys/dev/ath/if_ath_tx.cTue Mar 26 04:53:40 2013 (r248716) +++ head/sys/dev/ath/if_ath_tx.cTue Mar 26 04:56:54 2013 (r248717) @@ -720,7 +720,6 @@ ath_tx_handoff_mcast(struct ath_softc *s bf->bf_daddr); } ATH_TXQ_INSERT_TAIL(txq, bf, bf_list); - ath_hal_gettxdesclinkptr(sc->sc_ah, bf->bf_lastds, &txq->axq_link); ATH_TXQ_UNLOCK(txq); } Modified: head/sys/dev/ath/if_ath_tx_edma.c == --- head/sys/dev/ath/if_ath_tx_edma.c Tue Mar 26 04:53:40 2013 (r248716) +++ head/sys/dev/ath/if_ath_tx_edma.c Tue Mar 26 04:56:54 2013 (r248717) @@ -279,9 +279,7 @@ ath_edma_xmit_handoff_mcast(struct ath_s if (if_ath_alq_checkdebug(&sc->sc_alq, ATH_ALQ_EDMA_TXDESC)) ath_tx_alq_post(sc, bf); #endif /* ATH_DEBUG_ALQ */ - ATH_TXQ_INSERT_TAIL(txq, bf, bf_list); - ath_hal_gettxdesclinkptr(sc->sc_ah, bf->bf_lastds, &txq->axq_link); ATH_TXQ_UNLOCK(txq); } ___ 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: r248720 - in head/sys/geom: gate nop raid
Author: mav Date: Tue Mar 26 05:42:12 2013 New Revision: 248720 URL: http://svnweb.freebsd.org/changeset/base/248720 Log: Remove extra bio_data and bio_length copying to child request after calling g_clone_bio(), that already copied them. Modified: head/sys/geom/gate/g_gate.c head/sys/geom/nop/g_nop.c head/sys/geom/raid/tr_raid1e.c Modified: head/sys/geom/gate/g_gate.c == --- head/sys/geom/gate/g_gate.c Tue Mar 26 05:31:08 2013(r248719) +++ head/sys/geom/gate/g_gate.c Tue Mar 26 05:42:12 2013(r248720) @@ -245,8 +245,6 @@ g_gate_start(struct bio *pbp) } cbp->bio_done = g_gate_done; cbp->bio_offset = pbp->bio_offset + sc->sc_readoffset; - cbp->bio_data = pbp->bio_data; - cbp->bio_length = pbp->bio_length; cbp->bio_to = sc->sc_readcons->provider; g_io_request(cbp, sc->sc_readcons); return; Modified: head/sys/geom/nop/g_nop.c == --- head/sys/geom/nop/g_nop.c Tue Mar 26 05:31:08 2013(r248719) +++ head/sys/geom/nop/g_nop.c Tue Mar 26 05:42:12 2013(r248720) @@ -136,8 +136,6 @@ g_nop_start(struct bio *bp) } cbp->bio_done = g_std_done; cbp->bio_offset = bp->bio_offset + sc->sc_offset; - cbp->bio_data = bp->bio_data; - cbp->bio_length = bp->bio_length; pp = LIST_FIRST(&gp->provider); KASSERT(pp != NULL, ("NULL pp")); cbp->bio_to = pp; Modified: head/sys/geom/raid/tr_raid1e.c == --- head/sys/geom/raid/tr_raid1e.c Tue Mar 26 05:31:08 2013 (r248719) +++ head/sys/geom/raid/tr_raid1e.c Tue Mar 26 05:42:12 2013 (r248720) @@ -1076,8 +1076,6 @@ rebuild_round_done: offset += vol->v_strip_size; } cbp->bio_offset = offset + start; - cbp->bio_length = bp->bio_length; - cbp->bio_data = bp->bio_data; cbp->bio_cmd = BIO_WRITE; cbp->bio_cflags = G_RAID_BIO_FLAG_REMAP; cbp->bio_caller2 = (void *)mask; ___ 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: r248721 - head/sys/geom/nop
Author: mav Date: Tue Mar 26 05:58:49 2013 New Revision: 248721 URL: http://svnweb.freebsd.org/changeset/base/248721 Log: GEOM NOP does not touch the data, so pass G_PF_ACCEPT_UNMAPPED flag through. Modified: head/sys/geom/nop/g_nop.c Modified: head/sys/geom/nop/g_nop.c == --- head/sys/geom/nop/g_nop.c Tue Mar 26 05:42:12 2013(r248720) +++ head/sys/geom/nop/g_nop.c Tue Mar 26 05:58:49 2013(r248721) @@ -242,6 +242,7 @@ g_nop_create(struct gctl_req *req, struc goto fail; } + newpp->flags |= pp->flags & G_PF_ACCEPT_UNMAPPED; g_error_provider(newpp, 0); G_NOP_DEBUG(0, "Device %s created.", gp->name); 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"