Commit Graph

1072 Commits

Author SHA1 Message Date
christos 46a93244b5 starttime needs to be time_t (Izumi Tsutsui) 2010-04-02 19:25:21 +00:00
pooka 19599ea184 If msgbuf is not enabled, do not report the node in readdir. That
way ls -l won't report funny errors because getattr for a readdir
result fails.

XXX: lookup for msgbuf still succeeds even if not enabled
2010-03-31 01:27:05 +00:00
pooka 242bf1c3e7 Stop exposing fifofs internals and leave only fifo_vnodeop_p visible. 2010-03-29 13:11:32 +00:00
pooka 57fb3b92e2 Access fifoinfo only when it's non-NULL. 2010-03-27 02:33:11 +00:00
pooka a8ae7feaa2 You have found a scroll of genocide --More--
What class of monsters do you wish to genocide? --More--
> fs_foo.h
Wiped out all fs_foo.h
2010-03-03 01:26:01 +00:00
uebayasi 1b9d02ce0c Reduce the diff between genfs_getpages() and genfs_do_io(). These should be
merged eventually.
2010-01-30 12:06:20 +00:00
uebayasi 64cb3c884a Slightly more descriptive local variable names. 2010-01-30 05:19:20 +00:00
uebayasi 53000cec23 genfs_getpages: Narrow & clarify the context where I/O happens & vmobjlock is dropped. 2010-01-29 04:36:20 +00:00
uebayasi f4e16ac91b genfs_getpages: Redo previous with a better goto label. 2010-01-29 04:33:37 +00:00
uebayasi 29f5c078cb Revert part which variable initializations within interleaved gotos.
again:	if (...) goto err;
	void *ptr = alloc();
	if (...) goto again;
	if (...) goto err1;
	...
err1:	if (ptr) free(ptr);
err:
	return;

This leaks memory if exited with "goto again; -> goto err;".
2010-01-28 14:25:17 +00:00
uebayasi 9fa66d7a3f genfs_getpages: More constification & localization. 2010-01-28 13:43:53 +00:00
uebayasi a0629265f2 genfs_getpages: Constify 2 variables, move one. No functional changes. 2010-01-28 08:20:00 +00:00
uebayasi bb4b25cfbc genfs_getpages: Constify orignpages. Don't override its meaning by the value
re-calucated from GOP_SIZE(GOP_SIZE_MEM), but assign another variable
(orignmempages).
2010-01-28 08:02:12 +00:00
uebayasi b0b6ddc39d Unbreak modules build. 2010-01-28 07:49:08 +00:00
uebayasi 680e7444ba genfs_getpages: Constify & localize more variables. 2010-01-28 07:44:54 +00:00
uebayasi 1a2a3af3da genfs_getpages: Move local variable declarations that are used only for I/O
to where they're used.  This helps to track what's going in this lengthy
function.
2010-01-28 07:38:32 +00:00
uebayasi 64e0246a73 genfs_getpages: Localize a few more variables. 2010-01-28 07:26:25 +00:00
uebayasi 6903a05402 genfs_putpages: Localize a few variables. No functional changes. 2010-01-28 07:24:55 +00:00
uebayasi a75c80a070 Use genfs_node_*lock(). 2010-01-27 15:53:06 +00:00
uebayasi e0f79090b7 Don't forget to tell the result of rw_tryenter(). 2010-01-27 15:52:31 +00:00
uebayasi 2372674c71 Constify some pointers in genfs_getpages() and genfs_do_putpages(). 2010-01-27 15:24:54 +00:00
uebayasi b9bfa07443 Add genfs_node_rdtrylock(). 2010-01-27 15:18:40 +00:00
njoly d343885518 Remove unneeded strlen() call in KFShostname case. 2010-01-22 22:46:00 +00:00
pooka c3183f3251 The VATTR_NULL/VREF/VHOLD/HOLDRELE() macros lost their will to live
years ago when the kernel was modified to not alter ABI based on
DIAGNOSTIC, and now just call the respective function interfaces
(in lowercase).  Plenty of mix'n match upper/lowercase has creeped
into the tree since then.  Nuke the macros and convert all callsites
to lowercase.

