Date: Tue, 26 Feb 2013 17:33:19 +0000 (UTC) From: Attilio Rao <attilio@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r247324 - in user/attilio/vmobj-rwlock: sys/arm/at91 sys/arm/conf sys/arm/include sys/arm/sa11x0 sys/boot/common sys/dev/ath/ath_rate/sample sys/dev/hwpmc sys/fs/fuse sys/sys sys/vm usr... Message-ID: <201302261733.r1QHXJTE098239@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: attilio Date: Tue Feb 26 17:33:18 2013 New Revision: 247324 URL: http://svnweb.freebsd.org/changeset/base/247324 Log: MFC Modified: user/attilio/vmobj-rwlock/sys/arm/at91/at91_machdep.c user/attilio/vmobj-rwlock/sys/arm/conf/RPI-B user/attilio/vmobj-rwlock/sys/arm/include/vmparam.h user/attilio/vmobj-rwlock/sys/arm/sa11x0/assabet_machdep.c user/attilio/vmobj-rwlock/sys/boot/common/load_elf.c user/attilio/vmobj-rwlock/sys/dev/ath/ath_rate/sample/sample.c user/attilio/vmobj-rwlock/sys/dev/hwpmc/hwpmc_soft.c user/attilio/vmobj-rwlock/sys/fs/fuse/fuse_io.c user/attilio/vmobj-rwlock/sys/sys/time.h user/attilio/vmobj-rwlock/sys/vm/vm_object.c user/attilio/vmobj-rwlock/usr.bin/truss/main.c user/attilio/vmobj-rwlock/usr.bin/truss/syscalls.c user/attilio/vmobj-rwlock/usr.bin/truss/truss.h Directory Properties: user/attilio/vmobj-rwlock/ (props changed) user/attilio/vmobj-rwlock/sys/ (props changed) user/attilio/vmobj-rwlock/sys/boot/ (props changed) Modified: user/attilio/vmobj-rwlock/sys/arm/at91/at91_machdep.c ============================================================================== --- user/attilio/vmobj-rwlock/sys/arm/at91/at91_machdep.c Tue Feb 26 17:22:08 2013 (r247323) +++ user/attilio/vmobj-rwlock/sys/arm/at91/at91_machdep.c Tue Feb 26 17:33:18 2013 (r247324) @@ -77,7 +77,6 @@ __FBSDID("$FreeBSD$"); #include <vm/vm_object.h> #include <vm/vm_page.h> #include <vm/vm_map.h> -#include <machine/pmap.h> #include <machine/vmparam.h> #include <machine/pcb.h> #include <machine/undefined.h> Modified: user/attilio/vmobj-rwlock/sys/arm/conf/RPI-B ============================================================================== --- user/attilio/vmobj-rwlock/sys/arm/conf/RPI-B Tue Feb 26 17:22:08 2013 (r247323) +++ user/attilio/vmobj-rwlock/sys/arm/conf/RPI-B Tue Feb 26 17:33:18 2013 (r247324) @@ -42,6 +42,7 @@ options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support options UFS_ACL #Support for access control lists options UFS_DIRHASH #Improve performance on big directories +options MSDOSFS #MSDOS Filesystem device snp options NFSCL #Network Filesystem Client @@ -113,5 +114,7 @@ device smsc # Flattened Device Tree options FDT -options FDT_DTB_STATIC -makeoptions FDT_DTS_FILE=bcm2835-rpi-b.dts +# Note: DTB is normally loaded and modified by RPi boot loader, then +# handed to kernel via U-Boot and ubldr. +#options FDT_DTB_STATIC +#makeoptions FDT_DTS_FILE=bcm2835-rpi-b.dts Modified: user/attilio/vmobj-rwlock/sys/arm/include/vmparam.h ============================================================================== --- user/attilio/vmobj-rwlock/sys/arm/include/vmparam.h Tue Feb 26 17:22:08 2013 (r247323) +++ user/attilio/vmobj-rwlock/sys/arm/include/vmparam.h Tue Feb 26 17:33:18 2013 (r247324) @@ -142,15 +142,15 @@ #define VM_KMEM_SIZE (12*1024*1024) #endif #ifndef VM_KMEM_SIZE_SCALE -#define VM_KMEM_SIZE_SCALE (2) +#define VM_KMEM_SIZE_SCALE (3) #endif /* - * Ceiling on the size of the kmem submap: 60% of the kernel map. + * Ceiling on the size of the kmem submap: 40% of the kernel map. */ #ifndef VM_KMEM_SIZE_MAX #define VM_KMEM_SIZE_MAX ((vm_max_kernel_address - \ - VM_MIN_KERNEL_ADDRESS + 1) * 3 / 5) + VM_MIN_KERNEL_ADDRESS + 1) * 2 / 5) #endif #define MAXTSIZ (16*1024*1024) Modified: user/attilio/vmobj-rwlock/sys/arm/sa11x0/assabet_machdep.c ============================================================================== --- user/attilio/vmobj-rwlock/sys/arm/sa11x0/assabet_machdep.c Tue Feb 26 17:22:08 2013 (r247323) +++ user/attilio/vmobj-rwlock/sys/arm/sa11x0/assabet_machdep.c Tue Feb 26 17:33:18 2013 (r247324) @@ -80,7 +80,6 @@ __FBSDID("$FreeBSD$"); #include <vm/vm_object.h> #include <vm/vm_page.h> #include <vm/vm_map.h> -#include <machine/pmap.h> #include <machine/vmparam.h> #include <machine/pcb.h> #include <machine/undefined.h> Modified: user/attilio/vmobj-rwlock/sys/boot/common/load_elf.c ============================================================================== --- user/attilio/vmobj-rwlock/sys/boot/common/load_elf.c Tue Feb 26 17:22:08 2013 (r247323) +++ user/attilio/vmobj-rwlock/sys/boot/common/load_elf.c Tue Feb 26 17:33:18 2013 (r247324) @@ -290,14 +290,25 @@ __elfN(loadimage)(struct preloaded_file } else off = 0; #elif defined(__arm__) - if (off & 0xf0000000u) { - off = -(off & 0xf0000000u); - ehdr->e_entry += off; + /* + * The elf headers in some kernels specify virtual addresses in all + * header fields. More recently, the e_entry and p_paddr fields are the + * proper physical addresses. Even when the p_paddr fields are correct, + * the MI code below uses the p_vaddr fields with an offset added for + * loading (doing so is arguably wrong). To make loading work, we need + * an offset that represents the difference between physical and virtual + * addressing. ARM kernels are always linked at 0xC0000000. Depending + * on the headers, the offset value passed in may be physical or virtual + * (because it typically comes from e_entry), but we always replace + * whatever is passed in with the va<->pa offset. On the other hand, we + * only adjust the entry point if it's a virtual address to begin with. + */ + off = -0xc0000000u; + if ((ehdr->e_entry & 0xc0000000u) == 0xc000000u) + ehdr->e_entry += off; #ifdef ELF_VERBOSE - printf("Converted entry 0x%08x\n", ehdr->e_entry); + printf("ehdr->e_entry 0x%08x, va<->pa off %llx\n", ehdr->e_entry, off); #endif - } else - off = 0; #else off = 0; /* other archs use direct mapped kernels */ #endif Modified: user/attilio/vmobj-rwlock/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- user/attilio/vmobj-rwlock/sys/dev/ath/ath_rate/sample/sample.c Tue Feb 26 17:22:08 2013 (r247323) +++ user/attilio/vmobj-rwlock/sys/dev/ath/ath_rate/sample/sample.c Tue Feb 26 17:33:18 2013 (r247324) @@ -1008,6 +1008,15 @@ ath_rate_tx_complete(struct ath_softc *s short_tries, long_tries, long_tries > rc[0].tries, nframes, nbad); + update_ewma_stats(sc, an, frame_size, + rc[0].rix, rc[0].tries, + rc[1].rix, rc[1].tries, + rc[2].rix, rc[2].tries, + rc[3].rix, rc[3].tries, + short_tries, long_tries, + long_tries > rc[0].tries, + nframes, nbad); + long_tries -= rc[0].tries; } @@ -1020,6 +1029,14 @@ ath_rate_tx_complete(struct ath_softc *s short_tries, long_tries, status, nframes, nbad); + update_ewma_stats(sc, an, frame_size, + rc[1].rix, rc[1].tries, + rc[2].rix, rc[2].tries, + rc[3].rix, rc[3].tries, + 0, 0, + short_tries, long_tries, + status, + nframes, nbad); long_tries -= rc[1].tries; } @@ -1032,6 +1049,14 @@ ath_rate_tx_complete(struct ath_softc *s short_tries, long_tries, status, nframes, nbad); + update_ewma_stats(sc, an, frame_size, + rc[2].rix, rc[2].tries, + rc[3].rix, rc[3].tries, + 0, 0, + 0, 0, + short_tries, long_tries, + status, + nframes, nbad); long_tries -= rc[2].tries; } @@ -1044,17 +1069,15 @@ ath_rate_tx_complete(struct ath_softc *s short_tries, long_tries, status, nframes, nbad); + update_ewma_stats(sc, an, frame_size, + rc[3].rix, rc[3].tries, + 0, 0, + 0, 0, + 0, 0, + short_tries, long_tries, + status, + nframes, nbad); } - - update_ewma_stats(sc, an, frame_size, - rc[0].rix, rc[0].tries, - rc[1].rix, rc[1].tries, - rc[2].rix, rc[2].tries, - rc[3].rix, rc[3].tries, - short_tries, long_tries, - long_tries > rc[0].tries, - nframes, nbad); - } } Modified: user/attilio/vmobj-rwlock/sys/dev/hwpmc/hwpmc_soft.c ============================================================================== --- user/attilio/vmobj-rwlock/sys/dev/hwpmc/hwpmc_soft.c Tue Feb 26 17:22:08 2013 (r247323) +++ user/attilio/vmobj-rwlock/sys/dev/hwpmc/hwpmc_soft.c Tue Feb 26 17:33:18 2013 (r247324) @@ -408,8 +408,11 @@ pmc_soft_intr(struct pmckern_soft *ks) } processed = 1; - pc->soft_values[ri]++; if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) { + if ((pc->soft_values[ri]--) <= 0) + pc->soft_values[ri] += pm->pm_sc.pm_reloadcount; + else + continue; user_mode = TRAPF_USERMODE(ks->pm_tf); error = pmc_process_interrupt(ks->pm_cpu, PMC_SR, pm, ks->pm_tf, user_mode); @@ -424,7 +427,8 @@ pmc_soft_intr(struct pmckern_soft *ks) */ curthread->td_flags |= TDF_ASTPENDING; } - } + } else + pc->soft_values[ri]++; } atomic_add_int(processed ? &pmc_stats.pm_intr_processed : Modified: user/attilio/vmobj-rwlock/sys/fs/fuse/fuse_io.c ============================================================================== --- user/attilio/vmobj-rwlock/sys/fs/fuse/fuse_io.c Tue Feb 26 17:22:08 2013 (r247323) +++ user/attilio/vmobj-rwlock/sys/fs/fuse/fuse_io.c Tue Feb 26 17:33:18 2013 (r247324) @@ -88,7 +88,6 @@ __FBSDID("$FreeBSD$"); #include <vm/vm_map.h> #include <vm/vm_page.h> #include <vm/vm_object.h> -#include <vm/vm_object.h> #include "fuse.h" #include "fuse_file.h" Modified: user/attilio/vmobj-rwlock/sys/sys/time.h ============================================================================== --- user/attilio/vmobj-rwlock/sys/sys/time.h Tue Feb 26 17:22:08 2013 (r247323) +++ user/attilio/vmobj-rwlock/sys/sys/time.h Tue Feb 26 17:33:18 2013 (r247324) @@ -156,9 +156,6 @@ timeval2bintime(const struct timeval *tv /* 18446744073709 = int(2^64 / 1000000) */ bt->frac = tv->tv_usec * (uint64_t)18446744073709LL; } -#endif /* __BSD_VISIBLE */ - -#ifdef _KERNEL /* Operations on timespecs */ #define timespecclear(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0) @@ -197,7 +194,7 @@ timeval2bintime(const struct timeval *tv /* timevaladd and timevalsub are not inlined */ -#endif /* _KERNEL */ +#endif /* __BSD_VISIBLE */ #ifndef _KERNEL /* NetBSD/OpenBSD compatible interfaces */ Modified: user/attilio/vmobj-rwlock/sys/vm/vm_object.c ============================================================================== --- user/attilio/vmobj-rwlock/sys/vm/vm_object.c Tue Feb 26 17:22:08 2013 (r247323) +++ user/attilio/vmobj-rwlock/sys/vm/vm_object.c Tue Feb 26 17:33:18 2013 (r247324) @@ -581,7 +581,7 @@ retry: VM_OBJECT_WUNLOCK(robject); object->flags |= OBJ_PIPWNT; VM_OBJECT_SLEEP(object, object, - PDROP | PVM, "objde2" , 0); + PDROP | PVM, "objde2", 0); VM_OBJECT_WLOCK(robject); temp = robject->backing_object; if (object == temp) { Modified: user/attilio/vmobj-rwlock/usr.bin/truss/main.c ============================================================================== --- user/attilio/vmobj-rwlock/usr.bin/truss/main.c Tue Feb 26 17:22:08 2013 (r247323) +++ user/attilio/vmobj-rwlock/usr.bin/truss/main.c Tue Feb 26 17:33:18 2013 (r247324) @@ -323,14 +323,14 @@ START_TRACE: fprintf(trussinfo->outfile, "%5d: ", trussinfo->pid); if (trussinfo->flags & ABSOLUTETIMESTAMPS) { - timespecsubt(&trussinfo->curthread->after, + timespecsubt_to(&trussinfo->curthread->after, &trussinfo->start_time, &timediff); fprintf(trussinfo->outfile, "%ld.%09ld ", (long)timediff.tv_sec, timediff.tv_nsec); } if (trussinfo->flags & RELATIVETIMESTAMPS) { - timespecsubt(&trussinfo->curthread->after, + timespecsubt_to(&trussinfo->curthread->after, &trussinfo->curthread->before, &timediff); fprintf(trussinfo->outfile, "%ld.%09ld ", (long)timediff.tv_sec, @@ -349,14 +349,14 @@ START_TRACE: fprintf(trussinfo->outfile, "%5d: ", trussinfo->pid); if (trussinfo->flags & ABSOLUTETIMESTAMPS) { - timespecsubt(&trussinfo->curthread->after, + timespecsubt_to(&trussinfo->curthread->after, &trussinfo->start_time, &timediff); fprintf(trussinfo->outfile, "%ld.%09ld ", (long)timediff.tv_sec, timediff.tv_nsec); } if (trussinfo->flags & RELATIVETIMESTAMPS) { - timespecsubt(&trussinfo->curthread->after, + timespecsubt_to(&trussinfo->curthread->after, &trussinfo->curthread->before, &timediff); fprintf(trussinfo->outfile, "%ld.%09ld ", (long)timediff.tv_sec, timediff.tv_nsec); Modified: user/attilio/vmobj-rwlock/usr.bin/truss/syscalls.c ============================================================================== --- user/attilio/vmobj-rwlock/usr.bin/truss/syscalls.c Tue Feb 26 17:22:08 2013 (r247323) +++ user/attilio/vmobj-rwlock/usr.bin/truss/syscalls.c Tue Feb 26 17:33:18 2013 (r247324) @@ -1126,14 +1126,14 @@ print_syscall(struct trussinfo *trussinf } if (trussinfo->flags & ABSOLUTETIMESTAMPS) { - timespecsubt(&trussinfo->curthread->after, + timespecsubt_to(&trussinfo->curthread->after, &trussinfo->start_time, &timediff); len += fprintf(trussinfo->outfile, "%ld.%09ld ", (long)timediff.tv_sec, timediff.tv_nsec); } if (trussinfo->flags & RELATIVETIMESTAMPS) { - timespecsubt(&trussinfo->curthread->after, + timespecsubt_to(&trussinfo->curthread->after, &trussinfo->curthread->before, &timediff); len += fprintf(trussinfo->outfile, "%ld.%09ld ", (long)timediff.tv_sec, timediff.tv_nsec); @@ -1165,9 +1165,9 @@ print_syscall_ret(struct trussinfo *trus if (!sc) return; clock_gettime(CLOCK_REALTIME, &trussinfo->curthread->after); - timespecsubt(&trussinfo->curthread->after, + timespecsubt_to(&trussinfo->curthread->after, &trussinfo->curthread->before, &timediff); - timespecadd(&sc->time, &timediff, &sc->time); + timespecadd_to(&sc->time, &timediff, &sc->time); sc->ncalls++; if (errorp) sc->nerror++; @@ -1205,7 +1205,7 @@ print_summary(struct trussinfo *trussinf fprintf(trussinfo->outfile, "%-20s%5jd.%09ld%8d%8d\n", sc->name, (intmax_t)sc->time.tv_sec, sc->time.tv_nsec, sc->ncalls, sc->nerror); - timespecadd(&total, &sc->time, &total); + timespecadd_to(&total, &sc->time, &total); ncall += sc->ncalls; nerror += sc->nerror; } Modified: user/attilio/vmobj-rwlock/usr.bin/truss/truss.h ============================================================================== --- user/attilio/vmobj-rwlock/usr.bin/truss/truss.h Tue Feb 26 17:22:08 2013 (r247323) +++ user/attilio/vmobj-rwlock/usr.bin/truss/truss.h Tue Feb 26 17:33:18 2013 (r247324) @@ -62,7 +62,7 @@ struct trussinfo SLIST_HEAD(, threadinfo) threadlist; }; -#define timespecsubt(tvp, uvp, vvp) \ +#define timespecsubt_to(tvp, uvp, vvp) \ do { \ (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ (vvp)->tv_nsec = (tvp)->tv_nsec - (uvp)->tv_nsec; \ @@ -72,7 +72,7 @@ struct trussinfo } \ } while (0) -#define timespecadd(tvp, uvp, vvp) \ +#define timespecadd_to(tvp, uvp, vvp) \ do { \ (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ (vvp)->tv_nsec = (tvp)->tv_nsec + (uvp)->tv_nsec; \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302261733.r1QHXJTE098239>