]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agoAdd minimally invasive shims to ease MFCs of mxge back as far
Andrew Gallatin [Thu, 14 Feb 2008 00:09:59 +0000 (00:09 +0000)]
Add minimally invasive shims to ease MFCs of mxge back as far
as RELENG_6

Sponsored by: Myricom, Inc.

16 years agoAdd KASSERT()'s to catch attempts to recurse on spin mutexes that aren't
John Baldwin [Wed, 13 Feb 2008 23:39:05 +0000 (23:39 +0000)]
Add KASSERT()'s to catch attempts to recurse on spin mutexes that aren't
marked recursable either via mtx_lock_spin() or thread_lock().

MFC after: 1 week

16 years agoMark the syscons video spin mutex as recursable since it is currently
John Baldwin [Wed, 13 Feb 2008 23:38:08 +0000 (23:38 +0000)]
Mark the syscons video spin mutex as recursable since it is currently
recursed in a few places.

MFC after: 1 week

16 years agoMark sleepqueue chain spin mutexes are recursable since the sleepq code
John Baldwin [Wed, 13 Feb 2008 23:36:56 +0000 (23:36 +0000)]
Mark sleepqueue chain spin mutexes are recursable since the sleepq code
now recurses on them in sleepq_broadcast() and sleepq_signal() when
resuming threads that are fully asleep.

MFC after: 1 week

16 years agoAdd a couple of assertions and KTR logging to thread_lock_flags() to
John Baldwin [Wed, 13 Feb 2008 23:33:50 +0000 (23:33 +0000)]
Add a couple of assertions and KTR logging to thread_lock_flags() to
match mtx_lock_spin_flags().

MFC after: 1 week

16 years agoMake the type of the firmware arrays match those
Andrew Gallatin [Wed, 13 Feb 2008 21:58:46 +0000 (21:58 +0000)]
Make the type of the firmware arrays match those
in the other eth*_z8e.h files.

16 years agoUpdate manpage with lockmgr_assert() description.
Attilio Rao [Wed, 13 Feb 2008 21:54:16 +0000 (21:54 +0000)]
Update manpage with lockmgr_assert() description.

16 years agoAdd an automatic kernel module version dependency to prevent loading
John Baldwin [Wed, 13 Feb 2008 21:34:06 +0000 (21:34 +0000)]
Add an automatic kernel module version dependency to prevent loading
modules using invalid ABI versions (e.g. a 7.x module with an 8.x kernel)
for a given kernel:
- Add a 'kernel' module version whose value is __FreeBSD_version.
- Add a version dependency on 'kernel' in every module that has an
  acceptable version range of __FreeBSD_version up to the end of the
  branch __FreeBSD_version is part of.  E.g. a module compiled on 701000
  would work on kernels with versions between 701000 and 799999 inclusive.

Discussed on: arch@
MFC after: 1 week

16 years agoBump __FreeBSD_version after the introduction of:
Attilio Rao [Wed, 13 Feb 2008 20:59:28 +0000 (20:59 +0000)]
Bump __FreeBSD_version after the introduction of:
- lockmgr_assert()
- BUF_ASSERT_*() family functions

which enriched the KPI.

16 years agoImprove conformance to the HTTP specification by using case-insensitive
Colin Percival [Wed, 13 Feb 2008 20:46:23 +0000 (20:46 +0000)]
Improve conformance to the HTTP specification by using case-insensitive
comparisons for header keywords.  Apparently some proxies use creative
capitalization.

Weird proxy found by: brooks
MFC after: 3 days

16 years ago- Add real assertions to lockmgr locking primitives.
Attilio Rao [Wed, 13 Feb 2008 20:44:19 +0000 (20:44 +0000)]
- Add real assertions to lockmgr locking primitives.
  A couple of notes for this:
  * WITNESS support, when enabled, is only used for shared locks in order
    to avoid problems with the "disowned" locks
  * KA_HELD and KA_UNHELD only exists in the lockmgr namespace in order
    to assert for a generic thread (not curthread) owning or not the
    lock.  Really, this kind of check is bogus but it seems very
    widespread in the consumers code.  So, for the moment, we cater this
    untrusted behaviour, until the consumers are not fixed and the
    options could be removed (hopefully during 8.0-CURRENT lifecycle)
  * Implementing KA_HELD and KA_UNHELD (not surported natively by
    WITNESS) made necessary the introduction of LA_MASKASSERT which
    specifies the range for default lock assertion flags
  * About other aspects, lockmgr_assert() follows exactly what other
    locking primitives offer about this operation.

- Build real assertions for buffer cache locks on the top of
  lockmgr_assert().  They can be used with the BUF_ASSERT_*(bp)
  paradigm.

- Add checks at lock destruction time and use a cookie for verifying
  lock integrity at any operation.

- Redefine BUF_LOCKFREE() in order to not use a direct assert but
  let it rely on the aforementioned destruction time check.

KPI results evidently broken, so __FreeBSD_version bumping and
manpage update result necessary and will be committed soon.

Side note: lockmgr_assert() will be used soon in order to implement
real assertions in the vnode namespace replacing the legacy and still
bogus "VOP_ISLOCKED()" way.

Tested by:      kris (earlier version)
Reviewed by:    jhb

16 years agoUpdate cache flushing behavior in light of recent namecache and
Robert Watson [Wed, 13 Feb 2008 19:50:17 +0000 (19:50 +0000)]
Update cache flushing behavior in light of recent namecache and
access cache improvements:

- Flush just access control state on CODA_PURGEUSER, not the full
  namecache for /coda.

- When replacing a fid on a cnode as a result of, e.g.,
  reintegration after offline operation, we no longer need to
  purge the namecache entries associated with its vnode.