no functional change
2010-01-08 11:35:07 +00:00
uebayasi 1f7c235131 gimpy invented PRIxVADDR format specifier. 2009-12-14 13:00:07 +00:00
pooka 70d4493c77 Remove the portalfs kernel file system driver. Replace mount_portal(8)
with a version based on puffs.  User functionality remains the same.
2009-12-05 20:11:01 +00:00
pooka 1643f3a7a1 Introduce genfs_statvfs() as pretty much a no-info statvfs and
convert several pseudo file systems to use it.
2009-11-30 10:59:19 +00:00
roy fab5d12590 Allow chown if caller is in the new group. 2009-11-20 13:42:43 +00:00
pooka fb54d5c528 Disallow chown for files the caller does not own. 2009-11-20 13:19:46 +00:00
elad 1570e68c40 - Move kauth_init() a little bit higher.
- Add spec_init() to authorize special device actions (and passthru too for
  the time being). Move policy out of secmodel_suser.
2009-11-14 18:36:56 +00:00
rmind 40cf6f3659 Remove uarea swap-out functionality:
- Addresses the issue described in PR/38828.
- Some simplification in threading and sleepq subsystems.
- Eliminates pmap_collect() and, as a side note, allows pmap optimisations.
- Eliminates XS_CTL_DATA_ONSTACK in scsipi code.
- Avoids few scans on LWP list and thus potentially long holds of proc_lock.
- Cuts ~1.5k lines of code.  Reduces amd64 kernel size by ~4k.
- Removes __SWAP_BROKEN cases.

Tested on x86, mips, acorn32 (thanks <mpumford>) and partly tested on
acorn26 (thanks to <bjh21>).

Discussed on <tech-kern>, reviewed by <ad>.
2009-10-21 21:11:57 +00:00
dholland a501df5ab8 Avoid leaking pages. Fixes PR 42053 from SHIMIZU Ryo. 2009-10-19 01:25:29 +00:00
elad 756638cf95 Factor out a block of code that appears in three places (Veriexec, keylock,
and securelevel) so that others can use it as well.
2009-10-06 04:28:10 +00:00
tsutsui 445e8226bb Put workaround fix for LOCKDEBUG panic mentioned in PR kern/41078:
Don't try to load a driver module if the driver is already exist but just
 not attached. [bc]dev_open() could return ENXIO even if the driver exists.

XXX: Maybe this should be handled by helper functions for
XXX: module_autoload() calls on demand.
2009-10-04 06:23:58 +00:00
elad 51f0d6a0eb Put procfs policy back in the subsystem. 2009-10-02 23:00:02 +00:00
pooka 11281f01a0 Replace a large number of link set based sysctl node creations with
calls from subsystem constructors.  Benefits both future kernel
modules and rump.

no change to sysctl nodes on i386/MONOLITHIC & build tested i386/ALL
2009-09-16 15:23:04 +00:00
pooka 288dd7d670 Get rid of dependency on M_UFSMNT. Since we need storage only for
one pointer, simply hang that off of mnt_data instead of allocating
storage.
2009-07-31 19:47:47 +00:00
pooka 2ebc149961 Do a name-based search for the ctty major instead of requiring an
external symbol.
2009-07-31 18:50:58 +00:00
pooka af1b79236a Instead of reporting some random "files used/free" figures for the
process doing statvfs(!), just report 0.  The code had some kernel
panicking bug after the descriptor code update, the functionality
is more like a bunny rabbit hat than anything useful, and I can't
bother to figure out what the invariants in the new descriptor code
are.

fixes PR kern/41534 and kern/41786
2009-07-31 18:44:58 +00:00
elad 009f5d2f88 Where possible, extract the file-system's access() routine to two internal
functions: the first checking if the operation is possible (regardless of
permissions), the second checking file-system permissions, ACLs, etc.

Mailing list reference:

	http://mail-index.netbsd.org/tech-kern/2009/06/21/msg005311.html
2009-07-03 21:17:40 +00:00
elad 870920260d Move the implementation of vaccess() to genfs_can_access(), in line with
the other routines of the same spirit.

Adjust file-system code to use it.

Keep vaccess() for KPI compatibility and to keep element of least
surprise. A "diagnostic" message warning that vaccess() is deprecated will
be printed when it's used (obviously, only in DIAGNOSTIC kernels).

