Commit graph

121471 commits

Author SHA1 Message Date
Jason Evans b97aec1d61 If no coalesced exact-fit small regions are available, but delayed exact-
fit regions are available, use the delayed regions in LIFO order, in order
to increase locality of reference.  We might expect this to cause delayed
regions to be removed from the delay ring buffer more often (since we're
now re-using more recently buffered regions), but numerous tests indicate
that the overall impact on memory usage tends to be good (reduced
fragmentation).

Re-work arena_frag_reg_alloc() so that when large free regions are
exhausted, it uses small regions in a way that favors contiguous allocation
of sequentially allocated small regions.  Use arena_frag_reg_alloc() in
this capacity, rather than directly attempting over-fitting of small
requests when no large regions are available.

Remove the bin overfit statistic, since it is no longer relevant due to
the arena_frag_reg_alloc() changes.

Do not specify arena_frag_reg_alloc() as an inline function.  It is too
large to benefit much from being inlined, and it is also called in two
places, only one of which is in the critical path (the other call bloated
arena_reg_alloc()).

Call arena_coalesce() for a region before caching it with
arena_mru_cache().

Add assertions that detect the attempted caching of adjacent free regions,
so that we notice this problem when it is first created, rather than in
arena_coalesce(), when it's too late to know how the problem arose.

Reported by:    Hans Blancke
2006-01-25 04:21:22 +00:00
Stephan Uphoff 6807424d19 Back out changes made in rev. 1.151.
They were bogus.

Cluebat applied by: jhb@
2006-01-25 02:05:47 +00:00
Don Lewis f4af687a3b Touch all the pages wired by sysctl_wire_old_buffer() to avoid PTE
modified bit emulation traps on Alpha while holding locks in the
sysctl handler.

A better solution would be to pass a hint to the Alpha pmap code to
tell mark these pages as modified when they as they are being wired,
but that appears to be more difficult to implement.

Suggested by: jhb
MFC after:	3 days
2006-01-25 01:03:34 +00:00
John Baldwin 67f7fe8c01 Whitespace fix. 2006-01-24 22:24:05 +00:00
John Baldwin 2b604e82b2 - Add a new KTR_SUBSYS in place of KTR_SPARE1 to serve as a subsystem
placeholder similar to KTR_DEV.  Explain the use of KTR_DEV and
  KTR_SUBSYS in a comment as well.
- Retire KTR_WITNESS and instead have KTR_WITNESS default to off but use
  KTR_SUBSYS if it is enabled.
2006-01-24 22:23:45 +00:00
Doug Ambrisko 084500bc13 Add in the Linux IOCTL shim and create the megadev0 device so
Linux LSI MegaRaid tools can run on FreeBSD until Linux emulation.

Add in the Linux IOCTL shim and create the megadev0 device so
Linux LSI MegaRaid tools can run on FreeBSD until Linux emulation.

Add glue to build the modules but don't tie it into the build
yet until I test it from the CVS repo. via the mirror on an
amd64 machine.

Tie this into the Linux32 emulation on amd64 so the tools can
run on amd64 kernel.

Cleaned up by:	ps (amr_linux.c)
2006-01-24 21:13:50 +00:00
Alan Cox 39fd9b639f With the recent changes to the implementation of page coloring, the
the option PQ_NOOPT is used exclusively by vm_pageq.c.  Thus, the
include of opt_vmpage.h can be removed from vm_page.h.
2006-01-24 19:24:54 +00:00
Alexander Leidinger 77a1d1e153 As a quick fix disable the update of the linux ld.so.cache file, since
currently it grabs some FreeBSD native libs too.

A final solution is under discussion with brooks.
2006-01-24 18:58:48 +00:00
Andre Oppermann ab48768b20 When doing IP forwarding with [FAST_]IPSEC compiled into the kernel
ip_forward() would report back a zero MTU in ICMP needfrag messages
because on a IPSEC SP lookup failure no MTU got computed.

Fix this by changing the logic to compute a new MTU in any case if
IPSEC didn't do it.

Change MTU computation logic to use egress interface MTU if available
or the next smaller MTU compared to the current packet size instead
of falling back to a very small fixed MTU.

Fix associated comment.

PR:		kern/91412
MFC after:	3 days
2006-01-24 17:57:19 +00:00
Andre Oppermann 1dec73a153 In ip_mdq() compute the TV_DELTA the correct way around.
PR:		kern/91851
Submitted by:	SAKAI Hiroaki <sakai.hiroaki-at-jp.fujitsu.com>
MFC after:	3 days
2006-01-24 17:09:12 +00:00
Andre Oppermann 31343a3da2 In in_control() remove the temporary in_ifaddr structure from the
ia_hash only if it actually is an AF_INET address.  All other places
test for sa_family == AF_INET but this one.