MFC after: 1 month

16 years agoThe hptrr driver first appeared in 6.3, not 5.3.
Christian Brueffer [Wed, 13 Feb 2008 18:32:44 +0000 (18:32 +0000)]
The hptrr driver first appeared in 6.3, not 5.3.

PR: 120616
Submitted by: Josh Paetzel <josh@tcbug.org>
MFC after: 3 days

16 years agoForced commit to note that the lost log message for the previous commit
Bruce Evans [Wed, 13 Feb 2008 18:16:43 +0000 (18:16 +0000)]
Forced commit to note that the lost log message for the previous commit
said that the previous commit was almost a null forced commit too.  It
just converted to __FBSDID().  I was going to change `huge' from its
double precision value of 1e300, but that seems to be unnecessary since
`huge' is only used to set FE_INEXACT, and any value with an exponent
larger than LDBL_MANT_DIG will do for that, while initializing a really
huge value in a portable way would require more code.

16 years agos_ceill.c
Bruce Evans [Wed, 13 Feb 2008 17:38:16 +0000 (17:38 +0000)]
s_ceill.c
s_floorl.c
s_truncl.c

16 years agoUse RTFREE_LOCKED() instead of rtfree() when releasing a reference on the
John Baldwin [Wed, 13 Feb 2008 16:57:58 +0000 (16:57 +0000)]
Use RTFREE_LOCKED() instead of rtfree() when releasing a reference on the
'rt' route in rtredirect() as 'rt' is always locked.

MFC after: 1 week
PR: kern/117913
Submitted by: Stefan Lambrev  stefan.lambrev of moneybookers.com