No objections on tech-kern@:

	http://mail-index.netbsd.org/tech-kern/2009/06/21/msg005310.html
2009-06-23 19:36:38 +00:00
ad d991fcb3b6 More changes to improve kern_descrip.c.
- Avoid atomics in more places.
- Remove the per-descriptor mutex, and just use filedesc_t::fd_lock.
  It was only being used to synchronize close, and in any case we needed
  to take fd_lock to free the descriptor slot.
- Optimize certain paths for the <NDFDFILE case.
- Sprinkle more comments and assertions.
- Cache more stuff in filedesc_t.
- Fix numerous minor bugs spotted along the way.
- Restructure how the open files array is maintained, for clarity and so
  that we can eliminate the membar_consumer() call in fd_getfile().  This is
  mostly syntactic sugar; the main functional change is that fd_nfiles now
  lives alongside the open file array.

Some measurements with libmicro:

- simple file syscalls are like close() are between 1 to 10% faster.
- some nice improvements, e.g. poll(1000) which is ~50% faster.
2009-05-24 21:41:25 +00:00
elad 863a01b5c1 Extract the open-coded authorization logic for chtimes() from various
file-systems and put it in a single function, genfs_can_chtimes().

This also makes UDF follow the same policy as all other file-systems.

Mailing list reference:

	http://mail-index.netbsd.org/tech-kern/2009/04/27/msg004951.html
2009-05-07 19:30:29 +00:00
elad 54bf8cc67a Add genfs_can_mount() and use it to prevent some more code duplication of
the security checks when mounting a device (VOP_ACCESS() + kauth(9) call)).

Proposed with no objections on tech-kern@:

	http://mail-index.netbsd.org/tech-kern/2009/04/20/msg004859.html

The vnode is always expected to be locked, so no locking is done outside
the file-system code.
2009-04-25 18:53:44 +00:00
rmind 440e5485e0 - Rearrange pg_delete() and pg_remove() (renamed pg_free), thus
proc_enterpgrp() with proc_leavepgrp() to free process group and/or
  session without proc_lock held.
- Rename SESSHOLD() and SESSRELE() to  to proc_sesshold() and
  proc_sessrele().  The later releases proc_lock now.

Quick OK by <ad>.
2009-04-25 15:06:31 +00:00
elad f68b0219b0 Per discussion on tech-kern@:
- Replace use of label/goto with returns

  - Rename, change prototype of, and move functions from vfs_subr.c to
    genfs_vnops.c
2009-04-22 22:57:08 +00:00
pooka 6d1ff74c7a Move genfs_null_putpages() from genfs_io.c to genfs_vnops.c -- it does
not really do i/o.
2009-04-18 15:40:33 +00:00
cegger b8817e4aed ansify function definitions 2009-03-15 17:14:40 +00:00
dsl 82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
dsl 454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
rmind e52fb16203 genfs_getpages: rework 1.18 revision - move uvm_pagermapout() back.
It is useful to make KVA available ASAP.  Per discussion with <yamt>.
2009-02-23 21:27:51 +00:00
rmind aa58fb8da4 sched_sync: syncer_data_lock is not released now (regression fix). 2009-02-22 22:26:53 +00:00
ad 59fcf21389 PR kern/26878 FFSv2 + softdep = livelock (no free ram)
PR kern/16942 panic with softdep and quotas
PR kern/19565 panic: softdep_write_inodeblock: indirect pointer #1 mismatch
PR kern/26274 softdep panic: allocdirect_merge: ...
PR kern/26374 Long delay before non-root users can write to softdep partitions
PR kern/28621 1.6.x "vp != NULL" panic in ffs_softdep.c:4653 while unmounting a softdep (+quota) filesystem
PR kern/29513 FFS+Softdep panic with unfsck-able file-corruption
PR kern/31544 The ffs softdep code appears to fail to write dirty bits to disk
PR kern/31981 stopping scsi disk can cause panic (softdep)
PR kern/32116 kernel panic in softdep (assertion failure)
PR kern/32532 softdep_trackbufs deadlock
PR kern/37191 softdep: locking against myself
PR kern/40474 Kernel panic after remounting raid root with softdep