PR:		kern/92091
Submitted by:	Seth Kingsley <sethk-at-meowfishies.com>
MFC after:	3 days
2006-01-24 16:19:31 +00:00
Pawel Jakub Dawidek 093a8c9e1b s/<space><tab>/<tab>/ 2006-01-24 15:26:36 +00:00
Pawel Jakub Dawidek 219d40fbb1 The 'reload' command did the same as 'restart' command.
Allow user to decide if SAD and SPD entries should be flushed on 'reload'.
With this change flush/spdflush is not done automatically (it could still
be done from ipsec.conf).
2006-01-24 15:16:55 +00:00
Pawel Jakub Dawidek 76098314b0 Remove stale comment.
This change should be made in rev1.9.

MFC after:	1 week
2006-01-24 15:12:44 +00:00
Pawel Jakub Dawidek 2d7b446560 Use $ipsec_file instead of hardcoded /etc/ipsec.conf.
This change should be made in rev1.2.

MFC after:	1 week
2006-01-24 15:11:11 +00:00
Oleg Bulyzhin 44a515834f Fix minor bug in uRPF:
If net.link.ether.inet.useloopback=1 and we send broadcast packet using our
  own source ip address it may be rejected by uRPF rules.

  Same bug was fixed for IPv6 in rev. 1.115 by suz.

PR:		kern/76971
Approved by:	glebius (mentor)
MFC after:	3 days
2006-01-24 13:38:06 +00:00
Søren Schmidt 634c377652 Do not test for DMA status on legacy ATA devices. This has the unfortunate
side effect that legacy ATA controllers at irq14 and irq15 cannot share
interrupts with anything else without major problems.
This fixes the ATAPI DMA problems some systems/devices have seen.
2006-01-24 12:34:56 +00:00
Gleb Smirnoff 0b4ae859ac Implement 'ipfw fwd laddr,port' feature for UDP. According to ipfw(8)
it should work, however it never did. People expect it to work.

PR:		kern/90834
2006-01-24 09:08:54 +00:00
David Xu 1aa4c324ee Add locking annotation and comments about socket, pipe, fifo problem.
Temporarily fix a locking problem for socket I/O.
2006-01-24 07:24:24 +00:00
Alan Cox fc3c1bc471 In vm_page_set_invalid() invalidate all of the page's mappings as soon as
any part of the page's contents is invalidated.

Submitted by: tegge
2006-01-24 07:21:38 +00:00
Brooks Davis c283464ab7 s/predefine/predefined/
PR:		gnu/86627
Submitted by:	Arne Woerner <arne_woerner at yahoo dot com>
MFC After:	6 days
2006-01-24 06:38:35 +00:00
Brooks Davis b0864f3a7d Give the TIMEOUT case a chance to work by using -t # instead of the
OpenBSD -w # when invoking ping.

PR:		bin/92187
Submitted by:	"Shin'ya Kumabuchi" <kumabu at t3 dot rim dot or dot jp>
MFC After:	6 days
2006-01-24 06:11:55 +00:00
David Xu e6bdc05ff7 Er, rescure a deleted comment line. 2006-01-24 02:50:42 +00:00
David Xu bd793be3c6 More cleanup for aio code:
1) unregsiter kqueue filter for EVFILT_LIO.
2) free uma_zones.
3) call setsid directly to enter another session rather than
   implementing by itself.

Submitted by: jhb
2006-01-24 02:46:15 +00:00
Ariff Abdullah 14665331ab channel.c:
(1) Fix DMA alignment, based on bytes per sample.

