svn commit: r344960 - head/sys/powerpc/powerpc
Author: jhibbits Date: Sat Mar 9 03:18:37 2019 New Revision: 344960 URL: https://svnweb.freebsd.org/changeset/base/344960 Log: powerpc: Print trap frame address for fatal traps MFC after:1 week Modified: head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/powerpc/trap.c == --- head/sys/powerpc/powerpc/trap.c Sat Mar 9 03:15:09 2019 (r344959) +++ head/sys/powerpc/powerpc/trap.c Sat Mar 9 03:18:37 2019 (r344960) @@ -546,6 +546,7 @@ printtrap(u_int vector, struct trapframe *frame, int i printf(" current msr = 0x%" PRIxPTR "\n", mfmsr()); printf(" lr = 0x%" PRIxPTR " (0x%" PRIxPTR ")\n", frame->lr, frame->lr - (register_t)(__startkernel - KERNBASE)); + printf(" frame = %p\n", frame); printf(" curthread = %p\n", curthread); if (curthread != NULL) printf(" pid = %d, comm = %s\n", ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r344958 - head/sys/powerpc/powerpc
Author: jhibbits Date: Sat Mar 9 03:10:56 2019 New Revision: 344958 URL: https://svnweb.freebsd.org/changeset/base/344958 Log: powerpc: Print data address register on alignment exceptions MFC after:1 week Modified: head/sys/powerpc/powerpc/trap.c Modified: head/sys/powerpc/powerpc/trap.c == --- head/sys/powerpc/powerpc/trap.c Sat Mar 9 02:03:07 2019 (r344957) +++ head/sys/powerpc/powerpc/trap.c Sat Mar 9 03:10:56 2019 (r344958) @@ -528,6 +528,7 @@ printtrap(u_int vector, struct trapframe *frame, int i case EXC_DSE: case EXC_DSI: case EXC_DTMISS: + case EXC_ALI: printf(" virtual address = 0x%" PRIxPTR "\n", frame->dar); break; case EXC_ISE: ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r344961 - head/sys/powerpc/powerpc
Author: jhibbits Date: Sat Mar 9 03:24:39 2019 New Revision: 344961 URL: https://svnweb.freebsd.org/changeset/base/344961 Log: powerpc: Print trap frame address in ddb backtraces Registers visible from 'show reg' don't always match the registers from the offending trap frame. Knowing the frame address lets one examine the registers manually. MFC after:1 week Modified: head/sys/powerpc/powerpc/db_trace.c Modified: head/sys/powerpc/powerpc/db_trace.c == --- head/sys/powerpc/powerpc/db_trace.c Sat Mar 9 03:18:37 2019 (r344960) +++ head/sys/powerpc/powerpc/db_trace.c Sat Mar 9 03:24:39 2019 (r344961) @@ -277,7 +277,7 @@ db_backtrace(struct thread *td, db_addr_t fp, int coun if (tf->exc == EXC_DSI) db_printf(" sr=%#x", (uint32_t)tf->cpu.aim.dsisr); - db_printf("\n"); + db_printf(" frame=%p\n", tf); stackframe = (db_addr_t) tf->fixreg[1]; if (kernel_only && (tf->srr1 & PSL_PR)) break; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r344957 - head/usr.bin/mkimg/tests
Author: marcel Date: Sat Mar 9 02:03:07 2019 New Revision: 344957 URL: https://svnweb.freebsd.org/changeset/base/344957 Log: Don't compress and uuencode the "hexdump -C" output files. Just save them with the $FreeBSD$ tag prepended. Changes to these files are now a lot easier to comprehend, which makes diffs also reviewable. Added: head/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-apm.qcow2.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-apm.raw.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhd.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-apm.vhdf.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-apm.vmdk.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-bsd.qcow.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-bsd.qcow2.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-bsd.raw.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhd.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vhdf.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-bsd.vmdk.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-ebr.qcow.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-ebr.qcow2.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-ebr.raw.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhd.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vhdf.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-ebr.vmdk.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-gpt.qcow2.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-gpt.raw.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhd.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vhdf.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-gpt.vmdk.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-mbr.qcow.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-mbr.qcow2.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-mbr.raw.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhd.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vhdf.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-mbr.vmdk.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.qcow2.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.raw.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhd.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vhdf.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-4096-vtoc8.vmdk.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-apm.qcow.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-apm.qcow2.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-apm.raw.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-apm.vhd.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-apm.vhdf.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-apm.vmdk.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-bsd.qcow.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-bsd.qcow2.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-bsd.raw.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhd.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-bsd.vhdf.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-bsd.vmdk.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-ebr.qcow.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-ebr.qcow2.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-ebr.raw.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-ebr.vhd.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-ebr.vhdf.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-ebr.vmdk.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-gpt.qcow2.hex (contents, props changed) head/usr.bin/mkimg/tests/img-1x1-512-gpt.raw.hex (contents, props changed)
svn commit: r344956 - head/sys/sys
Author: bz Date: Sat Mar 9 01:37:00 2019 New Revision: 344956 URL: https://svnweb.freebsd.org/changeset/base/344956 Log: Try to improve comment for socket state bits. In r324227 the comment moved into socketvar.h originally from sockstate.h r180948. Try to improve English and as a consequence rewrap the comment. No functional changes. Reviewed by: jhb (a wording suggestion) Differential Revision:https://reviews.freebsd.org/D13865 Modified: head/sys/sys/socketvar.h Modified: head/sys/sys/socketvar.h == --- head/sys/sys/socketvar.hSat Mar 9 01:18:16 2019(r344955) +++ head/sys/sys/socketvar.hSat Mar 9 01:37:00 2019(r344956) @@ -180,13 +180,13 @@ struct socket { /* * Socket state bits. * - * Historically, this bits were all kept in the so_state field. For - * locking reasons, they are now in multiple fields, as they are - * locked differently. so_state maintains basic socket state protected - * by the socket lock. so_qstate holds information about the socket - * accept queues. Each socket buffer also has a state field holding - * information relevant to that socket buffer (can't send, rcv). Many - * fields will be read without locks to improve performance and avoid + * Historically, these bits were all kept in the so_state field. + * They are now split into separate, lock-specific fields. + * so_state maintains basic socket state protected by the socket lock. + * so_qstate holds information about the socket accept queues. + * Each socket buffer also has a state field holding information + * relevant to that socket buffer (can't send, rcv). + * Many fields will be read without locks to improve performance and avoid * lock order issues. However, this approach must be used with caution. */ #defineSS_NOFDREF 0x0001 /* no file table ref any more */ ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r344954 - in head: sys/net sys/netinet usr.bin/netstat
Author: bz Date: Sat Mar 9 01:12:59 2019 New Revision: 344954 URL: https://svnweb.freebsd.org/changeset/base/344954 Log: Improve ARP logging. r344504 added an extra ARP_LOG() call in case of an if_output() failure. It turns out IPv4 can be noisy. In order to not spam the console by default: (a) add a counter for these events so people can keep better track of how often it happens, and (b) add a sysctl to select the default ARP_LOG log level and set it to INFO avoiding the one (the new) DEBUG level by default. Claim a spare (1st one after 10 years since the stats were added) in order to not break netstat from FreeBSD 12->13 updates in the future. Reviewed by: karels Differential Revision:https://reviews.freebsd.org/D19490 Modified: head/sys/net/if_arp.h head/sys/netinet/if_ether.c head/usr.bin/netstat/inet.c Modified: head/sys/net/if_arp.h == --- head/sys/net/if_arp.h Sat Mar 9 00:32:00 2019(r344953) +++ head/sys/net/if_arp.h Sat Mar 9 01:12:59 2019(r344954) @@ -105,8 +105,9 @@ struct arpstat { uint64_t rxrequests;/* # of ARP requests received by this host. */ uint64_t rxreplies; /* # of ARP replies received by this host. */ uint64_t received; /* # of ARP packets received by this host. */ + uint64_t txerrors; /* # of ARP requests failed to send. */ - uint64_t arp_spares[4]; /* For either the upper or lower half. */ + uint64_t arp_spares[3]; /* For either the upper or lower half. */ /* Abnormal event and error counting: */ uint64_t dropped; /* # of packets dropped waiting for a reply. */ uint64_t timeouts; /* # of times with entries removed */ Modified: head/sys/netinet/if_ether.c == --- head/sys/netinet/if_ether.c Sat Mar 9 00:32:00 2019(r344953) +++ head/sys/netinet/if_ether.c Sat Mar 9 01:12:59 2019(r344954) @@ -161,8 +161,15 @@ SYSCTL_PROC(_net_link_ether_inet, OID_AUTO, garp_rexmi "Number of times to retransmit GARP packets;" " 0 to disable, maximum of 16"); +VNET_DEFINE_STATIC(int, arp_log_level) = LOG_INFO; /* Min. log(9) level. */ +#defineV_arp_log_level VNET(arp_log_level) +SYSCTL_INT(_net_link_ether_arp, OID_AUTO, log_level, CTLFLAG_VNET | CTLFLAG_RW, + _NAME(arp_log_level), 0, + "Minimum log(9) level for recording rate limited arp log messages. " + "The higher will be log more (emerg=0, info=6 (default), debug=7)."); #defineARP_LOG(pri, ...) do { \ - if (ppsratecheck(_lastlog, _curpps, arp_maxpps))\ + if ((pri) <= V_arp_log_level && \ + ppsratecheck(_lastlog, _curpps, arp_maxpps))\ log((pri), "arp: " __VA_ARGS__);\ } while (0) @@ -428,9 +435,11 @@ arprequest_internal(struct ifnet *ifp, const struct in m_clrprotoflags(m); /* Avoid confusing lower layers. */ error = (*ifp->if_output)(ifp, m, , ); ARPSTAT_INC(txrequests); - if (error) + if (error) { + ARPSTAT_INC(txerrors); ARP_LOG(LOG_DEBUG, "Failed to send ARP packet on %s: %d\n", if_name(ifp), error); + } return (error); } Modified: head/usr.bin/netstat/inet.c == --- head/usr.bin/netstat/inet.c Sat Mar 9 00:32:00 2019(r344953) +++ head/usr.bin/netstat/inet.c Sat Mar 9 01:12:59 2019(r344954) @@ -1044,6 +1044,7 @@ arp_stats(u_long off, const char *name, int af1 __unus xo_emit("\t" m, (uintmax_t)arpstat.f, pluralies(arpstat.f)) p(txrequests, "{:sent-requests/%ju} {N:/ARP request%s sent}\n"); + p(txerrors, "{:sent-failures/%ju} {N:/ARP request%s failed to sent}\n"); p2(txreplies, "{:sent-replies/%ju} {N:/ARP repl%s sent}\n"); p(rxrequests, "{:received-requests/%ju} " "{N:/ARP request%s received}\n"); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r344955 - head/sys/dev/nvme
Author: imp Date: Sat Mar 9 01:18:16 2019 New Revision: 344955 URL: https://svnweb.freebsd.org/changeset/base/344955 Log: Don't print all the I/O we abort on a reset, unless we're out of retries. When resetting the controller, we abort I/O. Prior to this fix, we printed a ton of abort messages for I/O that we're going to retry. This imparts no useful information. Stop printing them unless our retry count is exhausted. Clarify code for when we don't retry, and remove useless arg to a routine that's always called with it as 'true'. All the other debug is still printed (including multiple reset messages if we have multiple timeouts before the taskqueue runs the actual reset) so that we know when we reset. Reviewed by: jimharris@, chuck@ Differential Revision: https://reviews.freebsd.org/D19431 Modified: head/sys/dev/nvme/nvme_ctrlr.c head/sys/dev/nvme/nvme_private.h head/sys/dev/nvme/nvme_qpair.c Modified: head/sys/dev/nvme/nvme_ctrlr.c == --- head/sys/dev/nvme/nvme_ctrlr.c Sat Mar 9 01:12:59 2019 (r344954) +++ head/sys/dev/nvme/nvme_ctrlr.c Sat Mar 9 01:18:16 2019 (r344955) @@ -237,7 +237,7 @@ nvme_ctrlr_fail_req_task(void *arg, int pending) STAILQ_REMOVE_HEAD(>fail_req, stailq); mtx_unlock(>lock); nvme_qpair_manual_complete_request(req->qpair, req, - NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST, TRUE); + NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST); mtx_lock(>lock); } mtx_unlock(>lock); Modified: head/sys/dev/nvme/nvme_private.h == --- head/sys/dev/nvme/nvme_private.hSat Mar 9 01:12:59 2019 (r344954) +++ head/sys/dev/nvme/nvme_private.hSat Mar 9 01:18:16 2019 (r344955) @@ -417,8 +417,7 @@ voidnvme_qpair_reset(struct nvme_qpair *qpair); void nvme_qpair_fail(struct nvme_qpair *qpair); void nvme_qpair_manual_complete_request(struct nvme_qpair *qpair, struct nvme_request *req, - uint32_t sct, uint32_t sc, - boolean_t print_on_error); + uint32_t sct, uint32_t sc); void nvme_admin_qpair_enable(struct nvme_qpair *qpair); void nvme_admin_qpair_disable(struct nvme_qpair *qpair); Modified: head/sys/dev/nvme/nvme_qpair.c == --- head/sys/dev/nvme/nvme_qpair.c Sat Mar 9 01:12:59 2019 (r344954) +++ head/sys/dev/nvme/nvme_qpair.c Sat Mar 9 01:18:16 2019 (r344955) @@ -36,6 +36,9 @@ __FBSDID("$FreeBSD$"); #include "nvme_private.h" +typedef enum error_print { ERROR_PRINT_NONE, ERROR_PRINT_NO_RETRY, ERROR_PRINT_ALL } error_print_t; +#define DO_NOT_RETRY 1 + static void_nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req); static voidnvme_qpair_destroy(struct nvme_qpair *qpair); @@ -325,7 +328,7 @@ nvme_completion_is_retry(const struct nvme_completion sct = NVME_STATUS_GET_SCT(cpl->status); sc = NVME_STATUS_GET_SC(cpl->status); - dnr = NVME_STATUS_GET_DNR(cpl->status); + dnr = NVME_STATUS_GET_DNR(cpl->status); /* Do Not Retry Bit */ /* * TODO: spec is not clear how commands that are aborted due @@ -369,7 +372,7 @@ nvme_completion_is_retry(const struct nvme_completion static void nvme_qpair_complete_tracker(struct nvme_qpair *qpair, struct nvme_tracker *tr, -struct nvme_completion *cpl, boolean_t print_on_error) +struct nvme_completion *cpl, error_print_t print_on_error) { struct nvme_request *req; boolean_t retry, error; @@ -379,7 +382,8 @@ nvme_qpair_complete_tracker(struct nvme_qpair *qpair, retry = error && nvme_completion_is_retry(cpl) && req->retries < nvme_retry_count; - if (error && print_on_error) { + if (error && (print_on_error == ERROR_PRINT_ALL || + (!retry && print_on_error == ERROR_PRINT_NO_RETRY))) { nvme_qpair_print_command(qpair, >cmd); nvme_qpair_print_completion(qpair, cpl); } @@ -431,7 +435,7 @@ nvme_qpair_complete_tracker(struct nvme_qpair *qpair, static void nvme_qpair_manual_complete_tracker(struct nvme_qpair *qpair, struct nvme_tracker *tr, uint32_t sct, uint32_t sc, uint32_t dnr, -boolean_t print_on_error) +error_print_t print_on_error) { struct nvme_completion cpl; @@ -446,8 +450,7 @@ nvme_qpair_manual_complete_tracker(struct nvme_qpair * void nvme_qpair_manual_complete_request(struct nvme_qpair *qpair, -struct nvme_request *req, uint32_t sct, uint32_t
svn commit: r344952 - head/bin/chmod
Author: gordon Date: Sat Mar 9 00:30:13 2019 New Revision: 344952 URL: https://svnweb.freebsd.org/changeset/base/344952 Log: Correct wording around '-' masks. PR: 236407 Reported by: Brian Saia MFC after:1 week Modified: head/bin/chmod/chmod.1 Modified: head/bin/chmod/chmod.1 == --- head/bin/chmod/chmod.1 Sat Mar 9 00:27:50 2019(r344951) +++ head/bin/chmod/chmod.1 Sat Mar 9 00:30:13 2019(r344952) @@ -259,7 +259,7 @@ If no value is supplied for each permission bit specified in .Ar perm , for which the corresponding bit in the file mode creation mask -is clear, is cleared. +is set, is cleared. Otherwise, the mode bits represented by the specified .Ar who and ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r344951 - in head: contrib/llvm/include/llvm/IR contrib/llvm/tools/clang/include/clang/Driver lib/clang/include/clang/Basic lib/clang/include/lld/Common lib/clang/include/llvm/Support
Author: dim Date: Sat Mar 9 00:27:50 2019 New Revision: 344951 URL: https://svnweb.freebsd.org/changeset/base/344951 Log: Merge llvm, clang, compiler-rt, libc++, lld, and lldb release_80 branch r355677 (effectively, 8.0.0 rc4), resolve conflicts, and bump version numbers. PR: 236062 MFC after:1 month X-MFC-With: r344779 Modified: head/contrib/llvm/include/llvm/IR/IntrinsicsX86.td head/contrib/llvm/tools/clang/include/clang/Driver/CLCompatOptions.td head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/lld/Common/Version.inc head/lib/clang/include/llvm/Support/VCSRevision.h Directory Properties: head/contrib/compiler-rt/ (props changed) head/contrib/compiler-rt/lib/fuzzer/ (props changed) head/contrib/libc++/ (props changed) head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) head/contrib/llvm/tools/lld/ (props changed) head/contrib/llvm/tools/lldb/ (props changed) Modified: head/contrib/llvm/include/llvm/IR/IntrinsicsX86.td == --- head/contrib/llvm/include/llvm/IR/IntrinsicsX86.td Fri Mar 8 23:07:51 2019(r344950) +++ head/contrib/llvm/include/llvm/IR/IntrinsicsX86.td Sat Mar 9 00:27:50 2019(r344951) @@ -1677,71 +1677,73 @@ let TargetPrefix = "x86" in { // All intrinsics start // Gather ops let TargetPrefix = "x86" in { // All intrinsics start with "llvm.x86.". + // NOTE: These can't be ArgMemOnly because you can put the address completely + // in the index register. def int_x86_avx2_gather_d_pd : GCCBuiltin<"__builtin_ia32_gatherd_pd">, Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v2f64_ty, llvm_i8_ty], -[IntrReadMem, IntrArgMemOnly]>; +[IntrReadMem]>; def int_x86_avx2_gather_d_pd_256 : GCCBuiltin<"__builtin_ia32_gatherd_pd256">, Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4f64_ty, llvm_i8_ty], -[IntrReadMem, IntrArgMemOnly]>; +[IntrReadMem]>; def int_x86_avx2_gather_q_pd : GCCBuiltin<"__builtin_ia32_gatherq_pd">, Intrinsic<[llvm_v2f64_ty], [llvm_v2f64_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v2f64_ty, llvm_i8_ty], -[IntrReadMem, IntrArgMemOnly]>; +[IntrReadMem]>; def int_x86_avx2_gather_q_pd_256 : GCCBuiltin<"__builtin_ia32_gatherq_pd256">, Intrinsic<[llvm_v4f64_ty], [llvm_v4f64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4f64_ty, llvm_i8_ty], -[IntrReadMem, IntrArgMemOnly]>; +[IntrReadMem]>; def int_x86_avx2_gather_d_ps : GCCBuiltin<"__builtin_ia32_gatherd_ps">, Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4f32_ty, llvm_i8_ty], -[IntrReadMem, IntrArgMemOnly]>; +[IntrReadMem]>; def int_x86_avx2_gather_d_ps_256 : GCCBuiltin<"__builtin_ia32_gatherd_ps256">, Intrinsic<[llvm_v8f32_ty], [llvm_v8f32_ty, llvm_ptr_ty, llvm_v8i32_ty, llvm_v8f32_ty, llvm_i8_ty], -[IntrReadMem, IntrArgMemOnly]>; +[IntrReadMem]>; def int_x86_avx2_gather_q_ps : GCCBuiltin<"__builtin_ia32_gatherq_ps">, Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v4f32_ty, llvm_i8_ty], -[IntrReadMem, IntrArgMemOnly]>; +[IntrReadMem]>; def int_x86_avx2_gather_q_ps_256 : GCCBuiltin<"__builtin_ia32_gatherq_ps256">, Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4f32_ty, llvm_i8_ty], -[IntrReadMem, IntrArgMemOnly]>; +[IntrReadMem]>; def int_x86_avx2_gather_d_q : GCCBuiltin<"__builtin_ia32_gatherd_q">, Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v2i64_ty, llvm_i8_ty], -[IntrReadMem, IntrArgMemOnly]>; +[IntrReadMem]>; def int_x86_avx2_gather_d_q_256 : GCCBuiltin<"__builtin_ia32_gatherd_q256">, Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4i64_ty, llvm_i8_ty], -[IntrReadMem, IntrArgMemOnly]>; +[IntrReadMem]>; def int_x86_avx2_gather_q_q : GCCBuiltin<"__builtin_ia32_gatherq_q">, Intrinsic<[llvm_v2i64_ty], [llvm_v2i64_ty, llvm_ptr_ty, llvm_v2i64_ty, llvm_v2i64_ty, llvm_i8_ty], -[IntrReadMem, IntrArgMemOnly]>; +[IntrReadMem]>; def int_x86_avx2_gather_q_q_256 : GCCBuiltin<"__builtin_ia32_gatherq_q256">, Intrinsic<[llvm_v4i64_ty], [llvm_v4i64_ty, llvm_ptr_ty, llvm_v4i64_ty, llvm_v4i64_ty, llvm_i8_ty], -[IntrReadMem, IntrArgMemOnly]>; +[IntrReadMem]>; def int_x86_avx2_gather_d_d : GCCBuiltin<"__builtin_ia32_gatherd_d">, Intrinsic<[llvm_v4i32_ty], [llvm_v4i32_ty, llvm_ptr_ty, llvm_v4i32_ty, llvm_v4i32_ty, llvm_i8_ty], -[IntrReadMem, IntrArgMemOnly]>; +[IntrReadMem]>; def
svn commit: r344936 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys
Author: mav Date: Fri Mar 8 21:13:45 2019 New Revision: 344936 URL: https://svnweb.freebsd.org/changeset/base/344936 Log: MFV/ZoL: Disable LBA weighting on files and SSDs The LBA weighting makes sense on rotational media where the outer tracks have twice the bandwidth of the inner tracks. However, it is detrimental on nonrotational media such as solid state disks, where the only effect is to ensure that metaslabs enter the best-fit allocation behavior sooner, which is detrimental to performance. It also makes no sense on files where the underlying filesystem can arrange things however it wants. Author: Richard Yao Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #3712 zfsonlinux/zfs@fb40095f5f0853946f8150481ca22602d1334dfe To reduce code divergence this merge replaces equivalent but different FreeBSD code detecting non-rotating medium vdevs. MFC after:1 month Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri Mar 8 21:07:08 2019(r344935) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri Mar 8 21:13:45 2019(r344936) @@ -1830,7 +1830,7 @@ metaslab_space_weight(metaslab_t *msp) * In effect, this means that we'll select the metaslab with the most * free bandwidth rather than simply the one with the most free space. */ - if (metaslab_lba_weighting_enabled) { + if (!vd->vdev_nonrot && metaslab_lba_weighting_enabled) { weight = 2 * weight - (msp->ms_id * weight) / vd->vdev_ms_count; ASSERT(weight >= space && weight <= 2 * space); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Fri Mar 8 21:07:08 2019(r344935) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Fri Mar 8 21:13:45 2019(r344936) @@ -235,6 +235,7 @@ struct vdev { vdev_stat_t vdev_stat; /* virtual device statistics*/ boolean_t vdev_expanding; /* expand the vdev? */ boolean_t vdev_reopening; /* reopen in progress? */ + boolean_t vdev_nonrot;/* true if solid state */ int vdev_open_error; /* error on last open */ kthread_t *vdev_open_thread; /* thread opening children */ uint64_tvdev_crtxg; /* txg when top-level was added */ @@ -372,9 +373,6 @@ struct vdev { zio_t *vdev_probe_zio; /* root of current probe */ vdev_aux_t vdev_label_aux; /* on-disk aux state*/ struct trim_map *vdev_trimmap; /* map on outstanding trims */ - uint16_tvdev_rotation_rate; /* rotational rate of the media */ -#defineVDEV_RATE_UNKNOWN 0 -#defineVDEV_RATE_NON_ROTATING 1 uint64_tvdev_leaf_zap; /* Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fri Mar 8 21:07:08 2019(r344935) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fri Mar 8 21:13:45 2019(r344936) @@ -1476,15 +1476,19 @@ vdev_open_children(vdev_t *vd) taskq_t *tq; int children = vd->vdev_children; + vd->vdev_nonrot = B_TRUE; + /* * in order to handle pools on top of zvols, do the opens * in a single thread so that the same thread holds the * spa_namespace_lock */ if (B_TRUE || vdev_uses_zvols(vd)) { - for (int c = 0; c < children; c++) + for (int c = 0; c < children; c++) { vd->vdev_child[c]->vdev_open_error = vdev_open(vd->vdev_child[c]); + vd->vdev_nonrot &= vd->vdev_child[c]->vdev_nonrot; + } return; } tq = taskq_create("vdev_open", children, minclsyspri, @@ -1495,6 +1499,9 @@ vdev_open_children(vdev_t *vd) TQ_SLEEP) != 0); taskq_destroy(tq); +
svn commit: r344935 - in head: contrib/netbsd-tests/lib/libpthread lib/libthr/thread
Author: markj Date: Fri Mar 8 21:07:08 2019 New Revision: 344935 URL: https://svnweb.freebsd.org/changeset/base/344935 Log: Have pthread_cond_destroy() return EBUSY if the condvar has waiters. This is not required of a compliant implementation, but it's easy to check for and helps improve compatibility with other common implementations. Moreover, it's consistent with our pthread_mutex_destroy(). PR: 234805 Reviewed by: jhb, kib, ngie MFC after:2 weeks Sponsored by: The FreeBSD Foundation Differential Revision:https://reviews.freebsd.org/D19496 Modified: head/contrib/netbsd-tests/lib/libpthread/t_cond.c head/lib/libthr/thread/thr_cond.c Modified: head/contrib/netbsd-tests/lib/libpthread/t_cond.c == --- head/contrib/netbsd-tests/lib/libpthread/t_cond.c Fri Mar 8 19:38:52 2019(r344934) +++ head/contrib/netbsd-tests/lib/libpthread/t_cond.c Fri Mar 8 21:07:08 2019(r344935) @@ -493,6 +493,51 @@ ATF_TC_BODY(bogus_timedwaits, tc) PTHREAD_REQUIRE(pthread_mutex_unlock(_mutex)); } +#ifdef __FreeBSD__ +static void * +destroy_busy_threadfunc(void *arg) +{ + PTHREAD_REQUIRE(pthread_mutex_lock()); + + share = 1; + PTHREAD_REQUIRE(pthread_cond_broadcast()); + PTHREAD_REQUIRE(pthread_cond_wait(, )); + + PTHREAD_REQUIRE(pthread_mutex_unlock()); + + return NULL; +} + +ATF_TC(destroy_busy); +ATF_TC_HEAD(destroy_busy, tc) +{ + atf_tc_set_md_var(tc, "descr", "Checks non-standard behaviour of " + "returning EBUSY when attempting to destroy an active condvar"); +} +ATF_TC_BODY(destroy_busy, tc) +{ + pthread_t thread; + + PTHREAD_REQUIRE(pthread_mutex_init(, NULL)); + PTHREAD_REQUIRE(pthread_cond_init(, NULL)); + PTHREAD_REQUIRE(pthread_mutex_lock()); + PTHREAD_REQUIRE(pthread_create(, NULL, destroy_busy_threadfunc, + NULL)); + + while (share == 0) { + PTHREAD_REQUIRE(pthread_cond_wait(, )); + } + + PTHREAD_REQUIRE_STATUS(pthread_cond_destroy(), EBUSY); + PTHREAD_REQUIRE(pthread_cond_signal()); + PTHREAD_REQUIRE(pthread_cond_destroy()); + + PTHREAD_REQUIRE(pthread_mutex_unlock()); + PTHREAD_REQUIRE(pthread_join(thread, NULL)); + PTHREAD_REQUIRE(pthread_mutex_destroy()); +} +#endif + static void unlock(void *arg) { @@ -547,6 +592,49 @@ ATF_TC_BODY(destroy_after_cancel, tc) PTHREAD_REQUIRE(pthread_mutex_destroy()); } +static void * +destroy_after_signal_threadfunc(void *arg) +{ + PTHREAD_REQUIRE(pthread_mutex_lock()); + + share = 1; + PTHREAD_REQUIRE(pthread_cond_broadcast()); + PTHREAD_REQUIRE(pthread_cond_wait(, )); + + PTHREAD_REQUIRE(pthread_mutex_unlock()); + + return NULL; +} + +ATF_TC(destroy_after_signal); +ATF_TC_HEAD(destroy_after_signal, tc) +{ + atf_tc_set_md_var(tc, "descr", "Checks destroying a condition variable " + "immediately after signaling waiters"); +} +ATF_TC_BODY(destroy_after_signal, tc) +{ + pthread_t thread; + + PTHREAD_REQUIRE(pthread_mutex_init(, NULL)); + PTHREAD_REQUIRE(pthread_cond_init(, NULL)); + PTHREAD_REQUIRE(pthread_mutex_lock()); + PTHREAD_REQUIRE(pthread_create(, NULL, + destroy_after_signal_threadfunc, NULL)); + + while (share == 0) { + PTHREAD_REQUIRE(pthread_cond_wait(, )); + } + + PTHREAD_REQUIRE(pthread_cond_signal()); + PTHREAD_REQUIRE(pthread_cond_destroy()); + PTHREAD_REQUIRE(pthread_mutex_unlock()); + + PTHREAD_REQUIRE(pthread_join(thread, NULL)); + + PTHREAD_REQUIRE(pthread_mutex_destroy()); +} + ATF_TC(condattr); ATF_TC_HEAD(condattr, tc) { @@ -577,7 +665,11 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, cond_timedwait_race); ATF_TP_ADD_TC(tp, broadcast); ATF_TP_ADD_TC(tp, bogus_timedwaits); +#ifdef __FreeBSD__ + ATF_TP_ADD_TC(tp, destroy_busy); +#endif ATF_TP_ADD_TC(tp, destroy_after_cancel); + ATF_TP_ADD_TC(tp, destroy_after_signal); ATF_TP_ADD_TC(tp, condattr); return atf_no_error(); Modified: head/lib/libthr/thread/thr_cond.c == --- head/lib/libthr/thread/thr_cond.c Fri Mar 8 19:38:52 2019 (r344934) +++ head/lib/libthr/thread/thr_cond.c Fri Mar 8 21:07:08 2019 (r344935) @@ -166,17 +166,26 @@ _pthread_cond_destroy(pthread_cond_t *cond) error = 0; if (*cond == THR_PSHARED_PTR) { cvp = __thr_pshared_offpage(cond, 0); - if (cvp != NULL) - __thr_pshared_destroy(cond); - *cond = THR_COND_DESTROYED; + if (cvp != NULL) { + if (cvp->kcond.c_has_waiters) + error = EBUSY; + else +
svn commit: r344934 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Fri Mar 8 19:38:52 2019 New Revision: 344934 URL: https://svnweb.freebsd.org/changeset/base/344934 Log: Add separate aggregation limit for non-rotating media. Before sequential scrub patches ZFS never aggregated I/Os above 128KB. Sequential scrub bumped that to 1MB, which motivation I understand for spinning disks, since it should reduce number of head seeks. But for SSDs it makes much less sense to me, especially on FreeBSD, where due to MAXPHYS limitation device will likely still see bunch of 128KB I/Os instead of one large. Having more strict aggregation limit allows to avoid allocation of large memory buffer and memcpy to/from it, that is a serious problem when bandwidth reaches few GB/s. MFC after:1 month Sponsored by: iXsystems, Inc. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.cFri Mar 8 19:20:46 2019(r344933) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.cFri Mar 8 19:38:52 2019(r344934) @@ -178,6 +178,7 @@ int zfs_vdev_async_write_active_max_dirty_percent = 60 * they aren't able to help us aggregate at this level. */ int zfs_vdev_aggregation_limit = 1 << 20; +int zfs_vdev_aggregation_limit_non_rotating = SPA_OLD_MAXBLOCKSIZE; int zfs_vdev_read_gap_limit = 32 << 10; int zfs_vdev_write_gap_limit = 4 << 10; @@ -262,6 +263,9 @@ ZFS_VDEV_QUEUE_KNOB_MAX(initializing); SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, aggregation_limit, CTLFLAG_RWTUN, _vdev_aggregation_limit, 0, "I/O requests are aggregated up to this size"); +SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, aggregation_limit_non_rotating, CTLFLAG_RWTUN, +_vdev_aggregation_limit_non_rotating, 0, +"I/O requests are aggregated up to this size for non-rotating media"); SYSCTL_INT(_vfs_zfs_vdev, OID_AUTO, read_gap_limit, CTLFLAG_RWTUN, _vdev_read_gap_limit, 0, "Acceptable gap between two reads being aggregated"); @@ -682,9 +686,13 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) ASSERT(MUTEX_HELD(>vq_lock)); maxblocksize = spa_maxblocksize(vq->vq_vdev->vdev_spa); - limit = MAX(MIN(zfs_vdev_aggregation_limit, maxblocksize), 0); + if (vq->vq_vdev->vdev_rotation_rate == VDEV_RATE_NON_ROTATING) + limit = zfs_vdev_aggregation_limit_non_rotating; + else + limit = zfs_vdev_aggregation_limit; + limit = MAX(MIN(limit, maxblocksize), 0); - if (zio->io_flags & ZIO_FLAG_DONT_AGGREGATE || limit == 0) + if (zio->io_flags & ZIO_FLAG_DONT_AGGREGATE || zio->io_size >= limit) return (NULL); first = last = zio; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r344817 - in head/sys: dev/e1000 net
On 3/5/19 4:06 PM, Matthew Macy wrote: This represents a misunderstanding of how defines are used. This left the option open to the user to enable the use of larger than page size buffers as it does enable better performance. Over the course of a long uptime memory can get too fragmented. However, this left it open to the end consumer. I'd like to see this reverted with perhaps a better name for the define and the addition of an explanatory comment. I'd strongly prefer that it stay removed. Since it is not hooked to an option, no user is ever going to find it. This really should have been a tuneable (since it is done at ring init time, rather than rx buffer alloc time), but nobody cared enough to make it actually usable. From brief memories of performance tuning 10G adapters 14 years ago, the differences between page-sized and 9k jumbos were minimal even back then (1/3 as many mbuf alloc/free, smaller chains). So I'm not convinced that it is worth bringing back in any form. My general feeling is that the more of this code that we can remove, the better. Iflib is tricky enough that it is already challenging to reason about and maintain. Removing code which is for all intents and purposes unreachable and never tested is Good Thing. Drew ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r344928 - head/share/misc
Author: bcr (doc committer) Date: Fri Mar 8 18:58:41 2019 New Revision: 344928 URL: https://svnweb.freebsd.org/changeset/base/344928 Log: Update members of doceng in the chart. Update the members of the doceng team to include ryusuke@ and me. Sort and reduce number of line breaks so that our bubble in the chart is a bit more compact (similar to portmgr next to it). Reminded by:gjb Modified: head/share/misc/organization.dot Modified: head/share/misc/organization.dot == --- head/share/misc/organization.dotFri Mar 8 18:53:54 2019 (r344927) +++ head/share/misc/organization.dotFri Mar 8 18:58:41 2019 (r344928) @@ -28,7 +28,7 @@ _misc [label="Miscellaneous Hats"] core [label="Core Team\nc...@freebsd.org\nallanjude, bcr, brooks,\nimp, hrs, jeff,\njhb, kmoore, seanc"] coresecretary [label="Core Team Secretary\ncore-secret...@freebsd.org\njrm"] doccommitters [label="Doc/www Committers\ndoc-committ...@freebsd.org"] -doceng [label="Documentation Engineering Team\ndoc...@freebsd.org\ngjb, blackend,\ngabor, hrs,\nwblock"] +doceng [label="Documentation Engineering Team\ndoc...@freebsd.org\nbcr, gabor, gjb, hrs,\nblackend, ryusuke, wblock"] portscommitters [label="Ports Committers\nports-committ...@freebsd.org"] portmgr [label="Port Management Team\nport...@freebsd.org\nadamw, antoine, bapt, bdrewery\nfeld, mat, rene, swills"] portmgrsecretary [label="Port Management Team Secretary\nportmgr-secret...@freebsd.org\nrene"] ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r344926 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: mav Date: Fri Mar 8 18:49:27 2019 New Revision: 344926 URL: https://svnweb.freebsd.org/changeset/base/344926 Log: MFV/ZoL: Fix zfs_vdev_aggregation_limit bounds checking Update the bounds checking for zfs_vdev_aggregation_limit so that it has a floor of zero and a maximum value of the supported block size for the pool. Additionally add an early return when zfs_vdev_aggregation_limit equals zero to disable aggregation. For very fast solid state or memory devices it may be more expensive to perform the aggregation than to issue the IO immediately. Author: Brian Behlendorf zfsonlinux/zfs@a58df6f53687ac6d1dee21f60de41b2552a43201 MFV/ZoL: Cap maximum aggregate IO size Commit 8542ef8 allowed optional IOs to be aggregated beyond the specified aggregation limit. Since the aggregation limit was also used to enforce the maximum block size, setting `zfs_vdev_aggregation_limit=16777216` could result in an attempt to allocate an ABD larger than 16M. Author: Brian Behlendorf Reviewed by: Matthew Ahrens Reviewed-by: George Melikov Reviewed-by: Giuseppe Di Natale Signed-off-by: Brian Behlendorf Closes #6259 Closes #6270 zfsonlinux/zfs@2d678f779aba26a93314c8ee1142c3985fa25cb6 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.cFri Mar 8 18:17:57 2019(r344925) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.cFri Mar 8 18:49:27 2019(r344926) @@ -673,13 +673,18 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) zio_link_t *zl = NULL; uint64_t maxgap = 0; uint64_t size; + uint64_t limit; + int maxblocksize; boolean_t stretch; avl_tree_t *t; enum zio_flag flags; ASSERT(MUTEX_HELD(>vq_lock)); - if (zio->io_flags & ZIO_FLAG_DONT_AGGREGATE) + maxblocksize = spa_maxblocksize(vq->vq_vdev->vdev_spa); + limit = MAX(MIN(zfs_vdev_aggregation_limit, maxblocksize), 0); + + if (zio->io_flags & ZIO_FLAG_DONT_AGGREGATE || limit == 0) return (NULL); first = last = zio; @@ -710,7 +715,7 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) t = vdev_queue_type_tree(vq, zio->io_type); while (t != NULL && (dio = AVL_PREV(t, first)) != NULL && (dio->io_flags & ZIO_FLAG_AGG_INHERIT) == flags && - IO_SPAN(dio, last) <= zfs_vdev_aggregation_limit && + IO_SPAN(dio, last) <= limit && IO_GAP(dio, first) <= maxgap && dio->io_type == zio->io_type) { first = dio; @@ -734,8 +739,9 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) */ while ((dio = AVL_NEXT(t, last)) != NULL && (dio->io_flags & ZIO_FLAG_AGG_INHERIT) == flags && - (IO_SPAN(first, dio) <= zfs_vdev_aggregation_limit || + (IO_SPAN(first, dio) <= limit || (dio->io_flags & ZIO_FLAG_OPTIONAL)) && + IO_SPAN(first, dio) <= maxblocksize && IO_GAP(last, dio) <= maxgap && dio->io_type == zio->io_type) { last = dio; @@ -789,7 +795,7 @@ vdev_queue_aggregate(vdev_queue_t *vq, zio_t *zio) return (NULL); size = IO_SPAN(first, last); - ASSERT3U(size, <=, SPA_MAXBLOCKSIZE); + ASSERT3U(size, <=, maxblocksize); aio = zio_vdev_delegated_io(first->io_vd, first->io_offset, abd_alloc_for_io(size, B_TRUE), size, first->io_type, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r344925 - head/sys/netinet
Author: tuexen Date: Fri Mar 8 18:17:57 2019 New Revision: 344925 URL: https://svnweb.freebsd.org/changeset/base/344925 Log: Fix locking bug. MFC after:3 days Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c == --- head/sys/netinet/sctp_usrreq.c Fri Mar 8 18:16:19 2019 (r344924) +++ head/sys/netinet/sctp_usrreq.c Fri Mar 8 18:17:57 2019 (r344925) @@ -4069,10 +4069,12 @@ sctp_setopt(struct socket *so, int optname, void *optv } SCTP_FIND_STCB(inp, stcb, av->assoc_id); if (stcb) { + SCTP_TCB_SEND_LOCK(stcb); stcb->asoc.ss_functions.sctp_ss_clear(stcb, >asoc, 1, 1); stcb->asoc.ss_functions = sctp_ss_functions[av->assoc_value]; stcb->asoc.stream_scheduling_module = av->assoc_value; stcb->asoc.ss_functions.sctp_ss_init(stcb, >asoc, 1); + SCTP_TCB_SEND_UNLOCK(stcb); SCTP_TCB_UNLOCK(stcb); } else { if ((inp->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || @@ -4088,10 +4090,12 @@ sctp_setopt(struct socket *so, int optname, void *optv SCTP_INP_RLOCK(inp); LIST_FOREACH(stcb, >sctp_asoc_list, sctp_tcblist) { SCTP_TCB_LOCK(stcb); + SCTP_TCB_SEND_LOCK(stcb); stcb->asoc.ss_functions.sctp_ss_clear(stcb, >asoc, 1, 1); stcb->asoc.ss_functions = sctp_ss_functions[av->assoc_value]; stcb->asoc.stream_scheduling_module = av->assoc_value; stcb->asoc.ss_functions.sctp_ss_init(stcb, >asoc, 1); + SCTP_TCB_SEND_UNLOCK(stcb); SCTP_TCB_UNLOCK(stcb); } SCTP_INP_RUNLOCK(inp); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r344924 - head/sys/netinet
Author: tuexen Date: Fri Mar 8 18:16:19 2019 New Revision: 344924 URL: https://svnweb.freebsd.org/changeset/base/344924 Log: Some cleanup and consistency improvements. MFC after:3 days Modified: head/sys/netinet/sctp_ss_functions.c Modified: head/sys/netinet/sctp_ss_functions.c == --- head/sys/netinet/sctp_ss_functions.cFri Mar 8 15:48:19 2019 (r344923) +++ head/sys/netinet/sctp_ss_functions.cFri Mar 8 18:16:19 2019 (r344924) @@ -54,6 +54,9 @@ sctp_ss_default_init(struct sctp_tcb *stcb, struct sct { uint16_t i; + if (holds_lock == 0) { + SCTP_TCB_SEND_LOCK(stcb); + } asoc->ss_data.locked_on_sending = NULL; asoc->ss_data.last_out_stream = NULL; TAILQ_INIT(>ss_data.out.wheel); @@ -65,8 +68,11 @@ sctp_ss_default_init(struct sctp_tcb *stcb, struct sct for (i = 0; i < stcb->asoc.streamoutcnt; i++) { stcb->asoc.ss_functions.sctp_ss_add_to_stream(stcb, >asoc, >asoc.strmout[i], - NULL, holds_lock); + NULL, 1); } + if (holds_lock == 0) { + SCTP_TCB_SEND_UNLOCK(stcb); + } return; } @@ -396,12 +402,13 @@ sctp_ss_prio_clear(struct sctp_tcb *stcb, struct sctp_ SCTP_TCB_SEND_LOCK(stcb); } while (!TAILQ_EMPTY(>ss_data.out.wheel)) { - struct sctp_stream_out *strq = TAILQ_FIRST(>ss_data.out.wheel); + struct sctp_stream_out *strq; + strq = TAILQ_FIRST(>ss_data.out.wheel); if (clear_values) { strq->ss_params.prio.priority = 0; } - TAILQ_REMOVE(>ss_data.out.wheel, TAILQ_FIRST(>ss_data.out.wheel), ss_params.prio.next_spoke); + TAILQ_REMOVE(>ss_data.out.wheel, strq, ss_params.prio.next_spoke); strq->ss_params.prio.next_spoke.tqe_next = NULL; strq->ss_params.prio.next_spoke.tqe_prev = NULL; @@ -586,12 +593,13 @@ sctp_ss_fb_clear(struct sctp_tcb *stcb, struct sctp_as SCTP_TCB_SEND_LOCK(stcb); } while (!TAILQ_EMPTY(>ss_data.out.wheel)) { - struct sctp_stream_out *strq = TAILQ_FIRST(>ss_data.out.wheel); + struct sctp_stream_out *strq; + strq = TAILQ_FIRST(>ss_data.out.wheel); if (clear_values) { strq->ss_params.fb.rounds = -1; } - TAILQ_REMOVE(>ss_data.out.wheel, TAILQ_FIRST(>ss_data.out.wheel), ss_params.fb.next_spoke); + TAILQ_REMOVE(>ss_data.out.wheel, strq, ss_params.fb.next_spoke); strq->ss_params.fb.next_spoke.tqe_next = NULL; strq->ss_params.fb.next_spoke.tqe_prev = NULL; } @@ -764,6 +772,9 @@ sctp_ss_fcfs_init(struct sctp_tcb *stcb, struct sctp_a struct sctp_stream_queue_pending *sp; uint16_t i; + if (holds_lock == 0) { + SCTP_TCB_SEND_LOCK(stcb); + } TAILQ_INIT(>ss_data.out.list); /* * If there is data in the stream queues already, the scheduler of @@ -781,11 +792,14 @@ sctp_ss_fcfs_init(struct sctp_tcb *stcb, struct sctp_a x++; } if (sp != NULL) { - sctp_ss_fcfs_add(stcb, >asoc, >asoc.strmout[i], sp, holds_lock); + sctp_ss_fcfs_add(stcb, >asoc, >asoc.strmout[i], sp, 1); add_more = 1; } } n++; + } + if (holds_lock == 0) { + SCTP_TCB_SEND_UNLOCK(stcb); } return; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r344922 - head/sbin/fsck
Author: wosch Date: Fri Mar 8 10:03:16 2019 New Revision: 344922 URL: https://svnweb.freebsd.org/changeset/base/344922 Log: explain ``fsck -f'' more in detail PR: 223491 Approved by: mckusick, 0mp, imp Differential Revision:https://reviews.freebsd.org/D19437 Modified: head/sbin/fsck/fsck.8 Modified: head/sbin/fsck/fsck.8 == --- head/sbin/fsck/fsck.8 Fri Mar 8 09:33:16 2019(r344921) +++ head/sbin/fsck/fsck.8 Fri Mar 8 10:03:16 2019(r344922) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 5, 2016 +.Dd March 5, 2019 .Dt FSCK 8 .Os .Sh NAME @@ -142,8 +142,12 @@ only if .Nm is compiled to support it. .It Fl f -Force checking of file systems, even when they are marked clean (for file systems -that support this). +Force checking of file systems. +Running +.Dq Li fsck -f +ignores the journal and does a full +consistency check of the disk so will find and fix the errors about which the +journal is unaware. .It Fl n Causes .Nm ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r344921 - head/sys/netpfil/pf
Author: kp Date: Fri Mar 8 09:33:16 2019 New Revision: 344921 URL: https://svnweb.freebsd.org/changeset/base/344921 Log: pf: Fix DIOCGETSRCNODES r343295 broke DIOCGETSRCNODES by failing to reset 'nr' after counting the number of source tracking nodes. This meant that we never copied the information to userspace, leading to '? -> ?' output from pfctl. PR: 236368 MFC after:1 week Modified: head/sys/netpfil/pf/pf_ioctl.c Modified: head/sys/netpfil/pf/pf_ioctl.c == --- head/sys/netpfil/pf/pf_ioctl.c Fri Mar 8 09:18:29 2019 (r344920) +++ head/sys/netpfil/pf/pf_ioctl.c Fri Mar 8 09:33:16 2019 (r344921) @@ -3754,6 +3754,8 @@ DIOCCHANGEADDR_error: break; } + nr = 0; + p = pstore = malloc(psn->psn_len, M_TEMP, M_WAITOK); for (i = 0, sh = V_pf_srchash; i <= pf_srchashmask; i++, sh++) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r344920 - head/sys/dev/mlx4/mlx4_en
Author: hselasky Date: Fri Mar 8 09:18:29 2019 New Revision: 344920 URL: https://svnweb.freebsd.org/changeset/base/344920 Log: Teardown ifnet after stopping port in the mlx4en(4) driver. mlx4_en_stop_port() calls mlx4_en_put_qp() which can refer the link level address of the network interface, which in turn will be freed by the network interface detach function. Make sure the port is stopped before detaching the network interface. MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c == --- head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Fri Mar 8 09:16:29 2019 (r344919) +++ head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Fri Mar 8 09:18:29 2019 (r344920) @@ -1778,13 +1778,13 @@ void mlx4_en_destroy_netdev(struct net_device *dev) if (priv->vlan_detach != NULL) EVENTHANDLER_DEREGISTER(vlan_unconfig, priv->vlan_detach); - /* Unregister device - this will close the port if it was up */ - if (priv->registered) - ether_ifdetach(dev); - mutex_lock(>state_lock); mlx4_en_stop_port(dev); mutex_unlock(>state_lock); + + /* Unregister device - this will close the port if it was up */ + if (priv->registered) + ether_ifdetach(dev); if (priv->allocated) mlx4_free_hwq_res(mdev->dev, >res, MLX4_EN_PAGE_SIZE); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r344919 - head/sys/dev/mlx4/mlx4_en
Author: hselasky Date: Fri Mar 8 09:16:29 2019 New Revision: 344919 URL: https://svnweb.freebsd.org/changeset/base/344919 Log: Don't hold state lock while detaching network device instance in mlx4en(4). It can happen during shutdown that the lock will recurse when the mlx4en(4) instance is part of a lagg interface. Call ether_ifdetach() unlocked. Backtrace: panic(): _sx_xlock_hard: recursed on non-recursive sx >state_lock _sx_xlock_hard() _sx_xlock() mlx4_en_ioctl() if_setlladdr() lagg_port_destroy() lagg_port_ifdetach() if_detach() mlx4_en_destroy_netdev() mlx4_en_remove() mlx4_remove_device() mlx4_unregister_device() mlx4_unload_one() mlx4_shutdown() linux_pci_shutdown() bus_generic_shutdown() MFC after:1 week Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Modified: head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c == --- head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Fri Mar 8 08:27:33 2019 (r344918) +++ head/sys/dev/mlx4/mlx4_en/mlx4_en_netdev.c Fri Mar 8 09:16:29 2019 (r344919) @@ -1779,11 +1779,8 @@ void mlx4_en_destroy_netdev(struct net_device *dev) EVENTHANDLER_DEREGISTER(vlan_unconfig, priv->vlan_detach); /* Unregister device - this will close the port if it was up */ - if (priv->registered) { - mutex_lock(>state_lock); + if (priv->registered) ether_ifdetach(dev); - mutex_unlock(>state_lock); - } mutex_lock(>state_lock); mlx4_en_stop_port(dev); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"