Commit Graph

130415 Commits

Author SHA1 Message Date
Ruslan Ermilov
7b6b0e6d24 Fix panic on boot caused by setting up a NULL interrupt handler.
Submitted by:	Goran Gajic
Pointy hat to:	piso
2007-02-28 05:29:23 +00:00
Pawel Jakub Dawidek
1d1f5f8560 Add a comment for PRIV_NET_SETLLADDR.
OK'ed by:	rwatson
2007-02-27 23:38:58 +00:00
Greg Lehey
8866174561 Furhter clarifications:
- the issues with wakeup_one are due to address space clashes between
  unrelated groups of threads.
- sleep() was removed in FreeBSD 2.2.
- date the page today, not 4 days ago.
- replace grammatically correct "woken" with "woken up" for
  consistency with the function name.
2007-02-27 23:09:31 +00:00
Warner Losh
76ddd31f5a Some USB mass storage devices return the number of sectors in response
to a READ_CAPACITY request rather than the maximum sector (off by one
problem).  This causes a huge cascade of errors as the geom tasting
code tries to read the last sector (which isn't really there in the
face of this error).  automated tools that manipulate disk labels and
such also have issues.

Create a new quirk READ_CAPACITY_OFFBY1 and add a quirk for the
SanDISK ImageMate that I have that suffers from this problem (the
SDDR-31).  It intercepts the READ_CAPACITY response and adjusts it
from number of sectors to max sector for devices with this quirk.

Reading the Linux source suggests that there are a host of
other devices with this issue, including iPods and some popular
cameras.  I've not added quirks for them, since I don't have the
devices in front of me to test.
2007-02-27 22:33:50 +00:00
Warner Losh
9995cc7a29 Entries sorted by id number, not name 2007-02-27 22:27:53 +00:00
John Baldwin
8db5fc58ff Use pause() in vm_object_deallocate() to yield the CPU to the lock holder
rather than a tsleep() on &proc0.  The only wakeup on &proc0 is intended
to awaken the swapper, not random threads blocked in
vm_object_deallocate().
2007-02-27 19:40:26 +00:00
John Baldwin
1a4435ee0e Print tid's rather than thread pointers in KTR_PROC traces. 2007-02-27 18:46:07 +00:00
John Baldwin
3d4c1b5744 Use taskqueue_drain() to wait for any pending tasks to complete rather
than just pausing for a second.
2007-02-27 18:45:37 +00:00
John Baldwin
8410d79dd1 Use pause() instead of tsleep()'s on the softc pointer that have no
corresponding wakeups.  Also, at least some of the comments nearby indicate
that these are fixed-length I/O sleeps.
2007-02-27 17:27:23 +00:00
John Baldwin
4d70511ac3 Use pause() rather than tsleep() on stack variables and function pointers. 2007-02-27 17:23:29 +00:00
John Baldwin
84d37a463a Use pause() rather than tsleep() on explicit global dummy variables. 2007-02-27 17:22:30 +00:00
John Baldwin
f36511e7f8 Use pause() rather than using tsleep() on a dummy variable. 2007-02-27 17:19:33 +00:00
John Baldwin
5f6fcd82a2 Always protect the kthread flags with the lock and close a race with
module unload and kthread_exit().

