Commit Graph

162059 Commits

Author SHA1 Message Date
rumble f25f34f4c0 Don't explicitly set vp->v_size and then call uvm_vnp_setsize(). This is
not only unnecessary, but trips a kernel assertion introduced in r1.85 of
uvm/uvm_vnode.c.
2007-09-08 19:19:37 +00:00
rumble 0b6fb31125 In efs_readdir don't foolishly allocate and free dirents for each entry
before copying them out, rather just use a single one. Further, follow
the example of tmpfs and others by simply allocating on the stack.

This should have the side-effect of silencing false Coverity reports like
CID 4559 and 4554.
2007-09-08 18:17:59 +00:00
ober 062d98253b regen. added Intel Pro/Wifi 4965AGN 2007-09-08 16:39:27 +00:00
ober b72cf10513 Add definitions for Intel 4965AGN. 2007-09-08 16:38:28 +00:00
rumble df9eaeb9e0 CID 4553:
In efs_lookup, when checking whether a CREATE or RENAME operation would
succeed, be sure to pass the appropriate vnode pointer to VOP_ACCESS.
2007-09-08 16:21:27 +00:00
pooka 96b66ea698 Free pufbuf in error branches. CID: 4546 2007-09-08 15:49:33 +00:00
xtraeme 6f2d66f364 Don't forget to free sme_evdrv in non error case too. Noticed and
reviewed by rmind.
2007-09-08 15:47:37 +00:00
pooka 88f28c1eed honor LOCKLEAF in namei 2007-09-08 15:40:51 +00:00
pooka 584065ec56 Check against errors when reading trace device. CID 4561. 2007-09-08 15:34:23 +00:00
xtraeme 70a37300e4 Use only one single condvar(9) for devices and events, they are protected
by the same mutex (sme_mtx) and there's no point in using two of them.

Also add a comment mentioning some locking notes.

Reviewed and ok by rmind.
2007-09-08 15:25:18 +00:00
chris 5e02e37306 Fix bug which causes cats builds to not produce an a.out install kernels,
which are needed to boot from Cyclone firmware.

Bug reported on port-cats mailing list:
http://mail-index.netbsd.org/port-cats/2007/09/08/0000.html
2007-09-08 14:25:09 +00:00
gdt c6d3ad8ec3 enable cgd to reduce diffs to GENERIC 2007-09-08 12:11:58 +00:00
agc e0ef0e5000 Welcome to version 20070908 - multiple targets bug fix. 2007-09-08 09:52:20 +00:00
agc c11d4df578 Resurrect the port number argument to the iSCSI test harness. 2007-09-08 09:44:24 +00:00
plunky 086f1f09f5 fix misleading comment 2007-09-08 07:46:13 +00:00
dyoung 7cf94b5474 Rename gre_socreate1() -> gre_socreate(). 2007-09-08 04:34:02 +00:00
xtraeme 94b4332c25 Update a comment. 2007-09-08 03:42:20 +00:00
xtraeme c1594607bd Disable debug, committed accidentally in previous. 2007-09-08 03:41:28 +00:00
xtraeme cf08870553 Use a 2 seconds period to refresh sensor data, previous value wasn't
accepted and triggered an assertion.
2007-09-08 03:38:35 +00:00
xtraeme 83b57478ed sysmon_envsys_register: only call sme_event_unregister_all when any
other error than EEXIST is returned.
2007-09-08 03:37:51 +00:00
xtraeme 10fa1cb836 - Use only one global mutex for all tasks with devices & events.
- sysmon_envsys_register: use a SLIST to maintain allocated sme_event_drv_t
  structs for later use in sysmon_task_queue_sched(). This avoids a
  locking error acquiring/dropping the mutex multiple times.

Suggested by rmind.
2007-09-08 03:17:38 +00:00
xtraeme 8c48c47af5 Remove another COMPAT_40 block, found by rmind@. 2007-09-08 00:58:32 +00:00
xtraeme e193a16137 - Use a callout(9) to refresh sensor data each 1.5 seconds, respecting
the limit in some LM chips.
- Add the lm_detach() function that stops/destroys the callout and
  unregisters the driver from the sysmon_envsys(9) framework.
2007-09-08 00:42:11 +00:00
xtraeme 28abae783c Add the detach method that calls driver's lm_detach() function and
unmaps the I/O space used.
2007-09-08 00:39:48 +00:00
xtraeme 515802b6b0 Fix previous. 2007-09-08 00:30:54 +00:00
xtraeme b60ffc9079 Print the error of sysmon_envsys_register() if it fails. 2007-09-08 00:23:46 +00:00
xtraeme a880528756 - Build unconditionally compatibility code, there's no point to have it
disabled, because some drivers depend in the old code yet.
- Use a new mutex for sysmon_envsys_next_sensor_index (used in
  compatibility code), otherwise bad things happen with LKMs. Thanks
  to this, the hack for LKMs has been removed.
- Check in advance if the driver doesn't exist already on the list
  before adding the sensors in the dictionary.
- Don't forget to call sme_event_unregister_all() if
  sysmon_envsys_unregister() fails after adding the array into the global
  dictionary or when creating sensors.
- Modify and add some DPRINTFs.

The lm(4) lkm works without known problems registering and unregistering
it multiple times.
2007-09-08 00:21:43 +00:00
xtraeme 93aefe8737 - sme_event_unregister_all: check if sme_events_initialized is set
before calling sme_events_destroy().
- sme_event_worker: remove a KASSERT and always check if returned sme
  is NULL and do not continue the task.