16 years agoOn arches where long double is the same as double, alias ceil(), floor()
Bruce Evans [Wed, 13 Feb 2008 16:56:52 +0000 (16:56 +0000)]
On arches where long double is the same as double, alias ceil(), floor()
and trunc() to the corresponding long double functions.  This is not
just an optimization for these arches.  The full long double functions
have a wrong value for `huge', and the arches without full long doubles
depended on it being wrong.

16 years agoRemove coda_namecache from coda5 as well. We should probably GC coda5
Robert Watson [Wed, 13 Feb 2008 16:31:04 +0000 (16:31 +0000)]
Remove coda_namecache from coda5 as well.  We should probably GC coda5
entirely at this point as coda6 is considered the supported branch.

MFC after: 1 month

16 years agoRemove coda_namecache from "options vcoda", it is no longer required.
Robert Watson [Wed, 13 Feb 2008 16:15:47 +0000 (16:15 +0000)]
Remove coda_namecache from "options vcoda", it is no longer required.

MFC after: 1 month
Spotted by: Tinderbox

16 years agoImplement a rudimentary access cache for the Coda kernel module,
Robert Watson [Wed, 13 Feb 2008 15:45:12 +0000 (15:45 +0000)]
Implement a rudimentary access cache for the Coda kernel module,
modeled on the access cache found in NFS, smbfs, and the Linux coda
module.  This is a positive access cache of a single entry per file,
tracking recently granted rights, but unlike NFS and smbfs,
supporting explicit invalidation by the distributed file system.

For each cnode, maintain a C_ACCCACHE flag indicating the validity
of the cache, and a cached uid and mode tracking recently granted
positive access control decisions.

Prefer the cache to venus_access() in VOP_ACCESS() if it is valid,
and when we must fall back to venus_access(), update the cache.

Allow Venus to clear the access cache, either the whole cache on
CODA_FLUSH, or just entries for a specific uid on CODA_PURGEUSER.
Unlike the Coda module on Linux, we don't flush all entries on a
user purge using a generation number, we instead walk present
cnodes and clear only entries for the specific user, meaning it is
somewhat more expensive but won't hit all users.

Since the Coda module is agressive about not keeping around
unopened cnodes, the utility of the cache is somewhat limited for
files, but works will for directories.  We should make Coda less
agressive about GCing cnodes in VOP_INACTIVE() in order to improve
the effectiveness of in-kernel caching of attributes and access
rights.

MFC after: 1 month

16 years agoFix the C version of ceill(x) for -1 < x <= -0 in all rounding modes.
Bruce Evans [Wed, 13 Feb 2008 15:22:53 +0000 (15:22 +0000)]
Fix the C version of ceill(x) for -1 < x <= -0 in all rounding modes.
The result should be -0, but was +0.

16 years ago- Remove duplicate tputs.3 from MLINK. As we use termcap in the bsae, remove
Rong-En Fan [Wed, 13 Feb 2008 14:34:39 +0000 (14:34 +0000)]
- Remove duplicate tputs.3 from MLINK. As we use termcap in the bsae, remove
  the one links to curs_terminfo.

Submitted by: David Naylor <blackdragon at highveldmail.co.za>
MFC after: 3 days

16 years agoRemove now-unused Coda namecache.
Robert Watson [Wed, 13 Feb 2008 13:26:01 +0000 (13:26 +0000)]
Remove now-unused Coda namecache.

MFC after: 1 month

16 years agoRather than having the Coda module use its own namecache, use the global
Robert Watson [Wed, 13 Feb 2008 13:06:22 +0000 (13:06 +0000)]
Rather than having the Coda module use its own namecache, use the global
VFS namecache, as is done by the Coda module on Linux.  Unlike the Coda
namecache, the global VFS namecache isn't tagged by credential, so use
ore conservative flushing behavior (for now) when CODA_PURGEUSER is
issued by Venus.

This improves overall integration with the FreeBSD VFS, including
allowing __getcwd() to work better, procfs/procstat monitoring, and so
on.  This improves shell behavior in many cases, and improves ".."
handling.  It may lead to some slowdown until we've implemented a
specific access cache, which should net improve performance, but in the
mean time, lookup access control now always goes to Venus, whereas
previously it didn't.

MFC after: 1 month

16 years agoFix a lock leak in the ntfs locking scheme:
Attilio Rao [Wed, 13 Feb 2008 13:02:12 +0000 (13:02 +0000)]
Fix a lock leak in the ntfs locking scheme:
When ntfs_ntput() reaches 0 in the refcount the inode lockmgr is not
released and directly destroyed. Fix this by unlocking the lockmgr() even
in the case of zero-refcount.

Reported by: dougb, yar, Scot Hetzel <swhetzel at gmail dot com>
Submitted by: yar

16 years agoFix exp2*(x) on signaling NaNs by returning x+x as usual.
Bruce Evans [Wed, 13 Feb 2008 10:44:44 +0000 (10:44 +0000)]
Fix exp2*(x) on signaling NaNs by returning x+x as usual.

This has the side effect of confusing gcc-4.2.1's optimizer into more
often doing the right thing.  When it does the wrong thing here, it
seems to be mainly making too many copies of x with dependency chains.
This effect is tiny on amd64, but in some cases on i386 it is enormous.
E.g., on i386 (A64) with -O1, the current version of exp2() should
take about 50 cycles, but took 83 cycles before this change and 66
cycles after this change.  exp2f() with -O1 only speeded up from 51
to 47 cycles.  (exp2f() should take about 40 cycles, on an Athlon in
either i386 or amd64 mode, and now takes 42 on amd64).  exp2l() with
-O1 slowed down from 155 cycles to 123 for some args; this is unimportant
since the i386 exp2l() is a fake; the wrong thing for it seems to
involve branch misprediction.

16 years agoRemove dublicate MLINK.
Christian Brueffer [Wed, 13 Feb 2008 09:50:37 +0000 (09:50 +0000)]
Remove dublicate MLINK.

Submitted by: David Naylor <blackdragon@highveldmail.co.za>

16 years agoRearrange the polynomial evaluation for better parallelism. This is
Bruce Evans [Wed, 13 Feb 2008 08:36:13 +0000 (08:36 +0000)]
Rearrange the polynomial evaluation for better parallelism.  This is
faster on all machines tested (old Celeron (P2), A64 (amd64 and i386)
and ia64) except on ia64 when compiled with -O1.  It takes 2 more
multiplications, so it will be slower on old machines.  The speedup
is about 8 cycles = 17% on A64 (amd64 and i386) with best CFLAGS
and some parallelism in the caller.

Move the evaluation of 2**k up a bit so that it doesn't compete too
much with the new polynomial evaluation.  Unlike the previous
optimization, this rearrangement cannot change the result, so compilers
and CPU schedulers can do it, but they don't do it quite right yet.
This saves a whole 1 or 2 cycles on A64.

16 years ago- mention new firmware images used in multi-slice mode
Christian Brueffer [Wed, 13 Feb 2008 08:09:55 +0000 (08:09 +0000)]
- mention new firmware images used in multi-slice mode
- mention LRO support
- describe multi-slice related tunables.
- correct DIAGNOSTICS section to reflect that missing firmware
  is non-fatal.

Submitted by: gallatin

16 years agoUse hardware remainder on amd64 since it is 5 to 10 times faster than
Bruce Evans [Wed, 13 Feb 2008 06:01:48 +0000 (06:01 +0000)]
Use hardware remainder on amd64 since it is 5 to 10 times faster than
software remainder and is already used for remquo().

16 years agostyle.Makefile(5)
David E. O'Brien [Wed, 13 Feb 2008 05:25:43 +0000 (05:25 +0000)]
style.Makefile(5)

16 years agostyle(9)
David E. O'Brien [Wed, 13 Feb 2008 05:12:05 +0000 (05:12 +0000)]
style(9)

16 years agoConsolidate the code to generate a new XID for a NFS request into a
John Baldwin [Wed, 13 Feb 2008 00:04:58 +0000 (00:04 +0000)]
Consolidate the code to generate a new XID for a NFS request into a
nfs_xid_gen() function instead of duplicating the logic in both
nfsm_rpchead() and the NFS3ERR_JUKEBOX handling in nfs_request().

MFC after: 1 week
Submitted by: mohans (a long while ago)

16 years agoRemove SMP left-overs from NetBSD.
Marcel Moolenaar [Tue, 12 Feb 2008 20:55:51 +0000 (20:55 +0000)]
Remove SMP left-overs from NetBSD.

16 years agoMake sure we restrict Linux only IPC calls from being executed
Christian S.J. Peron [Tue, 12 Feb 2008 20:55:03 +0000 (20:55 +0000)]
Make sure we restrict Linux only IPC calls from being executed
through the FreeBSD ABI.  IPC_INFO, SHM_INFO, SHM_STAT were added
specifically for Linux binary support.  They are not documented
as being a part of the FreeBSD ABI, also, the structures necessary
for them have been hidden away from the users for a long time.

Also, the Linux ABI layer uses it's own structures to populate the
responses back to the user to ensure that the ABI is consistent.

I think there is a bit more separation work that needs to happen.

Reviewed by: jhb
Discussed with: jhb
Discussed on: freebsd-arch@ (very briefly)
MFC after: 1 month

16 years agoRegenerate for readlink(2).
Ruslan Ermilov [Tue, 12 Feb 2008 20:11:54 +0000 (20:11 +0000)]
Regenerate for readlink(2).

16 years agoChange readlink(2)'s return type and type of the last argument
Ruslan Ermilov [Tue, 12 Feb 2008 20:09:04 +0000 (20:09 +0000)]
Change readlink(2)'s return type and type of the last argument
to match POSIX.

Prodded by: Alexey Lyashkov

16 years agoThere's no need to suppress option GDB.
Marcel Moolenaar [Tue, 12 Feb 2008 19:38:39 +0000 (19:38 +0000)]
There's no need to suppress option GDB.

16 years agoAdd PIC support for IPIs. When registering an interrupt handler,
Marcel Moolenaar [Tue, 12 Feb 2008 18:14:46 +0000 (18:14 +0000)]
Add PIC support for IPIs. When registering an interrupt handler,
the PIC also informs the platform at which IRQ level it can start
assigning IPIs, since this can depend on the number of IRQs
supported for external interrupts.

16 years agoFix remainder() and remainderf() in round-towards-minus-infinity mode
Bruce Evans [Tue, 12 Feb 2008 17:11:36 +0000 (17:11 +0000)]
Fix remainder() and remainderf() in round-towards-minus-infinity mode
when the result is +-0.  IEEE754 requires (in all rounding modes) that
if the result is +-0 then its sign is the same as that of the first
arg, but in round-towards-minus-infinity mode an uncorrected implementation
detail always reversed the sign.  (The detail is that x-x with x's
sign positive gives -0 in this mode only, but the algorithm assumed
that x-x always has positive sign for such x.)

remquo() and remquof() seem to need the same fix, but I cannot test them
yet.

Use long doubles when mixing NaN args.  This trick improves consistency
of results on at least amd64, so that more serious problems like the
above aren't hidden in simple regression tests by noise for the NaNs.
On amd64, hardware remainder should be used since it is about 10 times
faster than software remainder and is already used for remquo(), but
it involves using the i387 even for floats and doubles, and the i387
does NaN mixing which is better than but inconsistent with SSE NaN mixing.
Software remainder() would probably have been inconsistent with
software remainderl() for the same reason if the latter existed.

Signaling NaNs cause further inconsistencies on at least ia64 and i386.

Use __FBSDID().

16 years agoIf busdma is being used to realign dynamic buffers and the alignment is set to
Scott Long [Tue, 12 Feb 2008 16:24:30 +0000 (16:24 +0000)]
If busdma is being used to realign dynamic buffers and the alignment is set to
PAGE_SIZE or less, the bounce page counting logic was flawed and wouldn't
reserve any pages.  Adjust to be correct.  Review of other architectures is
forthcoming.

Submitted by: Joseph Golio

16 years agoFix a typo when testing for the NO_C3 quirk.
John Baldwin [Tue, 12 Feb 2008 15:26:59 +0000 (15:26 +0000)]
Fix a typo when testing for the NO_C3 quirk.

MFC after: 3 days

16 years agoFix typo.
Rafal Jaworowski [Tue, 12 Feb 2008 11:07:33 +0000 (11:07 +0000)]
Fix typo.

Approved by: cognet (mentor)

16 years agoEliminate BUS_DMA <-> cache incoherencies in USB transfers.
Rafal Jaworowski [Tue, 12 Feb 2008 11:03:29 +0000 (11:03 +0000)]
Eliminate BUS_DMA <-> cache incoherencies in USB transfers.

With write-allocate cache we get into the following scenario:

1. data has been updated in the memory by the USB HC, but
2. D-cache holds an un-flushed value of it
3. when affected cache line is being replaced, the old (un-flushed) value is
flushed and overwrites the newly arrived

This is possible due to how write-allocate works with virtual caches (ARM for
example).

In case of USB transfers it leads to fatal tags discrepancies in umass(4)
operation, which look like the following:

umass0: Invalid CSW: tag 1 should be 2
(probe0:umass-sim0:0:0:0): Request completed with CAM_REQ_CMP_ERR
(probe0:umass-sim0:0:0:0): Retrying Command
umass0: Invalid CSW: tag 1 should be 3
(probe0:umass-sim0:0:0:0): Request completed with CAM_REQ_CMP_ERR
(probe0:umass-sim0:0:0:0): Retrying Command
umass0: Invalid CSW: tag 1 should be 4
(probe0:umass-sim0:0:0:0): Request completed with CAM_REQ_CMP_ERR
(probe0:umass-sim0:0:0:0): Retrying Command
umass0: Invalid CSW: tag 1 should be 5
(probe0:umass-sim0:0:0:0): Request completed with CAM_REQ_CMP_ERR
(probe0:umass-sim0:0:0:0): Retrying Command
umass0: Invalid CSW: tag 1 should be 6
(probe0:umass-sim0:0:0:0): Request completed with CAM_REQ_CMP_ERR
(probe0:umass-sim0:0:0:0): error 5
(probe0:umass-sim0:0:0:0): Retries Exausted

To eliminate this, a BUS_DMASYNC_PREREAD sync operation is required in
usbd_start_transfer().

Credits for nailing this down go to Grzegorz Bernacki gjb AT semihalf DOT com.

Reviewed by: imp
Approved by: cognet (mentor)

16 years agoAdd the -4 option to the synopsis.
Ceri Davies [Tue, 12 Feb 2008 09:24:11 +0000 (09:24 +0000)]
Add the -4 option to the synopsis.

16 years agoBump .Dd for r1.48.
Ceri Davies [Tue, 12 Feb 2008 09:20:27 +0000 (09:20 +0000)]
Bump .Dd for r1.48.

16 years agoAdd missing \n.
Christian Brueffer [Tue, 12 Feb 2008 08:58:26 +0000 (08:58 +0000)]
Add missing \n.

PR: 120341
Submitted by: CyberLeo <cyberleo@cyberleo.net>
Approved by: rwatson (mentor), aradford@amcc.com
MFC after: 3 days

16 years agoForced commit: previous change also switches the default diskless NFS mode
Kris Kennaway [Mon, 11 Feb 2008 23:28:35 +0000 (23:28 +0000)]
Forced commit: previous change also switches the default diskless NFS mode
from NFSv2 to NFSv3.

16 years agoSwitch the default NFS mount mode from UDP to TCP. UDP mounts are a
Kris Kennaway [Mon, 11 Feb 2008 23:23:21 +0000 (23:23 +0000)]
Switch the default NFS mount mode from UDP to TCP.  UDP mounts are a
historical relic, and are no longer appropriate for either LAN or WAN
mounting.  At modern (gigabit and 10 gigabit) LAN speeds packet loss
from socket buffer fill events is common, and sequence numbers wrap
quickly enough that data corruption is possible.  TCP solves both of
these problems without imposing significant overhead.

MFC after:     1 month

16 years agoThe Sun disk label only uses 16-bit fields for cylinders, heads and
Marius Strobl [Mon, 11 Feb 2008 21:40:22 +0000 (21:40 +0000)]
The Sun disk label only uses 16-bit fields for cylinders, heads and
sectors so the geometry of large IDE disks has to be adjusted. This
corresponds to what the OpenSolaris dad(7D) driver does except that
the latter only tweaks sectors and effectively limits the mediasize
to 128GB so the cylinders and heads fields won't ever overflow. Not
limiting the mediasize is a compromise between allowing to use Sun
disk label as far as possible and being able to use the entire disk
with another disk label.
This allows to use the full capacity of large IDE disks if they were
not labeled under (Open)Solaris (in both ways of the meaning).

MFC after: 2 weeks

16 years agoMFOpenBSD rev 1.393 pf.conf.5
Remko Lodder [Mon, 11 Feb 2008 21:09:34 +0000 (21:09 +0000)]
MFOpenBSD rev 1.393 pf.conf.5

  do not describe `/' as solidus; from Allen (freebsd pr120484);

