dragonfly.git
4 years agoMerge commit '973c11b9c3cdde88fe6ca0ef2c5af56a8c49e014' into amd64
Jordan Gordeev [Mon, 6 Jul 2009 14:54:20 +0000 (17:54 +0300)]
Merge commit '973c11b9c3cdde88fe6ca0ef2c5af56a8c49e014' into amd64

4 years agoMerge commit '1276d1e1a1b128f7093a3021d3f6bc27afa80d23' into amd64
Jordan Gordeev [Mon, 6 Jul 2009 14:47:52 +0000 (17:47 +0300)]
Merge commit '1276d1e1a1b128f7093a3021d3f6bc27afa80d23' into amd64

4 years agoamd64: Change the way I/O APIC's are mapped.
Jordan Gordeev [Sat, 4 Jul 2009 19:38:53 +0000 (22:38 +0300)]
amd64: Change the way I/O APIC's are mapped.

4 years agoamd64: Fix UP kernel build.
Jordan Gordeev [Mon, 6 Jul 2009 12:42:50 +0000 (15:42 +0300)]
amd64: Fix UP kernel build.

4 years agoamd64: Use proper size for atomic ops.
Jordan Gordeev [Mon, 6 Jul 2009 10:46:07 +0000 (13:46 +0300)]
amd64: Use proper size for atomic ops.

4 years agoamd64: Properly size an array for SMP.
Jordan Gordeev [Mon, 6 Jul 2009 10:33:17 +0000 (13:33 +0300)]
amd64: Properly size an array for SMP.

4 years agoamd64: Correct an omission.
Jordan Gordeev [Mon, 6 Jul 2009 12:15:35 +0000 (15:15 +0300)]
amd64: Correct an omission.

4 years agoamd64: Fix invocations of setidt().
Jordan Gordeev [Mon, 6 Jul 2009 10:25:53 +0000 (13:25 +0300)]
amd64: Fix invocations of setidt().
setidt() has different interface on i386 and amd64.

4 years agoamd64: Fixes for init_secondary().
Jordan Gordeev [Mon, 6 Jul 2009 10:24:23 +0000 (13:24 +0300)]
amd64: Fixes for init_secondary().

4 years agoamd64: Use the proper form of 'iret' to return from interrupt handlers.
Jordan Gordeev [Mon, 6 Jul 2009 09:58:49 +0000 (12:58 +0300)]
amd64: Use the proper form of 'iret' to return from interrupt handlers.

4 years agoamd64: Fix improper saving of a register.
Jordan Gordeev [Mon, 6 Jul 2009 09:43:00 +0000 (12:43 +0300)]
amd64: Fix improper saving of a register.
%esi is not guaranteed to be preserved across function calls.

4 years agoamd64: Update cpu_mfence(), cpu_lfence(), cpu_sfence() for SMP.
Jordan Gordeev [Sun, 5 Jul 2009 16:08:23 +0000 (19:08 +0300)]
amd64: Update cpu_mfence(), cpu_lfence(), cpu_sfence() for SMP.

4 years agoamd64: Help mptable_pass2() find and read the mptable.
Jordan Gordeev [Mon, 6 Jul 2009 12:12:53 +0000 (15:12 +0300)]
amd64: Help mptable_pass2() find and read the mptable.

4 years agoamd64: Call mptable_pass2().
Jordan Gordeev [Mon, 6 Jul 2009 11:14:29 +0000 (14:14 +0300)]
amd64: Call mptable_pass2().

4 years agoamd64: Map the local APIC.
Jordan Gordeev [Fri, 3 Jul 2009 19:23:20 +0000 (22:23 +0300)]
amd64: Map the local APIC.
Introduce a new function - pmap_mapdev_uncacheable(). It's a copy of pmap_mapdev(), but creates PT entries that disable caching.
Use pmap_mapdev_uncacheable() when mapping the local APIC.

4 years agoamd64: Sync mp_bootaddress() with FreeBSD.
Jordan Gordeev [Mon, 6 Jul 2009 11:12:33 +0000 (14:12 +0300)]
amd64: Sync mp_bootaddress() with FreeBSD.
Changed to match invocation in 'machdep.c'.

4 years agoamd64: Don't forget to call mp_probe().
Jordan Gordeev [Fri, 3 Jul 2009 18:38:48 +0000 (21:38 +0300)]
amd64: Don't forget to call mp_probe().