Retire softdep, pass 2. As discussed and later formally announced on the
mailing lists.
2009-02-22 20:28:05 +00:00
ad 430f67aa17 PR kern/39564 wapbl performance issues with disk cache flushing
PR kern/40361 WAPBL locking panic in -current
PR kern/40361 WAPBL locking panic in -current
PR kern/40470 WAPBL corrupts ext2fs
PR kern/40562 busy loop in ffs_sync when unmounting a file system
PR kern/40525 panic: ffs_valloc: dup alloc

- A fix for an issue that can lead to "ffs_valloc: dup" due to dirty cg
  buffers being invalidated. Problem discovered and patch by dholland@.

- If the syncer fails to lazily sync a vnode due to lock contention,
  retry 1 second later instead of 30 seconds later.

- Flush inode atime updates every ~10 seconds (this makes most sense with
  logging). Presently they didn't hit the disk for read-only files or
  devices until the file system was unmounted. It would be better to trickle
  the updates out but that would require more extensive changes.

- Fix issues with file system corruption, busy looping and other nasty
  problems when logging and non-logging file systems are intermixed,
  with one being the root file system.

- For logging, do not flush metadata on an inode-at-a-time basis if the sync
  has been requested by ioflush. Previously, we could try hundreds of log
  sync operations a second due to inode update activity, causing the syncer
  to fall behind and metadata updates to be serialized across the entire
  file system. Instead, burst out metadata and log flushes at a minimum
  interval of every 10 seconds on an active file system (happens more often
  if the log becomes full). Note this does not change the operation of
  fsync() etc.

- With the flush issue fixed, re-enable concurrent metadata updates in
  vfs_wapbl.c.
2009-02-22 20:10:25 +00:00
plunky 767dc27ad2 add a comment re the vop (?) flag LAYERFS_MBYPASSDEBUG, that if set
could cause a bad pointer dereference in the debug printing when
credentials with values of NOCRED or FSCRED were passed to kauth.

I don't see any way to set such a flag, I think its just a debug
thing that could be enabled at compile time by somebody who knew
how, hence the comment rather than a real fix.
2009-02-14 17:29:11 +00:00
plunky cea3e862b4 consistency checks made inside #ifdef SAFETY should really
be #ifdef DIAGNOSTIC
2009-02-14 16:57:05 +00:00
plunky 821f05b0d3 While we remap credentials we should ignore cred == FSCRED as well as
cred == NOCRED.

This fixes a page fault occurring when a union is mounted over a umap,
as FSCRED is passed by union filesystem.
2009-02-13 22:29:00 +00:00
rmind 78a982c8f2 genfs_getpages: move putiobuf() and uvm_pagermapout() outside the glock.
OK by <ad>.
2009-02-04 20:32:19 +00:00
haad 07b62696b9 Add support for loading pseudo-device drivers. Try to autoload modules from
specs_open routine. If devsw_open fail, get driver name with devsw_getname
routine and autoload module.

For now only dm drivervcan be loaded, other pseudo drivers needs more work.

Ok by ad@.
2009-02-02 14:00:27 +00:00
yamt 812bb0d164 restore the pre socket locking patch signal behaviour.
this fixes a busy-loop in nfs_connect.
2009-01-21 06:59:29 +00:00
yamt cea19a4d14 malloc -> kmem_alloc. 2009-01-17 07:02:35 +00:00
yamt 09ff411cf6 - g/c stale function prototypes.
- rename UVM_PAGE_HASH_PENALTY to UVM_PAGE_TREE_PENALTY.
2009-01-16 02:33:14 +00:00
christos 8f9e04edea this change was somehow missed. 2009-01-11 03:16:33 +00:00
christos 461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
dholland 2bd5b48033 Clarify a comment 2009-01-03 04:38:07 +00:00
pooka 8583cae233 Rename specfs_lock as device_lock and move it from specfs to devsw.
Relaxes kernel dependency on vfs.
2008-12-29 17:41:18 +00:00
cegger 9b87d582bd kill MALLOC and FREE macros. 2008-12-17 20:51:31 +00:00
ad 49e50a21d6 PR kern/40110: null, overlay and umap modules loading -> panic (layerfs symbols not there)
Add a layerfs module.
2008-12-05 13:05:37 +00:00
joerg f5bbefdb21 Check that the filesystem acutally uses WAPBL before initiating a
transaction for the directio case. Fixes PR 39929 and similiar issues
seen with PostgreSQL.
2008-12-01 11:22:12 +00:00
pooka 010ce4930e more <sys/buf.h> police 2008-11-16 19:34:29 +00:00
christos 2a274197af - allocate 8 pointers on the stack to avoid stack overflow in nfs.
- make that 8 a constant
- remove bogus panic
2008-10-31 20:42:41 +00:00
hannken ac6b16172a Make genfs_directio() IO_JOURNALLOCKED aware. DirectIO no longer triggers
"locking against myself" panic in wapbl_begin().

