svn commit: r356863 - head/sys/net
Author: eugen Date: Sat Jan 18 04:48:05 2020 New Revision: 356863 URL: https://svnweb.freebsd.org/changeset/base/356863 Log: ifa_maintain_loopback_route: adjust debugging output Correction after r333476: - write this as LOG_DEBUG again instead of LOG_INFO; - get back function name into the message; - error may be ESRCH if an address is removed in process (by carp f.e.), not only ENOENT; - expression complexity grows, so try making it more readable. MFC after:1 week Modified: head/sys/net/if.c Modified: head/sys/net/if.c == --- head/sys/net/if.c Sat Jan 18 04:12:41 2020(r356862) +++ head/sys/net/if.c Sat Jan 18 04:48:05 2020(r356863) @@ -1867,10 +1867,13 @@ ifa_maintain_loopback_route(int cmd, const char *otype if (rti_ifa != NULL) ifa_free(rti_ifa); - if (error != 0 && - !(cmd == RTM_ADD && error == EEXIST) && - !(cmd == RTM_DELETE && error == ENOENT)) - if_printf(ifp, "%s failed: %d\n", otype, error); + if (error == 0 || + (cmd == RTM_ADD && error == EEXIST) || + (cmd == RTM_DELETE && (error == ENOENT || error == ESRCH))) + return (error); + + log(LOG_DEBUG, "%s: %s failed for interface %s: %u\n", + __func__, otype, if_name(ifp), error); return (error); } ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356862 - in head/sys/powerpc: aim include
Author: bdragon Date: Sat Jan 18 04:12:41 2020 New Revision: 356862 URL: https://svnweb.freebsd.org/changeset/base/356862 Log: D23057: [PowerPC] Fix offset calculations in bridge mode In rS354701, I replaced text relocations with offsets from Unfortunately, the magic variable I was using doesn't actually mean the address of , in bridge mode it actually means So, for bridge mode to work, it is necessary to differentiate between "where do we need to branch to to handle a trap" and "where is for purposes of doing relative math". Introduce a new TRAP_ENTRY and use it instead of TRAP_GENTRAP for doing actual calls to the generic trap handler. Reported by: Mark Millard Reviewed by: jhibbits Sponsored by: Tag1 Consulting, Inc. Differential Revision:https://reviews.freebsd.org/D23057 > Description of fields to fill in above: 76 columns --| > PR: If and which Problem Report is related. > Submitted by: If someone else sent in the change. > Reported by: If someone else reported the issue. > 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. > MFH: Ports tree branch name. Request approval for merge. > Relnotes: Set to 'yes' for mention in release notes. > Security: Vulnerability reference (one per line) or description. > Sponsored by: If the change was sponsored by an organization (each collaborator). > Differential Revision:https://reviews.freebsd.org/D### (*full* phabric URL needed). > Empty fields above will be automatically removed. Msys/powerpc/aim/aim_machdep.c Msys/powerpc/aim/trap_subr32.S Msys/powerpc/aim/trap_subr64.S Msys/powerpc/include/trap.h Modified: head/sys/powerpc/aim/aim_machdep.c head/sys/powerpc/aim/trap_subr32.S head/sys/powerpc/aim/trap_subr64.S head/sys/powerpc/include/trap.h Modified: head/sys/powerpc/aim/aim_machdep.c == --- head/sys/powerpc/aim/aim_machdep.c Sat Jan 18 03:33:44 2020 (r356861) +++ head/sys/powerpc/aim/aim_machdep.c Sat Jan 18 04:12:41 2020 (r356862) @@ -388,16 +388,18 @@ aim_cpu_init(vm_offset_t toc) bcopy(, (void *)(EXC_DSI + trap_offset), (size_t) - (size_t)); + /* Set address of generictrap for self-reloc calculations */ + *((void **)TRAP_GENTRAP) = #ifdef __powerpc64__ /* Set TOC base so that the interrupt code can get at it */ - *((void **)TRAP_GENTRAP) = + *((void **)TRAP_ENTRY) = *((register_t *)TRAP_TOCBASE) = toc; #else /* Set branch address for trap code */ if (cpu_features & PPC_FEATURE_64) - *((void **)TRAP_GENTRAP) = + *((void **)TRAP_ENTRY) = else - *((void **)TRAP_GENTRAP) = + *((void **)TRAP_ENTRY) = *((void **)TRAP_TOCBASE) = _GLOBAL_OFFSET_TABLE_; /* G2-specific TLB miss helper handlers */ Modified: head/sys/powerpc/aim/trap_subr32.S == --- head/sys/powerpc/aim/trap_subr32.S Sat Jan 18 03:33:44 2020 (r356861) +++ head/sys/powerpc/aim/trap_subr32.S Sat Jan 18 04:12:41 2020 (r356862) @@ -348,7 +348,7 @@ CNAME(trapcode): mtsprg1 %r1 /* save SP */ mflr%r1 /* Save the old LR in r1 */ mtsprg2 %r1 /* And then in SPRG2 */ - lwz %r1, TRAP_GENTRAP(0)/* Get branch address */ + lwz %r1, TRAP_ENTRY(0) /* Get branch address */ mtlr%r1 li %r1, 0xe0 /* How to get the vector from LR */ blrl/* LR & (0xff00 | r1) is exception # */ @@ -908,7 +908,7 @@ CNAME(dblow): mflr %r1 /* save LR */ mtsprg2 %r1 /* And then in SPRG2 */ - lwz %r1, TRAP_GENTRAP(0)/* Get branch address */ + lwz %r1, TRAP_ENTRY(0) /* Get branch address */ mtlr%r1 li %r1, 0 /* How to get the vector from LR */ blrl/* LR & (0xff00 | r1) is exception # */ Modified: head/sys/powerpc/aim/trap_subr64.S == --- head/sys/powerpc/aim/trap_subr64.S Sat Jan 18 03:33:44 2020 (r356861) +++ head/sys/powerpc/aim/trap_subr64.S Sat Jan 18 04:12:41 2020 (r356862) @@ -318,7 +318,7 @@ CNAME(rstcode): * It is software
svn commit: r356861 - head/sys/geom/label
Author: cem Date: Sat Jan 18 03:33:44 2020 New Revision: 356861 URL: https://svnweb.freebsd.org/changeset/base/356861 Log: GEOM label: strip leading/trailing space synthesizing devfs names %20%20%20 is ugly and doesn't really help make human-readable devfs names. PR: 243318 Reported by: Peter Eriksson Relnotes: yes Modified: head/sys/geom/label/g_label.c Modified: head/sys/geom/label/g_label.c == --- head/sys/geom/label/g_label.c Sat Jan 18 02:39:38 2020 (r356860) +++ head/sys/geom/label/g_label.c Sat Jan 18 03:33:44 2020 (r356861) @@ -179,9 +179,25 @@ g_label_mangle_name(char *label, size_t size) { struct sbuf *sb; const u_char *c; + size_t len, i; + /* Trim trailing whitespace. */ + len = strlen(label); + for (i = len; i > 0; i--) { + if (isspace(label[i - 1])) + label[i - 1] = '\0'; + else + break; + } + if (*label == '\0') + return; + + sb = sbuf_new(NULL, NULL, size, SBUF_FIXEDLEN); for (c = label; *c != '\0'; c++) { + /* Trim leading whitespace. */ + if (isspace(*c) && sbuf_len(sb) == 0) + continue; if (!isprint(*c) || isspace(*c) || *c =='"' || *c == '%') sbuf_printf(sb, "%%%02X", *c); else ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356860 - in head/sys: powerpc/aim powerpc/powerpc tools
Author: jhibbits Date: Sat Jan 18 02:39:38 2020 New Revision: 356860 URL: https://svnweb.freebsd.org/changeset/base/356860 Log: Add a 'SINGLETON' directive to kobj interface definition Summary: This makes the interface described in the definition file act like a pseudo-IFUNC service, by caching the found method locally. Applying this to the PowerPC MMU definitions, it yields a significant (15-20%) performance improvement, seen in both a 'make buildworld' and a parallel build of LLVM, on a POWER9 system. Reviewed By: imp Differential Revision:https://reviews.freebsd.org/D23245 Modified: head/sys/powerpc/aim/moea64_if.m head/sys/powerpc/powerpc/mmu_if.m head/sys/tools/makeobjops.awk Modified: head/sys/powerpc/aim/moea64_if.m == --- head/sys/powerpc/aim/moea64_if.mSat Jan 18 01:29:02 2020 (r356859) +++ head/sys/powerpc/aim/moea64_if.mSat Jan 18 02:39:38 2020 (r356860) @@ -43,6 +43,7 @@ */ INTERFACE moea64; +SINGLETON; CODE { static moea64_pte_replace_t moea64_pte_replace_default; Modified: head/sys/powerpc/powerpc/mmu_if.m == --- head/sys/powerpc/powerpc/mmu_if.m Sat Jan 18 01:29:02 2020 (r356859) +++ head/sys/powerpc/powerpc/mmu_if.m Sat Jan 18 02:39:38 2020 (r356860) @@ -46,6 +46,7 @@ */ INTERFACE mmu; +SINGLETON; # # Default implementations of some methods Modified: head/sys/tools/makeobjops.awk == --- head/sys/tools/makeobjops.awk Sat Jan 18 01:29:02 2020 (r356859) +++ head/sys/tools/makeobjops.awk Sat Jan 18 02:39:38 2020 (r356860) @@ -325,13 +325,18 @@ function handle_method (static, doc) line_width, length(prototype))); } printh("{"); - printh("\tkobjop_t _m;"); + if (singleton) + printh("\tstatic kobjop_t _m;"); + else + printh("\tkobjop_t _m;"); if (ret != "void") printh("\t" ret " rc;"); if (!static) firstvar = "((kobj_t)" firstvar ")"; if (prolog != "") printh(prolog); + if (singleton) + printh("\tif (_m == NULL)"); printh("\tKOBJOPLOOKUP(" firstvar "->ops," mname ");"); rceq = (ret != "void") ? "rc = " : ""; printh("\t" rceq "((" mname "_t *) _m)(" varname_list ");"); @@ -453,6 +458,7 @@ for (file_i = 0; file_i < num_files; file_i++) { lastdoc = ""; prolog = ""; epilog = ""; + singleton = 0; while (!error && (getline < src) > 0) { lineno++; @@ -497,6 +503,8 @@ for (file_i = 0; file_i < num_files; file_i++) { prolog = handle_code(); else if (/^EPILOG[ ]*{$/) epilog = handle_code(); + else if (/^SINGLETON/) + singleton = 1; else { debug($0); warnsrc("Invalid line encountered"); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356859 - head/sys/kern
Author: mjg Date: Sat Jan 18 01:29:02 2020 New Revision: 356859 URL: https://svnweb.freebsd.org/changeset/base/356859 Log: vfs: distribute freevnodes counter per-cpu It gets rolled up to the global when deferred requeueing is performed. A dedicated read routine makes sure to return a value only off by a certain amount. This soothes a global serialisation point for all 0<->1 hold count transitions. Reviewed by: jeff Differential Revision:https://reviews.freebsd.org/D23235 Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cSat Jan 18 01:26:54 2020(r356858) +++ head/sys/kern/vfs_subr.cSat Jan 18 01:29:02 2020(r356859) @@ -191,10 +191,11 @@ static struct vnode *vnode_list_reclaim_marker; * E.g., 9% of 75% of MAXVNODES is more than 566000 vnodes to reclaim * whenever vnlru_proc() becomes active. */ -static u_long wantfreevnodes; -static u_long __exclusive_cache_line freevnodes; +static long wantfreevnodes; +static long __exclusive_cache_line freevnodes; SYSCTL_ULONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, , 0, "Number of \"free\" vnodes"); +static long freevnodes_old; static counter_u64_t recycles_count; SYSCTL_COUNTER_U64(_vfs, OID_AUTO, recycles, CTLFLAG_RD, _count, @@ -299,6 +300,7 @@ SYSCTL_INT(_debug, OID_AUTO, rush_requests, CTLFLAG_RW #defineVDBATCH_SIZE 8 struct vdbatch { u_int index; + long freevnodes; struct mtx lock; struct vnode *tab[VDBATCH_SIZE]; }; @@ -323,6 +325,8 @@ static u_long vlowat; /* minimal extras before expans static u_long vstir; /* nonzero to stir non-free vnodes */ static volatile int vsmalltrigger = 8; /* pref to keep if > this many pages */ +static u_long vnlru_read_freevnodes(void); + /* * Note that no attempt is made to sanitize these parameters. */ @@ -1205,15 +1209,17 @@ SYSCTL_INT(_debug, OID_AUTO, max_vnlru_free, CTLFLAG_R /* * Attempt to reduce the free list by the requested amount. */ -static void +static int vnlru_free_locked(int count, struct vfsops *mnt_op) { struct vnode *vp, *mvp; struct mount *mp; + int ocount; mtx_assert(_list_mtx, MA_OWNED); if (count > max_vnlru_free) count = max_vnlru_free; + ocount = count; mvp = vnode_list_free_marker; restart: vp = mvp; @@ -1254,6 +1260,7 @@ restart: mtx_lock(_list_mtx); goto restart; } + return (ocount - count); } void @@ -1283,6 +1290,38 @@ vnlru_recalc(void) static struct proc *vnlruproc; static int vnlruproc_sig; +/* + * The main freevnodes counter is only updated when threads requeue their vnode + * batches. CPUs are conditionally walked to compute a more accurate total. + * + * Limit how much of a slop are we willing to tolerate. Note: the actual value + * at any given moment can still exceed slop, but it should not be by significant + * margin in practice. + */ +#define VNLRU_FREEVNODES_SLOP 128 + +static u_long +vnlru_read_freevnodes(void) +{ + struct vdbatch *vd; + long slop; + int cpu; + + mtx_assert(_list_mtx, MA_OWNED); + if (freevnodes > freevnodes_old) + slop = freevnodes - freevnodes_old; + else + slop = freevnodes_old - freevnodes; + if (slop < VNLRU_FREEVNODES_SLOP) + return (freevnodes >= 0 ? freevnodes : 0); + freevnodes_old = freevnodes; + CPU_FOREACH(cpu) { + vd = DPCPU_ID_PTR((cpu), vd); + freevnodes_old += vd->freevnodes; + } + return (freevnodes_old >= 0 ? freevnodes_old : 0); +} + static bool vnlru_under(u_long rnumvnodes, u_long limit) { @@ -1293,6 +1332,23 @@ vnlru_under(u_long rnumvnodes, u_long limit) space = desiredvnodes - rnumvnodes; if (space < limit) { + rfreevnodes = vnlru_read_freevnodes(); + if (rfreevnodes > wantfreevnodes) + space += rfreevnodes - wantfreevnodes; + } + return (space < limit); +} + +static bool +vnlru_under_unlocked(u_long rnumvnodes, u_long limit) +{ + long rfreevnodes, space; + + if (__predict_false(rnumvnodes > desiredvnodes)) + return (true); + + space = desiredvnodes - rnumvnodes; + if (space < limit) { rfreevnodes = atomic_load_long(); if (rfreevnodes > wantfreevnodes) space += rfreevnodes - wantfreevnodes; @@ -1317,16 +1373,23 @@ vnlru_proc(void) u_long rnumvnodes, rfreevnodes, target; unsigned long onumvnodes; int done, force, trigger, usevnodes; - bool reclaim_nc_src; + bool reclaim_nc_src, want_reread; EVENTHANDLER_REGISTER(shutdown_pre_sync, kproc_shutdown, vnlruproc,
svn commit: r356858 - in head/sys/powerpc: include ofw powernv powerpc
Author: jhibbits Date: Sat Jan 18 01:26:54 2020 New Revision: 356858 URL: https://svnweb.freebsd.org/changeset/base/356858 Log: powerpc: Fix the NUMA domain list on powernv Summary: Consolidate the NUMA associativity handling into a platform function. Non-NUMA platforms will just fall back to the default (0). Currently only implemented for powernv, which uses a lookup table to map the device tree associativity into a system NUMA domain. Fixes hangs on powernv after r356534, and corrects a fairly longstanding bug in powernv's NUMA handling, which ended up using domains 1 and 2 for devices and memory on power9, while CPUs were bound to domains 0 and 1. Reviewed by: bdragon, luporl Differential Revision:https://reviews.freebsd.org/D23220 Modified: head/sys/powerpc/include/ofw_machdep.h head/sys/powerpc/include/platform.h head/sys/powerpc/ofw/ofw_machdep.c head/sys/powerpc/ofw/ofw_pcibus.c head/sys/powerpc/powernv/platform_powernv.c head/sys/powerpc/powerpc/platform.c head/sys/powerpc/powerpc/platform_if.m Modified: head/sys/powerpc/include/ofw_machdep.h == --- head/sys/powerpc/include/ofw_machdep.h Sat Jan 18 01:22:54 2020 (r356857) +++ head/sys/powerpc/include/ofw_machdep.h Sat Jan 18 01:26:54 2020 (r356858) @@ -37,6 +37,9 @@ #include #include +struct mem_region; +struct numa_mem_region; + typedefuint32_tcell_t; void OF_getetheraddr(device_t dev, u_char *addr); Modified: head/sys/powerpc/include/platform.h == --- head/sys/powerpc/include/platform.h Sat Jan 18 01:22:54 2020 (r356857) +++ head/sys/powerpc/include/platform.h Sat Jan 18 01:26:54 2020 (r356858) @@ -37,6 +37,7 @@ #ifndef_MACHINE_PLATFORM_H_ #define_MACHINE_PLATFORM_H_ +#include #include #include @@ -66,6 +67,7 @@ int platform_smp_start_cpu(struct pcpu *); void platform_smp_timebase_sync(u_long tb, int ap); void platform_smp_ap_init(void); void platform_smp_probe_threads(void); +intplatform_node_numa_domain(phandle_t); const char *installed_platform(void); void platform_probe_and_attach(void); Modified: head/sys/powerpc/ofw/ofw_machdep.c == --- head/sys/powerpc/ofw/ofw_machdep.c Sat Jan 18 01:22:54 2020 (r356857) +++ head/sys/powerpc/ofw/ofw_machdep.c Sat Jan 18 01:26:54 2020 (r356858) @@ -466,9 +466,8 @@ void ofw_numa_mem_regions(struct numa_mem_region *memp, int *memsz) { phandle_t phandle; - int res, count, msz; + int count, msz; char name[31]; - cell_t associativity[5]; struct numa_mem_region *curmemp; msz = 0; @@ -486,13 +485,8 @@ ofw_numa_mem_regions(struct numa_mem_region *memp, int if (count == 0) continue; curmemp = [msz]; - res = OF_getproplen(phandle, "ibm,associativity"); - if (res <= 0) - continue; MPASS(count == 1); - OF_getencprop(phandle, "ibm,associativity", - associativity, res); - curmemp->mr_domain = associativity[3]; + curmemp->mr_domain = platform_node_numa_domain(phandle); if (bootverbose) printf("%s %#jx-%#jx domain(%ju)\n", name, (uintmax_t)curmemp->mr_start, Modified: head/sys/powerpc/ofw/ofw_pcibus.c == --- head/sys/powerpc/ofw/ofw_pcibus.c Sat Jan 18 01:22:54 2020 (r356857) +++ head/sys/powerpc/ofw/ofw_pcibus.c Sat Jan 18 01:26:54 2020 (r356858) @@ -385,39 +385,13 @@ ofw_pcibus_get_devinfo(device_t bus, device_t dev) return (>opd_obdinfo); } -static int -ofw_pcibus_parse_associativity(device_t dev, int *domain) -{ - phandle_t node; - cell_t associativity[5]; - int res; - - if ((node = ofw_bus_get_node(dev)) == -1) { - if (bootverbose) - device_printf(dev, "no ofw node found\n"); - return (ENXIO); - } - res = OF_getproplen(node, "ibm,associativity"); - if (res <= 0) - return (ENXIO); - OF_getencprop(node, "ibm,associativity", - associativity, res); - - *domain = associativity[3]; - if (bootverbose) - device_printf(dev, "domain(%d)\n", *domain); - return (0); -} - int ofw_pcibus_get_cpus(device_t dev, device_t child, enum cpu_sets op, size_t setsize, cpuset_t *cpuset) { int d, error; - error = ofw_pcibus_parse_associativity(child, ); - if (error) - return (bus_generic_get_cpus(dev, child, op,
svn commit: r356857 - head/sys/powerpc/booke
Author: bdragon Date: Sat Jan 18 01:22:54 2020 New Revision: 356857 URL: https://svnweb.freebsd.org/changeset/base/356857 Log: [PowerPC] Fix Book-E direct map for >=16G ram on e5500 It turns out the maximum TLB1 page size on e5500 is 4G, despite the format being defined for up to 1TB. So, we need to clamp the DMAP TLB1 entries to not attempt to create 16G or larger entries. Fixes boot on my X5000 in which I just installed 16G of RAM. Reviewed by: jhibbits Sponsored by: Tag1 Consulting, Inc. Differential Revision:https://reviews.freebsd.org/D23244 Modified: head/sys/powerpc/booke/pmap.c Modified: head/sys/powerpc/booke/pmap.c == --- head/sys/powerpc/booke/pmap.c Fri Jan 17 23:41:35 2020 (r356856) +++ head/sys/powerpc/booke/pmap.c Sat Jan 18 01:22:54 2020 (r356857) @@ -4028,7 +4028,22 @@ tlb1_mapin_region(vm_offset_t va, vm_paddr_t pa, vm_si sz >>= 2; } while (va % sz != 0); } - /* Now align from there to VA */ +#ifdef __powerpc64__ + /* +* Clamp TLB1 entries to 4G. +* +* While the e6500 supports up to 1TB mappings, the e5500 +* only supports up to 4G mappings. (0b1011) +* +* If any e6500 machines capable of supporting a very +* large amount of memory appear in the future, we can +* revisit this. +* +* For now, though, since we have plenty of space in TLB1, +* always avoid creating entries larger than 4GB. +*/ + sz = MIN(sz, 1UL << 32); +#endif if (bootverbose) printf("Wiring VA=%p to PA=%jx (size=%lx)\n", (void *)va, (uintmax_t)pa, (long)sz); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356856 - head/sys/powerpc/powerpc
Author: bdragon Date: Fri Jan 17 23:41:35 2020 New Revision: 356856 URL: https://svnweb.freebsd.org/changeset/base/356856 Log: [PowerPC] Save a dword in the powerpc64 signal trampoline In r291668, an instruction was added to sigcode64.S without the nop pad at the end being taken out. Due to alignment, this means that a dword is being wasted on the shared page for no reason. Take out this nop, and add some comments while I'm here. Reviewed by: jhibbits Sponsored by: Tag1 Consulting, Inc. Differential Revision:https://reviews.freebsd.org/D23055 Modified: head/sys/powerpc/powerpc/sigcode64.S Modified: head/sys/powerpc/powerpc/sigcode64.S == --- head/sys/powerpc/powerpc/sigcode64.SFri Jan 17 22:26:41 2020 (r356855) +++ head/sys/powerpc/powerpc/sigcode64.SFri Jan 17 23:41:35 2020 (r356856) @@ -63,9 +63,13 @@ CNAME(sigcode64_elfv2): addi3,1,112+SF_UC /* restore sp, and get >sf_uc */ li 0,SYS_sigreturn sc /* sigreturn(scp) */ + /* +* If we get back to here, it means sigreturn failed. +* As such, we are now stuck in the wrong context. +* Exit immediately without touching the stack. +*/ li 0,SYS_exit sc /* exit(errno) */ - nop /* align to doubleword */ endsigcode64: .data ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356855 - head/usr.sbin/bsdinstall/partedit
Author: woodsb02 (ports committer) Date: Fri Jan 17 22:26:41 2020 New Revision: 356855 URL: https://svnweb.freebsd.org/changeset/base/356855 Log: Fix regression in bsdinstall post r356740 - partedit errno(2) 21 EISDIR This resulted in the partitioning step failing if either of the "Auto (UFS)" or "Manual" options were selected. Reason: partedit was attempting to open a directory (TMPDIR) read/write, which resulted in errno(2) 21 - EISDIR - Is a directory. Reported by: Clay Daniels Reviewed by: Ryan Moeller Approved by: emaste, bcran Differential Revision:https://reviews.freebsd.org/D23232 Modified: head/usr.sbin/bsdinstall/partedit/partedit.c Modified: head/usr.sbin/bsdinstall/partedit/partedit.c == --- head/usr.sbin/bsdinstall/partedit/partedit.cFri Jan 17 22:24:56 2020(r356854) +++ head/usr.sbin/bsdinstall/partedit/partedit.cFri Jan 17 22:26:41 2020(r356855) @@ -93,7 +93,7 @@ main(int argc, const char **argv) tmpdir = getenv("TMPDIR"); if (tmpdir == NULL) tmpdir = "/tmp"; - tmpdfd = open(tmpdir, O_RDWR | O_DIRECTORY); + tmpdfd = open(tmpdir, O_DIRECTORY); if (tmpdfd < 0) err(EX_OSERR, "%s", tmpdir); unlinkat(tmpdfd, "bsdinstall-esps", 0); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356854 - stable/12/sys/cddl/dev/dtrace/arm
Author: ian Date: Fri Jan 17 22:24:56 2020 New Revision: 356854 URL: https://svnweb.freebsd.org/changeset/base/356854 Log: MFC r356574: Remove scary-looking printf output that happens when you kldload dtrace on arm. Replace it with a comment block explaining why the function is empty on 32-bit arm. Modified: stable/12/sys/cddl/dev/dtrace/arm/dtrace_subr.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/cddl/dev/dtrace/arm/dtrace_subr.c == --- stable/12/sys/cddl/dev/dtrace/arm/dtrace_subr.c Fri Jan 17 22:21:38 2020(r356853) +++ stable/12/sys/cddl/dev/dtrace/arm/dtrace_subr.c Fri Jan 17 22:24:56 2020(r356854) @@ -123,7 +123,18 @@ dtrace_invop_remove(int (*func)(uintptr_t, struct trap void dtrace_toxic_ranges(void (*func)(uintptr_t base, uintptr_t limit)) { - printf("IMPLEMENT ME: dtrace_toxic_ranges\n"); + + /* +* There are no ranges to exclude that are common to all 32-bit arm +* platforms. This function only needs to exclude ranges "... in +* which it is impossible to recover from such a load after it has been +* attempted." -- i.e., accessing within the range causes some sort +* fault in the system which is not handled by the normal arm +* exception-handling mechanisms. If systems exist where that is the +* case, a method to handle this functionality would have to be added to +* the platform_if interface so that those systems could provide their +* specific toxic range(s). +*/ } void ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356853 - stable/12/sys/arm/conf
Author: ian Date: Fri Jan 17 22:21:38 2020 New Revision: 356853 URL: https://svnweb.freebsd.org/changeset/base/356853 Log: MFC r356295: Add the xdma framework and pl330 dma drivers to arm lint build. Modified: stable/12/sys/arm/conf/NOTES Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/conf/NOTES == --- stable/12/sys/arm/conf/NOTESFri Jan 17 22:04:11 2020 (r356852) +++ stable/12/sys/arm/conf/NOTESFri Jan 17 22:21:38 2020 (r356853) @@ -42,3 +42,7 @@ nodevice mps # Add devices which are specific to various arm platforms... device twsi# i2c controller on Marvel and Allwinner + +device pl330 # ARM PL330 dma controller +device xdma# xDMA framework for SoC on-chip dma controllers + ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356852 - head/sys/net80211
Author: cem Date: Fri Jan 17 22:04:11 2020 New Revision: 356852 URL: https://svnweb.freebsd.org/changeset/base/356852 Log: net80211: Move rate printing in amrr_node_stats() to a separate method This makes amrr_node_stats() cleaner and allows the rate printing to be reusable. Submitted by: Neel Chauhan Reviewed by: adrian Differential Revision:https://reviews.freebsd.org/D22318 Modified: head/sys/net80211/ieee80211_amrr.c Modified: head/sys/net80211/ieee80211_amrr.c == --- head/sys/net80211/ieee80211_amrr.c Fri Jan 17 22:02:35 2020 (r356851) +++ head/sys/net80211/ieee80211_amrr.c Fri Jan 17 22:04:11 2020 (r356852) @@ -477,18 +477,12 @@ amrr_sysctlattach(struct ieee80211vap *vap, } static void -amrr_node_stats(struct ieee80211_node *ni, struct sbuf *s) +amrr_print_node_rate(struct ieee80211_amrr_node *amn, +struct ieee80211_node *ni, struct sbuf *s) { int rate; - struct ieee80211_amrr_node *amn = ni->ni_rctls; struct ieee80211_rateset *rs; - /* XXX TODO: check locking? */ - - if (!amn) - return; - - /* XXX TODO: this should be a method */ if (amrr_node_is_11n(ni)) { rs = (struct ieee80211_rateset *) >ni_htrates; rate = rs->rs_rates[amn->amn_rix] & IEEE80211_RATE_VAL; @@ -498,7 +492,19 @@ amrr_node_stats(struct ieee80211_node *ni, struct sbuf rate = rs->rs_rates[amn->amn_rix] & IEEE80211_RATE_VAL; sbuf_printf(s, "rate: %d Mbit\n", rate / 2); } +} +static void +amrr_node_stats(struct ieee80211_node *ni, struct sbuf *s) +{ + struct ieee80211_amrr_node *amn = ni->ni_rctls; + + /* XXX TODO: check locking? */ + + if (!amn) + return; + + amrr_print_node_rate(amn, ni, s); sbuf_printf(s, "ticks: %d\n", amn->amn_ticks); sbuf_printf(s, "txcnt: %u\n", amn->amn_txcnt); sbuf_printf(s, "success: %u\n", amn->amn_success); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356851 - stable/12
Author: jhb Date: Fri Jan 17 22:02:35 2020 New Revision: 356851 URL: https://svnweb.freebsd.org/changeset/base/356851 Log: MFC 353932: Strip "sf" suffix when generating a target triple. This fixes the target triple used when compiling riscv64sf with clang. Sponsored by: DARPA Modified: stable/12/Makefile.inc1 Directory Properties: stable/12/ (props changed) Modified: stable/12/Makefile.inc1 == --- stable/12/Makefile.inc1 Fri Jan 17 21:57:05 2020(r356850) +++ stable/12/Makefile.inc1 Fri Jan 17 22:02:35 2020(r356851) @@ -126,9 +126,9 @@ TARGET_ABI= gnueabi .endif .endif MACHINE_ABI?= unknown -MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd12.1 +MACHINE_TRIPLE?=${MACHINE_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${MACHINE_ABI}-freebsd12.1 TARGET_ABI?= unknown -TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/hf$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd12.1 +TARGET_TRIPLE?= ${TARGET_ARCH:S/amd64/x86_64/:C/[hs]f$//:S/mipsn32/mips64/}-${TARGET_ABI}-freebsd12.1 KNOWN_ARCHES?= aarch64/arm64 \ amd64 \ arm \ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356850 - stable/12/sys/riscv/include
Author: jhb Date: Fri Jan 17 21:57:05 2020 New Revision: 356850 URL: https://svnweb.freebsd.org/changeset/base/356850 Log: MFC 353931: Fix atomic_*cmpset32 on riscv64 with clang. The lr.w instruction used to read the value from memory sign-extends the value read from memory. GCC sign-extends the 32-bit comparison value passed in whereas clang currently does not. As a result, if the value being compared has the MSB set, the comparison fails for matching 32-bit values when compiled with clang. Use a cast to explicitly sign-extend the unsigned comparison value. This works with both GCC and clang. There is commentary in the RISC-V spec that suggests that GCC's approach is more correct, but it is not clear if the commentary in the RISC-V spec is binding. Sponsored by: DARPA Modified: stable/12/sys/riscv/include/atomic.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/riscv/include/atomic.h == --- stable/12/sys/riscv/include/atomic.hFri Jan 17 21:39:28 2020 (r356849) +++ stable/12/sys/riscv/include/atomic.hFri Jan 17 21:57:05 2020 (r356850) @@ -116,7 +116,7 @@ atomic_cmpset_32(volatile uint32_t *p, uint32_t cmpval "bnez %1, 0b\n" "1:" : "=" (tmp), "=" (res), "+A" (*p) - : "rJ" (cmpval), "rJ" (newval) + : "rJ" ((long)(int32_t)cmpval), "rJ" (newval) : "memory"); return (!res); @@ -141,7 +141,7 @@ atomic_fcmpset_32(volatile uint32_t *p, uint32_t *cmpv "sw %0, %3\n" /* Save old value */ "2:" : "=" (tmp), "=" (res), "+A" (*p), "+A" (*cmpval) - : "rJ" (*cmpval), "rJ" (newval) + : "rJ" ((long)(int32_t)*cmpval), "rJ" (newval) : "memory"); return (!res); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356849 - head/sys/arm/broadcom/bcm2835
Author: kevans Date: Fri Jan 17 21:39:28 2020 New Revision: 356849 URL: https://svnweb.freebsd.org/changeset/base/356849 Log: bcm2835_vcbus: unifdef all platform definitions Raspberry Pi are all over the board, and the reality is that there's no harm in including all of the definitions by default but plenty of harm in the current situation. This change is safe because we match a definition by root /compatible in the FDT, so there will be no false-positives because of it. The main array of definitions grows, but it's only walked exactly once to determine which we need to use. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.c == --- head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.c Fri Jan 17 21:29:20 2020(r356848) +++ head/sys/arm/broadcom/bcm2835/bcm2835_vcbus.c Fri Jan 17 21:39:28 2020(r356849) @@ -35,9 +35,6 @@ __FBSDID("$FreeBSD$"); * mappings for use in DMA/mailbox interactions. This is only used for the * arm64 SoC because the 32-bit SoC used the same mappings. */ -#if defined (__aarch64__) -#include "opt_soc.h" -#endif #include #include @@ -67,7 +64,6 @@ struct bcm283x_memory_mapping { vm_paddr_t vcbus_start; }; -#ifdef SOC_BCM2835 static struct bcm283x_memory_mapping bcm2835_memmap[] = { { /* SDRAM */ @@ -83,9 +79,7 @@ static struct bcm283x_memory_mapping bcm2835_memmap[] }, { 0, 0, 0 }, }; -#endif -#ifdef SOC_BCM2836 static struct bcm283x_memory_mapping bcm2836_memmap[] = { { /* SDRAM */ @@ -101,9 +95,7 @@ static struct bcm283x_memory_mapping bcm2836_memmap[] }, { 0, 0, 0 }, }; -#endif -#ifdef SOC_BRCM_BCM2837 static struct bcm283x_memory_mapping bcm2837_memmap[] = { { /* SDRAM */ @@ -119,10 +111,7 @@ static struct bcm283x_memory_mapping bcm2837_memmap[] }, { 0, 0, 0 }, }; -#endif -#ifdef SOC_BRCM_BCM2838 - /* * The BCM2838 supports up to 4GB of SDRAM, but unfortunately we can still only * map the first 1GB into the "legacy master view" (vcbus) address space. Thus, @@ -144,14 +133,12 @@ static struct bcm283x_memory_mapping bcm2838_memmap[] }, { 0, 0, 0 }, }; -#endif static struct bcm283x_memory_soc_cfg { struct bcm283x_memory_mapping *memmap; const char *soc_compat; bus_addr_t busdma_lowaddr; } bcm283x_memory_configs[] = { -#ifdef SOC_BCM2835 /* Legacy */ { .memmap = bcm2835_memmap, @@ -164,8 +151,6 @@ static struct bcm283x_memory_soc_cfg { .soc_compat = "brcm,bcm2835", .busdma_lowaddr = BUS_SPACE_MAXADDR_32BIT, }, -#endif -#ifdef SOC_BCM2836 /* Legacy */ { .memmap = bcm2836_memmap, @@ -178,16 +163,11 @@ static struct bcm283x_memory_soc_cfg { .soc_compat = "brcm,bcm2836", .busdma_lowaddr = BUS_SPACE_MAXADDR_32BIT, }, - -#endif -#ifdef SOC_BRCM_BCM2837 { .memmap = bcm2837_memmap, .soc_compat = "brcm,bcm2837", .busdma_lowaddr = BUS_SPACE_MAXADDR_32BIT, }, -#endif -#ifdef SOC_BRCM_BCM2838 { .memmap = bcm2838_memmap, .soc_compat = "brcm,bcm2711", @@ -198,7 +178,6 @@ static struct bcm283x_memory_soc_cfg { .soc_compat = "brcm,bcm2838", .busdma_lowaddr = BCM2838_PERIPH_MAXADDR, }, -#endif }; static struct bcm283x_memory_soc_cfg *booted_soc_memcfg; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356847 - vendor/llvm-project/llvmorg-10-init-17468-gc4a134a5107
Author: dim Date: Fri Jan 17 21:22:11 2020 New Revision: 356847 URL: https://svnweb.freebsd.org/changeset/base/356847 Log: Tag llvm-project release/10.x c4a134a51. Added: vendor/llvm-project/llvmorg-10-init-17468-gc4a134a5107/ - copied from r356846, vendor/llvm-project/release-10.x/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356846 - in vendor/llvm-project/release-10.x/clang: include/clang/Driver lib/Driver tools/driver
Author: dim Date: Fri Jan 17 21:20:15 2020 New Revision: 356846 URL: https://svnweb.freebsd.org/changeset/base/356846 Log: Vendor import of llvm-project release/10.x c4a134a51. Modified: vendor/llvm-project/release-10.x/clang/include/clang/Driver/Options.td vendor/llvm-project/release-10.x/clang/lib/Driver/Driver.cpp vendor/llvm-project/release-10.x/clang/tools/driver/driver.cpp Modified: vendor/llvm-project/release-10.x/clang/include/clang/Driver/Options.td == --- vendor/llvm-project/release-10.x/clang/include/clang/Driver/Options.td Fri Jan 17 20:50:00 2020(r356845) +++ vendor/llvm-project/release-10.x/clang/include/clang/Driver/Options.td Fri Jan 17 21:20:15 2020(r356846) @@ -2855,6 +2855,14 @@ def fintegrated_as : Flag<["-"], "fintegrated-as">, Fl def fno_integrated_as : Flag<["-"], "fno-integrated-as">, Flags<[CC1Option, DriverOption]>, Group, HelpText<"Disable the integrated assembler">; + +def fintegrated_cc1 : Flag<["-"], "fintegrated-cc1">, + Flags<[CoreOption, DriverOption]>, Group, + HelpText<"Run cc1 in-process">; +def fno_integrated_cc1 : Flag<["-"], "fno-integrated-cc1">, + Flags<[CoreOption, DriverOption]>, Group, + HelpText<"Spawn a separate process for each cc1">; + def : Flag<["-"], "integrated-as">, Alias, Flags<[DriverOption]>; def : Flag<["-"], "no-integrated-as">, Alias, Flags<[CC1Option, DriverOption]>; Modified: vendor/llvm-project/release-10.x/clang/lib/Driver/Driver.cpp == --- vendor/llvm-project/release-10.x/clang/lib/Driver/Driver.cppFri Jan 17 20:50:00 2020(r356845) +++ vendor/llvm-project/release-10.x/clang/lib/Driver/Driver.cppFri Jan 17 21:20:15 2020(r356846) @@ -1035,6 +1035,10 @@ Compilation *Driver::BuildCompilation(ArrayRef argv) { +CreateAndPopulateDiagOpts(ArrayRef argv, bool ) { auto *DiagOpts = new DiagnosticOptions; unsigned MissingArgIndex, MissingArgCount; InputArgList Args = getDriverOptTable().ParseArgs( @@ -303,6 +282,12 @@ CreateAndPopulateDiagOpts(ArrayRef argv) // Any errors that would be diagnosed here will also be diagnosed later, // when the DiagnosticsEngine actually exists. (void)ParseDiagnosticArgs(*DiagOpts, Args); + + UseNewCC1Process = + Args.hasFlag(clang::driver::options::OPT_fno_integrated_cc1, + clang::driver::options::OPT_fintegrated_cc1, + /*Default=*/CLANG_SPAWN_CC1); + return DiagOpts; } @@ -330,7 +315,7 @@ static void SetInstallDir(SmallVectorImpl argv) { // If we call the cc1 tool from the clangDriver library (through - // Driver::CC1Main), we need to cleanup the options usage count. The options + // Driver::CC1Main), we need to clean up the options usage count. The options // are currently global, and they might have been used previously by the // driver. llvm::cl::ResetAllOptionOccurrences(); @@ -413,6 +398,8 @@ int main(int argc_, const char **argv_) { return ExecuteCC1Tool(argv); } + // Handle options that need handling before the real command line parsing in + // Driver::BuildCompilation() bool CanonicalPrefixes = true; for (int i = 1, size = argv.size(); i < size; ++i) { // Skip end-of-line response file markers @@ -457,8 +444,14 @@ int main(int argc_, const char **argv_) { std::string Path = GetExecutablePath(argv[0], CanonicalPrefixes); + // Whether the cc1 tool should be called inside the current process, or if we + // should spawn a new clang subprocess (old behavior). + // Not having an additional process saves some execution time of Windows, + // and makes debugging and profiling easier. + bool UseNewCC1Process; + IntrusiveRefCntPtr DiagOpts = - CreateAndPopulateDiagOpts(argv); + CreateAndPopulateDiagOpts(argv, UseNewCC1Process); TextDiagnosticPrinter *DiagClient = new TextDiagnosticPrinter(llvm::errs(), &*DiagOpts); @@ -485,6 +478,12 @@ int main(int argc_, const char **argv_) { insertTargetAndModeArgs(TargetAndMode, argv, SavedStrings); SetBackdoorDriverOutputsFromEnvVars(TheDriver); + + if (!UseNewCC1Process) { +TheDriver.CC1Main = +// Ensure the CC1Command actually catches cc1 crashes +llvm::CrashRecoveryContext::Enable(); + } std::unique_ptr C(TheDriver.BuildCompilation(argv)); int Res = 1; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356845 - vendor/llvm-project/release-10.x
Author: dim Date: Fri Jan 17 20:50:00 2020 New Revision: 356845 URL: https://svnweb.freebsd.org/changeset/base/356845 Log: Branch vendor/llvm-project/master to vendor/llvm-project/release-10.x, to allow for independent merges of the upstream master and release-10.x branches. Added: vendor/llvm-project/release-10.x/ - copied from r356844, vendor/llvm-project/master/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356844 - vendor/llvm-project/llvmorg-10-init-17466-ge26a78e7085
Author: dim Date: Fri Jan 17 20:46:33 2020 New Revision: 356844 URL: https://svnweb.freebsd.org/changeset/base/356844 Log: Tag llvm-project master e26a78e70, the last commit before the llvmorg-11-init tag, from which release/10.x was branched. Added: vendor/llvm-project/llvmorg-10-init-17466-ge26a78e7085/ - copied from r356843, vendor/llvm-project/master/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356842 - in vendor/llvm-project/release-9.x: libcxx/src lld lld/COFF lld/Common lld/ELF lld/docs lld/lib lld/lib/Core lld/lib/Driver lld/lib/ReaderWriter lld/lib/ReaderWriter/MachO lld...
Author: dim Date: Fri Jan 17 20:30:08 2020 New Revision: 356842 URL: https://svnweb.freebsd.org/changeset/base/356842 Log: Remove files from vendor/llvm-project/release-9.x which are unused, and never merged to contrib. Deleted: vendor/llvm-project/release-9.x/libcxx/src/CMakeLists.txt vendor/llvm-project/release-9.x/lld/CMakeLists.txt vendor/llvm-project/release-9.x/lld/COFF/CMakeLists.txt vendor/llvm-project/release-9.x/lld/Common/CMakeLists.txt vendor/llvm-project/release-9.x/lld/ELF/CMakeLists.txt vendor/llvm-project/release-9.x/lld/docs/CMakeLists.txt vendor/llvm-project/release-9.x/lld/lib/CMakeLists.txt vendor/llvm-project/release-9.x/lld/lib/Core/CMakeLists.txt vendor/llvm-project/release-9.x/lld/lib/Driver/CMakeLists.txt vendor/llvm-project/release-9.x/lld/lib/ReaderWriter/CMakeLists.txt vendor/llvm-project/release-9.x/lld/lib/ReaderWriter/MachO/CMakeLists.txt vendor/llvm-project/release-9.x/lld/lib/ReaderWriter/YAML/CMakeLists.txt vendor/llvm-project/release-9.x/lld/tools/lld/CMakeLists.txt ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356841 - in vendor/llvm-project/master: clang/lib/Tooling/Transformer clang/tools/clang-offload-wrapper compiler-rt/lib/gwp_asan/scripts compiler-rt/tools libcxx/src lld lld/COFF lld/C...
Author: dim Date: Fri Jan 17 20:27:24 2020 New Revision: 356841 URL: https://svnweb.freebsd.org/changeset/base/356841 Log: Remove files from vendor/llvm-project/master which are unused, and never merged to contrib. Deleted: vendor/llvm-project/master/clang/lib/Tooling/Transformer/CMakeLists.txt vendor/llvm-project/master/clang/tools/clang-offload-wrapper/ vendor/llvm-project/master/compiler-rt/lib/gwp_asan/scripts/ vendor/llvm-project/master/compiler-rt/tools/ vendor/llvm-project/master/libcxx/src/CMakeLists.txt vendor/llvm-project/master/lld/CMakeLists.txt vendor/llvm-project/master/lld/COFF/CMakeLists.txt vendor/llvm-project/master/lld/Common/CMakeLists.txt vendor/llvm-project/master/lld/ELF/CMakeLists.txt vendor/llvm-project/master/lld/docs/CMakeLists.txt vendor/llvm-project/master/lld/lib/CMakeLists.txt vendor/llvm-project/master/lld/lib/Core/CMakeLists.txt vendor/llvm-project/master/lld/lib/Driver/CMakeLists.txt vendor/llvm-project/master/lld/lib/ReaderWriter/CMakeLists.txt vendor/llvm-project/master/lld/lib/ReaderWriter/MachO/CMakeLists.txt vendor/llvm-project/master/lld/lib/ReaderWriter/YAML/CMakeLists.txt vendor/llvm-project/master/lld/tools/lld/CMakeLists.txt vendor/llvm-project/master/lldb/source/Plugins/ABI/SysV-arc/CMakeLists.txt vendor/llvm-project/master/llvm/tools/llvm-ifs/ vendor/llvm-project/master/llvm/tools/llvm-reduce/ vendor/llvm-project/master/llvm/tools/vfabi-demangle-fuzzer/ vendor/llvm-project/master/llvm/utils/TableGen/GlobalISel/CMakeLists.txt vendor/llvm-project/master/llvm/utils/add_argument_names.py vendor/llvm-project/master/llvm/utils/llvm-locstats/ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r356832 - head/lib/libc/gen
On Fri, Jan 17, 2020 at 11:55 AM Dimitry Andric wrote: > On 17 Jan 2020, at 16:45, Mateusz Guzik wrote: > > > > Author: mjg > > Date: Fri Jan 17 15:45:39 2020 > > New Revision: 356832 > > URL: https://svnweb.freebsd.org/changeset/base/356832 > > > > Log: > > libc: fix build after r356830 > > > > Apparently building with 'cd lib/libc; make all install' is not the same > > as buildworld. > > Definitely not, indeed. Such a plain make will use your system's > headers for inclusion, not those in /usr/src. Only use this when you > are certain those headers are up-to-date (or up-to-date enough ;). > Generally, one can do % cd lib/libc; make buildenv $ make all install to get this functionality. Warner ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r356832 - head/lib/libc/gen
On 1/17/20, Dimitry Andric wrote: > On 17 Jan 2020, at 16:45, Mateusz Guzik wrote: >> >> Author: mjg >> Date: Fri Jan 17 15:45:39 2020 >> New Revision: 356832 >> URL: https://svnweb.freebsd.org/changeset/base/356832 >> >> Log: >> libc: fix build after r356830 >> >> Apparently building with 'cd lib/libc; make all install' is not the same >> as buildworld. > > Definitely not, indeed. Such a plain make will use your system's > headers for inclusion, not those in /usr/src. Only use this when you > are certain those headers are up-to-date (or up-to-date enough ;). > That's not the difference I meant. Building like above works fine with: unionstack = _fcntl(fd, F_ISUNIONSTACK); It's only buildworld during which this fails with: /usr/src/lib/libc/gen/opendir.c:282:40: error: too few arguments provided to function-like macro invocation unionstack = _fcntl(fd, F_ISUNIONSTACK); hence the patch. -- Mateusz Guzik ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356840 - head/sys/riscv/riscv
Author: jhb Date: Fri Jan 17 19:13:49 2020 New Revision: 356840 URL: https://svnweb.freebsd.org/changeset/base/356840 Log: Check for invalid sstatus values in set_mcontext(). Previously, this check was only in sys_sigreturn() which meant that user applications could write invalid values to the register via setcontext() or swapcontext(). Reviewed by: mhorne Sponsored by: DARPA Differential Revision:https://reviews.freebsd.org/D23219 Modified: head/sys/riscv/riscv/machdep.c Modified: head/sys/riscv/riscv/machdep.c == --- head/sys/riscv/riscv/machdep.c Fri Jan 17 19:01:59 2020 (r356839) +++ head/sys/riscv/riscv/machdep.c Fri Jan 17 19:13:49 2020 (r356840) @@ -367,6 +367,14 @@ set_mcontext(struct thread *td, mcontext_t *mcp) tf = td->td_frame; + /* +* Make sure the processor mode has not been tampered with and +* interrupts have not been disabled. +* Supervisor interrupts in user mode are always enabled. +*/ + if ((mcp->mc_gpregs.gp_sstatus & SSTATUS_SPP) != 0) + return (EINVAL); + memcpy(tf->tf_t, mcp->mc_gpregs.gp_t, sizeof(tf->tf_t)); memcpy(tf->tf_s, mcp->mc_gpregs.gp_s, sizeof(tf->tf_s)); memcpy(tf->tf_a, mcp->mc_gpregs.gp_a, sizeof(tf->tf_a)); @@ -523,21 +531,11 @@ struct sigreturn_args { int sys_sigreturn(struct thread *td, struct sigreturn_args *uap) { - uint64_t sstatus; ucontext_t uc; int error; if (copyin(uap->sigcntxp, , sizeof(uc))) return (EFAULT); - - /* -* Make sure the processor mode has not been tampered with and -* interrupts have not been disabled. -* Supervisor interrupts in user mode are always enabled. -*/ - sstatus = uc.uc_mcontext.mc_gpregs.gp_sstatus; - if ((sstatus & SSTATUS_SPP) != 0) - return (EINVAL); error = set_mcontext(td, _mcontext); if (error != 0) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356839 - in head/sys: arm64/arm64 riscv/riscv
Author: jhb Date: Fri Jan 17 19:01:59 2020 New Revision: 356839 URL: https://svnweb.freebsd.org/changeset/base/356839 Log: Save and restore floating point registers in get/set_mcontext(). arm64 and riscv were only saving and restoring floating point registers for sendsig() and sys_sigreturn(), but not for getcontext(), setcontext(), and swapcontext(). While here, remove an always-false check for uap being NULL from sys_sigreturn(). Reviewed by: br, mhorne Sponsored by: DARPA Differential Revision:https://reviews.freebsd.org/D23218 Modified: head/sys/arm64/arm64/machdep.c head/sys/riscv/riscv/machdep.c Modified: head/sys/arm64/arm64/machdep.c == --- head/sys/arm64/arm64/machdep.c Fri Jan 17 17:57:34 2020 (r356838) +++ head/sys/arm64/arm64/machdep.c Fri Jan 17 19:01:59 2020 (r356839) @@ -98,6 +98,8 @@ __FBSDID("$FreeBSD$"); #include #endif +static void get_fpcontext(struct thread *td, mcontext_t *mcp); +static void set_fpcontext(struct thread *td, mcontext_t *mcp); enum arm64_bus arm64_bus_method = ARM64_BUS_NONE; @@ -473,6 +475,7 @@ get_mcontext(struct thread *td, mcontext_t *mcp, int c mcp->mc_gpregs.gp_sp = tf->tf_sp; mcp->mc_gpregs.gp_lr = tf->tf_lr; mcp->mc_gpregs.gp_elr = tf->tf_elr; + get_fpcontext(td, mcp); return (0); } @@ -495,6 +498,7 @@ set_mcontext(struct thread *td, mcontext_t *mcp) tf->tf_lr = mcp->mc_gpregs.gp_lr; tf->tf_elr = mcp->mc_gpregs.gp_elr; tf->tf_spsr = mcp->mc_gpregs.gp_spsr; + set_fpcontext(td, mcp); return (0); } @@ -667,15 +671,12 @@ sys_sigreturn(struct thread *td, struct sigreturn_args ucontext_t uc; int error; - if (uap == NULL) - return (EFAULT); if (copyin(uap->sigcntxp, , sizeof(uc))) return (EFAULT); error = set_mcontext(td, _mcontext); if (error != 0) return (error); - set_fpcontext(td, _mcontext); /* Restore signal mask. */ kern_sigprocmask(td, SIG_SETMASK, _sigmask, NULL, 0); @@ -747,7 +748,6 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask /* Fill in the frame to copy out */ bzero(, sizeof(frame)); get_mcontext(td, _uc.uc_mcontext, 0); - get_fpcontext(td, _uc.uc_mcontext); frame.sf_si = ksi->ksi_info; frame.sf_uc.uc_sigmask = *mask; frame.sf_uc.uc_stack = td->td_sigstk; Modified: head/sys/riscv/riscv/machdep.c == --- head/sys/riscv/riscv/machdep.c Fri Jan 17 17:57:34 2020 (r356838) +++ head/sys/riscv/riscv/machdep.c Fri Jan 17 19:01:59 2020 (r356839) @@ -99,6 +99,9 @@ __FBSDID("$FreeBSD$"); #include #endif +static void get_fpcontext(struct thread *td, mcontext_t *mcp); +static void set_fpcontext(struct thread *td, mcontext_t *mcp); + struct pcpu __pcpu[MAXCPU]; static struct trapframe proc0_tf; @@ -352,6 +355,7 @@ get_mcontext(struct thread *td, mcontext_t *mcp, int c mcp->mc_gpregs.gp_tp = tf->tf_tp; mcp->mc_gpregs.gp_sepc = tf->tf_sepc; mcp->mc_gpregs.gp_sstatus = tf->tf_sstatus; + get_fpcontext(td, mcp); return (0); } @@ -372,6 +376,7 @@ set_mcontext(struct thread *td, mcontext_t *mcp) tf->tf_gp = mcp->mc_gpregs.gp_gp; tf->tf_sepc = mcp->mc_gpregs.gp_sepc; tf->tf_sstatus = mcp->mc_gpregs.gp_sstatus; + set_fpcontext(td, mcp); return (0); } @@ -522,8 +527,6 @@ sys_sigreturn(struct thread *td, struct sigreturn_args ucontext_t uc; int error; - if (uap == NULL) - return (EFAULT); if (copyin(uap->sigcntxp, , sizeof(uc))) return (EFAULT); @@ -540,8 +543,6 @@ sys_sigreturn(struct thread *td, struct sigreturn_args if (error != 0) return (error); - set_fpcontext(td, _mcontext); - /* Restore signal mask. */ kern_sigprocmask(td, SIG_SETMASK, _sigmask, NULL, 0); @@ -612,7 +613,6 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask /* Fill in the frame to copy out */ bzero(, sizeof(frame)); get_mcontext(td, _uc.uc_mcontext, 0); - get_fpcontext(td, _uc.uc_mcontext); frame.sf_si = ksi->ksi_info; frame.sf_uc.uc_sigmask = *mask; frame.sf_uc.uc_stack = td->td_sigstk; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r356832 - head/lib/libc/gen
On 17 Jan 2020, at 16:45, Mateusz Guzik wrote: > > Author: mjg > Date: Fri Jan 17 15:45:39 2020 > New Revision: 356832 > URL: https://svnweb.freebsd.org/changeset/base/356832 > > Log: > libc: fix build after r356830 > > Apparently building with 'cd lib/libc; make all install' is not the same > as buildworld. Definitely not, indeed. Such a plain make will use your system's headers for inclusion, not those in /usr/src. Only use this when you are certain those headers are up-to-date (or up-to-date enough ;). -Dimitry signature.asc Description: Message signed with OpenPGP
svn commit: r356838 - in stable/12: share/man/man4 sys/conf sys/dev/flash sys/dev/iicbus sys/dev/iicbus/mux sys/modules/i2c sys/modules/i2c/mux
Author: ian Date: Fri Jan 17 17:57:34 2020 New Revision: 356838 URL: https://svnweb.freebsd.org/changeset/base/356838 Log: MFC r356086, r356278, r356294, r356519, r356521-r356522, r356525-r356526 r356086: Add comments to a couple i2c device lines in NOTES. r356278: Add support for i2c bus mux hardware. An i2c bus can be divided into segments which can be selectively connected and disconnected from the main bus. This is usually done to enable using multiple slave devices having the same address, by isolating the devices onto separate bus segments, only one of which is connected to the main bus at once. There are several types of i2c bus muxes, which break down into two general categories... - Muxes which are themselves i2c slaves. These devices respond to i2c commands on their upstream bus, and based on those commands, connect various downstream buses to the upstream. In newbus terms, they are both a child of an iicbus and the parent of one or more iicbus instances. - Muxes which are not i2c devices themselves. Such devices are part of the i2c bus electrically, but in newbus terms their parent is some other bus. The association with the upstream bus must be established by separate metadata (such as FDT data). In both cases, the mux driver has one or more iicbus child instances representing the downstream buses. The mux driver implements the iicbus_if interface, as if it were an iichb host bridge/i2c controller driver. It services the IO requests sent to it by forwarding them to the iicbus instance representing the upstream bus, after electrically connecting the upstream bus to the downstream bus that hosts the i2c slave device which made the IO request. The net effect is automatic mux switching which is transparent to slaves on the downstream buses. They just do i2c IO they way they normally do, and the bus is electrically connected for the duration of the IO and then idled when it is complete. The existing iicbus_if callback() method is enhanced so that the parameter passed to it can be a struct which contains a device_t for the requesting bus and slave devices. This change is done by adding a flag that indicates the extra values are present, and making the flags field the first field of a new args struct. If the flag is set, the iichb or mux driver can recast the pointer-to-flags into a pointer-to-struct and access the extra fields. Thus abi compatibility with older drivers is retained (but a mux cannot exist on the bus with the older iicbus driver in use.) A new set of core support routines exists in iicbus.c. This code will help implement mux drivers for any type of mux hardware by supplying all the boilerplate code that forwards IO requests upstream. It also has code for parsing metadata and instantiating the child iicbus instances based on it. Two new hardware mux drivers are added. The ltc430x driver supports the LTC4305/4306 mux chips which are controlled via i2c commands. The iic_gpiomux driver supports any mux hardware which is controlled by manipulating the state of one or more gpio pins. Test Plan Tested locally using a variety of mux'd bus configurations involving both ltc4305 and a homebrew gpio-controlled mux. Tested configurations included cascaded muxes (unlikely in the real world, but useful to prove that 'it all just works' in terms of the automatic switching and upstream forwarding of IO requests). r356294: Explicitly include sys/rman.h instead of relying on getting it via some other header. r356519: Ensure any reserved gpio pins get released if an early exit is taken from the attach function. r356521: Init sc->maxbus to -1, not 0. It represents the highest array index that has a non-NULL child bus stored in it, so the "none" value can't be zero since that's a valid array index. Also, when adding all possible buses because there is no specific per-bus config, there's no need to reset sc->maxbus on each loop iteration, it can be set once after the loop. r356522: Change some KASSERT to device_printf + return EINVAL. There's no need to bring the whole kernel down due to a configuration error detected when a module is loaded, it suffices to just not attach the device. r356525: Split the code to find and add iicbus children out to its own function. Move the decision to take an early exit from that function after adding children based on FDT data into the #ifdef FDT block, so that it doesn't offend coverity's notion of how the code should be written. (What's the point of compilers optimizing away dead code if static analyzers won't let you use the feature in conjuction with an #ifdef block?) Reported by: coverity via vangyzen@ r356526: Remove some trailing whitespace; no functional changes. Added: stable/12/share/man/man4/iic_gpiomux.4 - copied
svn commit: r356837 - head/share/man/man5
Author: emaste Date: Fri Jan 17 17:56:31 2020 New Revision: 356837 URL: https://svnweb.freebsd.org/changeset/base/356837 Log: src.conf.5: regen after r356836, DMAGENT dependency on OPENSSL Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Fri Jan 17 17:53:13 2020 (r356836) +++ head/share/man/man5/src.conf.5 Fri Jan 17 17:56:31 2020 (r356837) @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd January 14, 2020 +.Dd January 17, 2020 .Dt SRC.CONF 5 .Os .Sh NAME @@ -179,11 +179,10 @@ Build all binaries with the flag set to indicate that the run-time loader should perform all relocation processing at process startup rather than on demand. .It Va WITHOUT_BINUTILS -Set to not build or install GNU +Do not build or install GNU .Xr as 1 , -.Xr objdump 1 , -and, on powerpc, -.Xr ld.bfd 1 +.Xr ld.bfd 1 , and +.Xr objdump 1 as part of the normal system build. The resulting system cannot build programs from source. @@ -202,7 +201,7 @@ of the normal system build. This is a default setting on amd64/amd64, arm/armv6, arm/armv7, i386/i386, mips/mipsel, mips/mips, mips/mips64el, mips/mips64, mips/mipsn32, mips/mipselhf, mips/mipshf, mips/mips64elhf, mips/mips64hf, powerpc/powerpc, powerpc/powerpc64 and sparc64/sparc64. .It Va WITHOUT_BINUTILS_BOOTSTRAP -Set to not build binutils (as, objdump, and on powerpc ld) +Do not build binutils (as, ld.bfd, and objdump) as part of the bootstrap process. .Bf -symbolic The option does not work for build targets unless some alternative @@ -469,6 +468,8 @@ When set, it enforces these options: .Pp .Bl -item -compact .It +.Va WITHOUT_DMAGENT +.It .Va WITHOUT_KERBEROS .It .Va WITHOUT_KERBEROS_SUPPORT @@ -1453,6 +1454,8 @@ Set to not build OpenSSL. When set, it enforces these options: .Pp .Bl -item -compact +.It +.Va WITHOUT_DMAGENT .It .Va WITHOUT_KERBEROS .It ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356836 - head/share/mk
Author: emaste Date: Fri Jan 17 17:53:13 2020 New Revision: 356836 URL: https://svnweb.freebsd.org/changeset/base/356836 Log: src.opts.mk: force DMAGENT off under WITHOUT_OPENSSL dma(8) depends on OpenSSL unconditionally. Reported by: Michael Dexter's Build Options Survey run MFC after:1 weeks Sponsored by: The FreeBSD Foundation Modified: head/share/mk/src.opts.mk Modified: head/share/mk/src.opts.mk == --- head/share/mk/src.opts.mk Fri Jan 17 17:03:25 2020(r356835) +++ head/share/mk/src.opts.mk Fri Jan 17 17:53:13 2020(r356836) @@ -497,6 +497,7 @@ MK_NLS_CATALOGS:= no .endif .if ${MK_OPENSSL} == "no" +MK_DMAGENT:= no MK_OPENSSH:= no MK_KERBEROS:= no MK_KERBEROS_SUPPORT:= no ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r356831 - head/sys/powerpc/include
On 1/17/20 6:43 AM, Leandro Lupori wrote: > Author: luporl > Date: Fri Jan 17 14:43:58 2020 > New Revision: 356831 > URL: https://svnweb.freebsd.org/changeset/base/356831 > > Log: > [PPC] Fix wrong comment > > pcb_context[20] holds r12-r31 and not r14-r31, as the comment said. Thanks, this was the source of the kgdb bug I think. :) -- John Baldwin ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356835 - head/sys/riscv/riscv
Author: mhorne Date: Fri Jan 17 17:03:25 2020 New Revision: 356835 URL: https://svnweb.freebsd.org/changeset/base/356835 Log: RISC-V: fix global pointer assignment at boot As part of the RISC-V ABI, the gp register is expected to initialized with the address of __global_pointer$ as early as possible. This allows loads and stores from .sdata to be relaxed based on the value of gp. In locore.S we do this initialization twice, once each for va and mpva. However, in both cases the initialization is preceded by an la instruction, which in theory could be relaxed by the linker. Move the initialization of gp to be slightly earlier (before la cpu_exception_handler), and add an additional gp initialization at the very beginning of _start, before virtual memory is set up. Reported by: jrtc27 Reviewed by: jrtc27 Differential Revision:https://reviews.freebsd.org/D23139 Modified: head/sys/riscv/riscv/locore.S Modified: head/sys/riscv/riscv/locore.S == --- head/sys/riscv/riscv/locore.S Fri Jan 17 16:48:20 2020 (r356834) +++ head/sys/riscv/riscv/locore.S Fri Jan 17 17:03:25 2020 (r356835) @@ -53,6 +53,12 @@ .text .globl _start _start: + /* Set the global pointer */ +.option push +.option norelax + lla gp, __global_pointer$ +.option pop + /* Get the physical address kernel loaded to */ lla t0, virt_map ld t1, 0(t0) @@ -168,6 +174,11 @@ _start: .align 2 va: + /* Set the global pointer again, this time with the virtual address. */ +.option push +.option norelax + lla gp, __global_pointer$ +.option pop /* Setup supervisor trap vector */ la t0, cpu_exception_handler @@ -177,12 +188,6 @@ va: li t0, 0 csrwsscratch, t0 - /* Set the global pointer */ -.option push -.option norelax - la gp, __global_pointer$ -.option pop - /* Initialize stack pointer */ la s3, initstack_end mv sp, s3 @@ -322,6 +327,12 @@ ENTRY(mpentry) .align 2 mpva: + /* Set the global pointer again, this time with the virtual address. */ +.option push +.option norelax + lla gp, __global_pointer$ +.option pop + /* Setup supervisor trap vector */ la t0, cpu_exception_handler csrwstvec, t0 @@ -329,12 +340,6 @@ mpva: /* Ensure sscratch is zero */ li t0, 0 csrwsscratch, t0 - - /* Set the global pointer */ -.option push -.option norelax - la gp, __global_pointer$ -.option pop callinit_secondary END(mpentry) ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356834 - head/sys/riscv/riscv
Author: br Date: Fri Jan 17 16:48:20 2020 New Revision: 356834 URL: https://svnweb.freebsd.org/changeset/base/356834 Log: Use unsigned loads in fubyte, fuword16, generic_bs_r_1, generic_bs_r_2 as these functions should do zero-extend. Discovered by running pci_read_cap(), and by hint from James Clarke. Reviewed by: James Clarke Sponsored by: DARPA, AFRL Differential Revision:https://reviews.freebsd.org/D23236 Modified: head/sys/riscv/riscv/bus_space_asm.S head/sys/riscv/riscv/support.S Modified: head/sys/riscv/riscv/bus_space_asm.S == --- head/sys/riscv/riscv/bus_space_asm.SFri Jan 17 15:55:14 2020 (r356833) +++ head/sys/riscv/riscv/bus_space_asm.SFri Jan 17 16:48:20 2020 (r356834) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016 Ruslan Bukin + * Copyright (c) 2016-2020 Ruslan Bukin * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -38,13 +38,13 @@ __FBSDID("$FreeBSD$"); ENTRY(generic_bs_r_1) add a3, a1, a2 - lb a0, 0(a3) + lbu a0, 0(a3) ret END(generic_bs_r_1) ENTRY(generic_bs_r_2) add a3, a1, a2 - lh a0, 0(a3) + lhu a0, 0(a3) ret END(generic_bs_r_2) Modified: head/sys/riscv/riscv/support.S == --- head/sys/riscv/riscv/support.S Fri Jan 17 15:55:14 2020 (r356833) +++ head/sys/riscv/riscv/support.S Fri Jan 17 16:48:20 2020 (r356834) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015-2018 Ruslan Bukin + * Copyright (c) 2015-2020 Ruslan Bukin * All rights reserved. * * Portions of this software were developed by SRI International and the @@ -102,7 +102,7 @@ ENTRY(fubyte) la a6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(a6, a1) /* And set it */ ENTER_USER_ACCESS(a1) - lb a0, 0(a0) /* Try loading the data */ + lbu a0, 0(a0) /* Try loading the data */ EXIT_USER_ACCESS(a1) SET_FAULT_HANDLER(x0, a1) /* Reset the fault handler */ ret /* Return */ @@ -117,7 +117,7 @@ ENTRY(fuword16) la a6, fsu_fault /* Load the fault handler */ SET_FAULT_HANDLER(a6, a1) /* And set it */ ENTER_USER_ACCESS(a1) - lh a0, 0(a0) /* Try loading the data */ + lhu a0, 0(a0) /* Try loading the data */ EXIT_USER_ACCESS(a1) SET_FAULT_HANDLER(x0, a1) /* Reset the fault handler */ ret /* Return */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356833 - in stable/12/sys: arm/arm arm/conf arm/include conf kern sys
Author: ian Date: Fri Jan 17 15:55:14 2020 New Revision: 356833 URL: https://svnweb.freebsd.org/changeset/base/356833 Log: MFC r354709-r354710, r355069, r355439, r355780, r356273, r356472 r354709: Rewrite arm/stack_machdep.c for EABI; add stack(9) support to arm kernels. The old stack_machdep.c code was written for the APCS ABI (aka "oldabi"). When we switched to ARM EABI (back in freebsd 10) this file never got updated, and apparently nobody noticed that until now. The new implementation uses the same stack unwinder code used by the arm implemenation of the db_trace stuff. r354710: Compile in arm/unwind.c if options STACK is in effect; the new arm stack(9) code now uses unwind.c. r355069: When doing ARM stack unwinding as part of stack_save(9), do not search loaded modules (pass 0/false for the can_lock arg). Searching the unwind info in modules acquires an exclusive sxlock, and the stack(9) functions can be called in a context where unbounded sleeps are forbidden (such as from the witness checkorder code). Just ignoring the existence of modules in stack_save() is not ideal, so I'm looking for a better solution, but this commit will make it possible to boot an ARM kernel with WITNESS enabled again, until I get something better. PR: 242200 r355439: Declare the global kernel symbols created by ldscript.arm in arm's machdep.h, and remove a couple scattered local declarations. Most of these aren't referenced in C code (there are some references in asm code), and they also aren't documented anywhere. This helps a bit with the latter. r355780: Rewrite arm kernel stack unwind code to work when unwinding through modules. The arm kernel stack unwinder has apparently never been able to unwind when the path of execution leads through a kernel module. There was code that tried to handle modules by looking for the unwind data in them, but it did so by trying to find symbols which have never existed in arm kernel modules. That caused the unwind code to panic, and because part of panic handling calls into the unwind code, that just created a recursion loop. Locating the unwind data in a loaded module requires accessing the Elf section headers to find the SHT_ARM_EXIDX section. For preloaded modules those headers are present in a metadata blob. For dynamically loaded modules, the headers are present only while the loading is in progress; the memory is freed once the module is ready to use. For that reason, there is new code in kern/link_elf.c, wrapped in #ifdef __arm__, to extract the unwind info while the headers are loaded. The values are saved into new fields in the linker_file structure which are also conditional on __arm__. In arm/unwind.c there is new code to locally cache the per-module info needed to find the unwind tables. The local cache is crafted for lockless read access, because the unwind code often needs to run in context where sleeping is not allowed. A large comment block describes the local cache list, so I won't repeat it all here. r356273: Since arm/unwind.c s conditionally compiled, only call functions in it when one of those conditions is true. Fixes build failure on kernel configs with no debugging options active. r356472: Add #ifdef option-test wrappers around another call to an arm/unwind.c function which is only compiled-in with certain options. Why is it always the most trivial part of a big commit that takes 3 tries to get right? Modified: stable/12/sys/arm/arm/elf_machdep.c stable/12/sys/arm/arm/mp_machdep.c stable/12/sys/arm/arm/stack_machdep.c stable/12/sys/arm/arm/unwind.c stable/12/sys/arm/conf/std.armv6 stable/12/sys/arm/conf/std.armv7 stable/12/sys/arm/include/machdep.h stable/12/sys/arm/include/stack.h stable/12/sys/conf/files.arm stable/12/sys/kern/kern_linker.c stable/12/sys/kern/link_elf.c stable/12/sys/sys/linker.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/arm/arm/elf_machdep.c == --- stable/12/sys/arm/arm/elf_machdep.c Fri Jan 17 15:45:39 2020 (r356832) +++ stable/12/sys/arm/arm/elf_machdep.c Fri Jan 17 15:55:14 2020 (r356833) @@ -47,10 +47,15 @@ __FBSDID("$FreeBSD$"); #include #include +#include #ifdef VFP #include #endif +#include "opt_ddb.h"/* for OPT_DDB */ +#include "opt_global.h" /* for OPT_KDTRACE_HOOKS */ +#include "opt_stack.h" /* for OPT_STACK */ + static boolean_t elf32_arm_abi_supported(struct image_params *); u_long elf_hwcap; @@ -309,12 +314,25 @@ elf_cpu_load_file(linker_file_t lf) cpu_l2cache_wb_range((vm_offset_t)lf->address, (vm_size_t)lf->size); cpu_icache_sync_range((vm_offset_t)lf->address, (vm_size_t)lf->size); #endif + +#if defined(DDB) || defined(KDTRACE_HOOKS) ||
svn commit: r356832 - head/lib/libc/gen
Author: mjg Date: Fri Jan 17 15:45:39 2020 New Revision: 356832 URL: https://svnweb.freebsd.org/changeset/base/356832 Log: libc: fix build after r356830 Apparently building with 'cd lib/libc; make all install' is not the same as buildworld. Reported by: Michael Butler Modified: head/lib/libc/gen/opendir.c Modified: head/lib/libc/gen/opendir.c == --- head/lib/libc/gen/opendir.c Fri Jan 17 14:43:58 2020(r356831) +++ head/lib/libc/gen/opendir.c Fri Jan 17 15:45:39 2020(r356832) @@ -279,7 +279,7 @@ is_unionstack(int fd) struct statfs sfb; int unionstack; - unionstack = _fcntl(fd, F_ISUNIONSTACK); + unionstack = _fcntl(fd, F_ISUNIONSTACK, 0); if (unionstack != -1) return (unionstack); ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r356758 - in head/usr.sbin/bsdinstall: . scripts
17.01.2020 21:08, Slawa Olhovchenkov wrote: > I am cleary understund you provide expirence from satble/10 to > current/13? > w/ different clang, kernel, etc? No, I'm talking about production and recent stable/11. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356831 - head/sys/powerpc/include
Author: luporl Date: Fri Jan 17 14:43:58 2020 New Revision: 356831 URL: https://svnweb.freebsd.org/changeset/base/356831 Log: [PPC] Fix wrong comment pcb_context[20] holds r12-r31 and not r14-r31, as the comment said. Modified: head/sys/powerpc/include/pcb.h Modified: head/sys/powerpc/include/pcb.h == --- head/sys/powerpc/include/pcb.h Fri Jan 17 14:42:25 2020 (r356830) +++ head/sys/powerpc/include/pcb.h Fri Jan 17 14:43:58 2020 (r356831) @@ -41,7 +41,7 @@ #ifndef _STANDALONE struct pcb { - register_t pcb_context[20];/* non-volatile r14-r31 */ + register_t pcb_context[20];/* non-volatile r12-r31 */ register_t pcb_cr; /* Condition register */ register_t pcb_sp; /* stack pointer */ register_t pcb_toc;/* toc pointer */ ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356830 - in head: lib/libc/gen lib/libc/sys sys/fs/unionfs sys/kern sys/sys
Author: mjg Date: Fri Jan 17 14:42:25 2020 New Revision: 356830 URL: https://svnweb.freebsd.org/changeset/base/356830 Log: vfs: provide F_ISUNIONSTACK as a kludge for libc Prior to introduction of this op libc's readdir would call fstatfs(2), in effect unnecessarily copying kilobytes of data just to check fs name and a mount flag. Reviewed by: kib (previous version) Differential Revision:https://reviews.freebsd.org/D23162 Modified: head/lib/libc/gen/opendir.c head/lib/libc/sys/fcntl.2 head/sys/fs/unionfs/union_vfsops.c head/sys/kern/kern_descrip.c head/sys/sys/fcntl.h head/sys/sys/mount.h Modified: head/lib/libc/gen/opendir.c == --- head/lib/libc/gen/opendir.c Fri Jan 17 14:40:09 2020(r356829) +++ head/lib/libc/gen/opendir.c Fri Jan 17 14:42:25 2020(r356830) @@ -273,7 +273,25 @@ _filldir(DIR *dirp, bool use_current_pos) return (true); } +static bool +is_unionstack(int fd) +{ + struct statfs sfb; + int unionstack; + unionstack = _fcntl(fd, F_ISUNIONSTACK); + if (unionstack != -1) + return (unionstack); + + /* +* Temporary compat for kernels which don't provide F_ISUNIONSTACK. +*/ + if (_fstatfs(fd, ) < 0) + return (true); + return (strcmp(sfb.f_fstypename, "unionfs") == 0 || + (sfb.f_flags & MNT_UNION)); +} + /* * Common routine for opendir(3), __opendir2(3) and fdopendir(3). */ @@ -312,12 +330,7 @@ __opendir_common(int fd, int flags, bool use_current_p */ unionstack = false; if (flags & DTF_NODUP) { - struct statfs sfb; - - if (_fstatfs(fd, ) == 0) { - unionstack = strcmp(sfb.f_fstypename, "unionfs") == 0 || - (sfb.f_flags & MNT_UNION); - } + unionstack = is_unionstack(fd); } if (unionstack) { Modified: head/lib/libc/sys/fcntl.2 == --- head/lib/libc/sys/fcntl.2 Fri Jan 17 14:40:09 2020(r356829) +++ head/lib/libc/sys/fcntl.2 Fri Jan 17 14:42:25 2020(r356830) @@ -28,7 +28,7 @@ .\" @(#)fcntl.28.2 (Berkeley) 1/12/94 .\" $FreeBSD$ .\" -.Dd September 4, 2019 +.Dd January 17, 2020 .Dt FCNTL 2 .Os .Sh NAME @@ -185,6 +185,11 @@ Add seals to the file as described below, if the under seals. .It Dv F_GET_SEALS Get seals associated with the file, if the underlying filesystem supports seals. +.It Dv F_ISUNIONSTACK +Check if the vnode is part of a union stack (either the "union" flag from +.Xr mount 2 +or unionfs). +This is a hack not intended to be used outside of libc. .El .Pp The flags for the Modified: head/sys/fs/unionfs/union_vfsops.c == --- head/sys/fs/unionfs/union_vfsops.c Fri Jan 17 14:40:09 2020 (r356829) +++ head/sys/fs/unionfs/union_vfsops.c Fri Jan 17 14:42:25 2020 (r356830) @@ -296,7 +296,7 @@ unionfs_domount(struct mount *mp) if ((ump->um_lowervp->v_mount->mnt_flag & MNT_LOCAL) && (ump->um_uppervp->v_mount->mnt_flag & MNT_LOCAL)) mp->mnt_flag |= MNT_LOCAL; - mp->mnt_kern_flag |= MNTK_NOMSYNC; + mp->mnt_kern_flag |= MNTK_NOMSYNC | MNTK_UNIONFS; MNT_IUNLOCK(mp); /* Modified: head/sys/kern/kern_descrip.c == --- head/sys/kern/kern_descrip.cFri Jan 17 14:40:09 2020 (r356829) +++ head/sys/kern/kern_descrip.cFri Jan 17 14:42:25 2020 (r356830) @@ -489,6 +489,7 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_ struct filedescent *fde; struct proc *p; struct vnode *vp; + struct mount *mp; int error, flg, seals, tmp; uint64_t bsize; off_t foffset; @@ -813,6 +814,49 @@ kern_fcntl(struct thread *td, int fd, int cmd, intptr_ atomic_clear_int(>f_flag, FRDAHEAD); } VOP_UNLOCK(vp); + fdrop(fp, td); + break; + + case F_ISUNIONSTACK: + /* +* Check if the vnode is part of a union stack (either the +* "union" flag from mount(2) or unionfs). +* +* Prior to introduction of this op libc's readdir would call +* fstatfs(2), in effect unnecessarily copying kilobytes of +* data just to check fs name and a mount flag. +* +* Fixing the code to handle everything in the kernel instead +* is a non-trivial endeavor and has low priority, thus this +* horrible kludge facilitates the current behavior in a much +* cheaper manner until
svn commit: r356829 - head/lib/libc/gen
Author: mjg Date: Fri Jan 17 14:40:09 2020 New Revision: 356829 URL: https://svnweb.freebsd.org/changeset/base/356829 Log: libc: assume no union stack if fstatfs fails in readdir The failure is not really expected, but should it happen it's better to get some data. Suggested by: kib Modified: head/lib/libc/gen/opendir.c Modified: head/lib/libc/gen/opendir.c == --- head/lib/libc/gen/opendir.c Fri Jan 17 14:39:00 2020(r356828) +++ head/lib/libc/gen/opendir.c Fri Jan 17 14:40:09 2020(r356829) @@ -283,7 +283,7 @@ __opendir_common(int fd, int flags, bool use_current_p DIR *dirp; int incr; int saved_errno; - int unionstack; + bool unionstack; if ((dirp = malloc(sizeof(DIR) + sizeof(struct _telldir))) == NULL) return (NULL); @@ -310,15 +310,14 @@ __opendir_common(int fd, int flags, bool use_current_p /* * Determine whether this directory is the top of a union stack. */ + unionstack = false; if (flags & DTF_NODUP) { struct statfs sfb; - if (_fstatfs(fd, ) < 0) - goto fail; - unionstack = !strcmp(sfb.f_fstypename, "unionfs") - || (sfb.f_flags & MNT_UNION); - } else { - unionstack = 0; + if (_fstatfs(fd, ) == 0) { + unionstack = strcmp(sfb.f_fstypename, "unionfs") == 0 || + (sfb.f_flags & MNT_UNION); + } } if (unionstack) { ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356828 - head/sys/kern
Author: mjg Date: Fri Jan 17 14:39:00 2020 New Revision: 356828 URL: https://svnweb.freebsd.org/changeset/base/356828 Log: vfs: shorten lock hold time in vdbatch_process Modified: head/sys/kern/vfs_subr.c Modified: head/sys/kern/vfs_subr.c == --- head/sys/kern/vfs_subr.cFri Jan 17 14:29:27 2020(r356827) +++ head/sys/kern/vfs_subr.cFri Jan 17 14:39:00 2020(r356828) @@ -3243,9 +3243,9 @@ vdbatch_process(struct vdbatch *vd) MPASS(vp->v_dbatchcpu != NOCPU); vp->v_dbatchcpu = NOCPU; } + mtx_unlock(_list_mtx); bzero(vd->tab, sizeof(vd->tab)); vd->index = 0; - mtx_unlock(_list_mtx); } static void ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r356827 - head/share/mk
Author: bdrewery Date: Fri Jan 17 14:29:27 2020 New Revision: 356827 URL: https://svnweb.freebsd.org/changeset/base/356827 Log: META_MODE: Allow 'make all install' to work with filemon. Filemon will add the ability to ignore the cookie if the installed file is missing. Without filemon that's not possible though so if the cookie is present an the command unchanged then the install wouldn't run. Sponsored by: DellEMC MFC after:2 weeks Modified: head/share/mk/src.sys.env.mk Modified: head/share/mk/src.sys.env.mk == --- head/share/mk/src.sys.env.mkFri Jan 17 06:10:24 2020 (r356826) +++ head/share/mk/src.sys.env.mkFri Jan 17 14:29:27 2020 (r356827) @@ -61,8 +61,9 @@ MAKEOBJDIRPREFIX:=${_saveMAKEOBJDIRPREFIX} .include # Top-level installs should not use meta mode as it may prevent installing -# based on cookies. -.if make(*install*) && ${.MAKE.LEVEL} == 0 +# based on cookies. It's fine with filemon though. +.if !empty(META_MODE:Mnofilemon) && \ + make(*install*) && ${.MAKE.LEVEL} == 0 META_MODE= normal MK_META_MODE= no .export MK_META_MODE ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r356758 - in head/usr.sbin/bsdinstall: . scripts
On Fri, Jan 17, 2020 at 08:17:11PM +0700, Eugene Grosbein wrote: > Considering /usr/ports, /usr/src and /usr/obj and amount of RAM > needed to keep metadata in ZFS ARC > >>> > >>> /usr/ports, /usr/src and /usr/obj don't need be exist on low-RAM > >>> install -- use poudriere and release build on dedicated build host and > >>> applay binary update. > >> > >> Poudriere itself has its disadvantages. It's heavy and it's unable to > >> produce minimal set of target packages > >> suitable for "pkg install -U *.txz" command without build-only > >> dependencies. > > > > Can you do it by /usr/ports way? No. And what you point? > > I can and I do, with my own scripts. > > >> I'd like to stick with poudriere but could not. Its supposed work-style > >> does not worth it. > >> > >> Real Work (TM) sometimes presents the need to apply patches, so > >> /usr/src and /usr/obj may become are unavoidable. > > > > I am do w/ dedicated builhost, produce custom build of > > base.txz/kernel.txz/kernel.CUSTOM.txz and applay binary updates w/ BE. > > What you point? > > The virtual guest is stand-alone including upgrades, does not depend on build > host nor its existance. > > >> 1GB-RAM UFS system runs just fine with such trees being stand-alone and > >> does not require extra build system and nor its overhead. > > > > clang very hard to compile in 1GB RAM. > > It was fine before clang-[78]. Buy nowadays, yes, I'm forced to use multiple > knobs for src.conf > > WITHOUT_LLVM_TARGET_ALL= > WITH_LLVM_TARGET_X86= > WITHOUT_CLANG_FULL= > > And using WITH_META_MODE not cleaning obj directory. > > > Anyway, my 1GB ZFS system run just fine. > > During life-time of stable/10 and early stable/11 (and not so-early) > ZFS required hard tuning for 1GB i386 system to be stable because it's > KVM-hog. I am cleary understund you provide expirence from satble/10 to current/13? w/ different clang, kernel, etc? ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r356758 - in head/usr.sbin/bsdinstall: . scripts
17.01.2020 19:58, Slawa Olhovchenkov wrote: Considering /usr/ports, /usr/src and /usr/obj and amount of RAM needed to keep metadata in ZFS ARC >>> >>> /usr/ports, /usr/src and /usr/obj don't need be exist on low-RAM >>> install -- use poudriere and release build on dedicated build host and >>> applay binary update. >> >> Poudriere itself has its disadvantages. It's heavy and it's unable to >> produce minimal set of target packages >> suitable for "pkg install -U *.txz" command without build-only dependencies. > > Can you do it by /usr/ports way? No. And what you point? I can and I do, with my own scripts. >> I'd like to stick with poudriere but could not. Its supposed work-style does >> not worth it. >> >> Real Work (TM) sometimes presents the need to apply patches, so >> /usr/src and /usr/obj may become are unavoidable. > > I am do w/ dedicated builhost, produce custom build of > base.txz/kernel.txz/kernel.CUSTOM.txz and applay binary updates w/ BE. > What you point? The virtual guest is stand-alone including upgrades, does not depend on build host nor its existance. >> 1GB-RAM UFS system runs just fine with such trees being stand-alone and does >> not require extra build system and nor its overhead. > > clang very hard to compile in 1GB RAM. It was fine before clang-[78]. Buy nowadays, yes, I'm forced to use multiple knobs for src.conf WITHOUT_LLVM_TARGET_ALL= WITH_LLVM_TARGET_X86= WITHOUT_CLANG_FULL= And using WITH_META_MODE not cleaning obj directory. > Anyway, my 1GB ZFS system run just fine. During life-time of stable/10 and early stable/11 (and not so-early) ZFS required hard tuning for 1GB i386 system to be stable because it's KVM-hog. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r356758 - in head/usr.sbin/bsdinstall: . scripts
On Fri, Jan 17, 2020 at 07:35:02PM +0700, Eugene Grosbein wrote: > 17.01.2020 18:21, Slawa Olhovchenkov wrote: > > >> Considering /usr/ports, /usr/src and /usr/obj and amount of RAM > >> needed to keep metadata in ZFS ARC > > > > /usr/ports, /usr/src and /usr/obj don't need be exist on low-RAM > > install -- use poudriere and release build on dedicated build host and > > applay binary update. > > Poudriere itself has its disadvantages. It's heavy and it's unable to produce > minimal set of target packages > suitable for "pkg install -U *.txz" command without build-only dependencies. Can you do it by /usr/ports way? No. And what you point? > I'd like to stick with poudriere but could not. Its supposed work-style does > not worth it. > > Real Work (TM) sometimes presents the need to apply patches, so > /usr/src and /usr/obj may become are unavoidable. I am do w/ dedicated builhost, produce custom build of base.txz/kernel.txz/kernel.CUSTOM.txz and applay binary updates w/ BE. What you point? > 1GB-RAM UFS system runs just fine with such trees being stand-alone and does > not require extra build system and nor its overhead. clang very hard to compile in 1GB RAM. Anyway, my 1GB ZFS system run just fine. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r356758 - in head/usr.sbin/bsdinstall: . scripts
17.01.2020 18:21, Slawa Olhovchenkov wrote: >> Considering /usr/ports, /usr/src and /usr/obj and amount of RAM >> needed to keep metadata in ZFS ARC > > /usr/ports, /usr/src and /usr/obj don't need be exist on low-RAM > install -- use poudriere and release build on dedicated build host and > applay binary update. Poudriere itself has its disadvantages. It's heavy and it's unable to produce minimal set of target packages suitable for "pkg install -U *.txz" command without build-only dependencies. I'd like to stick with poudriere but could not. Its supposed work-style does not worth it. Real Work (TM) sometimes presents the need to apply patches, so /usr/src and /usr/obj may become are unavoidable. 1GB-RAM UFS system runs just fine with such trees being stand-alone and does not require extra build system and nor its overhead. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r356758 - in head/usr.sbin/bsdinstall: . scripts
On Thu, Jan 16, 2020 at 04:19:52PM -0800, Devin Teske wrote: > > > > On Jan 16, 2020, at 16:03, Slawa Olhovchenkov wrote: > > > > On Thu, Jan 16, 2020 at 02:43:37PM +0700, Eugene Grosbein wrote: > > > >> 16.01.2020 4:41, Ed Maste wrote: > >> > >>> On Wed, 15 Jan 2020 at 16:10, Eugene Grosbein wrote: > > There are multiple scenarios there ZFS may be sub-optimal at least: > small i386 virtual guests > or 32-bit only hardware like AMD Geode, or big amd64 SSD-only systems > with bhyve and multiple guests > that need lots of memory and should not fight with ZFS for RAM etc. > >>> > >>> That may well be the case, but our defaults should represent the > >>> configuration that's desirable to the largest set of users, and IMO > >>> that's ZFS in most cases today. > >>> > >>> It might be that we should default to UFS on i386 and ZFS on amd64? > >> > >> UFS may be better for any virtual guest having RAM less or equal to 4GB. > > > > Why? > > ZFS does not do any auto-tuning in that situation and you’ll quickly > find you’ll have a dozen or more tunables in loader.conf tailored to > your workload. Even moderate workloads require tuning in i386 and/or > <=4GB environments with ZFS. This (auto-tuning) can be fixed, I am do this. > It is also highly inadvisable to mix UFS and ZFS — memory pressure from ARC > can cause UFS cache evictions and vice-versa. May be, don't test ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r356758 - in head/usr.sbin/bsdinstall: . scripts
On Fri, Jan 17, 2020 at 12:12:22PM +0700, Eugene Grosbein wrote: > 17.01.2020 7:03, Slawa Olhovchenkov write: > > There are multiple scenarios there ZFS may be sub-optimal at least: > small i386 virtual guests > or 32-bit only hardware like AMD Geode, or big amd64 SSD-only systems > with bhyve and multiple guests > that need lots of memory and should not fight with ZFS for RAM etc. > >>> > >>> That may well be the case, but our defaults should represent the > >>> configuration that's desirable to the largest set of users, and IMO > >>> that's ZFS in most cases today. > >>> > >>> It might be that we should default to UFS on i386 and ZFS on amd64? > >> > >> UFS may be better for any virtual guest having RAM less or equal to 4GB. > > > > Why? > > Considering /usr/ports, /usr/src and /usr/obj and amount of RAM > needed to keep metadata in ZFS ARC /usr/ports, /usr/src and /usr/obj don't need be exist on low-RAM install -- use poudriere and release build on dedicated build host and applay binary update. > plus standard daily periodic scripts traveling filesystems, low-RAM virtual > machine utilizing its RAM to full amount > can work reliably with UFS and hang at nights due to extra ZFS overhead in > default install (not tuned). Just need fix ZFS ARC pressure and UMA zone reclaim. ZFS ARC overhead about 10-20MB (IMHO) on low-RAM install. This is negligible from 512MB. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"