4 years agoamd64: Allow search_for_sig() to return 64-bit quantities.
Jordan Gordeev [Fri, 3 Jul 2009 18:16:26 +0000 (21:16 +0300)]
amd64: Allow search_for_sig() to return 64-bit quantities.

4 years agoamd64: Fix improper types in description of mptable structures.
Jordan Gordeev [Mon, 6 Jul 2009 11:06:35 +0000 (14:06 +0300)]
amd64: Fix improper types in description of mptable structures.

4 years agoamd64: Big batch of SMP changes.
Jordan Gordeev [Wed, 1 Jul 2009 19:32:11 +0000 (22:32 +0300)]
amd64: Big batch of SMP changes.

4 years agoAMD64 - Fix many compile-time warnings. int/ptr type mismatches, %llx, etc.
Matthew Dillon [Wed, 24 Jun 2009 19:31:02 +0000 (12:31 -0700)]
AMD64 - Fix many compile-time warnings.  int/ptr type mismatches, %llx, etc.

4 years agousb ehci - Fix machine freezes from shutdown race (missing commit)
Matthew Dillon [Wed, 24 Jun 2009 17:28:55 +0000 (10:28 -0700)]
usb ehci - Fix machine freezes from shutdown race (missing commit)

EHCI's shutdown code was killing the chipset without first killing the
interrupt, and it was also handing EHCI back to the BIOS without first
waiting for the shutdown reset to complete.  Either can lock the machine

4 years agoHAMMER Util: Fix missing check on fopen result.
Matthew Dillon [Wed, 24 Jun 2009 15:51:11 +0000 (08:51 -0700)]
HAMMER Util: Fix missing check on fopen result.

Fix a missing check when the fopen() to create a new period file fails.

Reported-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>
4 years agousb ehci - Fix machine freezes from shutdown race
Matthew Dillon [Wed, 24 Jun 2009 05:25:57 +0000 (22:25 -0700)]
usb ehci - Fix machine freezes from shutdown race

EHCI's shutdown code was killing the chipset without first killing the
interrupt, and it was also handing EHCI back to the BIOS without first
waiting for the shutdown reset to complete.  Either can lock the machine
up on shutdown/reboot.

4 years agousb - More interrupt livelock fixes.
Matthew Dillon [Wed, 24 Jun 2009 05:25:07 +0000 (22:25 -0700)]
usb - More interrupt livelock fixes.

Fix additional interrupt livelocks which occur during initialization due to
interrupts being enabled too early.