Observed and tested by: Frank Kardel <kardel@netbsd.org>
2008-10-19 18:17:13 +00:00
hannken 44f3404f57 Break a deadlock where one thread has a wapbl transaction, calls VOP_GETPAGES
and wants to busy a page  while  another thread calls VOP_PUTPAGES on the same
vnode, takes pages busy and wants to start a wapbl transaction.

Reviewed by: Jason Thorpe <thorpej@netbsd.org>
2008-10-10 09:21:58 +00:00
skrll 81817d63bf PR/39324 kernel diagnostic assertion "l->l_stat != LSZOMB" failed.
Ignore procs with zero or all LSZOMB LWPs. Get a non-LSZOMB LWP to perform
operations against as part of the deal.

procfs really needs to be updated to support multi-threading fully.
Hi Antti!
2008-09-05 14:01:11 +00:00
skrll 006aadc921 ANSIfy 2008-09-05 13:21:12 +00:00
yamt 34272c569e remove always-true conditionals. 2008-08-14 00:47:13 +00:00
yamt 1907407b97 constify 2008-08-11 02:51:01 +00:00
apb 10c7b7cb02 #include <sys/tree.h> to get a definition for SPLAY_ENTRY.
Needed by third party code, such as lsof.
2008-08-01 16:55:48 +00:00
simonb 36d65f1138 Merge the simonb-wapbl branch. From the original branch commit:
Add Wasabi System's WAPBL (Write Ahead Physical Block Logging)
   journaling code.  Originally written by Darrin B. Jewell while
   at Wasabi and updated to -current by Antti Kantee, Andy Doran,
   Greg Oster and Simon Burge.

OK'd by core@, releng@.
2008-07-31 05:38:04 +00:00
christos b00559d07e use bufsize instead of BUFFERSIZE 2008-07-25 18:36:50 +00:00
christos 3bccc0f766 Handle files with a large number of mappings gracefully. Reported by Nicholas
Joly.
2008-07-25 17:40:24 +00:00
rmind 160268aca6 Remove proc_representative_lwp(), use a simple LIST_FIRST() instead.
OK by <ad>.
2008-07-02 19:49:58 +00:00
rumble 28f5ebd853 Create sysctl entries during module initialisation and destroy them
appropriately.

Many of these file systems are now ready for modularisation.
2008-06-28 01:34:05 +00:00
ad a8ced4f0d0 Set up the sysctl tree correctly when loaded as a file system. 2008-06-24 11:25:05 +00:00
ad a00bd89dab Replace references to getsock/getvnode. 2008-06-24 11:18:14 +00:00
ad 06c343ac94 vm_page: put TAILQ_ENTRY into a union with LIST_ENTRY, so we can use both. 2008-06-04 12:41:40 +00:00
ad 736a4d9b78 Kill devsw_lock and just use specfs_lock. The two would need merging
in order to prevent unload of modules when a device that they provide
is still open.
2008-05-31 21:34:42 +00:00
hannken 5d2bff060a Make sure all cached buffers with valid, not yet written data have been
run through copy-on-write.  Call fscow_run() with valid data where possible.

The LP_UFSCOW hack is no longer needed to protect ffs_copyonwrite() against
endless recursion.

- Add a flag B_MODIFY to bread(), breada() and breadn().  If set the caller
  intends to modify the buffer returned.

- Always run copy-on-write on buffers returned from ffs_balloc().

- Add new function ffs_getblk() that gets a buffer, assigns a new blkno,
  may clear the buffer and runs copy-on-write.  Process possible errors
  from getblk() or fscow_run().  Part of PR kern/38664.