PR: 120484
Submitted by: Allen <alandsidel at 1001islington dot com>
MFC After: 3 days

16 years agoChange another argument and a variable both related to netname() to
Marius Strobl [Mon, 11 Feb 2008 20:34:27 +0000 (20:34 +0000)]
Change another argument and a variable both related to netname() to
be also 32-bit on all archs.

MFC after: 3 days

16 years agoFix Linux mmap with MAP_GROWSDOWN flag.
Jung-uk Kim [Mon, 11 Feb 2008 19:35:03 +0000 (19:35 +0000)]
Fix Linux mmap with MAP_GROWSDOWN flag.

Reported by: Andriy Gapon (avg at icyb dot net dot ua)
Tested by: Andriy Gapon (avg at icyb dot net dot ua)
Pointyhat: me
MFC after: 3 days

16 years ago- Update instructions for snapshot import
Rong-En Fan [Mon, 11 Feb 2008 13:42:45 +0000 (13:42 +0000)]
- Update instructions for snapshot import

16 years agoPer discussion on developers@, add vendor information for ncurses.
Rong-En Fan [Mon, 11 Feb 2008 13:40:20 +0000 (13:40 +0000)]
Per discussion on developers@, add vendor information for ncurses.

16 years ago- Update build glues for ncurses 5.6 snapshot 20080209
Rong-En Fan [Mon, 11 Feb 2008 13:39:36 +0000 (13:39 +0000)]
- Update build glues for ncurses 5.6 snapshot 20080209
- While I'm here, sort macro defines in ncurses_cfg.h