4 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Tue, 23 Jun 2009 23:10:34 +0000 (16:10 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

4 years agokernel diskmbr handling - Detect maxed out slice ds_size field.
Matthew Dillon [Tue, 23 Jun 2009 23:08:26 +0000 (16:08 -0700)]
kernel diskmbr handling - Detect maxed out slice ds_size field.

If the DOS slice field is found to be maxed out (0xFFFFFFFFU), use the
actual media size for calculations instead of ds_size.  This allows
disks > 2TB to have a conventional slice table and still contain a
disklabel64 which covers the actual size of the media.

4 years agodisklabel - expand warning if the media is too large.
Matthew Dillon [Tue, 23 Jun 2009 23:07:15 +0000 (16:07 -0700)]
disklabel - expand warning if the media is too large.

Instead of just warning that the media is too large and exiting, also
now suggest that disklabel64 be used.

4 years agofdisk - allow media sizes larger then 2TB
Matthew Dillon [Tue, 23 Jun 2009 23:05:51 +0000 (16:05 -0700)]
fdisk - allow media sizes larger then 2TB

If the media size is larger then 2TB set the 32 bit slice logical
size field, ds_size, to its maximum value of 0xFFFFFFFFU instead of
overflowing the field.

4 years agoAdd sili(4) and drm(4) manpages (from OpenBSD and NetBSD, respectively).
Sascha Wildner [Tue, 23 Jun 2009 18:38:00 +0000 (20:38 +0200)]
Add sili(4) and drm(4) manpages (from OpenBSD and NetBSD, respectively).

Thanks to Hasso Tepper for helping with the drm(4) one.

4 years agomake upgrade: Remove GNU cpio's info file, too.
Sascha Wildner [Tue, 23 Jun 2009 06:36:58 +0000 (08:36 +0200)]
make upgrade: Remove GNU cpio's info file, too.

4 years agoMake all G4X chips use the new framecount register.
Hasso Tepper [Mon, 22 Jun 2009 19:14:14 +0000 (22:14 +0300)]
Make all G4X chips use the new framecount register.

The G45 docs indicate that all G4X chips use the new framecount register.
Intel agrees with my reading of the docs, make it so for all G4X chips.

The new register also has a 32 bit width as opposed to 24 bits.  Fix
things up so that the counters roll over properly.

Obtained-from: FreeBSD

4 years agokrealloc() behaves identically to kmalloc when passed a NULL object pointer.
Hasso Tepper [Mon, 22 Jun 2009 19:12:25 +0000 (22:12 +0300)]
krealloc() behaves identically to kmalloc when passed a NULL object pointer.

If an error does occur we would have left max_context with an incorrect
value.

Obtained-from: FreeBSD

4 years agoDon't panic if drm_rmmap is called with a NULL map pointer.
Hasso Tepper [Mon, 22 Jun 2009 19:11:37 +0000 (22:11 +0300)]
Don't panic if drm_rmmap is called with a NULL map pointer.

Obtained-from: FreeBSD

4 years agoDon't try to setup interrupts for drivers that don't support them.
Hasso Tepper [Mon, 22 Jun 2009 19:09:32 +0000 (22:09 +0300)]
Don't try to setup interrupts for drivers that don't support them.

This causes sis and probably a couple of other drivers to panic and fail.

Obtained-from: FreeBSD

4 years agoCheck offsets for R300_ZB_ZPASS_ADDR.
Hasso Tepper [Mon, 22 Jun 2009 18:55:03 +0000 (21:55 +0300)]
Check offsets for R300_ZB_ZPASS_ADDR.

Obtained-from: FreeBSD

4 years agoAdd regs required for occlusion queries support.
Hasso Tepper [Mon, 22 Jun 2009 18:53:56 +0000 (21:53 +0300)]
Add regs required for occlusion queries support.

Obtained-from: FreeBSD

4 years agoAdd support for RV790 (HD 4890) asics.
Hasso Tepper [Mon, 22 Jun 2009 18:51:42 +0000 (21:51 +0300)]
Add support for RV790 (HD 4890) asics.

Obtained-from: FreeBSD

4 years agoRadeon microcode handling cleanup.
Hasso Tepper [Mon, 22 Jun 2009 18:50:04 +0000 (21:50 +0300)]
Radeon microcode handling cleanup.

A little more cleanup from AMD, if we don't have the right microcode
there is no reason to mess with the chip.

Obtained-from: FreeBSD

4 years agoMP table: Don't mix lapic/ioapic/imcr configuration information extraction
Sepherosa Ziehau [Mon, 22 Jun 2009 10:42:34 +0000 (18:42 +0800)]
MP table: Don't mix lapic/ioapic/imcr configuration information extraction

4 years agoMerge mptable_check() into mptable_probe()
Sepherosa Ziehau [Mon, 22 Jun 2009 10:24:17 +0000 (18:24 +0800)]
Merge mptable_check() into mptable_probe()

4 years agoUse madt_iterate_entries() in madt_pass2()
Sepherosa Ziehau [Sun, 21 Jun 2009 08:34:34 +0000 (16:34 +0800)]
Use madt_iterate_entries() in madt_pass2()

4 years agoACPI MADT: When locating lapic address, take Local APIC Address Override
Sepherosa Ziehau [Sun, 21 Jun 2009 07:58:53 +0000 (15:58 +0800)]
ACPI MADT: When locating lapic address, take Local APIC Address Override
into consideration.

4 years agoACPI MADT: Check existance of BSP in madt_check()
Sepherosa Ziehau [Sun, 21 Jun 2009 07:25:36 +0000 (15:25 +0800)]
ACPI MADT: Check existance of BSP in madt_check()

4 years agoACPI MADT: Add madt_iterate_entries()
Sepherosa Ziehau [Sun, 21 Jun 2009 06:53:21 +0000 (14:53 +0800)]
ACPI MADT: Add madt_iterate_entries()

4 years agoUse mptable_iterate_entries() in mptable_pass2()
Sepherosa Ziehau [Sun, 21 Jun 2009 05:41:28 +0000 (13:41 +0800)]
Use mptable_iterate_entries() in mptable_pass2()

4 years agoPull IMCR setting out of mptable_pass2()
Sepherosa Ziehau [Sun, 21 Jun 2009 04:37:23 +0000 (12:37 +0800)]
Pull IMCR setting out of mptable_pass2()

4 years agoLet mptable_pass2() call mptable_default()
Sepherosa Ziehau [Sun, 21 Jun 2009 04:30:00 +0000 (12:30 +0800)]
Let mptable_pass2() call mptable_default()

4 years agomptable_default() only configures ioapic stuffs
Sepherosa Ziehau [Sun, 21 Jun 2009 04:17:05 +0000 (12:17 +0800)]
mptable_default() only configures ioapic stuffs

4 years agoUse mptable_iterate_entries() in mptable_pass1()
Sepherosa Ziehau [Sun, 21 Jun 2009 04:08:50 +0000 (12:08 +0800)]
Use mptable_iterate_entries() in mptable_pass1()

4 years agoMP table: Remove global variables for HT fixup
Sepherosa Ziehau [Sat, 20 Jun 2009 12:49:49 +0000 (20:49 +0800)]
MP table: Remove global variables for HT fixup

4 years agoNAPICID 16 -> 256.
Sepherosa Ziehau [Sat, 20 Jun 2009 12:18:53 +0000 (20:18 +0800)]
NAPICID 16 -> 256.

This also makes sure that we could actually do 32 (MAXCPU) CPUs
instead of 16.

4 years agomptable_lapic_enumerate(): Fix comment
Sepherosa Ziehau [Sat, 20 Jun 2009 11:19:52 +0000 (19:19 +0800)]
mptable_lapic_enumerate(): Fix comment

4 years agoRearrange mptable_lapic_enumerate() by factoring out mptable_lapic_default()
Sepherosa Ziehau [Sat, 20 Jun 2009 10:59:08 +0000 (18:59 +0800)]
Rearrange mptable_lapic_enumerate() by factoring out mptable_lapic_default()

4 years agoAdd APIC_ID to extract apic id from local apic id field
Sepherosa Ziehau [Sat, 20 Jun 2009 10:29:27 +0000 (18:29 +0800)]
Add APIC_ID to extract apic id from local apic id field

4 years agoAdd lapic_init() to map local apic
Sepherosa Ziehau [Sat, 20 Jun 2009 10:18:51 +0000 (18:18 +0800)]
Add lapic_init() to map local apic

4 years agoMP table: Pull lapic related information extraction into seperate function
Sepherosa Ziehau [Sat, 20 Jun 2009 09:35:58 +0000 (17:35 +0800)]
MP table: Pull lapic related information extraction into seperate function

4 years agoMP table: Do preliminary checks before claiming that the MP table is valid
Sepherosa Ziehau [Sat, 20 Jun 2009 03:53:36 +0000 (11:53 +0800)]
MP table: Do preliminary checks before claiming that the MP table is valid

4 years agoPut mp_nbusses and bus_data under APIC_IO
Sepherosa Ziehau [Fri, 19 Jun 2009 13:40:55 +0000 (21:40 +0800)]
Put mp_nbusses and bus_data under APIC_IO

4 years agoStaticize mp_nbusses
Sepherosa Ziehau [Fri, 19 Jun 2009 12:19:18 +0000 (20:19 +0800)]
Staticize mp_nbusses

4 years agoRemove bsp_apic_ready
Sepherosa Ziehau [Fri, 19 Jun 2009 11:54:15 +0000 (19:54 +0800)]
Remove bsp_apic_ready

4 years agoCorrect the logical_cpus calculation in mptable_hyperthread_fixup()
Sepherosa Ziehau [Wed, 17 Jun 2009 11:54:22 +0000 (19:54 +0800)]
Correct the logical_cpus calculation in mptable_hyperthread_fixup()

The original code extracts logical_cpus directly from the output of
cpuid(eax=1), however,
According to Intel's #253668, section 7.7
"(CPUID.1:EBX[23:16]) -- Indicates the maximum number of addressable
 ID for logical processors in a physical package."
According to AMD's #25481 CPUID Fn0000_0001_EBX
"LogicalProcessorCount is the number of threads per CPU core times the
 number of CPU cores per processor."

So what we originally saved in logical_cpus is actually the upper limit
of the logical CPUs per phyical CPU package.  It may work correctly if
there is only one logical CPU per physical CPU package detected in MP
table.  But if more than one logical CPUs per phyical CPU package are
detected in the MP table, then the missing logical CPUs will not be
detected later, since the code assumed that logical_cpus is the number
of logical CPUs missed between two detected logical CPUs.

We try to fix the problem by calculating the distances between two nearest
APIC IDs.  If all such distances for all detect logical CPUs are same,
then the logical_cpus is set the calculated distance.  The value extracted
from cpuid(eax=1) just serves as the upper limit of the logical_cpus now.

Reported-and-Tested-by: Robert Luciani <rluciani@gmail.com>
4 years agoMerge branch 'vendor/LIBARCHIVE'
Peter Avalos [Mon, 22 Jun 2009 02:06:50 +0000 (16:06 -1000)]
Merge branch 'vendor/LIBARCHIVE'

4 years agoAdd README.DELETED to libarchive's vendor branch.
Peter Avalos [Mon, 22 Jun 2009 02:04:39 +0000 (16:04 -1000)]
Add README.DELETED to libarchive's vendor branch.

4 years agoMerge branch 'vendor/LIBARCHIVE'
Peter Avalos [Sun, 21 Jun 2009 22:00:54 +0000 (12:00 -1000)]
Merge branch 'vendor/LIBARCHIVE'

4 years agoMerge branch 'vendor/LIBARCHIVE' (early part)
Peter Avalos [Sun, 21 Jun 2009 21:48:22 +0000 (11:48 -1000)]
Merge branch 'vendor/LIBARCHIVE' (early part)

4 years agoRename libarchive-2/ to libarchive/. No need for it to be versioned.
Peter Avalos [Sun, 21 Jun 2009 21:45:01 +0000 (11:45 -1000)]
Rename libarchive-2/ to libarchive/.  No need for it to be versioned.

4 years agoRemove old versions of libarchive.
Peter Avalos [Sun, 21 Jun 2009 21:44:30 +0000 (11:44 -1000)]
Remove old versions of libarchive.

4 years agoRemove GNU cpio.
Peter Avalos [Sun, 21 Jun 2009 21:32:18 +0000 (11:32 -1000)]
Remove GNU cpio.

4 years agopnpinfo(8): Oops, add missing semicolons.
Sascha Wildner [Sun, 21 Jun 2009 21:24:35 +0000 (23:24 +0200)]
pnpinfo(8): Oops, add missing semicolons.

4 years agodiff(1): Commit our patches to contrib/ and get rid of -I-.
Sascha Wildner [Sun, 21 Jun 2009 19:06:56 +0000 (21:06 +0200)]
diff(1): Commit our patches to contrib/ and get rid of -I-.

4 years agoMerge branch 'master' of /home/www-data/gitweb/dragonfly
Peter Avalos [Sun, 21 Jun 2009 18:42:58 +0000 (08:42 -1000)]
Merge branch 'master' of /home/www-data/gitweb/dragonfly

4 years agoMerge branch 'vendor/LESS'
Peter Avalos [Sun, 21 Jun 2009 18:40:42 +0000 (08:40 -1000)]
Merge branch 'vendor/LESS'

4 years agoUpgrade to less-429.
Peter Avalos [Sun, 21 Jun 2009 18:31:16 +0000 (08:31 -1000)]
Upgrade to less-429.

* The -D option with one number now means use the normal background color.
* Don't change permissions on history file if it is not a regular file.
* Fix non-ANSI-compliant code that caused problems with some compilers.
* Fix binary file detection in UTF-8 mode.
* Fix display problems with long lines on "ignaw" terminals.
* Fix problem interrupting the line number calculation for initial prompt.
* Fix SGR emulation when dealing with multiple attributes (eg.
bold+underline).
* Fix highlight bug when searching for underlined/overstruck text.
* New "&" command allows filtering of lines based on a pattern.
* Status column now displays a search match, even if the matched string is
scrolled off screen because -S is in effect.
* Improve behavior of -F option.
* Allow CSI character (0x9B) to work in UTF-8 mode.
* Output carriage return at startup in case terminal doesn't default to
column 1.
* Fix bug in '' (quote, quote) command after G command.

4 years agoAdd README.DELETED to the vendor/LESS branch.
Peter Avalos [Sun, 21 Jun 2009 18:27:17 +0000 (08:27 -1000)]
Add README.DELETED to the vendor/LESS branch.

4 years agoMerge branch 'vendor/LESS'
Peter Avalos [Sun, 21 Jun 2009 18:26:30 +0000 (08:26 -1000)]
Merge branch 'vendor/LESS'

4 years agopnpinfo(8): isolation_protocol() takes no arguments.
Sascha Wildner [Sun, 21 Jun 2009 18:08:31 +0000 (20:08 +0200)]
pnpinfo(8): isolation_protocol() takes no arguments.

While here, clean up a bit, fix a couple of warnings and raise WARNS to 6.

4 years agoMove less-4/ to less/. No need for versioned directories.
Peter Avalos [Sun, 21 Jun 2009 18:05:12 +0000 (08:05 -1000)]
Move less-4/ to less/.  No need for versioned directories.

4 years agoRemove old versions of less.
Peter Avalos [Sun, 21 Jun 2009 18:02:47 +0000 (08:02 -1000)]
Remove old versions of less.

4 years agoAdd MD, optimized versions of string functions for amd64.
Peter Avalos [Sun, 26 Apr 2009 04:46:03 +0000 (04:46 +0000)]
Add MD, optimized versions of string functions for amd64.

Obtained-from: FreeBSD

4 years agoAdd amd64 assembly versions of div(3), ldiv(3), and lldiv(3).
Peter Avalos [Sun, 26 Apr 2009 04:23:41 +0000 (04:23 +0000)]
Add amd64 assembly versions of div(3), ldiv(3), and lldiv(3).

Obtained-from: FreeBSD

4 years agoUpdate some of the amd64 parts of libc:
Peter Avalos [Sun, 26 Apr 2009 03:57:31 +0000 (03:57 +0000)]
Update some of the amd64 parts of libc:

* Change the syscall stub branch orders so that the static branch
prediction will assume that syscalls will succeed rather than fail.

* Add error handling for PSEUDO syscalls.

* Add END() macros for Assembler code. This causes the symbol
table to include the size of the function.

* ldexp:  Fix a typo in the !__GNUC__ case and remove an obsolete
comment.

* setjmp/longjmp changes:
-Save and restore the control part of the MXCSR in addition to the
i387 control word to ensure that the two are consistent.
-Don't clobber the FPU exception flags in longjmp. C99 requires them
to remain unchanged.

Obtained-from: FreeBSD

4 years agoSync with i386's _fpmath.h:
Peter Avalos [Fri, 24 Apr 2009 04:10:45 +0000 (04:10 +0000)]
Sync with i386's _fpmath.h:

* Define LDBL_NBIT to be a mask indicating the position of the integer
bit in a long double.

* Add an alternative view of the bits in an 80-bit long double (64+16
instead of 32+32+15+1).

Obtained-from: FreeBSD

4 years agoDefine an END() macro for use in i386 and amd64 assembly code.
Peter Avalos [Sun, 21 Jun 2009 02:43:11 +0000 (16:43 -1000)]
Define an END() macro for use in i386 and amd64 assembly code.

Obtained-from: FreeBSD

4 years agoRemove dead code (_ARCH_INDIRECT) from <machine/asm.h>.
Peter Avalos [Sun, 21 Jun 2009 02:35:27 +0000 (16:35 -1000)]
Remove dead code (_ARCH_INDIRECT) from <machine/asm.h>.

4 years agoAllow pre-2.3 systems to build the new version of file.
Peter Avalos [Sun, 21 Jun 2009 08:07:22 +0000 (08:07 +0000)]
Allow pre-2.3 systems to build the new version of file.

Add a few things under COMPILE_ONLY so systems without strtof and/or
daylight can still build the host tool.

4 years agoMerge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Sun, 21 Jun 2009 02:40:31 +0000 (19:40 -0700)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly

4 years agoHAMMER VFS - Implement inode number matching against the directory hash
Matthew Dillon [Sun, 21 Jun 2009 02:29:57 +0000 (19:29 -0700)]
HAMMER VFS - Implement inode number matching against the directory hash

Change hammer_create_inode() and hammer_alloc_objid() to take the upper
10 bits of the filename hash and attempt to use them as the lower 10 bits
of the inode number.

hammer_alloc_objid() now utilizes a small two-level 1024-bit bitmap to
assign the low 10 bits of the inode number, on a per-directory basis.
If a collision occurs a nearby value is used instead.

The idea is for inode numbers to have approximately the same linearity
as the directory read scan order, so programs such as cpio, tar, cpdup,
find, and ls which do recursive scans of the directory tree get much
better locality of reference for stat() and other related system calls.

Based-on: Numerous discussions with people, esp corecode.

4 years agocpdup - Do not create a .tmp file and rename if the target does not exist.
Matthew Dillon [Sun, 21 Jun 2009 02:25:26 +0000 (19:25 -0700)]
cpdup - Do not create a .tmp file and rename if the target does not exist.

* When copying if the target does not exist use the target's actual name
  instead of the name of a temporary file.

  This helps filesystems (aka HAMMER) which use hashed directories.  Inode
  numbers can be selected by the FS on the basis of the file-name in
  order to maintain directory-order linearity.  If the copy program creates
  the target file with one name and then renames it to the real name,
  however, the feature is lost and we get one big scramble again.

4 years agoMerge branch 'vendor/FILE'
Peter Avalos [Sun, 21 Jun 2009 00:48:42 +0000 (14:48 -1000)]
Merge branch 'vendor/FILE'

4 years agoUpgrade to file-5.03.
Peter Avalos [Sat, 20 Jun 2009 23:57:23 +0000 (13:57 -1000)]
Upgrade to file-5.03.

Changes can be viewed in the ChangeLog file.

4 years agoHAMER VFS - Cache additional b-tree nodes in directory.
Matthew Dillon [Sat, 20 Jun 2009 23:53:21 +0000 (16:53 -0700)]
HAMER VFS - Cache additional b-tree nodes in directory.

* Cache inode record cursors in the directory at dip->cache[2] to reduce
  cpu overhead when iterating a directory.

* Cache file object record cursors in the file's governing directory at
  dip->cache[3] after reading the last data record in a file, to reduce
  cpu overhead when chain-reading files.

* Also add vfs.hammer.stats_btree_root_iterations, a counter which
  is incremented whenever a B-Tree search is initiated from the root
  node.

4 years agoMerge branch 'vendor/FILE'
Peter Avalos [Sat, 20 Jun 2009 22:20:03 +0000 (12:20 -1000)]
Merge branch 'vendor/FILE'

4 years agoAdd README.DELETED to file's vendor branch.
Peter Avalos [Sat, 20 Jun 2009 22:18:24 +0000 (12:18 -1000)]
Add README.DELETED to file's vendor branch.

4 years agoMerge branch 'vendor/FILE'
Peter Avalos [Sat, 20 Jun 2009 22:07:26 +0000 (12:07 -1000)]
Merge branch 'vendor/FILE'

4 years agoMerge branch 'vendor/FILE' (early part)
Peter Avalos [Sat, 20 Jun 2009 22:00:13 +0000 (12:00 -1000)]
Merge branch 'vendor/FILE' (early part)

4 years agoMove file-4/ to file/. We don't need a versioned directory.
Peter Avalos [Sat, 20 Jun 2009 21:57:20 +0000 (11:57 -1000)]
Move file-4/ to file/.  We don't need a versioned directory.

4 years agoRemove old versions of file.
Peter Avalos [Sat, 20 Jun 2009 21:56:41 +0000 (11:56 -1000)]
Remove old versions of file.

4 years agoHAMMER VFS - Add hinting capability to block allocator, hint B-Tree
Matthew Dillon [Sat, 20 Jun 2009 21:49:12 +0000 (14:49 -0700)]
HAMMER VFS - Add hinting capability to block allocator, hint B-Tree

* A hammer_off_t can now be supplied to the blockmap allocator as a hint.

* Use the hinting mechanism to better-localize B-Tree node allocations
  and meta-data updates.

4 years agoiostat - Increase the tps field width from 3 to 4.
Matthew Dillon [Sat, 20 Jun 2009 21:07:33 +0000 (14:07 -0700)]
iostat - Increase the tps field width from 3 to 4.

* Standard workloads now easily push the tps rate into the 4 digits.
  Increase the tps field with to 4.