2007-09-07 23:28:33 +00:00
tnn 592c250391 First part of ti(4) overhaul:
- Sanitise macros
- Apply KNF
Should have no functional changes.
2007-09-07 23:05:27 +00:00
plunky c212c4900f move the HID processing defs to a higher context, since it is used by
bluetooth and USB code.
2007-09-07 20:17:37 +00:00
xtraeme 7c46a42d68 s/ENVSYS_FMONDRVSTATE/ENVSYS_FMONSTCHANGED/ 2007-09-07 19:58:06 +00:00
rmind d4ec323e32 Added support for POSIX message queues.
Welcome to NetBSD 4.99.31!
2007-09-07 19:21:41 +00:00
rmind 4492a08ad7 Regen syscalls. 2007-09-07 18:58:46 +00:00
rmind 2cecf9bbe9 Implementation of POSIX message queues.
Reviewed by: <ad>, <tech-kern>
2007-09-07 18:56:02 +00:00
plunky 0d2b4f91b7 add new option 'rssi' to enable/disable inquiry results with RSSI, and
add recognition of the "inquiry result with RSSI" packets
2007-09-07 18:40:01 +00:00
plunky 9ab5b2f6b0 add event processing for "Inquiry result with RSSI", and modify the memo
contents so that this will fit.
2007-09-07 18:37:30 +00:00
plunky ef349c282b adjust typedef name for consistency with other parts, since hci_rssi_response
is only a packet segment it should not be in _ep namespace.
2007-09-07 18:14:33 +00:00
wiz 760a199b41 XFree86-4.7.0 has been out for about a month. 2007-09-07 15:43:44 +00:00
ad e2b4d9fba5 libpthread: scalability and performance enhancements. The MySQL
sysbench benchmark in read-only mode now scales to 900
                simultaneous client threads on a 4xCPU i386 system before
                serious performance drop-off occurs. [ad 20070907]
2007-09-07 14:22:13 +00:00
ad 8ccc6e060d - Don't take the mutex's spinlock (ptr_interlock) in pthread_cond_wait().
Instead, make the deferred wakeup list a per-thread array and pass down
  the lwpid_t's that way.

- In pthread_cond_wait(), take the mutex before dealing with early wakeup.
  In this way there should never be contention on the CV's spinlock if
  the app follows POSIX rules (there should only be contention on the
  user-provided mutex).

- Add a port of the kernel's rwlocks. The rwlock's spinlock is only taken if
  there is contention. This is enabled where atomic ops are available. Right
  now that is only i386 and amd64 because I don't have other hardware to
  test with. It's trivial to add stubs for other architectures as long as
  they have compare-and-swap. When we have proper atomic ops the old rwlock
  code can be removed.

- Add a new mutex implementation that's similar to the kernel's mutexes, but
  uses compare-and-swap to maintain the waiters list, so no spinlocks are
  involved. Same caveats apply as for the rwlocks.
2007-09-07 14:09:27 +00:00
cube c86250575e Regen. 2007-09-07 13:51:14 +00:00
cube 2e3ad4c57d Add EVE. 2007-09-07 13:50:43 +00:00
lukem c3484cafd1 Change AMIGA to just include GENERIC and disable the DraCo stuff. 2007-09-07 12:53:40 +00:00
lukem 2c4f38e052 Fix caddr_t fallout; use "uint8_t *" as the type for sc_intack because that
seems it will result in the closest behaviour to that of the caddr_t
abusing code (which did, amongst other things, " *sc->sc_intack = 0; ".)
2007-09-07 10:34:58 +00:00
lukem 2ca22235a0 Change WSCONS to just include GENERIC, enable wscons devices,
and disable conflicting other-style console devices.
2007-09-07 10:08:35 +00:00
tron 6dda4e3f48 Use poll(2) to wait for rnd(4). The initialisation of OpenSSL's RNG
now works reliably if the first FD_SETSIZE file descriptors are in use.
2007-09-07 08:10:00 +00:00
lukem b698472136 Provide 'do-libgcc' to build gnu/lib/crtstuff${LIBGCC_EXT} (if necessary)
and then gnu/lib/libgcc${LIBGCC_EXT}.
Makes it easier to cut&paste from the list of targets built with 'make build'.
2007-09-07 04:20:44 +00:00
ad a6ed47a549 Add: pthread__atomic_cas_ptr, pthread__atomic_swap_ptr, pthread__membar_full
This is a stopgap until the thorpej-atomic branch is complete.
2007-09-07 00:24:56 +00:00
ad c67dc640cd If a libpthread internal spinlock is held, nanosleep() for a tick instead of
yielding. This is a nasty band-aid but with many threads, looping over
sched_yield() wastes a huge amount of CPU time. It would be nice to have a
way to temporarily disable preemption, but it turns out that's yet another
no-brain concept that has been patented and the patent holder seems to be
suing people lately. Another alternative is probably to have kernel-assisted
spinlocks.
2007-09-07 00:07:54 +00:00
ad 513227e941 - Fix sleepq_block() to return EINTR if the LWP is cancelled. Pointed out
by yamt@.

- Introduce SOBJ_SLEEPQ_LIFO, and use for LWPs sleeping via _lwp_park.
  libpthread enqueues most waiters in LIFO order to try and wake LWPs that
  ran recently, since their working set is more likely to be in cache.
  Matching the order of insertion reduces the time spent searching queues
  in the kernel.

- Do not boost the priority of LWPs sleeping in _lwp_park, just let them
  sleep at their user priority level. LWPs waiting for some I/O event in
  the kernel still wait with kernel priority and get woken more quickly.
  This needs more evaluation and is to be revisited, but the effect on a
  variety of benchmarks is positive.

- When waking LWPs, do not send an IPI to remote CPUs or arrange for the
  current LWP to be preempted unless (a) the thread being awoken has kernel
  priority and has higher priority than the currently running thread or (b)
  the remote CPU is idle.
2007-09-06 23:58:56 +00:00