16 years agoThis commit was generated by cvs2svn to compensate for changes in r176187,
Rong-En Fan [Mon, 11 Feb 2008 13:37:14 +0000 (13:37 +0000)]
This commit was generated by cvs2svn to compensate for changes in r176187,
which included commits to RCS files with non-trunk default branches.

16 years agoImport ncurses 5.6-20080209 snapshot onto the vender branch
Rong-En Fan [Mon, 11 Feb 2008 13:37:14 +0000 (13:37 +0000)]
Import ncurses 5.6-20080209 snapshot onto the vender branch

16 years agoClean up PowerPC loader(8) build config.
Rafal Jaworowski [Mon, 11 Feb 2008 12:30:32 +0000 (12:30 +0000)]
Clean up PowerPC loader(8) build config.

Turn off TFTP support by default: when both TFTP and NFS are enabled in the
loader, strange interactions occur in the pure netbooting scenario (i.e.
loader is TFTP-ed, kernel+world mounted over NFS), leading to very slow access
to the NFS-exported files.

Reviewed by: grehan
Approved by: cognet (mentor)

16 years agoWe no longer have both block and character devices, so remove the
Mike Pritchard [Mon, 11 Feb 2008 09:36:43 +0000 (09:36 +0000)]
We no longer have both block and character devices, so remove the
misleading information stated here.

16 years agoUnbreak build, size_t is larger on 64bit platforms.
Andrew Thompson [Mon, 11 Feb 2008 09:20:01 +0000 (09:20 +0000)]
Unbreak build, size_t is larger on 64bit platforms.

16 years agoExplain in more detail how the pass number field works. Bump .Dd.
Mike Pritchard [Mon, 11 Feb 2008 09:02:48 +0000 (09:02 +0000)]
Explain in more detail how the pass number field works.  Bump .Dd.

16 years agoSome small fixes, also introduce an EXAMPLES section.
Christian Brueffer [Mon, 11 Feb 2008 09:01:14 +0000 (09:01 +0000)]
Some small fixes, also introduce an EXAMPLES section.

