Commit Graph

50237 Commits

Author SHA1 Message Date
rwatson
3cbfc41798 Disable use of synchronization early in the boot by the MAC Framework;
for modules linked into the kernel or loaded very early, panics will
result otherwise, as the CV code it calls will panic due to its use
of a mutex before it is initialized.
2004-10-30 14:20:59 +00:00
brooks
582a105e35 Add a loader menu option to set hint.atkbd.0.flags=0x1 which allows USB
keyboards to work if no PS/2 keyboard is attached.  The position in the
menu was chosen to avoid moving option 6 (loader prompt).  This should
be a no-op on non-i386/amd64 machines.
2004-10-30 13:45:13 +00:00
nyan
ae417ad6ef MFi386: revision 1.599 (Preserve dcons(4) buffer passed by loader(8).) 2004-10-30 12:41:20 +00:00
nyan
073307841e Remove a duplicate code. 2004-10-30 12:34:25 +00:00
jeff
917f19c039 - When choosing a thread on the run queue, check to see if its nice is
outside of the nice threshold due to a recently awoken thread with a
   lower nice value.  This further reduces the amount of time a positively
   niced thread gets while running in conjunction with a workload that has
   many short sleeps (ie buildworld).
2004-10-30 12:19:15 +00:00
rwatson
f7da0c44ca Correct a bug in TCP SACK that could result in wedging of the TCP stack
under high load: only set function state to loop and continuing sending
if there is no data left to send.

RELENG_5_3 candidate.

Feet provided:	Peter Losher <Peter underscore Losher at isc dot org>
Diagnosed by:	Aniel Hartmeier <daniel at benzedrine dot cx>
Submitted by:	mohan <mohans at yahoo-inc dot com>
2004-10-30 12:02:50 +00:00
rwatson
f71b496ed7 Move if_handoff() from an inline in if_var.h to a function to if.c
in orden to harden the ABI for 5.x; this will permit us to modify
the locking in the ifnet packet dispatch without requiring drivers
to be recompiled.

MFC after:	3 days
Discussed at:	EuroBSDCon Developer's Summit
2004-10-30 09:39:13 +00:00
le
2675d48d5a Add support for the B&B Electronics USB->RS422/485 adapter.
PR:            kern/73178
Submitted by:  Scott Price <prices@dflytech.com>
2004-10-30 09:21:44 +00:00
rwatson
a9f55430f9 Add additional "spare" fields to 'struct ifnet' in order to improve
the resistance of the network driver ABI to changes that will be
required as we optimize locking.

MFC after:	3 days
Discussed at:	Developer Summit
2004-10-30 08:45:13 +00:00
jeff
d8f987468c - In sched_prio() check to see if the kse is assigned to a runq as the
check for TD_ON_RUNQ() no longer means the thread is really on a run-
   queue.  I suspect this state should be re-evaluated as it must mean
   something else now.  This fixes ULE+KSE+PREEMPTION on UP x86.
