François Tigeot [Fri, 11 Dec 2015 19:21:33 +0000 (20:21 +0100)]
drm/i915: Remove duplicated code in i915_gem_fault (3/3)
François Tigeot [Fri, 11 Dec 2015 19:19:55 +0000 (20:19 +0100)]
drm/i915: Remove duplicated code in i915_gem_fault (2/3)
François Tigeot [Fri, 11 Dec 2015 19:06:38 +0000 (20:06 +0100)]
drm/i915: Remove duplicated code in i915_gem_fault (1/3)
Tomohiro Kusumi [Fri, 11 Dec 2015 09:57:03 +0000 (18:57 +0900)]
sbin/hammer: Make show print symlink[24] if inode is symlink
Since now that parent_obj_localization part of the union
inode.ext is gone. It's either a symlink string or not used.
Tomohiro Kusumi [Thu, 10 Dec 2015 15:11:44 +0000 (00:11 +0900)]
sys/vfs/hammer: Fix wrong parent localization for PFS root
The idea of PFS root inode having ip localization value of its
parent directory's inode has been #if0'd after
ea434b6f in 2008.
(Since then parent_obj_localization field of ondisk inode seems
to be always 0 because the field is never touched after it's
first allocated, unless it's a symlink which uses symlink[24]
part of union)
Since the field is now deprecated, using this as a localization
value of inode's parent is wrong when the inode is PFS root. It
should use a proper localization value HAMMER_DEF_LOCALIZATION
which is also 0.
Note that HAMMER userspace doesn't allow creating a PFS in PFS
unless the parent PFS is PFS0 (see hammer_cmd_pseudofs_create()),
so it doesn't need to consider the parent inode's localization
value other than the default localization value. If that's allowed,
there seems to be no easy way to tell the localization value.
Also remove parent_obj_localization field of ondisk inode since
it's no longer used after this commit.
Tomohiro Kusumi [Thu, 10 Dec 2015 10:51:12 +0000 (19:51 +0900)]
sys/vfs/hammer: Use hammer_find_inode()
Add __hammer_find_inode() and make hammer_get_*inode() use this.
__hammer_find_inode() is no-ref version of hammer_find_inode()
directly called by hammer_find_inode().
Neither three function arguments obj_id, asof, localization nor
three fields of struct hammer_inode_info are modified in
hammer_get_inode() and hammer_get_dummy_inode(), so getting rid
of hammer_inode_info initialization placed before loop: is ok.
Tomohiro Kusumi [Thu, 10 Dec 2015 09:11:11 +0000 (18:11 +0900)]
sys/vfs/hammer: Cleanup
Sepherosa Ziehau [Fri, 11 Dec 2015 07:39:03 +0000 (15:39 +0800)]
if: Bandaid ifa_ifwithnet() for ifaddrs w/ same netmask
The original ifaddr selection logic would cause trouble for
SO_DONTROUTE sockets, if following stuffs happened:
ifconfig drv0 inet a.b.c.1
ifconfig drv0 down
ifconfig drv1 inet a.b.c.2
The original ifaddr selection logic in ifa_ifwithnet() will
select a.b.c.1@drv0, which is down. Instead, a.b.c.2@drv1
should be selected.
We thus prefer ifaddr w/ IFF_UP interface or is routable.
Same bandaid probably should be applied to ifa_ifwithdstaddr(),
ifa_ifwithaddr() [broadcast part], and ifaof_ifpforaddr() too.
Sascha Wildner [Thu, 10 Dec 2015 20:40:41 +0000 (21:40 +0100)]
libc/stdtime: Fix two cases where a NULL pointer could have been free()'d.
Also, make the rest of error returns more consistent.
Sascha Wildner [Thu, 10 Dec 2015 18:16:09 +0000 (19:16 +0100)]
libcompat: Clean up a bit, fix warnings and raise WARNS to 2.
* Remove K&R definitions for non-__STDC__ case.
* Add two defines to rexec.c which afaict were forgotten when the
RFC 3542 support was added back in 2008 (
5aa41e7ced). Or perhaps
they were present somewhere else which has been removed since.
* Add braces.
* Remove unneeded CFLAGS.
Sascha Wildner [Thu, 10 Dec 2015 18:12:24 +0000 (19:12 +0100)]
btxld(8): Fix some warnings and raise WARNS to 6.
Tomohiro Kusumi [Wed, 9 Dec 2015 13:21:35 +0000 (22:21 +0900)]
sys/vfs/hammer: Add hammer_xlate_to_phys()
This macro is zone2 --> physical offset version of
hammer_xlate_to_zone2() and hammer_xlate_to_zoneX().
Tomohiro Kusumi [Wed, 9 Dec 2015 12:41:36 +0000 (21:41 +0900)]
sys/vfs/hammer: Cleanup assertion for zone
Don't hardcode ZONE_BTREE (zone-8).
Alhough it requires slightly more calculation than just >ZONE_BTREE,
this is what blockmap does on every allocation/reservation/etc.
Tomohiro Kusumi [Wed, 9 Dec 2015 09:38:52 +0000 (18:38 +0900)]
sys/vfs/hammer: Make hammer_bnew*() call _hammer_bread()
Remove _hammer_bnew() since _hammer_bread() and _hammer_bnew()
are the exact same except for isnew arg of hammer_get_buffer().
hammer_bnew*() use isnew=1 to only allocate ondisk buffer with
no disk i/o at the moment.
Tomohiro Kusumi [Wed, 9 Dec 2015 07:11:06 +0000 (16:11 +0900)]
sys/vfs/hammer: Remove unused waitfor field from vsyncscan data
Only error field is used.
Tomohiro Kusumi [Wed, 9 Dec 2015 06:57:49 +0000 (15:57 +0900)]
sys/vfs/hammer: Make struct hammer_sync_info file local
This should be a file local struct as no one else needs this
at this point. This struct is for *data part of vsyncscan().
Tomohiro Kusumi [Wed, 9 Dec 2015 06:52:51 +0000 (15:52 +0900)]
sys/vfs/hammer: Remove unused lock free_lock
This was only used in the early stage of hammer development
when hammer_freemap.c had some code.
Sascha Wildner [Wed, 9 Dec 2015 08:00:18 +0000 (09:00 +0100)]
bsd-family-tree: Sync with FreeBSD (for DragonFly 4.4.1).
Sepherosa Ziehau [Mon, 7 Dec 2015 06:33:51 +0000 (14:33 +0800)]
inpcb: Split portinfo token into tokens for porthash head
And use pooled token for porthash head. This avoids another 10K/s
~20K/s contention during local port selection.
John Marino [Tue, 8 Dec 2015 22:41:22 +0000 (23:41 +0100)]
ls(1): Fix sort-by-size bug
For a reason that escapes me, in order to sort files by size using ls(1),
one had to pass both the size sort switch (-S) and the time sort switch
(-t), otherwise the -S flag would be ignored. This hacky workaround was
documented in the man page as well.
Let's fix this with code taken from FreeBSD. The -t and -S switches are
now mutually exclusive. If someone uses them together, then the last
one wins (e.g. ls -st sorts by mod. time and -ts sorts by file size)
John Marino [Tue, 8 Dec 2015 21:40:03 +0000 (22:40 +0100)]
w(1): Limit affect of locale change
In essence, w(1) is not designed to be locale sensitive. The majority
of the outputted text is exclusively English. However, it does check
the locale for the AM/PM setting (12 hour vs 24 hour clock) and the
decimal separator.
Given that w(1) is designed for English, it only provides enough space
to accommodate "AM" or "PM". When other locales are used
(e.g. de_DE.UTF-8) the output is simply truncated and confusing.
Let's keep the 12-hour clock labels in the same language as the rest
of the program by forcing strftime to use the C/POSIX locale. Using
locales still affects am/pm presence and the decimal separator as
originally intended.
Tomohiro Kusumi [Tue, 8 Dec 2015 17:06:42 +0000 (02:06 +0900)]
sys/vfs/hammer: Make offset kprintf message explicit
bp->b_bio2.bio_offset (bp->b_bio_array[1].bio_offset)
is zone2 offset, so make it print "zone2_offset" instead of "doff".
Tomohiro Kusumi [Tue, 8 Dec 2015 09:18:43 +0000 (18:18 +0900)]
sys/vfs/hammer: Make hammer_io_flush_mark() inline
Tomohiro Kusumi [Tue, 8 Dec 2015 07:55:09 +0000 (16:55 +0900)]
sys/vfs/hammer: Use HAMMER_ENCODE() for hammer_mod_rb_compare()
Try not to hardcode 8 for volume fields.
The 60 bits offset format changes, but the change doesn't affect
RB-Tree's elements comparison. It works as long as it has volume
bits and 52 bits offset within that volume. Whether HAMMER_ENCODE()
is used or not, io[12]_offset are not valid offsets anyway.
These offset values just need to be unique for physical locations.
(A) before this commit
----oooooooooooooooooooooooooooooooooooooooooooooooooooovvvvvvvv
(B) this commit
----vvvvvvvvoooooooooooooooooooooooooooooooooooooooooooooooooooo
Tomohiro Kusumi [Tue, 8 Dec 2015 07:35:49 +0000 (16:35 +0900)]
sys/vfs/hammer: Fix wrong comment on zone2 offset
This isn't zone2 offset.
A bug fixed by
41a8e517 in 2012 was based on the wrong assumption
that this offset was zone2 offset, so this comment should be fixed
as well.
Sascha Wildner [Tue, 8 Dec 2015 17:52:59 +0000 (18:52 +0100)]
kernel: Silence two unused variables warnings without INET{,6}.
Unlikely that someone will compile a kernel without both INET and INET6
but it helps my testing of other, really optional, stuff.
Tomohiro Kusumi [Tue, 8 Dec 2015 06:51:50 +0000 (15:51 +0900)]
sys/vfs/hammer: Move hammer_buf_xxx_io() to _KERNEL
usr.bin/fstat/hammer.c
includes in-kernel structures and KKASSERT results in compile time error.
Tomohiro Kusumi [Tue, 8 Dec 2015 06:26:47 +0000 (15:26 +0900)]
sys/vfs/hammer: Make bio ops static
Only functions that initialize bios need to see this.
Tomohiro Kusumi [Mon, 7 Dec 2015 15:29:49 +0000 (00:29 +0900)]
sys/vfs/hammer: Add hammer_buf_peek_io()/hammer_buf_attach_io()
HAMMER doesn't really use bp->b_dep as a list, because it only
has one io entry linked to it (buf and io are 1:1).
Add hammer_buf_peek_io() and hammer_buf_attach_io() to hide the
implication of list (that isn't really a list). These functions
also hide bunch of void* casts between worklist and hammer_io.
Tomohiro Kusumi [Mon, 7 Dec 2015 14:55:25 +0000 (23:55 +0900)]
sys/vfs/hammer: Add comments on struct worklist
This worklist isn't very clean, but having a general structure
will require lots of changes in UFS.
Tomohiro Kusumi [Mon, 7 Dec 2015 12:19:52 +0000 (21:19 +0900)]
sys/vfs/hammer: Remove union hammer_io_structure
Remove union hammer_io_structure that was added in the early
stage of hammer development. This has been used in a certain
part of hammer_io.c, but the code is more clear without this.
Using the existing HAMMER_ITOB() as well as a newly added
HAMMER_ITOV() makes the code less complicated than using this
union.
Imre Vadasz [Fri, 4 Dec 2015 15:45:21 +0000 (16:45 +0100)]
kqueue: Make EVFILT_TIMER mpsafe, by modifying kq_ncallouts with atomics.
Sepherosa Ziehau [Mon, 7 Dec 2015 09:44:28 +0000 (17:44 +0800)]
igb: Fix DMACR settings
Noticed-by: swildner@
Sepherosa Ziehau [Fri, 4 Dec 2015 08:47:12 +0000 (16:47 +0800)]
inpcb: Push porthash token down a bit and use atomic op to update lastport
This paves the way to use pooled token for porthash list head.
Even just with this commit, porthash token contention is reduced by 20K/s
on 12core/24threads system when running tools/kq_connect_client.
Tomohiro Kusumi [Sun, 6 Dec 2015 10:36:05 +0000 (19:36 +0900)]
sys/vfs/hammer: Add lo_to_pfs()/pfs_to_lo() macros
These macros hide 16 bits shift and cast to int/uint32_t
that are necessary on localization to/from PFS id conversion.
Some code are better without details being hidden by macros,
but this seems to be more readable with x_to_y macros that
hide bunch of >>16, <<16, and casts.
(No diff in binary on x86_64/gcc5)
Tomohiro Kusumi [Sat, 5 Dec 2015 15:34:45 +0000 (00:34 +0900)]
sys/vfs/hammer: Remove unused global variables and sysctls
Remove the following entries that aren't used for anything.
These are mostly from the early stage of hammer development
and no longer used.
vfs.hammer.debug_recover_faults
vfs.hammer.write_mode
vfs.hammer.zone_limit
Tomohiro Kusumi [Sat, 5 Dec 2015 17:43:45 +0000 (02:43 +0900)]
sbin/hammer: Change assertion on invalid cleanup path to printf
This shouldn't be assertion.
Users could just type . for no reason and result in core dump.
It should end like other errors as shown below.
# hammer cleanup . . . . .
cleanup . - path must start with '/'
cleanup . - PFS #0 already handled
cleanup . - PFS #0 already handled
cleanup . - PFS #0 already handled
cleanup . - PFS #0 already handled
Tomohiro Kusumi [Sat, 5 Dec 2015 12:38:23 +0000 (21:38 +0900)]
sys/vfs/hammer: Use hammer_vfs_root()
Tomohiro Kusumi [Sat, 5 Dec 2015 11:04:08 +0000 (20:04 +0900)]
sys/vfs/hammer: Define HAMMER_MAX_PFS in hammer_disk.h
Maximum number of PFS (0 to 0xFFFF) is a part of ondisk definitions,
so move HAMMER_MAX_PFS to hammer_disk.h.
Also add HAMMER_MAX_PFSID which is (HAMMER_MAX_PFS - 1).
Tomohiro Kusumi [Sat, 5 Dec 2015 07:32:38 +0000 (16:32 +0900)]
sys/vfs/hammer: Use bitwise OR to generate ondisk localization
Use |= to generate localization field for B-Tree elements and
cursor keys instead of +=, since lower 16 bits are bitfields
(or safer to treat INODE=0x1 and MISC=0x2 as bitfields).
The typical code to generate ondisk localization value is to
do either of the followings.
ondisk_lo = local_variable + {INODE or MISC};
ondisk_lo = ip->obj_localization + {INODE or MISC};
ondisk_lo = HAMMER_XXX_LOCALIZATION + {INODE or MISC};
^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
(A)32 bits localization (B)lower 16 bits
with usually 0 for
lower 16 bits for type
Adding (A) and (B) to synthesize PFS id and localization type
could lead to a potential bug if (A) already has type bits set
to either INODE or MISC. For example if (A) had INODE for type
bits and the code is to += INODE for (B), then type bits turn
into MISC (1+1=2) which is not the intention of the code.
This could potentially occur with the first example of above
three where (A) is a local variable or a function argument.
It is not too obvious from the code whether that local variable
has 0 for the lower 16 bits (which basically should be).
If the code just always uses |= no such thing will happen.
John Marino [Sun, 6 Dec 2015 10:55:27 +0000 (11:55 +0100)]
gcc50: Very minor updates to three man pages
Now that gcc 5.3 has been officially released, the new man pages are
available (they are not present in the repository).
Alexander Kuleshov [Sat, 5 Dec 2015 17:14:03 +0000 (23:14 +0600)]
bsd.lib.mk: No need to check DEBUG_FLAGS twice
We no need to check the DEBUG_FLAGS twice in the share/mk/bsd.lib.mk,
we can just add '.else' clause to the first check.
Sascha Wildner [Sun, 6 Dec 2015 03:21:21 +0000 (04:21 +0100)]
gcc50: Remove bits/mutex.h from the libstdcxx headers Makefile again.
This header doesn't exist in bits/. The quoted_string.h addition
seems to have been correct though.
Markus Pfeiffer [Sat, 5 Dec 2015 14:16:18 +0000 (14:16 +0000)]
gcc50: add some missing files
* mutex.h is an internal header omitted from a previous commit
* quoted_string.h and mutex.h were missing in Makefile.headers
This broke compilation of cmake-3.3.1 on my system.
Sascha Wildner [Fri, 4 Dec 2015 20:46:40 +0000 (21:46 +0100)]
Local adjustments for OpenSSL-1.0.1q.
Sascha Wildner [Fri, 4 Dec 2015 20:45:43 +0000 (21:45 +0100)]
Merge branch 'vendor/OPENSSL'
Sascha Wildner [Fri, 4 Dec 2015 20:45:11 +0000 (21:45 +0100)]
Import OpenSSL 1.0.1q.
* Certificate verify crash with missing PSS parameter (CVE-2015-3194)
* X509_ATTRIBUTE memory leak (CVE-2015-3195)
* Rewrite EVP_DecodeUpdate (base64 decoding) to fix several bugs
* In DSA_generate_parameters_ex, if the provided seed is too short,
return an error
Sascha Wildner [Fri, 4 Dec 2015 16:27:26 +0000 (17:27 +0100)]
kqueue.2: Fix manpage.
John Marino [Fri, 4 Dec 2015 14:20:16 +0000 (15:20 +0100)]
gcc50: Upgrade version 5.2.1 => 5.3.1
This came out today so there are no distfiles available yet. That
means I can't update the manpages for cc.1, cpp.1, and gcov.1. There
are no significant changes expected though.
John Marino [Fri, 4 Dec 2015 15:04:54 +0000 (16:04 +0100)]
Merge branch 'vendor/GCC50'
John Marino [Fri, 4 Dec 2015 14:11:37 +0000 (15:11 +0100)]
Update gcc-50 to SVN version 231263 (gcc-5-branch)
This is equivalent to the gcc 5.3 release (version shows 5.3.1 though)
Last Changed Date: 2015-12-04 01:16:08 +0100 (Fri, 04 Dec 2015)
John Marino [Fri, 4 Dec 2015 13:34:18 +0000 (14:34 +0100)]
libc: Define a new version, DF406.0, for the 4.5 branch
Ben Woolley [Fri, 4 Dec 2015 07:58:21 +0000 (23:58 -0800)]
kqueue: Bring in EV_RECEIPT and EV_DISPATCH from FreeBSD
EV_RECEIPT: FreeBSD SVN 197243
EV_DISPATCH: FreeBSD SVN 197242
Since EV_RECEIPT has been on FreeBSD since release 8.1 and on OSX
since Release 10.5, it's starting to show up in 3rd party software.
And authors assume if FreeBSD has it, all BSDs have.
suggested by: Jan Beich
contributed by: Ben Woolley
Sepherosa Ziehau [Fri, 4 Dec 2015 07:26:48 +0000 (15:26 +0800)]
atomic: Fix atomic_cmpset_long prototype
Return value is actually a boolean, int should be enough.
Sepherosa Ziehau [Fri, 4 Dec 2015 07:04:28 +0000 (15:04 +0800)]
atomic: Add atomic_cmpset_short
Sepherosa Ziehau [Fri, 4 Dec 2015 02:20:40 +0000 (10:20 +0800)]
socket: so_ref 0->1 transition is valid for an aborted socket on so_comp
Add comment about it.
Reported-by: marino@, dillon@
Tomohiro Kusumi [Thu, 3 Dec 2015 12:43:15 +0000 (21:43 +0900)]
sys/vfs/hammer: Add hammer_is_zone2|direct_mapped_index()
No functional changes.
Just makes the code a bit more readable than having bunch of
assert(zone >= 8 && zone < 16)
Tomohiro Kusumi [Wed, 2 Dec 2015 18:55:00 +0000 (03:55 +0900)]
sbin/hammer: Make blockmap print fill percentage on -v
Tomohiro Kusumi [Wed, 2 Dec 2015 18:47:42 +0000 (03:47 +0900)]
sbin/hammer: Use correct printf format for crc
Tomohiro Kusumi [Wed, 2 Dec 2015 14:20:45 +0000 (23:20 +0900)]
sys/vfs/hammer: Add/fix comments on B-Tree node
Add/fix missing/incomplete/obsolete comments.
Move struct hammer_node_ondisk to the right place which is
underneath the comment on ondisk node.
Tomohiro Kusumi [Wed, 2 Dec 2015 14:55:43 +0000 (23:55 +0900)]
sys/vfs/hammer: Cleanup unnecessary cast
DECODE macros do cast the result to int (actually was int32_t).
Sepherosa Ziehau [Tue, 1 Dec 2015 03:07:40 +0000 (11:07 +0800)]
ix: Update to Intel ix-2.8.2
This update adds more chips support.
Local changes:
Fix ifmedia support. Now media change (force 10G-SR and 1G-SX) works
properly at least on my 82599 w/ DAC; though "autoselect" is still
the recommended mode.
Sepherosa Ziehau [Thu, 3 Dec 2015 02:48:03 +0000 (10:48 +0800)]
ifmedia: Add two helper functions for ifmedia_add and ifmedia_set
- ifmedia_add_nodup() will not add duplicated media into ifmedia
- ifmedia_tryset() will fail, if the target media does not exist
Imre Vadasz [Wed, 2 Dec 2015 21:55:12 +0000 (22:55 +0100)]
drm: fb_get_options() can just use the unmodified connector-name.
There was apparently never an actual need for using a modified connector
name in the video mode tunable.
e.g. instead of drm.video.dvid1="1024x768" one can just use
drm.video.DVI-D-1="1024x768" which is more similar to the Linux
command line option.
Sascha Wildner [Wed, 2 Dec 2015 20:14:10 +0000 (21:14 +0100)]
devfs(9): Rename DEVFS_DECLARE_CLONE_BITMAP to DEVFS_DEFINE_CLONE_BITMAP.
Also, add DEVFS_DECLARE_CLONE_BITMAP() for extern declarations, analogous
to MALLOC_DEFINE() and MALLOC_DECLARE().
In the sound code, replace some externs with DEVFS_DECLARE_CLONE_BITMAP()
and remove one unneeded extern.
Sascha Wildner [Wed, 2 Dec 2015 16:59:42 +0000 (17:59 +0100)]
backtrace.3: Fix prototype of backtrace_symbols_fd_fmt().
Tomohiro Kusumi [Wed, 2 Dec 2015 09:42:02 +0000 (18:42 +0900)]
sys/vfs/hammer: Add/fix comments on volume header
Tomohiro Kusumi [Tue, 1 Dec 2015 17:06:32 +0000 (02:06 +0900)]
sys/vfs/hammer: Cast HAMMER_BLOCKMAP_LAYER1|2_INDEX macros to int
This commit does the same as
37fa1bc7 for INDEX macros.
RADIX macro is how many layer entries a big-block can hold,
INDEX macro is an index of layer entry for the given offset.
(i.e. Maximum INDEX equals (RADIX - 1))
Imre Vadasz [Tue, 1 Dec 2015 22:47:02 +0000 (23:47 +0100)]
syscons: Fixup kms_draw() after change for xpad variable removal.
In kms_draw(), draw_pos should always point to the beginning of a
scanline now.
Matthew Dillon [Tue, 1 Dec 2015 19:00:11 +0000 (11:00 -0800)]
bmake - Disable use of PWD env
* bmake tries to use the logical directory path via the PWD environment
variable, and its various exceptions for dealing with OBJDIR fall short.
This creates mass confusion for buildworld if the source tree is built
via a logical directory path which goes through a symlink.
* With this change, bmake now only uses the real directory path.
Taken-from: FreeBSD
Tomohiro Kusumi [Tue, 1 Dec 2015 13:25:07 +0000 (22:25 +0900)]
sys/vfs/hammer: Cast HAMMER_BLOCKMAP_RADIX1|2 macros to int
RADIX macros represent how many layer1/2 entries (32/16 bytes)
a 8MB big-block can hold, but these aren't zone-x offset.
These are typicaly used as an index of array where each entry
is a data structure that corresponds to layer1/2 entry,
therefore it makes sense to cast these macros to int.
Tomohiro Kusumi [Tue, 1 Dec 2015 11:53:37 +0000 (20:53 +0900)]
sys/vfs/hammer: Remove HAMMER_BLOCKMAP_RADIX1|2_PERBUFFER macros
Things can be implemented without using these macros that
are a bit difficult to understand what they are.
newfs_hammer is the only program that currently uses them,
but it can be done in a more simple way.
Tomohiro Kusumi [Mon, 30 Nov 2015 15:15:47 +0000 (00:15 +0900)]
sys/vfs/hammer: Add/fix comments on zones
Tomohiro Kusumi [Mon, 30 Nov 2015 14:22:24 +0000 (23:22 +0900)]
sys/vfs/hammer: Cleanup hammer_alloc_data()
François Tigeot [Mon, 30 Nov 2015 19:23:59 +0000 (20:23 +0100)]
drm: Add BUILD_BUG_ON_MSG()
Tomohiro Kusumi [Sun, 29 Nov 2015 15:41:06 +0000 (00:41 +0900)]
sys/vfs/hammer: Add/fix comments on ondisk formats
Tomohiro Kusumi [Sun, 29 Nov 2015 16:24:10 +0000 (01:24 +0900)]
sys/vfs/hammer: Use hammer_modify_buffer_noundo()
Sepherosa Ziehau [Mon, 30 Nov 2015 03:42:42 +0000 (11:42 +0800)]
kevent: Reduce kqueue token contention
By reducing kqueue token coverage on kern_event() path.
This halves the pool token contention for tool/kq_connect_client
(from 100Kcollisions/s to 50Kcollision/s, @315Kconns/s). And
also reduces pool token contention for tool/kq_accept_server
noticeablely.
Sepherosa Ziehau [Mon, 30 Nov 2015 02:30:55 +0000 (10:30 +0800)]
kevent: Fix comment and remove extra blank line
Sepherosa Ziehau [Mon, 30 Nov 2015 02:19:30 +0000 (10:19 +0800)]
hammer: Always set noatime for hammerfs
Set tunable vfs.hammer.noatime to 0 to disable this "auto" noatime.
Reviewed-by: dillon@
Sascha Wildner [Sun, 29 Nov 2015 16:26:09 +0000 (17:26 +0100)]
kernel: Better separate the "deprecated" spinlocks from DRM.
* Rename spin_lock_init() -> spin_init_deprecated(). Also remove
the spinlock_t type for the deprecated ones.
* Move DRM to using struct spinlock * where it used spinlock_t
before.
Sascha Wildner [Sun, 29 Nov 2015 16:14:23 +0000 (17:14 +0100)]
kernel: Clean up the "deprecated" spinlock stuff a bit.
Remove intr_{lock,unlock,spinlock} and mpintr_{lock,unlock,spinlock}
because they are no longer used.
Sascha Wildner [Sun, 29 Nov 2015 15:59:52 +0000 (16:59 +0100)]
kernel/drm: Make i915 and radeon compilable into the kernel.
This is for debugging and testing purposes.
For example, it helps catching certain types of errors which are
not easily caught when building just the module, such as when a
prototype of a called function is present but its implementation
isn't.
Sascha Wildner [Sun, 29 Nov 2015 15:57:03 +0000 (16:57 +0100)]
kernel/drm: Move the CONFIG_* options to header files.
i915_drv.h already had CONFIG_ACPI, so put the other options we
currently define for i915 here too.
radeon needs no additions since CONFIG_ACPI, the only option we
define for it, is already in radeon.h
Comparison of preprocessed files shows that this commit changes
nothing except a few line numbers in warning/error message
strings.
François Tigeot [Sun, 29 Nov 2015 16:19:21 +0000 (17:19 +0100)]
drm: Stop ignoring the second argument of drm_free()
DragonFly's native kfree() call takes a second argument in order to report
which usage correspond to which memory allocations.
Some memory areas in the drm subsystem must also be freed with the memory
type M_TEMP and not M_DRM.
Submitted-by: zrj
Tomohiro Kusumi [Sun, 29 Nov 2015 10:14:46 +0000 (19:14 +0900)]
sys/vfs/hammer: Remove HAMMER_ITIMES_XXX macros
hammer_update_itimes() is better without these macros.
The details of hammer_modify_buffer() arguments shouldn't be
hidden by these macros, because ondisk inode fields modified
in the next two lines are what hammer_modify_buffer() pushes
into undo fifo. This relation should be visible in the code.
Also remove a comment that refers to HAMMER_INODE_ITIMES.
This macro has already been removed.
Tomohiro Kusumi [Sun, 29 Nov 2015 10:07:23 +0000 (19:07 +0900)]
sys/vfs/hammer: Remove integrity_crc field of ondisk inode
This integrity_crc field was added in
5a930e66,
but never used or explained what this was supposed to be.
Rename it to reserved.
Also rename reserved fields from 01.
Tomohiro Kusumi [Sun, 29 Nov 2015 09:24:01 +0000 (18:24 +0900)]
sys/vfs/hammer: Remove time/freq fields of ondisk PFS
These ondisk fields were added in
4c038e17 when mirroring
code was committed (without detailed explanation), but the
idea of time/freq was never implemented.
Rename them to reserved.
Sascha Wildner [Sun, 29 Nov 2015 13:42:18 +0000 (14:42 +0100)]
i386 removal, part 46/x: Remove sys/cpu/i386.
Move the four i386 headers which libstand previously took from this
directory to libstand's dir. This is just a precaution and actually
not necessary at all because our x86_64 headers have #ifdef __i386__
checks for everything which libstand needs (binary comparison with
a libstand that was compiled with only x86_64 headers confirms it).
Review of the .depend files in /usr/obj confirms that this headers
are now taken.
Also reduce some no longer needed compatibility setup in libstand's
Makefile.
Tomohiro Kusumi [Sun, 29 Nov 2015 07:52:46 +0000 (16:52 +0900)]
sys/vfs/hammer: Remove #if0'd hammer_mirror_write()
and its sub function hammer_mirror_localize_data().
These two functions are replaced by hammer_create_at_cursor()
and hammer_cursor_localize_data() which basically do the same
thing in
83f2a3aa, as the comment says.
Fix some comments that haven't been updated after replacing.
Tomohiro Kusumi [Sun, 29 Nov 2015 07:37:06 +0000 (16:37 +0900)]
sys/vfs/hammer: Remove #if0'd obsolete symlink format
Masters are to use "-1" after "@@", but not "0xFFFF....",
so this #if0'd code is obsolete.
Tomohiro Kusumi [Sun, 29 Nov 2015 07:36:14 +0000 (16:36 +0900)]
sys/vfs/hammer: Remove #if0'd debug kprintfs
Tomohiro Kusumi [Sun, 29 Nov 2015 06:48:44 +0000 (15:48 +0900)]
sys/vfs/hammer: Remove DEBUG_TRUNCATE flag
This was only used in the early stage of hammer development
for debug kprintfs and no longer used or enabled.
Imre Vadasz [Sat, 28 Nov 2015 15:44:45 +0000 (16:44 +0100)]
kern: Support hh modifier in ksscanf (needed for drm/radeon).
This fixes VCE initialization in drm/radeon.
Taken from lib/libc/stdio/vfscanf.c
Tomohiro Kusumi [Sat, 28 Nov 2015 15:04:06 +0000 (00:04 +0900)]
sys/vfs/hammer: Remove HAMMER_VOLF_VALID|OPEN macros
These macros added by
8750964d in 2007 (the first hammer commit)
were never used.
Tomohiro Kusumi [Sat, 28 Nov 2015 14:51:48 +0000 (23:51 +0900)]
sys/vfs/hammer: Remove HAMMER_HEAD_FLAG_FREE macro
This macro is no longer used independently after
bf686dbe,
but only used as a part of HAMMER_HEAD_TYPE_PAD.
(it can't be simply removed unless hammer version gets
++ or something, since TYPE_PAD is ondisk representation)
Tomohiro Kusumi [Sat, 28 Nov 2015 14:47:37 +0000 (23:47 +0900)]
sys/vfs/hammer: Remove HAMMER_HEAD_TYPE_42|45 macros
These macros were never used.
See
02428fb6.
Tomohiro Kusumi [Sat, 28 Nov 2015 14:37:23 +0000 (23:37 +0900)]
sys/vfs/hammer: #if0 HAMMER_BIGBLOCK_OVERFILL
The code using this macro has been #if0'd by
b4f86ea3.
(The code isn't obsolete, so it should still be there)
Sepherosa Ziehau [Sat, 28 Nov 2015 11:27:20 +0000 (19:27 +0800)]
kevent: Mark file_filtops and kqread_filtops MPSAFE
- kqread_filtops is MPSAFE.
- All fo_kqfilter are MPSAFE or take care of the MPSAFE of their
sub-nodes.
Sepherosa Ziehau [Sat, 28 Nov 2015 10:01:49 +0000 (18:01 +0800)]
kevent: Fix comment