16 years agoTypo fix.
Remko Lodder [Mon, 11 Feb 2008 08:12:58 +0000 (08:12 +0000)]
Typo fix.

Spotted by: brueffer

16 years agoAfter issueing a ntpdate [1] I noticed it's already 2008, reflect that
Remko Lodder [Mon, 11 Feb 2008 07:43:23 +0000 (07:43 +0000)]
After issueing a ntpdate [1] I noticed it's already 2008, reflect that
in the last modified date.

Noticed by: brueffer [1]

16 years agoFix typo (s/existance/existence/)
Remko Lodder [Mon, 11 Feb 2008 07:15:52 +0000 (07:15 +0000)]
Fix typo (s/existance/existence/)

Noticed by: ceri

16 years agoAdd missing GEOM_LVM option.
Andrew Thompson [Mon, 11 Feb 2008 05:36:15 +0000 (05:36 +0000)]
Add missing GEOM_LVM option.

16 years agoUse double precision for z and thus for the entire calculation of
Bruce Evans [Mon, 11 Feb 2008 05:20:02 +0000 (05:20 +0000)]
Use double precision for z and thus for the entire calculation of
exp2(i/TBLSIZE) * p(z) instead of only for the final multiplication
and addition.  This fixes the code to match the comment that the maximum
error is 0.5010 ulps (except on machines that evaluate float expressions
in extra precision, e.g., i386's, where the evaluation was already
in extra precision).

Fix and expand the comment about use of double precision.

The relative roundoff error from evaluating p(z) in non-extra precision
was about 16 times larger than in exp2() because the interval length
is 16 times smaller.  Its maximum was at least P1 * (1.0 ulps) *
max(|z|) ~= log(2) * 1.0 * 1/32 ~= 0.0217 ulps (1.0 ulps from the
addition in (1 + P1*z) with a cancelation error when z ~= -1/32).  The
actual final maximum was 0.5313 ulps, of which 0.0303 ulps must have
come from the additional roundoff error in p(z).  I can't explain why
the additional roundoff error was almost 3/2 times larger than the rough
estimate.

16 years agoHook geom_lvm(4) up to the build.
Andrew Thompson [Mon, 11 Feb 2008 03:10:40 +0000 (03:10 +0000)]
Hook geom_lvm(4) up to the build.

16 years agoAdd a geom class to map Linux LVM logical volumes.
Andrew Thompson [Mon, 11 Feb 2008 03:05:11 +0000 (03:05 +0000)]
Add a geom class to map Linux LVM logical volumes.

The logical disks will appear as /dev/lvm/<vol group>-<logical vol>, for
instance /dev/lvm/vg0-home. GLVM currently supports linear stripes with
segments on multiple physical disks. The metadata is read only, logical
volumes can not be allocated or resized.

Reviewed by: Ivan Voras

16 years agoClean up coda_pathconf() slightly while debugging a problem there.
Robert Watson [Mon, 11 Feb 2008 00:01:45 +0000 (00:01 +0000)]
Clean up coda_pathconf() slightly while debugging a problem there.

MFC after: 1 month

16 years agoGive traceroute6 the ability to traceroute with packets with no
David Malone [Sun, 10 Feb 2008 21:06:38 +0000 (21:06 +0000)]
Give traceroute6 the ability to traceroute with packets with no
upper layer header (IP PROTO = 59). Useful for testing firewalls.

MFC after: 2 months

16 years agoAdd support for PC Engines ALIX boards.
Poul-Henning Kamp [Sun, 10 Feb 2008 19:14:42 +0000 (19:14 +0000)]
Add support for PC Engines ALIX boards.

Style cleanup.

Hide some messages behind bootverbose.

16 years ago- Revert last ehci.c change
Attilio Rao [Sun, 10 Feb 2008 15:50:21 +0000 (15:50 +0000)]
- Revert last ehci.c change
- Include lock.h in lockmgr.h as nested header in order to safely use
  LOCK_FILE and LOCK_LINE.  As long as this code will be replaced soon
  we can tollerate for a while this namespace pollution even if the real
  fix would be to let lockmgr() depend by lock.h as a separate header.

16 years agoSince we're now actively maintaining the Coda module in the FreeBSD source
Robert Watson [Sun, 10 Feb 2008 11:18:12 +0000 (11:18 +0000)]
Since we're now actively maintaining the Coda module in the FreeBSD source
tree, restyle everything but coda.h (which is more explicitly shared
across systems) into a closer approximation to style(9).

Remove a few more unused function prototypes.

Add or clarify some comments.

MFC after: 1 month

16 years agoAfter rev. 1.60 of sys/lockmgr.h, the header requires inclusion of the
Konstantin Belousov [Sun, 10 Feb 2008 07:34:16 +0000 (07:34 +0000)]
After rev. 1.60 of sys/lockmgr.h, the header requires inclusion of the
sys/lock.h.