2004-10-30 07:35:53 +00:00
alc
c823d3b356 Add an assignment statement that I omitted from the previous revision. 2004-10-30 07:09:46 +00:00
alfred
a2b1b554d2 Allow kill -9 to kill processes stuck in procfs STOPEVENTs. 2004-10-30 02:56:22 +00:00
alc
6c2b908e77 Implement per-CPU SYSMAPs, i.e., CADDR* and CMAP*, to reduce lock
contention within pmap_zero_page() and pmap_copy_page().
2004-10-29 19:10:46 +00:00
phk
994ee3fc52 Remove si_mountpoint and si_bsize_phys from cdev. 2004-10-29 11:17:24 +00:00
phk
c928cc4c54 Loose vfs_mountedon() 2004-10-29 11:15:08 +00:00
phk
5637a20bbe Don't set si_bsize_phys.
Use bioq_takefirst()
2004-10-29 11:12:16 +00:00
phk
6358ee90d6 Don't set si_bsize_phys, nobody cares. 2004-10-29 11:11:44 +00:00
phk
8fa3fd0acf Don't give disks special treatment, they don't come this way anymore. 2004-10-29 11:10:55 +00:00
phk
9e9b22d7da Don't set si_bszize_phys, nobody cares.
Use bioq_takefirst()
2004-10-29 11:09:50 +00:00
phk
0e582870f7 No point in setting si_bsize_phys anymore, nobody reads it.
Use bioq_takefirst().
2004-10-29 11:09:21 +00:00
phk
ac49cb1cad Now that filesystems respect and understand GEOM access counts, refuse
a write open of a read-only floppydisk.
2004-10-29 11:05:45 +00:00
phk
861b10d6de Remove VOP_SPECSTRATEGY() from the system. 2004-10-29 10:59:28 +00:00
phk
546ea57ed3 Remove the last call in the system to VOP_SPECSTRATEGY(): We can no
longer come through the VNODE layer to the disks since all the filesystems
now go via geom_vfs to GEOM.
2004-10-29 10:52:31 +00:00
phk
ff969023bb Move NTFS to GEOM backing instead of DEVFS.
For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
2004-10-29 10:43:45 +00:00
phk
2b08c63135 Move HPFS to GEOM backing instead of DEVFS.
For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
2004-10-29 10:43:07 +00:00
phk
bb4386fa18 Move EXT2FS to GEOM backing instead of DEVFS.
For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
2004-10-29 10:42:30 +00:00
phk
e172d33222 Move CD9660 to GEOM backing instead of DEVFS.
For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
2004-10-29 10:41:44 +00:00
phk
6dbcd5fd09 Move UDF to GEOM backing instead of DEVFS.
For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
2004-10-29 10:40:58 +00:00
phk
a4581c6788 Move MSDOSFS to GEOM backing instead of DEVFS.
For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
2004-10-29 10:40:14 +00:00
phk
d9d9558b8b Move UFS from DEVFS backing to GEOM backing.
This eliminates a bunch of vnode overhead (approx 1-2 % speed
improvement) and gives us more control over the access to the storage
device.

Access counts on the underlying device are not correctly tracked and
therefore it is possible to read-only mount the same disk device multiple
times:
	syv# mount -p
	/dev/md0        /var    ufs rw  2 2
	/dev/ad0        /mnt    ufs ro  1 1
	/dev/ad0        /mnt2   ufs ro  1 1
	/dev/ad0        /mnt3   ufs ro  1 1

Since UFS/FFS is not a synchrousely consistent filesystem (ie: it caches
things in RAM) this is not possible with read-write mounts, and the system
will correctly reject this.

Details:

	Add a geom consumer and a bufobj pointer to ufsmount.

	Eliminate the vnode argument from softdep_disk_prewrite().
	Pick the vnode out of bp->b_vp for now.  Eventually we
	should find it through bp->b_bufobj->b_private.

	In the mountcode, use g_vfs_open() once we have used
	VOP_ACCESS() to check permissions.

	When upgrading and downgrading between r/o and r/w do the
	right thing with GEOM access counts.  Remove all the
	workarounds for not being able to do this with VOP_OPEN().

	If we are the root mount, drop the exclusive access count
	until we upgrade to r/w.  This allows fsck of the root
	filesystem and the MNT_RELOAD to work correctly.

	Set bo_private to the GEOM consumer on the device bufobj.

	Change the ffs_ops->strategy function to call g_vfs_strategy()

	In ufs_strategy() directly call the strategy on the disk
	bufobj.  Same in rawread.

	In ffs_fsync() we will no longer see VCHR device nodes, so
	remove code which synced the filesystem mounted on it, in
	case we came there.  I'm not sure this code made sense in
	the first place since we would have taken the specfs route
	on such a vnode.

	Redo the highly bogus readblock() function in the snapshot
	code to something slightly less bogus: Constructing an uio
	and using physio was really quite a detour.  Instead just
	fill in a bio and ship it down.
2004-10-29 10:15:56 +00:00
phk
f0dd76e153 Add GEOM class "VFS" for filesystems and other buffer cache users
of GEOM devices.

There is nothing magic about this, it just gives a bufobj interface
to GEOM.
2004-10-29 09:56:56 +00:00
phk
12ca46b3fc Give the bufobj a private __bo_vnode for now to keep the syncer floating [1]
At some point later the syncer will unlearn about vnodes and the filesystems
method called by the syncer will know enough about what's in bo_private to
do the right thing.