feeder_rate.c:
	Handle strayed bytes (mostly caused by #1) better.

This DMA alignment issues are extremely hard to reproduce unless
the user happen to have a 32bit capable soundcards (ATI IXP) and
knowledgeable enough to force it to operate under pure 32bit
operations on both record and play directions.
2006-01-24 01:10:07 +00:00
David Xu 7f34b521c7 Add bracket. 2006-01-23 23:46:30 +00:00
John Baldwin 704c9f00fb Fix a vnode reference leak in the ktrace code. We always grab a reference
to the vnode at the start of ktr_writerequest() but were missing the
corresponding vrele() after we finished the write operation.

Reported by:	jasone
2006-01-23 21:45:32 +00:00
Tom Rhodes 129518ec2c Revert my previous commit.
Proved I'm not that bright at times:	jhb
2006-01-23 21:06:22 +00:00
Sam Leffler e99662a623 s/w beacon miss facility; need to add knobs to fiddle with the settings
MFC after:	2 weeks
2006-01-23 21:02:49 +00:00
Sam Leffler b99190971f track bmiss threshold change from time to frame count 2006-01-23 20:58:05 +00:00
Sam Leffler 233e00212e switch beacon miss threshold from a time to the number of beacon
frames; the time value was implicitly based on the beacon interval
but never being updated so wrong when the negotiated beacon interval
was not 100 TU
2006-01-23 20:57:30 +00:00
Gleb Smirnoff 1c0b0f523d Fix build. 2006-01-23 20:10:49 +00:00
Sam Leffler 336ec6a116 bounds check each ie's length when parsing
Obtained from:	madwifi
MFC after:	1 week
2006-01-23 19:31:00 +00:00
Stephan Uphoff 03001f59c8 Hopefully fix the "calcru: runtime went backwards from ..." problem by
keeping the resource values locked (where needed) while we use them
for calculations.

MFC after:	3 days
2006-01-23 19:15:13 +00:00
Tom Rhodes 9fc31f8a5f Update incorrect comments here, there should not be a call to panic()
over fs corruption.

Discussed with:	alfred, phk
2006-01-23 17:45:57 +00:00
Tom Rhodes cb5c1ec725 Fix indentation.
Prodded by:	stefanf, ru, njl (in that order)
2006-01-23 17:41:43 +00:00
Andre Oppermann 06003a1e7c Simplify ip_next_mtu() and make its logic more easy to see while
silencing code analysis tools.

Found by:	Coverity Prevent(tm)
Coverity ID:	CID341
Sponsored by:	TCP/IP Optimization Fundraise 2005
2006-01-23 17:06:32 +00:00
Gleb Smirnoff c3a5675226 Use m_getcl() instead of getting mbuf, and then getting a cluster. 2006-01-23 15:57:02 +00:00
Andre Oppermann fd2413398c In mb_zinit_pack() explicitly ignore the return value of uma_zalloc_arg().
The success of the cluster allocation is checked through a field in the
mbuf structure.  This change is non-functional but properly silences code
inspection tools.

Found by:	Coverity Prevent(tm)
Coverity ID:	CID807
Sponsored by:	TCP/IP Optimization Fundraise 2005
2006-01-23 15:49:01 +00:00
Stephan Uphoff 3753c2c3f1 Fix race conditions.
Tested by:	kris@
MFC after:      3 days
2006-01-23 15:46:09 +00:00
Olivier Houchard 2eff8c6814 Donc recompute the io port address if it's already the good one. 2006-01-23 14:03:14 +00:00
Xin LI 50385af97a An old patch from Dan Lukes <dan at obluda.cz>:
+ Include netinet/in.h for ntohl()
 * Since the return value was tested separately, cast the values to
   size_t in order to shut up compiler warnings.
 + Raise WARNS= level to 6

PR:	bin/71666
2006-01-23 13:55:32 +00:00
John Hay 23639a23a8 Add AfriNIC as a RIR.
PR:		80421
Submitted by:	Adrian Frith <adrian at frith.homelinux.org>
MFC after:	6 days
2006-01-23 13:49:39 +00:00
Joel Dahl ae75448fcd Sort list of modules.
Approved by:	ariff
2006-01-23 11:58:01 +00:00
Yaroslav Tykhiy 83ec464f61 Be consistent in checking ifa->ifa_addr for NULL.
Found by:	Coverity Prevent (tm)
MFC after:	3 days
2006-01-23 10:30:34 +00:00
Gleb Smirnoff 205aefa363 Simplify ng_source_send() removing temporary queue and merging two
cycles into one.
2006-01-23 10:28:04 +00:00
David Xu 68d7111884 Verify all supported notification types. 2006-01-23 10:27:15 +00:00
Søren Schmidt 247c37e782 Update copyright header to match rest of ATA. 2006-01-23 08:49:50 +00:00
Matt Jacob e526523707 First of several commits as this driver is dusted off and maybe brought
up to date.  Principle changes for this reelase is to support 2K Port Login
firmware. This allows us to support the 2322 (and 2422 4Gb) cards which only
come with the 2K Port Login firmware. The 2322 should now work- but we don't
have firmware sets for it in ispfw (as the change to load 2K Port Login f/w
hasn't been made- that f/w is so big it has to be loaded in more than one
chunk).

Other changes are the beginnings of cleaning up some long standing target
mode issues. The next changes here will incorporate a lot of bug fixes
from others.

Finally, some copyright cleanup and attempts to make the parts of the
driver that are FreeBSD specific start conforming more to FreeBSD style.

MFC after:	1 month
2006-01-23 06:23:37 +00:00
David Xu 5f9df00649 Add missing symbol pthread_set_name_np. 2006-01-23 06:11:23 +00:00