Welcome to 4.99.63

Reviewed by: YAMAMOTO Takashi <yamt@netbsd.org>
2008-05-16 09:21:59 +00:00
reinoud e979c658c9 Import writing part of the UDF file system making optical media like CD's
and DVD's behave like floppy discs. Writing is supported upto and including
version 2.01; version 2.50 and 2.60 will follow.

Also extending the UDF implementation to support symbolic links and
hardlinks.

Added are the mmcformat(8) tool to format rewritable CD/DVD discs and
newfs_udf(8).

Limitations:
        all operations can be performed on the file system though the
        sheduling is currently optimised for archiving workloads.

        mv(1)/rename(2) is currently only implemented for non-directories.
2008-05-14 16:49:47 +00:00
simonb 2fd5130380 mnt_data is a pointer, set it to NULL not 0 when we're finished with it. 2008-05-13 08:31:12 +00:00
rumble a1221b6d4a Convert file systems to dynamically attach with the new module interface.
Make VFS hooks dynamic while we're here and say farewell to VFS_ATTACH and
VFS_HOOKS_ATTACH linksets.

As a consequence, most of the file systems can now be loaded as new style
modules.

Quick sanity check by ad@.
2008-05-10 02:26:09 +00:00
ad 42d0626726 PR kern/38141 lookup/vfs_busy acquire rwlock recursively
Simplify the mount locking. Remove all the crud to deal with recursion on
the mount lock, and crud to deal with unmount as another weirdo lock.

Hopefully this will once and for all fix the deadlocks with this. With this
commit there are two locks on each mount:

- krwlock_t mnt_unmounting. This is used to prevent unmount across critical
  sections like getnewvnode(). It's only ever read locked with rw_tryenter(),
  and is only ever write locked in dounmount(). A write hold can't be taken
  on this lock if the current LWP could hold a vnode lock.

- kmutex_t mnt_updating. This is taken by threads updating the mount, for
  example when going r/o -> r/w, and is only present to serialize updates.
  In order to take this lock, a read hold must first be taken on
  mnt_unmounting, and the two need to be held across the operation.

One effect of this change: previously if an unmount failed, we would make a
half hearted attempt to back out of it gracefully, but that was unlikely to
work in a lot of cases. Now while an unmount that will be aborted is in
progress, new file operations within the mount will fail instead of being
delayed. That is unlikely to be a problem though, because if the admin
requests unmount of a file system then s(he) has made a decision to deny
access to the resource.
2008-05-06 18:43:44 +00:00
ad e071d39c84 - Convert hashinit() to use kmem_alloc(). The hash tables can be large
and it's better to not have them in kmem_map.
- Convert a couple of minor items along the way to kmem_alloc().
- Fix some memory leaks.
2008-05-05 17:11:16 +00:00
ad 928a6b2096 PR kern/38135 vfs_busy/vfs_trybusy confusion
The previous fix worked, but it opened a window where mounts could have
disappeared from mountlist while the caller was traversing it using
vfs_trybusy(). Fix that.
2008-04-30 12:49:16 +00:00
ad e3610f1886 kern/38135 vfs_busy/vfs_trybusy confusion
The symptom was that sometimes file systems would occasionally not appear
in output from 'df' or 'mount' if the system was busy. Resolution:

- Make mount locks work somewhat like vm_map locks.
- vfs_trybusy() now only fails if the mount is gone, or if someone is
  unmounting the file system. Simple contention on mnt_lock doesn't
  cause it to fail.
- vfs_busy() will wait even if the file system is being unmounted.
2008-04-29 23:51:04 +00:00
ad baa3395f8f PR kern/38057 ffs makes assuptions about devvp file system
PR kern/33406 softdeps get stuck in endless loop

Introduce VFS_FSYNC() and call it when syncing a block device, if it
has a mounted file system.
2008-04-29 18:18:08 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
ad 284c2b9aef Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
2008-04-24 18:39:20 +00:00
ad 6d70f903e6 Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.
2008-04-24 15:35:27 +00:00
ad ef9411cb09 Fix locking in the fifo kqueue routines. 2008-04-24 15:18:11 +00:00