John Marino [Sun, 19 Apr 2015 06:14:37 +0000 (08:14 +0200)]
Set gcc50 as the primary compiler, gcc47 as secondary
Per request, rather than define NO_GCC47 to prevent the building of the
secondary compiler, the new variable is called NO_ALTCOMPILER. This
will avoid some disruption in the future where the actual version is not
important, only the desire to avoid the secondary compiler.
John Marino [Wed, 22 Apr 2015 09:19:58 +0000 (11:19 +0200)]
gcc50: Update to release version 5.1.0 => 5.1.1
Immediately after the release was tagged, another commit was added that
changed the version to 5.1.1. Other than the version differing by 0.0.1,
this version is identical to what the GCC just released.
John Marino [Wed, 22 Apr 2015 19:43:22 +0000 (21:43 +0200)]
Merge branch 'vendor/GCC50'
John Marino [Wed, 22 Apr 2015 09:15:19 +0000 (11:15 +0200)]
Update gcc-50 to SVN version 222321 (gcc-5-branch)
This is equivalent to the GCC 5.1 release plus 1 commit that changes
the version from 5.1.0 to 5.1.1 to reopen the release branch.
Last Changed Date: 2015-04-22 12:45:39 +0200 (Wed, 22 Apr 2015)
Tomohiro Kusumi [Tue, 21 Apr 2015 15:15:21 +0000 (00:15 +0900)]
sbin/hammer: Print key_end.lo instead of key_beg.lo on reblock
- Print reblock.key_end.localization when reblock starts instead of
reblock.key_beg.localization.
- hammer reblock printing 0000 while reblock-inodes printing 0001
and reblock-data|dirs printing 0002 seems strange because reblock
covers all localization types ranging from MIN(0000) to MAX(ffff)
on btree iteration (which obviously includes existing two types
for inode and misc). Printing end localization should make better
sense here.
Tomohiro Kusumi [Tue, 21 Apr 2015 14:20:04 +0000 (23:20 +0900)]
sbin/hammer: Print big block size on reblock
- Print free_level/big_block_size when reblock starts instead of
just free_level.
- The meaning of 'fill_percentage' arg is easier to understand
this way because the big block size is not obvious for most users
while this arg is about selecting which big block to defrag.
Tomohiro Kusumi [Tue, 21 Apr 2015 12:08:56 +0000 (21:08 +0900)]
sys/vfs/hammer: Cleanup cursor initialization code on reblock
- Just make things a bit more clear.
- The rule is the ioctl caller sets localization type to reblock,
and the ioctl code adds up ip localization to initialize cursor.
Tomohiro Kusumi [Tue, 21 Apr 2015 12:04:38 +0000 (21:04 +0900)]
sys/vfs/hammer: Make hammer_blockmap_getfree() clear *curp on error case
- Set *curp to either 0 or 1 regardless of *errorp.
The previous return(0); case does this then all should do this.
Tomohiro Kusumi [Tue, 21 Apr 2015 12:02:47 +0000 (21:02 +0900)]
sys/vfs/hammer: Fix comment
- Sync a comment with what's written in reblock_usage().
Tomohiro Kusumi [Tue, 21 Apr 2015 12:01:00 +0000 (21:01 +0900)]
sys/vfs/hammer: Cleanup sanity checks
- Move sanity checks to the beginning of the function.
- Check 'free_level > HAMMER_BIGBLOCK_SIZE'.
free_level is somewhere between 0 and 8MB (inclusive).
Tomohiro Kusumi [Sun, 19 Apr 2015 10:51:41 +0000 (19:51 +0900)]
sbin/hammer: Remove irrelevant if(S_ISLNK()) case
- Remove if(S_ISLNK()) case for hammer snap since it never matches.
- Also note it shouldn't be matching S_ISLNK() in the first place.
If it does match hammer snap|snaplo|snapq commands will remove
a symlink to the existing snapshot and relink to the new snapshot
which results losing a reference to the old snapshot (although
the old snapshot is still accessible as HAMMER's snapshot is just
a pointer to the filesystem as of certain tid that is resolved
when accessed).
Tomohiro Kusumi [Sun, 19 Apr 2015 10:17:36 +0000 (19:17 +0900)]
sbin/hammer: Add missing snapshots related free(3)
- Call free(3) after asprintf(3)
Tomohiro Kusumi [Sat, 18 Apr 2015 18:42:43 +0000 (03:42 +0900)]
sys/vfs/hammer: Fix off-by-one for snapshot index
- The index starts from 0 so these ioctls should test 'index >= count'.
Tomohiro Kusumi [Sat, 18 Apr 2015 18:24:43 +0000 (03:24 +0900)]
sbin/hammer: Remove redundant exit(3)
- snapshot_usage(1); does exit(1); as the comment implies.
Matthew Dillon [Sat, 18 Apr 2015 19:05:03 +0000 (12:05 -0700)]
sshlockout - minor cleanup
* If ac >= 2 then av[1] will not be NULL.
Matthew Dillon [Sat, 18 Apr 2015 19:04:06 +0000 (12:04 -0700)]
sound - Fix default & unit specs for /dev/dsp and /dev/mixer (2)
* Cleanup a debugging kprintf().
* Cleanup incorrect dev reference and remove some unnecessary locking.
Tomohiro Kusumi [Sat, 18 Apr 2015 05:10:35 +0000 (14:10 +0900)]
sbin/hammer: Make hammer mirror-dump print localization
- Add printf for localiazation in addition to other
struct hammer_base_elm fields.
Tomohiro Kusumi [Sat, 18 Apr 2015 10:18:30 +0000 (19:18 +0900)]
sys/vfs/hammer: Try to fix hammer_ioc_pfs_iterate() [2/2]
- The ioctl HAMMERIOC_PFS_ITERATE added in commit
29d31c2d has
several design issues. This commit and the previous try to fix
them. Since it's been exposed to userspace, some of them are
left as it is with comments.
- Move hammer_ioc_pfs_iterate() to sys/vfs/hammer/hammer_pfs.c
and rename it to hammer_ioc_iterate_pseudofs().
- struct hammer_ioc_pfs_iterate was not necessary. The existing
struct hammer_ioc_pseudofs_rw which is being used by all other
pfs ioctls has everything HAMMERIOC_PFS_ITERATE needs given
that hammer_ioc_pfs_iterate::pos is just used as a pfs id.
Using the unique struct requires hammer_ioc_iterate_pseudofs()
extra conversion in order to make this ioctl behave like other
pfs ioctls using autodetect.
Tomohiro Kusumi [Wed, 15 Apr 2015 14:21:38 +0000 (23:21 +0900)]
sys/vfs/hammer: Try to fix hammer_ioc_pfs_iterate() [1/2]
- The ioctl HAMMERIOC_PFS_ITERATE added in commit
29d31c2d has
several design issues. This commit and the next one try to fix
them. Since it's been exposed to userspace, some of them are
left as it is with comments.
- The name hammer_ioc_pfs_iterate::pos (pi->pos) is misleading.
It should have been 'pfs_id'. Users will have no idea what
the 'pos' is supposed to be.
- pi->pos is unsigned.
- Don't shift pi->pos (Don't ip localize pi->pos). Copy it to a
local variable and then shift that.
- cursor.key_end fields are necessary only when iterating btree.
This function has 'iterate' in its name but all it does is
a single btree lookup.
- Don't |= HAMMER_PFSD_DELETED with pi->head.flags. pi->head.flags
is for HAMMER_IOC_XXX macros, but not for ondisk pfs status
(it was lucky PFSD_DELETED does not conflict with those values).
Users get pfs status from cursor.data->pfsd.mirror_flags copied
to userspace. libhammer code that is based on this wrong flag
checking is fixed accordingly.
- Check if pi->ondisk is allocated.
- Copy ondisk pfs data regardless of ondisk pfs delete flag bit.
The delete flag doesn't mean the data is gone.
Tomohiro Kusumi [Tue, 14 Apr 2015 14:48:30 +0000 (23:48 +0900)]
sbin/hammer: Add missing free(3) and relpfs()
- Add missing free(3) for mirror buffer and relpfs() to release pfs.
Tomohiro Kusumi [Tue, 14 Apr 2015 14:30:40 +0000 (23:30 +0900)]
sbin/hammer: Add missing free(3)
- Add missing free(3) for a return value of read_mrecord().
Tomohiro Kusumi [Tue, 14 Apr 2015 13:42:21 +0000 (22:42 +0900)]
sbin/hammer: Remove unnecessary strndup(3)
- user string is relative to host string, not filesystem string.
Tomohiro Kusumi [Tue, 14 Apr 2015 10:06:24 +0000 (19:06 +0900)]
sys/vfs/hammer: Add comments on ip localization of @@PFS symlink
- The userspace hammer command shows "You are attempting to access
a PFS softlink from a PFS..." and exit(1) whenever one tries to
make a PFS from non root fs directory.
- This restriction by userspace ensures @@PFS symlinks always belong
to the root fs, in other words ip localization of those symlinks
are always 0. HAMMER's kernel code doesn't impose this restriction
on pfs, but userspace does.
John Marino [Fri, 17 Apr 2015 08:06:03 +0000 (10:06 +0200)]
gcc50: Upgrade to GCC 5.1 release candidate plus
while here:
* remove 4+ Mb of unused texi files from contrib
* update the 3 man pages from Release candidate
* Change makefiles to not take man pages from contrib directory
After thinking about it, I've decided to continue to update GCC from
Subversion sources rather than limit updates to designated releases. This
is the reason the man pages are not taken from contrib; they are only
present in actual releases and not the SVN repository. The plan is to
only update the man pages when GCC minor version is released.
This is the first (and likely only) release candidate for GCC5. It will
be known as gcc 5.1.0, but CCVER will remain at "gcc50" regardless if the
version of gcc is 5.1.1 or 5.4.2. This includes changes up to SVN 222168
(April 17).
John Marino [Fri, 17 Apr 2015 10:57:20 +0000 (12:57 +0200)]
Merge branch 'vendor/GCC50'
John Marino [Fri, 17 Apr 2015 07:45:38 +0000 (09:45 +0200)]
Update gcc-50 to SVN version 222168 (gcc-5-branch)
Last Changed Date: 2015-04-17 09:45:46 +0200 (Fri, 17 Apr 2015)
Matthew Dillon [Thu, 16 Apr 2015 16:39:01 +0000 (09:39 -0700)]
sysperf - Adjust syscall tests
* Remove getuid_msg.c, no longer used.
* Adjust syscall1.c to be more verbose.
* Refactor syscall2.c to test on all threads in a somewhat more
sophisticated manner. The test expects the scheduler to move
the threads to their own cpus (and it should).
Matthew Dillon [Thu, 16 Apr 2015 16:20:54 +0000 (09:20 -0700)]
sound - Fix default & unit specs for /dev/dsp and /dev/mixer
* /dev/dsp{0,1} was overriding the unit number and forcing the currently
set default dsp unit, so it didn't matter if you specified /dev/dsp0 or 1,
it still used hw.snd.default_unit.
* Get rid of the devfs aliasing for /dev/dsp and /dev/mixer. Instead, use
the cloner code to lookup the default dsp and default mixer when /dev/dsp
or /dev/mixer is opened.
This simplifies default handling significantly.
Sascha Wildner [Wed, 15 Apr 2015 09:07:46 +0000 (11:07 +0200)]
Update the pciconf(8) database.
April 14, 2015 snapshot from http://pciids.sourceforge.net/
François Tigeot [Mon, 13 Apr 2015 21:32:36 +0000 (22:32 +0100)]
drm: linux/spin.h: Implement assert_spin_locked()
Sepherosa Ziehau [Fri, 10 Apr 2015 13:48:35 +0000 (21:48 +0800)]
coretemp: Add package level thermal sensor support
The temperature extracted from CPU package level thermal sensors are
exposed through sensor sysctl hw.sensors.cpu_nodeX.temp0 nodes.
Tomohiro Kusumi [Fri, 10 Apr 2015 20:32:18 +0000 (05:32 +0900)]
sbin/hammer: Allow pfs commands directly handle pfs
- pfs commands can handle a link to pfs, but not the pfs itself.
This commit allows pfs commands to directly handle pfs node,
in addition to doing it via link. Being able to execute them
only via link is strange behavior and should be able to do via
both ways.
- This commit basically makes both link and non-link path go through
scanpfsid() which scans pfs id and returns fd of its parent dir.
In the existing code only link path goes through pfs id scan code,
so pfs commands are unable to directly handle non-link pfs node
itself (even if one wants to do so).
==========
example1 - using existing /sbin/hammer
# ls -l ./test1
lrwxr-xr-x 1 root wheel 10 Apr 8 05:52 ./test1 -> @@-1:00001
# hammer pfs-downgrade @@-1:00001
pfs-downgrade of PFS#1 () failed: Directory not empty
# hammer pfs-destroy ./@@-1:00001
You have requested that PFS#1 () be destroyed
<snip>
Destroying PFS #1 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#1 failed: Directory not empty
==========
example2 - using this commit to directly destroy pfs
# hammer pfs-destroy ./@@-1:00001
You have requested that PFS#1 () be destroyed
<snip>
Destroying PFS #1 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#1 succeeded!
# hammer pfs-status ./test1
Cannot access PFS ./test1: No such file or directory
The only case that breaks current behavior is when there is a
regular directory whose format matches (not existing) pfs name,
although this is not likely to happen in the real world. This
is inevitable since stat(2) also recognizes pfs as a directory
(also see hammer_mkroot_pseudofs()).
# mkdir ./@@-1:00005
# hammer pfs-status ./@@-1:00005
Cannot access PFS ./@@-1:00005: No such file or directory
==========
example3 - another example using this commit.
Actually location of the pfs link doesn't matter as the pfs node
represents the root inode of pfs, but not a subdirectory of where
the pfs link is made in the root filesystem. This is confusing
though when there are more than 1 HAMMER filesystems in a single
system as "@@-1:00001" could indicate different pfs-es depending
on where/how commands are executed. Having access to pfs-es via
symlinks (created by pfs-master|slave) is usually a clearer way.
# mkdir -p a/b/c/d/e
# cd a/b/c/d/e
# hammer pfs-master test2 > /dev/null
# ls -l ./test2
lrwxr-xr-x 1 root wheel 10 Apr 10 04:12 ./test2 -> @@-1:00001
# cd ../../../../..
# hammer pfs-destroy @@-1:00001
You have requested that PFS#1 () be destroyed
<snip>
Destroying PFS #1 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#1 succeeded!
# hammer pfs-slave test3 > /dev/null
# ls -l ./test3
lrwxr-xr-x 1 root wheel 10 Apr 12 16:30 ./test3 -> @@0x0000000000000001:00001
# hammer pfs-destroy a/b/c/d/e/@@0x0000000000000001:00001
You have requested that PFS#1 () be destroyed
<snip>
Destroying PFS #1 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#1 succeeded!
Tomohiro Kusumi [Fri, 10 Apr 2015 20:40:07 +0000 (05:40 +0900)]
sbin/hammer: Remove strtrl()
- (see previous 3 commits)
Tomohiro Kusumi [Fri, 10 Apr 2015 20:32:18 +0000 (05:32 +0900)]
sbin/hammer: Make strtrl() api right [3/3]
- Fix changes made by commit
3c10747d.
- while (p-- > s && *p == '/')
is very obscure and not even sure if this code is portable.
Make it explicit.
Tomohiro Kusumi [Fri, 10 Apr 2015 20:32:18 +0000 (05:32 +0900)]
sbin/hammer: Make strtrl() api right [2/3]
- Fix changes made by commit
3c10747d.
- Not sure what the return value of strtrl() is trying to do, but
checking ==NULL here doesn't mean anything unless 'path' is NULL.
(The only case that had meaning was when 'path' was NULL, but
it's pretty obvious callers were not passing NULL)
- Change strnlen() to strlen(). It's better to use strlen() when
we know the input (argv[i]) is a C string. Also note that in
this case non NULL terminated char[] of length 'size_t maxlen'
is useless and does no good anyway.
Tomohiro Kusumi [Fri, 10 Apr 2015 20:32:17 +0000 (05:32 +0900)]
sbin/hammer: Make strtrl() api right [1/3]
- Fix changes made by commit
3c10747d.
- There shouldn't be any reason to take char** for the first arg,
but char* is enough.
- The second arg len can be calculated inside the function given
that the 'path' is a C string.
Tomohiro Kusumi [Fri, 10 Apr 2015 20:32:17 +0000 (05:32 +0900)]
sbin/hammer: Remove redundant printf for slave pfs info
- hammer pfs-status does show "operating as a SLAVE" if the pfs
is a slave, so no need to print another line that shows the
same thing. Also removing this line doesn't seem to break any
existing userspace.
Nuno Antunes [Sun, 12 Apr 2015 08:47:56 +0000 (09:47 +0100)]
virtio: Bring in SVN r251769 from FreeBSD.
* Fixes the following occasional log message when booting:
"vtnet0: error setting host MAC filter table"
* Original FreeBSD commit message below.
QEMU 1.4 made the descriptor requirement stricter - the size of buffer
descriptor must exactly match the number of MAC addresses provided.
Reported-by: nans_nans1@yahoo.de
Fix-pointed-out-by: Brian Venteicher <bryanv@daemoninthecloset.org>
Sascha Wildner [Sun, 12 Apr 2015 08:35:39 +0000 (10:35 +0200)]
kernel: APM was only supported on i386, remove unused x86_64 files.
This is due to our x86_64 not supporting VM86 BIOS calls. This
code was never hooked in.
This does not affect ACPI's APM "emulation" (it supports some
APM ioctls) which is available on x86_64 too.
Sascha Wildner [Sat, 11 Apr 2015 10:26:08 +0000 (12:26 +0200)]
Sync the de(4) manual page with FreeBSD.
Imre Vadasz [Sat, 11 Apr 2015 11:53:55 +0000 (13:53 +0200)]
if_de: Sync with current FreeBSD version (r271849). Now works with >4G ram.
* if_de now uses the bus_dma api for DMA memory handling. This makes the
driver work on systems with more than 4G of ram.
* Remove currently unused code for the TULIP_DO_GPR_SENSE option.
* Keeps most original modifications relative to the code from FreeBSD.
Sascha Wildner [Fri, 10 Apr 2015 21:49:40 +0000 (23:49 +0200)]
acpidump(8): Fix /dev/mem access.
I accidentally removed it in the ACPICA
20150408 upgrade.
Sascha Wildner [Thu, 9 Apr 2015 22:53:26 +0000 (00:53 +0200)]
boot/acpi: Use ACPICA constants instead of magic addresses.
While here, also adjust a comment to match the latest ACPI specification.
No functional change.
Sascha Wildner [Fri, 10 Apr 2015 17:31:29 +0000 (19:31 +0200)]
Sync ACPICA with Intel's version
20150410.
The only difference to
20150408 is reverting a change that caused
regressions in the disassembler.
Sascha Wildner [Fri, 10 Apr 2015 14:41:47 +0000 (16:41 +0200)]
kernel: Fix two typos.
Sascha Wildner [Fri, 10 Apr 2015 12:28:03 +0000 (14:28 +0200)]
mutex.9: Adjust for latest changes (ident was moved to mtx_init()).
Sascha Wildner [Fri, 10 Apr 2015 12:04:02 +0000 (14:04 +0200)]
sensor_attach.9: sensor_task_register() no longer can return failure.
Sepherosa Ziehau [Fri, 10 Apr 2015 03:53:58 +0000 (11:53 +0800)]
coretemp: CORE_LEVEL node contains 0 children, if hyperthread is not enabled
Reported-by: YRabbit
Sascha Wildner [Thu, 9 Apr 2015 20:38:13 +0000 (22:38 +0200)]
ACPICA: Remove no longer needed file.
Markus Pfeiffer [Thu, 9 Apr 2015 20:09:22 +0000 (20:09 +0000)]
usb4bsd: Use ifq_set_oactive, update stat counters
* We now use ifq_set_oactive and ifq_clr_oactive on if_urndis
* Also while we are here replace increments of counters
by use of IFNET_STAT_INC macros
Markus Pfeiffer [Thu, 9 Apr 2015 19:50:39 +0000 (19:50 +0000)]
usb4bsd: Do not start when output is active
Sascha Wildner [Thu, 9 Apr 2015 20:01:36 +0000 (22:01 +0200)]
Sync ACPICA with Intel's version
20150408.
General changes:
* First part of upstream DragonFly support. acdragonfly.h and
acdragonflyex.h are now in the upstream repo. Various needed
patches to hook them in should be in the next Intel release.
* _REV now permanently returns 2 (as in other ACPI implementations).
* Windows 2015 (aka Windows 10) _OSI string added.
* Various printf issue fixes.
iasl(8) specific changes:
* Constant folding enhanced.
* SLIC table support updated according to Microsoft's latest spec. It
dumps as hex data block now (proprietary data).
This issue was actually found by our sephe on his Compaq CQ45.
* MSDM table support added (handled as proprietary data, just like SLIC).
* -Pn option implemented for the table compiler (was only implemented
for the ASL compiler).
* Better data table disassembly comments.
* -df option to force the disassembler to assume the table contains AML.
* Some fixes in the EFI version of the tools.
* Small miscellaneous fixes.
For a more detailed list, please see sys/contrib/dev/acpica/changes.txt.
Sascha Wildner [Thu, 9 Apr 2015 19:58:22 +0000 (21:58 +0200)]
mtree: Stop creating /usr/share/info.
Sascha Wildner [Thu, 9 Apr 2015 19:57:56 +0000 (21:57 +0200)]
Actually remove all share/info traces.
Sascha Wildner [Thu, 9 Apr 2015 19:57:27 +0000 (21:57 +0200)]
Clean up no longer used NOINFO and NOINFOCOMPRESS make.conf variables.
Sascha Wildner [Thu, 9 Apr 2015 19:56:47 +0000 (21:56 +0200)]
Remove some more old files via 'make upgrade'.
Sascha Wildner [Thu, 9 Apr 2015 19:56:18 +0000 (21:56 +0200)]
make upgrade: Remove formatted manual pages automatically.
Sepherosa Ziehau [Thu, 9 Apr 2015 12:17:20 +0000 (20:17 +0800)]
coretemp: Indentation
Sepherosa Ziehau [Thu, 9 Apr 2015 12:17:00 +0000 (20:17 +0800)]
coretemp: Avoid magic number
Matthew Dillon [Thu, 9 Apr 2015 06:58:54 +0000 (23:58 -0700)]
hammer2 - slave sync adjustments, doc update
* Fix the hammer2_cluster*() API, do not multiply-ref underlying chains
when a cluster is multiply-ref'd. Fixes issues when underlying chain
elements of the cluster are replaced during operations.
* Fix frontend writing issues when multiple slaves are present.
* Adjust documentation a bit. Get rid of the 256-way split description
for copyid use, we aren't going to do things that way so the size for
each physical volume can be up to ~2^64 (maybe ~2^63 to be safe).
* Add a HAMMER2_LOOKUP_NODIRECT flag to prevent recursively returning
the inode and remove the broken (cluster == cparent) test in the slave-sync
code. Doh, cluster structures are independently allocated, test was
broken.
* Fix several other slave-sync issues when multiple slaves are present.
(there are still some issues remaining).
* Fix accounting for the number of mounts using a physical device
(hmp), rename pmp_count to mount_count for clarity.
Sepherosa Ziehau [Wed, 8 Apr 2015 14:56:45 +0000 (22:56 +0800)]
coretemp: Register sensor task for each core instead each HT
And replicate DTS readout to all HT sensors belonging to the same core.
DTS readout is actually only for cores.
Matthew Dillon [Wed, 8 Apr 2015 05:53:06 +0000 (22:53 -0700)]
hammer2 - Retool flushing and use of mirror_tid, more cluster work.
Now that I'm starting to deal with different PFSs on the same physical
volume some mirror_tid related issues need to be fixed.
* mirror_tid is now per-media, not per-PFS. This fixes a number of issues
particularly with the on-mount recovery scan. Mount, recovery, and flush
code now no longer has to worry about PFSs when it comes to adjusting
mirror_tid.
* modify_tid will become per-physical PFS (not quite done in this commit).
* Change where mirror_tid gets set. Set bref.mirror_tid in
hammer2_chain_modify() instead of in the flush code. This takes care
of most of the flush cases.
* Better separation of the freemap_tid in the volume header.
* fchain (freemap) and vchain (main topology) syncing now works properly.
The fchain can be flushed independently of vchain, and the recovery code
can handle any number of vchain flushes occuring without a fchain flush.
For the moment, both are flushed on sync, fchain first, vchain second.
This can leave fchain's mirror_tid slightly behind vchain requiring
recovery on mount if a crash were to occur.
We now properly update just the fchain mirror_tid on a followup sync if
no main topology modifications have occurred, allowing the fchain
mirror_tid to catch-up to the vchain mirror_tid.
We now properly sync the fchain on unmount so no recovery is required.
* Revamp the recovery code to properly use the fchain-to-vchain mirror_tid
range in the recovery scan. This has the general effect of making the
recovery pass run a whole lot faster and when coupled with the above
fixes.
Report whether recovery is needed or not on-mount and the mirror_tid range
if so.
* Update DESIGN.
* Add CITEM_FEMOD indicating which chains in the hammer2_cluster structure
can actually be modified and modsync'd by a hammer2_cluster_modify() call.
* CITEM_INVALID now also checks bref.modify_tid as intended, when checking
whether nodes are synchronized or not (it used to use mirror_tid but with
the revamping modify_tid takes over this functionality).
* Remove the auto-ref/auto-drop from hammer2_chain_lock(),
hammer2_chain_unlock(), hammer2_cluster_lock(),
and hammer2_cluster_unlock(). Separate ref and drop calls are needed if
the ref-count is not taken care of already.
This makes the *chain* and *cluster* API basically behave the same way,
reducing confusion.
Cleanup related #defines and code infrastructure that is no longer needed
to handle RESOLVE_NOLOCK.
* Fix a bug when LOOKUP_NOLOCK is used. Do not assume LOOKUP_SHARED when
LOOKUP_NOLOCK is used, use the LOOKUP_SHARED flag only to determine the
locking type. Otherwise relocking the parent (which has to be locked)
for the degenerate DIRECTDATA case breaks the parent and causes a
deadlock or assertion.
* Preliminary adjustments to the slave synchronization code. In particular,
add support to hammer2_chain_modify() to suppress modify_tid updates so
the slave synchronization code can update the field manually. It must
NOT update the modify_tid in parent chains in the topology until the
sub-tree under them is synchronized.
Sepherosa Ziehau [Tue, 7 Apr 2015 15:02:32 +0000 (23:02 +0800)]
coretemp: Clean up identify method
Sepherosa Ziehau [Tue, 7 Apr 2015 14:22:13 +0000 (22:22 +0800)]
coretemp: Set Tj max to 110; 105 is quite common on Ivy Bridge CPUs.
Sepherosa Ziehau [Tue, 7 Apr 2015 14:15:01 +0000 (22:15 +0800)]
coretemp: Set sensor status properly
Sepherosa Ziehau [Tue, 7 Apr 2015 13:57:09 +0000 (21:57 +0800)]
sensor: Stick sensors thread to the last CPU.
Round-robin CPU assignment could stick the sensors thread to CPU0,
which has many special tasks.
Submitted-by: YRabbit
Sepherosa Ziehau [Mon, 6 Apr 2015 13:59:28 +0000 (21:59 +0800)]
coretemp: Add description for the sensor
Sepherosa Ziehau [Mon, 6 Apr 2015 12:52:28 +0000 (20:52 +0800)]
clock: Piggyback passive IPIQ processing
Passive IPIs will be flushed by the target CPU at clock interrupt.
But we _never_ completely conform to the passive IPI description.
Before we implemented LAPIC interrupt timer, systimers on non-CPU0
were actually IPIQ processing, which processed the passive IPIs;
however, passive IPIQ processing on CPU0 didn't conform to the passive
IPIs description.
After the introduction of LAPIC interrupt timer, none of the systimers
were related to IPIQ processing, thus passive IPIQ processing no longer
conformed to the passive IPI description at all.
As of this commit we piggyback passive IPIQ processing in doreti after
hardclock(), which matches the passive IPI description.
* NOTE:
- We don't piggypack passive IPIQ processing directly in hardclock() to
avoid introducing extra jitters to system time.
- We choose not to check passive IPIQ in systimer_intr(), since systimer
rate could be pretty high, e.g. rate set by polling(4).
With-feedback-from: dillon@
Tomohiro Kusumi [Mon, 6 Apr 2015 15:40:16 +0000 (00:40 +0900)]
sbin/hammer: Make hammer show-undo indicate positions of tail-chasing fifo
- Make hammer show-undo command print '>' for undo zone blockmap's
first_offset, and '<' for undo zone blockmap's next_offset which
indicate positions of tail-chasing undo fifo.
Matthew Dillon [Mon, 6 Apr 2015 01:04:46 +0000 (18:04 -0700)]
hammer2 - Sync thread work
* Initial syncthread coding, still many issues to resolve, particularly
with the handling of mirror_tid, but it was able to successfully
synchronized a MASTER to a SLAVE.
* Add more features to the hammer2_cluster*() API and structures and fix
a couple of bugs in hammer2_cluster_lookup() and hammer2_cluster_next().
* Add hammer2_cluster_next_single_chain() for advancing one element of
a cluster structure. Used to advance past a chain which the sync code
must delete on a slave.
* Fix a bug in hammer2_chain_lookup() when HAMMER2_LOOKUP_NOLOCK is used.
Tomohiro Kusumi [Sun, 5 Apr 2015 16:38:13 +0000 (01:38 +0900)]
sbin/hammer: Don't readahead the base buffer itself
- readahead can be skipped for itself (ri==0) too.
Sepherosa Ziehau [Sun, 5 Apr 2015 15:25:55 +0000 (23:25 +0800)]
coretemp: Keep the previous sensor value, if the IPI does not complete yet
John Marino [Sun, 5 Apr 2015 13:38:06 +0000 (15:38 +0200)]
make distribution: Remove references to deleted nls dirs
reported by: zrj on irc
Sepherosa Ziehau [Sun, 5 Apr 2015 14:37:27 +0000 (22:37 +0800)]
coretemp: Use lwkt_send_ipiq_passive()
This makes coretemp even more lightweight.
Sepherosa Ziehau [Fri, 3 Apr 2015 15:41:08 +0000 (23:41 +0800)]
coretemp: Use IPI to get temperature on other CPUs
This is more lightweight than CPU migration to run just one instruction.
Sepherosa Ziehau [Sun, 29 Mar 2015 12:26:36 +0000 (20:26 +0800)]
dimm: Implement pseudo device driver for DIMM related drivers
- This pseudo device driver installs sensor device for DIMM related
sensors (memtemp(4) and upcoming ecc(4) changes).
- This pseudo device driver keeps DIMM location information. And
the location information is exposed through a new sysctl tree,
hw.dimminfo. The nodes in this sysctl tree have the same names
as the sensor devices, so that programatic way could be used to
report DIMM status.
- This pseudo device implements common sensor update function for
memtemp(4). And it keeps configurable temperature thresholds for
memtemp(4) sensor.
- Utilize this pseudo device driver in memtemp(4).
Matthew Dillon [Sun, 5 Apr 2015 02:22:39 +0000 (19:22 -0700)]
hammer2 - update documentation, cleanup
* Update the DESIGN document.
* Cleanup API for hammer2_inode_lock*() and hammer2_inode_unlock*().
* Start work on the synchronization thread framework.
Tomohiro Kusumi [Fri, 3 Apr 2015 14:17:26 +0000 (23:17 +0900)]
sbin/hammer: Fix wrong hash value
- get_buffer_readahead() scans ondisk buffer using a wrong hash
value based on raw address. It needs to use zone2 address.
- Using wrong value results unnecessary malloc/free since buf
is always NULL after TAILQ_FOREACH().
John Marino [Fri, 3 Apr 2015 14:49:34 +0000 (16:49 +0200)]
make upgrade: Clean out cat1 directory from texinfo pages
John Marino [Fri, 3 Apr 2015 13:14:23 +0000 (15:14 +0200)]
Remove unused bsd.info.mk
John Marino [Fri, 3 Apr 2015 13:12:00 +0000 (15:12 +0200)]
Remove unused texinfo source files from contrib directory
John Marino [Fri, 3 Apr 2015 13:09:08 +0000 (15:09 +0200)]
Remove texinfo from base
At this point, the only info files left in DragonFly are from texinfo
itself. Due to a similar effort on FreeBSD 11, the ports are already
prepared for the lack of texinfo utilities in base.
John Marino [Fri, 3 Apr 2015 12:45:00 +0000 (14:45 +0200)]
groff: Remove info page
Initially I converted the groff info page until groff.7, but then I
realized that groff.7 already existed and serves as an adequate
alternative to the groff info page. Thus, this commit simply removes
the installation of the info page (one of the last in base)
John Marino [Fri, 3 Apr 2015 12:21:17 +0000 (14:21 +0200)]
am-utils: Convert info page to "man 7 am-utils"
Each automounter tool had a man page, but the group of utilities was
covered by an info page. This unique information was converted to
am-utils.7 and the info page has been removed.
John Marino [Fri, 3 Apr 2015 12:05:31 +0000 (14:05 +0200)]
com_err: convert info page to com_err.7
The was already a com_err.1 man page, but it was significantly shorter
than the com_err info page. The info page was converted to man 7 com_err
and then removed.
John Marino [Fri, 3 Apr 2015 10:56:33 +0000 (12:56 +0200)]
gdb: Remove ~2Mb of doc files from contrib (texi)
These texi files are no longer used in the build and they've got
equivalent man pages in most cases.
John Marino [Fri, 3 Apr 2015 10:41:32 +0000 (12:41 +0200)]
gdb: Remove 4 info pages (2 converted to man pages)
GDB had four info pages: gdb, gdbint, stabs, and annotate. They have been
removed.
* gdb.info : There has always been a man page gdb.1 which is an
adequate replacement for gdb.info
* stabs.info : This has been converted to stabs.7 with info2man
* gdbint.info : This has been converted to gdbint.7 with info2man
* annotate.info : This was always obsolete[1], so it was not replaced
[1] From annotate info page: This document describes the obsolete level
two annotation interface implemented in older GDB versions.
John Marino [Fri, 3 Apr 2015 10:09:16 +0000 (12:09 +0200)]
diffutils: Remove redundant info page
The three diff binaries all have their own man pages, so the
diffutils.info file is redundant. For now a copy of it remains in
contrib/diffutils/doc, but it is being removed from the base system.
John Marino [Fri, 3 Apr 2015 08:26:46 +0000 (10:26 +0200)]
grep: remove "redundant" info page
Grep already has an adequate man page, so we can remove info page without
losing much.
John Marino [Fri, 3 Apr 2015 08:23:09 +0000 (10:23 +0200)]
gcc47: Remove info pages
The info pages from gcc50 are not installed due to limited use and the
fact all the information is readily available on the web. Removing info
pages from gcc47 matches gcc50 and moves us closer to removing texinfo.
John Marino [Fri, 3 Apr 2015 08:12:43 +0000 (10:12 +0200)]
binutils 2.24: Remove info pages
The info pages from binutils 2.25 are not installed (if they were, they
would overwrite 2.24 versions anyway). Both "as" and "ld" have sufficient
man pages. There is not equivalent "binutils" man page, but this
information is readily available on the internet, which is the same
justification used for not importing gcc50 info pages.
John Marino [Fri, 3 Apr 2015 08:59:00 +0000 (10:59 +0200)]
cvs: remove ~3.5Mb of doc files from contrib (texi/pdf)
The only documentation we needs from cvs is in man/cvs.5 and doc/cvs.1.
Everything else is unused, including the pre-generated pdf files, so
lets save shallow repos from pulling these large unused files.
John Marino [Fri, 3 Apr 2015 07:30:58 +0000 (09:30 +0200)]
cvs: Remove info pages (one converted to man page)
As the start of an effort to remove info pages and texinfo from the
system, the cvsclient info page has been converted to a man page.
The cvs info page was not converted since it appears to be equivalent
to the already existing man page.
Entries were added to Makefile_upgrade.inc, but when all the info pages
are gone, those entries will be replaced by a single directory line -
to remove /usr/share/info
John Marino [Thu, 2 Apr 2015 21:07:32 +0000 (23:07 +0200)]
gcc50: Update to 02 APR 2015 snapshot (SVN 221845)
John Marino [Thu, 2 Apr 2015 22:56:45 +0000 (00:56 +0200)]
Merge branch 'vendor/GCC50'
John Marino [Thu, 2 Apr 2015 20:43:43 +0000 (22:43 +0200)]
Update gcc-50 to SVN version 221845
Last Changed Date: 2015-04-02 19:33:22 +0200 (Thu, 02 Apr 2015)
Tomohiro Kusumi [Wed, 1 Apr 2015 12:41:31 +0000 (21:41 +0900)]
sbin/hammer: Don't downgrade when failed to destroy pfs
- hammer pfs-destroy command downgrades (and change some other params)
ondisk pfs data before it attempts to destroy the pfs. This leads to
unexpected result if it fails to destroy because that pfs is left
with downgraded info. This commit restores the original ondisk pfs
data on failure in order to keep status (this does generate a new
ondisk pfs record too).
==========
example1 - using existing /sbin/hammer
# mount | grep TEST
TEST on /HAMMER (hammer, local)
# pwd
/HAMMER
# mkdir -p ./mnt
# hammer pfs-master ./test1 | grep "operating as"
operating as a MASTER
# mount_null ./test1 ./mnt
# mount | grep mnt
/HAMMER/@@-1:00001 on /HAMMER/mnt (null, local)
# hammer pfs-destroy ./test1
You have requested that PFS#1 () be destroyed
<snip>
Destroying PFS #1 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#1 failed: Directory not empty
# hammer pfs-status ./test1 | grep "operating as"
operating as a SLAVE
==========
example2 - using this commit
# mount | grep TEST
TEST on /HAMMER (hammer, local)
# pwd
/HAMMER
# mkdir -p ./mnt
# hammer pfs-master ./test1 | grep "operating as"
operating as a MASTER
# mount_null ./test1 ./mnt
# mount | grep mnt
/HAMMER/@@-1:00001 on /HAMMER/mnt (null, local)
# hammer pfs-destroy ./test1
You have requested that PFS#1 () be destroyed
<snip>
Destroying PFS #1 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#1 failed: Directory not empty
# hammer pfs-status ./test1 | grep "operating as"
operating as a MASTER
Tomohiro Kusumi [Tue, 31 Mar 2015 21:15:09 +0000 (06:15 +0900)]
sbin/hammer: Print error message if already up|downgraded
- Print an error message that indicates the pfs has already
been upgraded to master or downgraded to slave, instead of
printing "pfs-xxxgrade of PFS#%d (%s) succeeded".
Tomohiro Kusumi [Tue, 31 Mar 2015 20:26:19 +0000 (05:26 +0900)]
sbin/hammer: Detect possible relinking of pfs by user
- It is possible that a user rm pfs symlink and then relink the pfs.
If the user happens to make the symlink to, for example,
"./@@-1:00001" (has "./" before "@@-1:00001"), then getpfs() fails
to properly parse the pfs id as it fails to sscanf the string.
This commit checks if the symlink has "/" in the path, and if yes
use a basename of it to get rid of unnecessary prefix to make it
work properly.
==========
example1 - using existing /sbin/hammer
# mount | grep TEST
TEST on /HAMMER (hammer, local)
# pwd
/HAMMER
# hammer pfs-master test1 > /dev/null
# ls -l ./test1
lrwxr-xr-x 1 root wheel 10 Apr 2 04:27 ./test1 -> @@-1:00001
# ln -s ./@@-1:00001 test2
# ls -l ./test2
lrwxr-xr-x 1 root wheel 12 Apr 2 04:28 ./test2 -> ./@@-1:00001
# hammer pfs-destroy ./test2
You have requested that PFS#1 () be destroyed
<snip>
Destroying PFS #1 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#1 failed: Directory not empty
==========
example2 - using this commit
# mount | grep TEST
TEST on /HAMMER (hammer, local)
# pwd
/HAMMER
# hammer pfs-master test1 > /dev/null
# ls -l ./test1
lrwxr-xr-x 1 root wheel 10 Apr 2 04:31 ./test1 -> @@-1:00001
# ln -s ./@@-1:00001 test2
# ls -l ./test2
lrwxr-xr-x 1 root wheel 12 Apr 2 04:31 ./test2 -> ./@@-1:00001
# hammer pfs-destroy ./test2
You have requested that PFS#1 () be destroyed
<snip>
Destroying PFS #1 () in 5 4 3 2 1.. starting destruction pass
pfs-destroy of PFS#1 succeeded!
# ls -l ./test*
lrwxr-xr-x 1 root wheel 10 Apr 2 04:31 ./test1 -> @@PFS00001
# hammer pfs-status ./test1
Cannot access PFS ./test1: No such file or directory
Tomohiro Kusumi [Tue, 31 Mar 2015 17:17:18 +0000 (02:17 +0900)]
sbin/hammer: Remove unnecessary bzero(3)
- No need to bzero pfs before calling getpfs().
- Make init_pfsd() bzero pfsd.