MFC after:	3 days
2007-02-27 17:16:52 +00:00
John Baldwin
552e9b06bb Use tsleep() rather than msleep() with a NULL mtx. 2007-02-27 17:15:39 +00:00
Sam Leffler
e5f015499d o consistently check strlcpy result
o warn when we skip an interface because it's name is too long
2007-02-27 17:11:18 +00:00
Paolo Pisati
f2d619c8b1 Do not execute filter only handlers in ithread_execute_handlers():
this fixes the panics when filter only and ithread only handlers where
sharing the same irq .
2007-02-27 17:09:20 +00:00
Sam Leffler
0b28f08125 correct type to silence const complaint 2007-02-27 17:03:22 +00:00
Sam Leffler
30705853b0 unbreak create operation, must copy argument to global name
Spotted by:	des
2007-02-27 17:00:59 +00:00
Florent Thoumie
4af453db2c Fix obvious typo (use long name if short name isn't provided).
Reviewed by:	sam
MFC after:	3 days
2007-02-27 16:52:27 +00:00
John Baldwin
a198b356e5 In FreeBSD 5.x+, sleep/wakeup operate on threads, not processes. 2007-02-27 16:32:55 +00:00
Ruslan Ermilov
7700fc3ca9 Fix markup and grammar bugs in recent revisions. 2007-02-27 16:21:01 +00:00
Ruslan Ermilov
66fd908b84 Remove a (harmless) stray backslash. 2007-02-27 16:13:19 +00:00
Paolo Pisati
fe59e41138 Add proper return codes to zs_intr() filter, and fix accordinlgly zs_intr()
prototype.
2007-02-27 15:31:11 +00:00
Bruce M Simpson
ad3b9f70ed Add INADDR_ALLRPTS_GROUP define for 224.0.0.22 for future IGMPv3 support.
Obtained from:	OpenSolaris
2007-02-27 14:45:37 +00:00
Nick Hibma
f30112ba16 Make hosts.allow point to hosts_options instead.
Requested by: 	ru
2007-02-27 14:22:07 +00:00
Paolo Pisati
2e35649225 Correct return code (int) for at91_rtc_intr() prototype.
Approved by: cognet
2007-02-27 13:39:34 +00:00
Dag-Erling Smørgrav
9c827cecbd Clean the lib32 object directory with cleandir rather than rm -rf.
Discussed with:	ru
MFC after:	2 weeks
2007-02-27 13:02:29 +00:00
Ruslan Ermilov
5897a066d9 Fix markup. 2007-02-27 12:06:02 +00:00
Dag-Erling Smørgrav
1db3766d66 Add GEOM_MULTIPATH so LINT will build.
Pointy hat to:	mjacob
2007-02-27 12:05:25 +00:00
Ruslan Ermilov
6f000336cd Fix markup. 2007-02-27 11:25:58 +00:00
Thomas Quinot
4647ebfc01 (cam_rescan): Do not reference ccb->ccb_h.path in CAM_DEBUG call before
it is initialized; use path instead.

This change fixes a panic when using atapicam in conjunction with CAMDEBUG,
which has been described under kern/103602.

Thanks to Josh Carroll <josh.carroll@gmail.com> for providing the traces
that allowed identifying this problem.

PR:		kern/103602
MFC after:	1 week
2007-02-27 09:00:51 +00:00
Alex Dupre
65835cf341 Call the multipath device with its real name. 2007-02-27 08:56:11 +00:00
Christian Brueffer
eb6cb8953e First cleanup pass: new sentence -> new line, typos fixed, some markup
errors fixed.
2007-02-27 07:53:20 +00:00
Kirk McKusick
34505cb376 KASSERT fails when the condition is false, not when it is true. 2007-02-27 07:34:28 +00:00
Matt Jacob
a5e9bfc6f9 Add a man page. 2007-02-27 07:29:15 +00:00
Kirk McKusick
3ec818266f Fix an error in dumping large sparse files containing extended attributes. 2007-02-27 07:28:17 +00:00
Kip Macy
f183910b97 Further improvements to LOCK_PROFILING:
- Fix missing initialization in kern_rwlock.c causing bogus times to be collected
 - Move updates to the lock hash to after the lock is released for spin mutexes,
   sleep mutexes, and sx locks
 - Add new kernel build option LOCK_PROFILE_FAST - only update lock profiling
   statistics when an acquisition is contended. This reduces the overhead of
   LOCK_PROFILING to increasing system time by 20%-25% which on
   "make -j8 kernel-toolchain" on a dual woodcrest is unmeasurable in terms
   of wall-clock time. Contrast this to enabling lock profiling without
   LOCK_PROFILE_FAST and I see a 5x-6x slowdown in wall-clock time.
2007-02-27 06:42:05 +00:00
Greg Lehey
fc5fe41fe9 Update HISTORY.
Reviewed by:	dmr
2007-02-27 05:39:22 +00:00
Bruce Evans
b6c86f4b1e Fixed some style bugs (whitespace lossage for removal of __P(()), and
lots of naming and typing errors involving `interval').
2007-02-27 05:10:36 +00:00
Bruce Evans
93547b07b9 Use a periodic itimer instead of repeated calls to alarm() in
sidewaysintpr().  This increases the accuracy of the per-interval
counts when they are interpreted as rates.  Repeated calls to alarm(n)
give an average interval that is about 2 ticks larger than n and has
a large variance.  Periodic itimers normally get the average almost
right but have similarly large variance (due to scheduling delays).

Statistics utilities should use clock_gettime() to determine the
actual interval, but it is still useful to maximize the accuracy of
the interval, especially for cases like netstat -w where counts are
displayed so the program cannot hide the inaccuracy in a rate
conversion.
2007-02-27 04:54:33 +00:00
Matt Jacob
e770bc6bf5 First cut at GEOM based multipath. This is an active/passive{/passive...}
arrangement that has no intrinsic internal knowledge of whether devices
it is given are truly multipath devices. As such, this is a simplistic
approach, but still a useful one.

The basic approach is to (at present- this will change soon) use camcontrol
to find likely identical devices and and label the trailing sector of the
first one. This label contains both a full UUID and a name. The name is
what is presented in /dev/multipath, but the UUID is used as a true
distinguishor at g_taste time, thus making sure we don't have chaos
on a shared SAN where everyone names their data multipath as "Fred".

The first of N identical devices (and N *may* be 1!) becomes the active
path until a BIO request is failed with EIO or ENXIO. When this occurs,
the active disk is ripped away and the next in a list is picked to
(retry and) continue with.

During g_taste events new disks that meet the match criteria for existing
multipath geoms get added to the tail end of the list.

Thus, this active/passive setup actually does work for devices which
go away and come back, as do (now) mpt(4) and isp(4) SAN based disks.

There is still a lot to do to improve this- like about 5 of the 12
recommendations I've received about it,  but it's been functional enough
for a while that it deserves a broader test base.

Reviewed by: pjd
Sponsored by: IronPort Systems
MFC: 2 months
2007-02-27 04:01:58 +00:00
Greg Lehey
5af924bf6c Add warning about deadlocks created by use of wakeup_one. 2007-02-27 02:51:41 +00:00
Jung-uk Kim
6a5964d385 MFP4: 115094
Linux does not check file descriptor when MAP_ANONYMOUS is set.
This should fix recent LTP test regressions.

Reported by:	Scot Hetzel (swhetzel at gmail dot com)
		netchild
2007-02-27 02:08:01 +00:00
Pawel Jakub Dawidek
3ad48efa4a Replace spaces with tabs in some places. 2007-02-27 01:48:58 +00:00
Nate Lawson
ef2374f700 Rework EC I/O approach. Implement burst mode, including proper handling of
case where it asynchronously exits burst mode on its own.  Handle different
values of hz in sleep loop.  Provide more debugging options to tune EC
behavior.  These tunables/sysctls may be temporary and are not for user
access if the EC is working properly.  Burst mode is now on by default for
testing and the poll interval has been increased from 100 to 500 us and
total timeout from 100 to 500 ms.

Hopefully this should be the first step of addressing reports of timeout
errors during battery or thermal access, especially on HP/Compaq laptops.
It is reasonably stable and should not cause a loss of functionality or
performance on systems that were previously working.  Testing shows an
increase of responsiveness by ~75% on one system.

PR:		kern/98171
2007-02-27 00:14:20 +00:00
Mohan Srinivasan
7c72af8770 Reap FIN_WAIT_2 connections marked SOCANTRCVMORE faster. This mitigate
potential issues where the peer does not close, potentially leaving
thousands of connections in FIN_WAIT_2. This is controlled by a new sysctl
fast_finwait2_recycle, which is disabled by default.

Reviewed by: gnn, silby.
2007-02-26 22:25:21 +00:00
Jung-uk Kim
560a54e10c Add three new ioctl(2) commands for bpf(4).
- BIOCGDIRECTION and BIOCSDIRECTION get or set the setting determining
whether incoming, outgoing, or all packets on the interface should be
returned by BPF.  Set to BPF_D_IN to see only incoming packets on the
interface.  Set to BPF_D_INOUT to see packets originating locally and
remotely on the interface.  Set to BPF_D_OUT to see only outgoing
packets on the interface.  This setting is initialized to BPF_D_INOUT
by default.  BIOCGSEESENT and BIOCSSEESENT are obsoleted by these but
kept for backward compatibility.

- BIOCFEEDBACK sets packet feedback mode.  This allows injected packets
to be fed back as input to the interface when output via the interface is
successful.  When BPF_D_INOUT direction is set, injected outgoing packet
is not returned by BPF to avoid duplication.  This flag is initialized to
zero by default.

Note that libpcap has been modified to support BPF_D_OUT direction for
pcap_setdirection(3) and PCAP_D_OUT direction is functional now.

Reviewed by:	rwatson
2007-02-26 22:24:14 +00:00
Robert Watson
e7c33e29ed Revise locking strategy used for UNIX domain sockets in order to improve
concurrency:

- Add per-unpcb mutexes protecting unpcb connection state, fields, etc.

- Replace global UNP mutex with a global UNP rwlock, which will protect the
  UNIX domain socket connection topology, v_socket, and be acquired
  exclusively before acquiring more than per-unpcb at a time in order to
  avoid lock order issues.

In performance measurements involving MySQL, this change has little or no
overhead on UP (+/- 1%), but leads to a significant (5%-30%) improvement in
multi-processor measurements using the sysbench and supersmack benchmarks.

Much testing by:	kris
Approved by:		re (kensmith)
2007-02-26 20:47:52 +00:00
John Baldwin
c0e767f9dd Use NULL rather than 0 for various pointer constants. 2007-02-26 19:28:18 +00:00
Robert Watson
149b6b0b12 Add rw_wowned(9) symlink. 2007-02-26 19:09:36 +00:00