Commit Graph

127968 Commits

Author SHA1 Message Date
Ruslan Ermilov
957d7c8f9c Remove the -C option as it does more harm than good. To be fully
compatible, it would have to (at least):

- support the "compat-compat" -T option,
- *not* support the -l, -O, and -v options,
- default to soft updates being disabled.

Worse, the compatibility mode makes it impossible to mount_mfs(8)
a file system from fstab(5) with soft updates disabled (-S).  [1]

Now, the only difference when called as "mount_mfs" or "mfs" (as
opposed to "mdmfs") is that the file mode of the mount point is
set by default to 01777.  All options available to mdmfs(8) are
also available to mount_mfs(8); the -C option is still recognized
but ignored for backward compatibility.

PR:		bin/98860 [1]
MFC after:	2 weeks
2006-11-03 12:02:24 +00:00
Warner Losh
8cd5dc08c3 MFp4:
o Fix the packet statistics
	o Make sure we set the FD bit when in full duplex
	o Improve TX side efficency by eliminating a data copy for
	  unfragmented mbufs (the hardware can't do s/g).
	o Minor busdma pedantry
	o better comments in some places, more XXX in others
	o Minor style nits.

This solves a problem I was seeing where I'd get no ethernet when not
booting with a NFS root.  Well, unless I unplugged the cable and
plugged it back in first so I'd get the same up down up messages I get
for NFS root...

Thanks to sam and scottl for suggestions on making this driver more
efficient through better use of approrpiate APIs.
2006-11-03 07:39:37 +00:00
Kip Macy
1df1b94714 Fix initialization sequence for console
Fix commenting convention slightly
Approved by: rwatson (mentor)
Reviewed by: jb
2006-11-03 07:29:09 +00:00
Kip Macy
00a8f0b4ff make sure physmem is initialized
add clarifying comments
Reviewed by: jb
Approved by: rwatson (mentor)
2006-11-03 07:27:55 +00:00
Christian Brueffer
0bf113a6ee Document IBM ServeRAID 8k support. 2006-11-03 06:50:03 +00:00
John Birrell
fd77f832c7 Add a low level function to write a string to the hypervisor
console directly.

Discussed with: kmacy
2006-11-03 06:31:56 +00:00
John Birrell
35b927a8c4 Always init the console before trying to cnadd it to
avoid the case where the console name isn't set and
cnadd wants to use printf to complain about it.
2006-11-03 06:23:53 +00:00
Nate Lawson
76f3dbcac7 Remove extra whitespace 2006-11-03 05:42:15 +00:00
Scott Long
eae94b6727 Add PCI Id for ServeRAID 8k.
Submitted by: Danny Braniss
2006-11-03 04:57:23 +00:00
Marcel Moolenaar
aa08c7e56e Make this compile on EFI32. The EFI_PHYSICAL_ADDRESS type is always
64-bit, even when sizeof(void *) is 32-bit.
2006-11-03 04:19:31 +00:00
Marcel Moolenaar
5910f6cc85 Make sure kern_envp is never NULL. If we don't get a pointer to
the environment from the loader, use the static environment.
2006-11-03 04:06:17 +00:00
Marcel Moolenaar
11f8548a0d Properly calculate the checksum of the APIC table. 2006-11-03 04:04:19 +00:00
Andrew Thompson
f935a26d9f Defer sending the bpdu from bstp_update_info as all code paths will test this
flag anyway.
2006-11-03 03:34:04 +00:00
Matt Jacob
162eef1f09 Fix some negotiation issues (like not being able to negotiate async) 2006-11-02 23:19:00 +00:00
Matt Jacob
d993cb4daf add some missing MPT<>CAM and CAM<>MPT bogolocks 2006-11-02 23:18:25 +00:00
Matt Jacob
84d67ea566 Add a tunable that allows one to turn off the automatic sending of
the ORDERED tag. This recoups significant performance gains for many
arrays.

The default is still to send out the ORDERED tag periodically.

Reviewed by:	scsi (justin+timeout)
2006-11-02 21:12:37 +00:00
Nick Hibma
1a82ee2eb9 Only use the filename part of the kernel configuration file as an argument to
KERNCONF after the file has been copied to the sys/${ARCH}/conf directory. This
allows the use of one kernel config file for multiple images. E.g.:

	NANO_KERNEL=../../../../software/nanobsd/default/SOEKRIS

MFC: after 6.2
2006-11-02 20:43:20 +00:00
Robert Watson
29a055ac65 Cross-reference libmemstat(3), malloc(9), uma(9). 2006-11-02 19:53:57 +00:00
Ceri Davies
b873ae5ca9 Fix typo. 2006-11-02 19:10:05 +00:00
Maksim Yevmenkin
a85871a72c Properly htole16() PSM in sockaddr_l2cap
MFC after:	3 days
2006-11-02 18:57:09 +00:00
Ruslan Ermilov
000a0f2a71 Unbreak compile with ELF_VERBOSE defined, and fix format warnings. 2006-11-02 17:52:43 +00:00
Andre Oppermann
1ae4d97d51 Use the improved m_uiotombuf() function instead of home grown sosend_copyin()
to do the userland to kernel copying in sosend_generic() and sosend_dgram().

sosend_copyin() is retained for ZERO_COPY_SOCKETS which are not yet supported
by m_uiotombuf().

Benchmaring shows significant improvements (95% confidence):
 66% less cpu (or 2.9 times better) with new sosend vs. old sosend (non-TSO)
 65% less cpu (or 2.8 times better) with new sosend vs. old sosend (TSO)

(Sender AMD Opteron 852 (2.6GHz) with em(4) PCI-X-133 interface and receiver
DELL Poweredge SC1425 P-IV Xeon 3.2GHz with em(4) LOM connected back to back
at 1000Base-TX full duplex.)

Sponsored by:	TCP/IP Optimization Fundraise 2005
MFC after:	3 month
2006-11-02 17:45:28 +00:00
Andre Oppermann
5e20f43d31 Rename m_getm() to m_getm2() and rewrite it to allocate up to page sized
mbuf clusters.  Add a flags parameter to accept M_PKTHDR and M_EOR mbuf
chain flags.  Provide compatibility macro for m_getm() calling m_getm2()
with M_PKTHDR set.

Rewrite m_uiotombuf() to use m_getm2() for mbuf allocation and do the
uiomove() in a tight loop over the mbuf chain.  Add a flags parameter to
accept mbuf flags to be passed to m_getm2().  Adjust all callers for the
extra parameter.

Sponsored by:	TCP/IP Optimization Fundraise 2005
MFC after:	3 month
2006-11-02 17:37:22 +00:00
Ruslan Ermilov
593bbd2195 Revert the last change. Masking only 2 MSBs of the virtual address
to get the physical address doesn't work for all values of KVA_PAGES,
while masking 8 MSBs works for all values of KVA_PAGES that are
multiple of 4 for non-PAE and 8 for PAE.  (This leaves us limited
with 12MB for non-PAE kernels and 14MB for PAE kernels.)

To get things right, we'd need to subtract the KERNBASE from the
virtual address (but KERNBASE is not easy to figure out from here),
or have physical addresses set properly in the ELF headers.

Discussed with:	jhb
2006-11-02 17:28:38 +00:00
Andre Oppermann
d99b0dd2c5 Rewrite kern_sendfile() to work in two loops, the inner which turns as many
VM pages into mbufs as it can -- up to the free send socket buffer space.
The outer loop then drops the whole mbuf chain into the send socket buffer,
calls tcp_output() on it and then waits until 50% of the socket buffer are
free again to repeat the cycle. This way tcp_output() gets the full amount
of data to work with and can issue up to 64K sends for TSO to chop up in
the network adapter without using any CPU cycles. Thus it gets very efficient
especially with the readahead the VM and I/O system do.

The previous sendfile(2) code simply looped over the file, turned each 4K
page into an mbuf and sent it off. This had the effect that TSO could only
generate 2 packets per send instead of up to 44 at its maximum of 64K.

Add experimental SF_MNOWAIT flag to sendfile(2) to return ENOMEM instead of
sleeping on mbuf allocation failures.

Benchmarking shows significant improvements (95% confidence):
 45% less cpu (or 1.81 times better) with new sendfile vs. old sendfile (non-TSO)
 83% less cpu (or 5.7 times better) with new sendfile vs. old sendfile (TSO)

(Sender AMD Opteron 852 (2.6GHz) with em(4) PCI-X-133 interface and receiver
DELL Poweredge SC1425 P-IV Xeon 3.2GHz with em(4) LOM connected back to back
at 1000Base-TX full duplex.)

Sponsored by:	TCP/IP Optimization Fundraise 2005
MFC after:	3 month
2006-11-02 16:53:26 +00:00
Pawel Jakub Dawidek
95de128d55 Fix ia64 build breakage. 2006-11-02 16:24:18 +00:00
Ruslan Ermilov
f19110addc Replace the SEE ALSO xrefs with a more reasonable set stolen from POSIX. 2006-11-02 14:10:56 +00:00
Konstantin Belousov
9641e38966 On trap while inside ddb, the trap handler calls kdb_reenter(), that
longjmp to the default context. As result, "alltrace" command may
be prematurely terminated (without error message). This is happens,
for instance, when system is low on memory and referenced page in
kernel-mode thread stack is swapped out.

Protect "alltrace" against termination on trap by setting temporary
kdb_jmpbuf context.

Submitted by:	Peter Holm
2006-11-02 11:47:38 +00:00
Ceri Davies
42db1b70c5 Bump .Dd for -f|-F. 2006-11-02 10:44:02 +00:00
Joseph Koshy
fb59cdf687 Document Elf{32,64}_Lword. Keep the list of ELF types sorted.
Describe the contents of the 'e_shnum' and 'e_shstrndx' fields when
using extended section numbering.
2006-11-02 09:21:57 +00:00
Pawel Jakub Dawidek
41517ab2e9 - Use g_duplicate_bio() instead of g_clone_bio(), so there memory is
allocated with M_WAITOK flag.
- Check 'buf' instead of 'error' so Prevent is not confused.

CID:		1562, 1563
Found by:	Coverity Prevent analysis tool
2006-11-02 09:14:18 +00:00
Pawel Jakub Dawidek
1506db2163 I want CPU number here.
Noticed by:	ru
2006-11-02 09:01:34 +00:00
Andrew Thompson
2efdffee15 Do not test all the conditions if the port is already forwarding. Also print a
debug message if the port is agreed as it is an important condition of the
protocol.
2006-11-02 08:44:19 +00:00
Andrew Thompson
cd281f6d40 Fix a resource leak when the mbuf pointer changes.
CID:		1564, 1565
Found by:	Coverity Prevent (tm)
2006-11-02 08:04:13 +00:00
Maxim Konovalov
1ab1fe7628 o There is no securenets(5) man page, refer to ypserv(8).
Obtained from:	DragonFlyBSD
MFC after:	1 week
2006-11-02 07:36:33 +00:00
Tim Kientzle
2bb9582faf Fix "1 day ago", "yesterday" and similar relative-time phrases
when parsing dates.

PR: bin/104934: bug in some date handling of bsdtar
Reported by: Herve Boulouis
MFC after: 3 days
2006-11-02 04:16:15 +00:00
Matt Jacob
98981e638f Use 2K Login f/w. 2006-11-02 03:23:01 +00:00
Matt Jacob
10365e5a68 Add 4Gb (24XX) support and lay the foundation for a lot of new stuff. 2006-11-02 03:21:32 +00:00
Marcel Moolenaar
6576695766 Sync the EFI headers with version 1.10.14.62 of the Intel sample EFI
implementation. This re-introduces C99 style comments that previously
were replaced by original C comments.
2006-11-02 02:42:48 +00:00
Marcel Moolenaar
932d8c46a2 Extend struct devdesc with a unit field, called d_unit. Promote the
device (kind) specific unit field to the common field. This change
allows a future version of libefi to work without requiring anything
more than what is defined in struct devdesc and as such makes it
possible to compile said version of libefi for different platforms
without requiring that those platforms have identical derivatives
of struct devdesc.
2006-11-02 01:23:18 +00:00
Matt Jacob
bd3fd815a7 2nd and final commit that moves us to CAM_NEW_TRAN_CODE
as the default.

Reviewed by multitudes.
2006-11-02 00:54:38 +00:00
Andrew Thompson
edc9f4ae99 If the port is agreed or edge then allow it go go straight to forwarding rather
than waiting another tick (1s) for the states to be checked again.
2006-11-02 00:39:36 +00:00
Pawel Jakub Dawidek
3398f41fc0 Grr, fix one more build breakage. 2006-11-02 00:37:39 +00:00
Marcel Moolenaar
5cae408f81 Don't unconditionally compile-in the bcache code. It's only used on
i386/amd64 and pc98. Remove useless calls to bcache_init() from the
ia64 and sparc64 loaders, as well as from the OFW common code.
2006-11-02 00:26:45 +00:00
Marius Strobl
9e264172bd Remove <sys/types.h>; including both <sys/param.h> and <sys/types.h>
violates style(9).
2006-11-02 00:05:15 +00:00
Marcel Moolenaar
ac2bbfc8cf o Make sure to clear f->f_devdata if d_dev->dv_open() fails. It
would otherwise cause devclose() to free() the memory again.
o  Refactor devopen() so that it's more readable.
2006-11-02 00:02:22 +00:00
Marius Strobl
65deb9d947 - In sunkbd_probe_keyboard() don't bother to determine the keyboard layout
as we have no use for that info. Instead let this function return the
  keyboard ID and verify at its invocation in sunkbd_configure() that we're
  talking to a Sun type 4/5/6 keyboard, i.e. a keyboard supported by this
  driver.
- Add an option SUNKBD_EMULATE_ATKBD whose code is based on the respective
  code in ukbd(4) and like UKBD_EMULATE_ATSCANCODE causes this driver to
  emit AT keyboard/KB_101 compatible scan codes in K_RAW mode as assumed by
  kbdmux(4). Unlike UKBD_EMULATE_ATSCANCODE, SUNKBD_EMULATE_ATKBD also
  triggers the use of AT keyboard maps and thus allows to use the map files
  in share/syscons/keymaps with this driver at the cost of an additional
  translation (in ukbd(4) this just is the way of operation).
- Implement an option SUNKBD_DFLT_KEYMAP, which like the equivalent options
  of the other keyboard drivers allows to specify the default in-kernel
  keyboard map. For obvious reasons this made to only work when also using
  SUNKBD_EMULATE_ATKBD.
- Implement sunkbd_check(), sunkbd_check_char() and sunkbd_clear_state(),
  which are also required for interoperability with kbdmux(4).
- Implement K_CODE mode and FreeBSD keypad compose.
- As a minor hack define KBD_DFLT_KEYMAP also in the !SUNKBD_EMULATE_ATKBD
  case so we can obtain fkey_tab from <dev/kbd/kbdtables.h> rather than
  having to duplicate it and #ifdef some more code.
- Don't use the TX-buffer for writing the two command bytes for setting the
  keyboard LEDs as this consequently requires a hardware FIFO that is at
  least two bytes in depth, which the NMOS-variant of the Zilog SCCs doesn't
  have. Thus use an inlined version of uart_putc() to consecutively write
  the command bytes (a cleaner approach would be to do this via the soft
  interrupt handler but that variant wouldn't work while in ddb(4)). [1]
- Fix some minor style(9) bugs.

PR:		90316 [1]
Reviewed by:	marcel [1]
2006-11-02 00:01:15 +00:00
Pawel Jakub Dawidek
a722f8df9e Document MNT_GJOURNAL option. 2006-11-01 23:40:44 +00:00
Pawel Jakub Dawidek
501250ba60 Now, that we have gjournal in the tree add possibility to configure
gmirror and graid3 in a way that it is not resynchronized after a
power failure or system crash.
It is safe when gjournal is running on top of gmirror/graid3.
2006-11-01 22:51:49 +00:00
Pawel Jakub Dawidek
aee5398c29 G_TYPE_NONE was replaced with G_TYPE_BOOL. 2006-11-01 22:28:11 +00:00