[1] Ok, I know, but I couldn't resist the pun.
2004-10-29 09:33:32 +00:00
phk
269b7a298a Add g_wither_geom_close() function. 2004-10-29 09:19:03 +00:00
alfred
29ecb2fede Backout 1.291.
re doesn't seem to think this fixes:
  Desired features for 5.3-RELEASE "More truss problems"
2004-10-29 08:24:41 +00:00
phk
86cc21c765 Give dev_strategy() an explict cdev argument in preparation for removing
buf->b-dev.

Put a bio between the buf passed to dev_strategy() and the device driver
strategy routine in order to not clobber fields in the buf.

Assert copyright on vfs_bio.c and update copyright message to canonical
text.  There is no legal difference between John Dysons two-clause
abbreviated BSD license and the canonical text.
2004-10-29 07:16:37 +00:00
jhb
9a3bf16356 Handle all types of interrupts when operating the uhci(4) controller in
polled mode.

PR:		kern/73000
Submitted by:	Daan Vreeken <Danovitsch at Vitsch dot net>
MFC after:	1 month
2004-10-28 20:24:50 +00:00
glebius
30d3609f0a Rename debug macro to DBG and indent it properly.
Requested by:	maxim
Approved by:	julian (mentor)
2004-10-28 18:23:44 +00:00
simokawa
8f7bf32c34 Use dcons buffer passed by loader on amd64. 2004-10-28 12:18:22 +00:00
simokawa
59e7ed6ecd MFi386: preserve dcons buffer passed by loader. 2004-10-28 12:16:03 +00:00
suz
0a0f72fa43 fixed a bug that incorrect IPsec request level may be returned for proto AH
Obtained from: KAME
2004-10-28 09:24:45 +00:00
phk
08ed0626b7 Lock bp->b_bufobj->b_object instead of bp->b_object 2004-10-28 08:38:46 +00:00
phk
5a159b2d78 Reduce the locking activity by epsilon by checking VNON condition before
releasing the mountlock.
2004-10-28 08:22:11 +00:00
phk
414fca23b7 We only support backing UFS/FFS with disks. 2004-10-28 06:19:28 +00:00
phk
6b2d7f7134 What can I say: don't allow people to mount DEVFS with option "nodev". 2004-10-28 06:03:25 +00:00
alc
f73575dddd Assert that the containing vm object is locked in vm_page_cache() and
vm_page_try_to_cache().
2004-10-28 05:26:21 +00:00
alfred
effc4c4363 comment out debug printf.
Submitted by: rees
2004-10-27 23:19:34 +00:00
bmilekic
13ebdd218a Fix a INVARIANTS-only bug introduced in Revision 1.104:
IF INVARIANTS is defined, and in the rare case that we have
allocated some objects from the slab and at least one initializer
on at least one of those objects failed, and we need to fail the
allocation and push the uninitialized items back into the slab
caches -- in that scenario, we would fail to [re]set the
bucket cache's ub_bucket item references to NULL, which would
eventually trigger a KASSERT.
2004-10-27 21:19:35 +00:00
rwatson
e2756c4e4c Move the 'debug' sysctl tree under options SYSCTL_DEBUG. It generates
an inordinate amount of synchronous console output that is fairly
undesirable on slower serial console.  It's easily hit by accident
when frobbing other sysctls late at night.
2004-10-27 19:26:01 +00:00
bms
586226b93c Forcibly disable interrupts, if we find ourselves servicing one when
the device is suspended or shutting down. This will need to be rethought
slightly if we implement suspend/resume support within vr(4).
This appears to fix the vr_shutdown() panic on SMP machines.

My theory here is there's a race somewhere during vr_detach() with
vr_intr() in the SMP case which was sometimes being triggered,
although quite why this was happening is unclear (vr_stop() also
explicitly disables interrupts by writing to the IMR register).

MFC-to-RELENG_5* candidate.

PR:		kern/62889
Tested by:	seb at struchtrup dot com
MFC after:	10 days
2004-10-27 19:02:23 +00:00
alc
ce02afb500 During traversal of the active queue, try locking the page's containing
object before accessing the page's flags or the object's reference count.
If the trylock fails, handle the page as though it is busy.
2004-10-27 18:29:17 +00:00