16 years agoAdd `hw.ciss.nop_message_heartbeat' tunable (default disabled) for
Mitsuru IWASAKI [Sun, 10 Feb 2008 06:21:52 +0000 (06:21 +0000)]
Add `hw.ciss.nop_message_heartbeat' tunable (default disabled) for
NOP-message polling in ciss_periodic().
Note that setting the tunable to non-zero can be workaround only for
`ADAPTER HEARTBEAT FAILED' problem, and may freeze the system w/o
the problem.

Reviewed by: scottl
Reported by: Attila Nagy
MFC after: 3 days

16 years agoUse LOCK_FILE and LOCK_LINE where necessary instead than __FILE__ and
Attilio Rao [Sat, 9 Feb 2008 21:37:54 +0000 (21:37 +0000)]
Use LOCK_FILE and LOCK_LINE where necessary instead than __FILE__ and
__LINE__ with lockmgr.

16 years agonamei() can call underlying nfs_readlink() passing a struct uio pointer
Attilio Rao [Sat, 9 Feb 2008 20:13:19 +0000 (20:13 +0000)]
namei() can call underlying nfs_readlink() passing a struct uio pointer
owned by a NULL owner. This will lead consequent VOP_ISLOCKED() present
into nfs_upgrade_vnlock() to panic as it only acquire curthread now.
Fix nfs_upgrade_vnlock() and nfs_downgrade_vnlock() in order to not use
more the struct thread pointer passed as argument (as it is really nomore
required there as vn_lock() and VOP_UNLOCK doesn't get the lock more).
Using curthread, in place, doesn't get ambiguity as LK_EXCLOTHER should
be handled as a "not locked" request by both functions.

Reported by: kris
Tested by: kris
Reviewed by: ups

16 years agoFix a few obvious errors in the znew(1) script.
Yaroslav Tykhiy [Sat, 9 Feb 2008 13:04:01 +0000 (13:04 +0000)]
Fix a few obvious errors in the znew(1) script.

PR: bin/120249
Submitted by: Jaakko Heinonen <see the PR for email>

16 years agoAs usual, use a minimax polynomial that is specialized for float
Bruce Evans [Sat, 9 Feb 2008 12:53:15 +0000 (12:53 +0000)]
As usual, use a minimax polynomial that is specialized for float
precision.  The new polynomial has degree 4 instead of 10, and a maximum
error of 2**-30.04 ulps instead of 2**-33.15.  This doesn't affect the
final error significantly; the maximum error was and is about 0.5015
ulps on i386 -O1, and the number of cases with an error of > 0.5 ulps
is increased from 13851 to 14407.

Note that the error is only this close to 0.5 ulps due to excessive
extra precision caused by compiler bugs on i386.  The extra precision
could be obtained intentionally, and is useful for keeping the error
of the hyperbolic float functions below 1 ulp, since these functions
are implemented using expm1f.  My recent change for scaling by 2**k
had the unintentional side effect of retaining extra precision for
longer, so callers of expm1f see errors of more like 0.0015 ulps than
0.5015 ulps, and for the hyperbolic functions this reduces the maximum
error from nearly about 2 ulps to about 0.75 ulps.

This is about 10% faster on i386 (A64).  expm1* is still very slow,
but now the float version is actually significantly faster.  The
algorithm is very sophisticated but not very good except on machines
with fast division.

16 years agoVarious further non-functional cleanups to coda:
Robert Watson [Sat, 9 Feb 2008 12:49:18 +0000 (12:49 +0000)]
Various further non-functional cleanups to coda:

- Rename print_vattr to coda_print_vattr and make static, rename
  print_cred to coda_print_cred.
- Remove unused coda_vop_nop.
- Add XXX comment because coda_readdir forwards to the cache vnode's
  readdir rather than venus_readdir, and annotate venus_readdir as
  unused.
- Rename vc_nb_* to vc_*.
- Use d_open_t, d_close_t, d_read_t, d_write_t, d_ioctl_t and d_poll_t
  for prototyping vc_* as that is the intent, don't use our own
  definitions.
- Rename coda_nb_statfs to coda_statfs, rename NB_SFS_SIZ to
  CODA_SFS_SIZ.
- Replace one more OBE reference to NetBSD with a reference to FreeBSD.
- Tidy up a little vertical whitespace here and there.
- Annotate coda_nc_zapvnode as unused.
- Remove unused vcodattach.
- Annotate VM_INTR as unused.
- Annotate that coda_fhtovp is unused and doesn't match the FreeBSD
  prototype, so isn't hooked up to vfs_fhtovp.  If we want NFS export of
  Coda to work someday, this needs to be fixed.
- Remove unused getNewVnode.
- Remove unused coda_vget, coda_init, coda_quotactl prototypes.

MFC after: 1 month

16 years agoNo reason not to maintain stats on statfs in Coda, as it's done for
Robert Watson [Sat, 9 Feb 2008 11:40:49 +0000 (11:40 +0000)]
No reason not to maintain stats on statfs in Coda, as it's done for
other VFS operations, so uncomment the existing statistics gathering.

MFC after: 1 month

16 years agoRemove unused devtomp(), which exploited UFS-specific knowledge to find
Robert Watson [Sat, 9 Feb 2008 11:12:18 +0000 (11:12 +0000)]
Remove unused devtomp(), which exploited UFS-specific knowledge to find
the mountpoint for a specific device.  This was implemented incorrectly,
a bad idea in a fundamental sense, and also never used, so presumably
a long-idle debugging function.

MFC after: 1 month

16 years agoFix a comment about coefficients and expand a related one.
Bruce Evans [Sat, 9 Feb 2008 10:36:07 +0000 (10:36 +0000)]
Fix a comment about coefficients and expand a related one.

16 years agoSince Coda is effectively a stacked file system, use VOP_EOPNOTSUPP
Robert Watson [Sat, 9 Feb 2008 09:33:19 +0000 (09:33 +0000)]
Since Coda is effectively a stacked file system, use VOP_EOPNOTSUPP
for vop_bmap; delete the existing stub that returned either EINVAL
or EOPNOTSUPP, and had unreachable calls to VOP_BMAP on the cache
vnode.

MFC after: 1 month

16 years agoWARNS fixes:
David Malone [Sat, 9 Feb 2008 09:12:02 +0000 (09:12 +0000)]
WARNS fixes:
1) Add missing parens around assignment that is compared to zero.
2) Make some variables that only take non-negative values unsigned.
3) Some casts/type changes to fix other constness warnings.
4) Make one variable a const char *.
5) Make sure termwidth is positive, it doesn't make sense for it to be negative.

Approved by: dds

16 years agoAdd support for displaying a process' current working directory, root
Joe Marcus Clarke [Sat, 9 Feb 2008 05:16:26 +0000 (05:16 +0000)]
Add support for displaying a process' current working directory, root
directory, and jail directory within procstat.  While this functionality
is available already in fstat, encapsulating it in the kern.proc.filedesc
sysctl makes it accessible without using kvm and thus without needing
elevated permissions.

The new procstat output looks like:

  PID COMM               FD T V FLAGS    REF  OFFSET PRO NAME
  76792 tcsh              cwd v d --------   -       - -   /usr/src
  76792 tcsh             root v d --------   -       - -   /
  76792 tcsh               15 v c rw------  16    9130 -   -
  76792 tcsh               16 v c rw------  16    9130 -   -
  76792 tcsh               17 v c rw------  16    9130 -   -
  76792 tcsh               18 v c rw------  16    9130 -   -
  76792 tcsh               19 v c rw------  16    9130 -   -

I am also bumping __FreeBSD_version for this as this new feature will be
used in at least one port.

Reviewed by: rwatson
Approved by: rwatson

16 years agoLock cache vnode when VOP_FSYNC() is called on a Coda vnode.
Robert Watson [Sat, 9 Feb 2008 00:12:22 +0000 (00:12 +0000)]
Lock cache vnode when VOP_FSYNC() is called on a Coda vnode.

MFC after: 1 month

16 years agoMake all calls to vn_lock() in Coda, including recently added ones,
Robert Watson [Sat, 9 Feb 2008 00:03:22 +0000 (00:03 +0000)]
Make all calls to vn_lock() in Coda, including recently added ones,
use LK_RETRY, since failure is undesirable (and not handled).

MFC after: 1 month
Pointed out by: kib

16 years agoThe Coda module was originally ported to NetBSD from Mach by rvb, and
Robert Watson [Fri, 8 Feb 2008 23:15:36 +0000 (23:15 +0000)]
The Coda module was originally ported to NetBSD from Mach by rvb, and
then later to FreeBSD.  Update various NetBSD-related comments: in some
cases delete them because they don't appply, in others update to say
FreeBSD as they still apply but in FreeBSD (and might for that matter
no longer apply on NetBSD), and flag one case where I'm not sure
whether it applies.

MFC after: 1 month

16 years agoFix truncation of lines at LINE_MAX characters by dynamically
Guy Helmer [Fri, 8 Feb 2008 23:04:13 +0000 (23:04 +0000)]
Fix truncation of lines at LINE_MAX characters by dynamically
extending line buffers.

PR: bin/76578

16 years agoBefore invoking vnode operations on cache vnodes, acquire the vnode
Robert Watson [Fri, 8 Feb 2008 23:01:40 +0000 (23:01 +0000)]
Before invoking vnode operations on cache vnodes, acquire the vnode
locks of those vnodes.  Probably, Coda should do the same lock sharing/
pass-through that is done for nullfs, but in the mean time this ensures
that locks are adequately held to prevent corruption of data structures
in the cache file system.

Assuming most operations came from the top layer of Coda and weren't
performed directly on the cache vnodes, in practice this corruption was
relatively unlikely as the Coda vnode locks were ensuring exclusive
access for most consumers.

This causes WITNESS to squeal like a pig immediately when Coda is used,
rather than waiting until file close; I noticed these problems because
of the lack of said squealing.

MFC after: 1 month

16 years agoRemove undefined coda excluded by #if 1 #else, which previously protected
Robert Watson [Fri, 8 Feb 2008 22:37:15 +0000 (22:37 +0000)]
Remove undefined coda excluded by #if 1 #else, which previously protected
vget() calls using inode numbers to query the root of /coda, which is not
needed since we now cache the root vnode with the mountpoint.

MFC after: 1 month

16 years agoConver all explicit instances to VOP_ISLOCKED(arg, NULL) into
Attilio Rao [Fri, 8 Feb 2008 21:45:47 +0000 (21:45 +0000)]
Conver all explicit instances to VOP_ISLOCKED(arg, NULL) into
VOP_ISLOCKED(arg, curthread). Now, VOP_ISLOCKED() and lockstatus() should
only acquire curthread as argument; this will lead in axing the additional
argument from both functions, making the code cleaner.

Reviewed by: jeff, kib

16 years agoNote m_collapse addition.
Sam Leffler [Fri, 8 Feb 2008 21:24:58 +0000 (21:24 +0000)]
Note m_collapse addition.

16 years agobelated bump for the addition of m_collapse
Sam Leffler [Fri, 8 Feb 2008 21:23:36 +0000 (21:23 +0000)]
belated bump for the addition of m_collapse

16 years agoIntroduce -i to SYNOPSIS, forgotten by krion@.
Ruslan Ermilov [Fri, 8 Feb 2008 14:00:01 +0000 (14:00 +0000)]
Introduce -i to SYNOPSIS, forgotten by krion@.

16 years agoWARNS fixes: mainly constness and avoid comparing signed with
David Malone [Fri, 8 Feb 2008 11:03:05 +0000 (11:03 +0000)]
WARNS fixes: mainly constness and avoid comparing signed with
unsigned by making array indicies unsigned. Also note one or two
unused parameters.

16 years agoWARNS fixes: remove two unused variables and add some constness.
David Malone [Fri, 8 Feb 2008 10:58:50 +0000 (10:58 +0000)]
WARNS fixes: remove two unused variables and add some constness.