Commit Graph

84302 Commits

Author SHA1 Message Date
jmallett
9dfe769e3c Fix style (no space after return, twice-too-big continuation) and
cast (casting long to a void pointer, rather than intptr_t to a
void pointer) bogons.

Reviewed by:	bde
2002-12-22 03:20:16 +00:00
dillon
b592835560 So many people have asked me to describe my development environment that
my fingers are getting tired.  Here is a new manual page, 'development',
which describes a very powerful, generic, exportable development environment
suitable to developers, sysops, admins, and anyone at all who is
maintaining more the one FreeBSD box.  I have used this type of environment
for many years and have had to make virtually no changes to it for all that
time.

MFC after:	3 days
2002-12-22 02:07:05 +00:00
jake
2e1dd4b9d1 - Add a pmap pointer to struct md_page, and use this to find the pmap that
a mapping belongs to by setting it in the vm_page_t structure that backs
  the tsb page that the tte for a mapping is in.  This allows the pmap that
  a mapping belongs to to be found without keeping a pointer to it in the
  tte itself.
- Remove the pmap pointer from struct tte and use the space to make the
  tte pv lists doubly linked (TAILQs), like on other architectures.  This
  makes entering or removing a mapping O(1) instead of O(n) where n is the
  number of pmaps a page is mapped by (including kernel_pmap).
- Use atomic ops for setting and clearing bits in the ttes, now that they
  return the old value and can be easily used for this purpose.
- Use __builtin_memset for zeroing ttes instead of bzero, so that gcc will
  inline it (4 inline stores using %g0 instead of a function call).
- Initially set the virtual colour for all the vm_page_ts to be equal to their
  physical colour.  This will be more useful once uma_small_alloc is
  implemented, but basically pages with virtual colour equal to phsyical
  colour are easier to handle at the pmap level because they can be safely
  accessed through cachable direct virtual to physical mappings with that
  colour, without fear of causing illegal dcache aliases.

In total these changes give a minor performance improvement, about 1%
reduction in system time during buildworld.
2002-12-21 22:43:19 +00:00
imp
d11be4669f Be nice. There are evidentally a number of different cards that
identify themselves as serial cards that it would be desirable to
attach a different driver than sio to.  Since we are claiming all
serial cards, this is not possible.  Instead, return -100 to indicate
that we're willing to take the card, but still allow other drivers to
attach.

Pointed out by: Maksim Yevmenkin
2002-12-21 22:37:54 +00:00
trhodes
8bc01269ca Make newsyslog(8) print the correct date when the logs are turned over.
PR:		46395
Submitted by:	maxim
MFC:		eventually
2002-12-21 22:27:26 +00:00
bbraun
6cc9e3ba3a Reduce libc's memory footprint by lazily allocating memory used internally
by setproctitle().

Reviewed by: jkh
2002-12-21 22:04:50 +00:00
dillon
2cfdba07e1 do not try to free a mountpoint that we did not allocate.
X-MFC after:	immediately
2002-12-21 20:55:34 +00:00
pb
521ca68827 In syncache_timer(), don't attempt to lock the inpcb structure
associated with the syncache entry: in case tcp_close() has been
called on the corresponding listening socket, the lock has been
destroyed as a side effect of in_pcbdetach(), causing a panic when
we attempt to lock on it.

Reviewed by:	hsu
2002-12-21 19:59:47 +00:00
des
30d49d78ba The previous commit contained a stupid mistake: ctxt->pam_[cp]sock was
initialized after the call to pthread_create() instead of before.  It just
happened to work with threads enabled because ctxt is shared, but of
course it doesn't work when we use a child process instead of threads.
2002-12-21 15:09:58 +00:00
tjr
45e7d1abc0 Mark the INVALID keyword as being deprecated since the concept of
"invalid runes" is useless without the rest of the deprecated rune interface.
2002-12-21 11:37:05 +00:00
jake
ee95f5b69f Make pmap_qenter and pmap_qremove look more like the other pmaps. 2002-12-21 10:44:30 +00:00
tjr
fb7d943cca Add the -P option which executes multiple copies of the specified utility
in parallel. Idea from GNU xargs.
2002-12-21 10:17:13 +00:00
jake
c04c7fbcb7 Removed unused pmap_qenter_flags. 2002-12-21 10:04:14 +00:00
jake
fe0ef1babd Make the atomic arithmetic functions return the old value, since they're
all implemented with cas anyway.
2002-12-21 08:53:26 +00:00
bbraun
7a3daaf160 Reduce libc.so's memory footprint by lazily allocating memory used internally
by basename() and dirname().
Reviewed by: eric
2002-12-21 07:12:35 +00:00
tjr
4362e6581e Import newer versions of div() and ldiv() from NetBSD which handle
the -fpcc-struct-return calling convention properly instead of
returning garbage. This may break backwards compatibility with some old
binaries that were compiled when -fno-pcc-struct-return was the default.
2002-12-21 05:11:39 +00:00
obrien
355bae9314 -mno-align-long-strings can make things smaller, so lets use it in hopes
that it does here.
2002-12-21 02:03:31 +00:00
marcel
4c6fe2d7af Fix multiple registration of the elf_legacy_coredump sysctl variable.
The duplication is caused by the fact that imgact_elf.c is included
by both imgact_elf32.c and imgact_elf64.c and both are compiled by
default on ia64. Consequently, we have two seperate copies of the
elf_legacy_coredump variable due to them being declared static, and
two entries for the same sysctl in the linker set, both referencing
the unique copy of the elf_legacy_coredump variable. Since the second
sysctl cannot be registered, one of the elf_legacy_coredump variables
can not be tuned (if ordering still holds, it's the ELF64 related one).

The only solution is to create two different sysctl variables, just
like the elf<32|64>_trace sysctl variables. This unfortunately is an
(user) interface change, but unavoidable. Thus, on ELF32 platforms
the sysctl variable is called elf32_legacy_coredump and on ELF64
platforms it is called elf64_legacy_coredump. Platforms that have
both ELF formats have both sysctl variables.

These variables should probably be retired sooner rather than later.
2002-12-21 01:15:39 +00:00
tjr
65abd11959 Remove unimplemented System V options from the getopt() option string. 2002-12-21 00:38:14 +00:00
dillon
8fe3a51b54 Revamp the way rc.diskless1 creates and populates memory filesystems. Make
the whole thing generic.  That is, /conf/base, /conf/default,
/conf/${ipba}, and /conf/${ip} are all handled the same way.

Introduce an NFS remounting feature via the /conf/base/<dir>/diskless_remount
so you can avoid dup'ing system directories in /conf (described in rc file).

Introduce a memory filesystem sizing feature via the /conf/base/<dir>/md_size
file that allows you to override the default memory filesystem size.

Introduce a file containing relative paths to remove for each memory filesystem
directory as /conf/base/<dirname>.remove.

Make the cpio feature more generic (applies to any filesystem) (aka
/conf/base/<dirname>.cpio.gz).

Allow any root directories to be created as a memory filesystem via the
/conf/*/* mechanism.

Replace the copyright notice with a reference to the COPYRIGHT file and
do other cleanups.

(documentation and man page updates to follow).

MFC after:	3 days
2002-12-21 00:30:08 +00:00
sam
e3b00dcf6c replace the special-purpose rate-limiting code with the general facility
just added; this tries to maintain the same behaviour vis a vis printing
the rate-limiting messages but need tweaking
2002-12-21 00:08:20 +00:00
sam
fa3ca506a4 define HAVE_PPSRATECHECK now that we have this stuff in the kernel
(probably belongs elsewhere; add it this way for now so the system
will build)
2002-12-20 23:57:22 +00:00
sam
e7050943f7 add generic rate limiting support from netbsd; ratelimit is purely time based,
ppsratecheck is for controlling packets/second

Obtained from:	netbsd
2002-12-20 23:54:47 +00:00
jake
7cb7f76248 Add page queue locking around functions that call vm_page_flag_set. This
fixes a failed assertion early in boot on sparc64.

Reported by:	Roderick van Domburg <r.s.a.vandomburg@student.utwente.nl>
2002-12-20 21:47:21 +00:00
alc
b765c38749 Extend the scope of the page queues lock in vm_pgmoveco(). 2002-12-20 21:18:29 +00:00
alc
3a908f43f6 Increase the scope of the kmem_object locking in kmem_malloc(). 2002-12-20 18:59:23 +00:00
dillon
c8de1533ac Modify the fake cylinders calculation so it is >= the size of the device,
not < the size of the device.  This avoids geom complaints.

Fix a serious bug in the handling of the RS_NO_CLEAR_UA quirk.  When we
go and insert the test-unit-ready command the umass_cam_quirk_cb() function
sets the status as if the READ_CAPACITY command suceeded when, in fact, it
did not.  This leads to the CAM layer trying to use garbage in the return
buffer and panicing the system (or doing other bad things).

Add a quirk entry for MSYSTEMS DISK-ON-KEY, which is sold under the Sony
brand as a solid state disk-on-key usb device.  This device requires
several quirks to work properly.

Note that the disk-on-key device will not work properly until CAM also
gets a quirk entry for it, which has been submitted to the CAM maintainer,
and you may have to temporarily uncomment the DELAY() as well.  -current
does not properly wait for devices to power up so you may also have
to temporarily uncomment the DELAY(300000) to make your device work.
A solution must be found to that issue.

MFC after:	3 days
X-MFC note:	the quirk support must MFCd before this patch can be
2002-12-20 18:56:55 +00:00
dillon
75fd8c22e0 Fix two bugs in the DMA chaining code for OHCI. The first bug is that
the dataphysend calculation could only possibly work if the virtual buffer
is also physically contiguous.  Calculate dataphysend by calculating the
ending virtual address first, then converting to a physical address.

The second bug applies only to NetBSD and OpenBSD and involves the curlen
calculation in the two-contiguous-physical-pages case (which we don't support).

Also cleanup the use of the OHIC_PAGE() macro on dataphysend and add a panic
if len goes negative (meaning we lost the physical page translation
representing the end of the buffer).

IMHO the dataphysend is still bokered since it might be misrepresented
by shared userland page mappings.  The whole section needs to be rewritten
to use the virtual address range.

MFC after:	3 days
2002-12-20 18:47:39 +00:00
mux
dce23b283c Don't forget to destroy the mutex if an error occurs
in the jail() system call.

Submitted by:	Pawel Jakub Dawidek <nick@garage.freebsd.pl>
2002-12-20 14:32:20 +00:00
ru
0ccfc98aaf mdoc(7) police: Fixed language. 2002-12-20 12:41:26 +00:00
sos
6c22654f6b Fxi support for the Promise SuperTrak 100, the PCI id was wrong. 2002-12-20 12:15:38 +00:00
hsu
8f65521f76 Eliminate a goto.
Fix some line breaks.
2002-12-20 11:24:02 +00:00
hsu
015bb54dc2 Swap the order of a free and a use of an ifaddr structure. 2002-12-20 11:21:07 +00:00
hsu
38d73b3ed3 Unravel a nested conditional.
Remove an unneeded local variable.
2002-12-20 11:16:52 +00:00
tjr
6845d56ec7 Document the fact that the printf() family of functions return negative
values (EOF in our case) on error, and some of the possible errno values
in an Errors section.

PR:		39257
2002-12-20 08:28:10 +00:00
tjr
505c0317e3 C99 standardised the vscanf() family of functions, update Standards
section to reflect this.
2002-12-20 07:46:01 +00:00
imp
c1a18b0842 Put back the casts to unsigned. While no strictly necessary for its
current uses, the name strcmp has strong connotations that shouldn't
lightly be discarded.  This doesn't cost us anything.

Submitted by: bde
2002-12-20 05:49:40 +00:00
mike
8c025307aa Stylistic changes:
o Fix an English error (comma splice) and poorly worded sentence.
o Fix KNF ordering of variables (pointers come before arithmetic types).
o Restore hand-optimization of sizeof()-1, instead of strlen().
o Remove unneeded local variables in strerror_r().

Test by:	strerror regression test
Requested by:	bde
Reviewed by:	bde
2002-12-20 05:26:10 +00:00
alc
b5432a36c5 Add a mutex to struct vm_object. Initialize and destroy that mutex
at appropriate times.  For the moment, the mutex is only used on
the kmem_object.
2002-12-20 05:10:32 +00:00
trhodes
88aa52260a Remove obsolete information about 'conflicts' 2002-12-20 04:56:52 +00:00
jake
5d3bd7b998 Fix breakage from earlier inadvertant changes. 2002-12-20 04:32:10 +00:00
trhodes
45963868f1 Move the NOTES section to DESCRIPTION. And correct some documentation while
I'm here.

PR:		43756
Submitted by:	Gary W. Swearingen <swear@attbi.com>
2002-12-20 01:17:18 +00:00
trhodes
bc104c5a36 Document what really occurs when we obtain an error.
PR:		43357
Submitted by:	David Schultz <dschultz@uclink.Berkeley.EDU>
2002-12-20 01:01:24 +00:00
hsu
7bc8ec9f68 Expand scope of TCP protocol lock to cover syncache data structures. 2002-12-20 00:24:19 +00:00
chris
69ce2536fa Include a cross-reference to maclabel(7) for policies that use MAC labels.
MFC Candidate.

Sponsored by:	DARPA, Network Associates Labs
2002-12-20 00:17:10 +00:00
jkh
ebe990356f Correct path to /usr/sbin/sysinstall for HEAD since that's where it lives now. 2002-12-20 00:10:37 +00:00
chris
02bfc03d3d o Change "accesses" to "access" (sounds better)
o Correct the range of compartments (1..256 instead of 0..255)
o Use the correct name for "Network Associates Laboratories"

MFC Candidate.

Sponsored by:	DARPA, Network Associates Laboratories
Reviewed by:	Adam Migus <adam@migus.org>
2002-12-19 23:47:59 +00:00
dillon
8a472af487 The zalloc pool's size calculation breaks if sbrk() does not return
contiguous chunks of memory.  It happens to do so in the bootstrap
code, but not necessarily in other places.
MFC after:	7 days
2002-12-19 23:23:20 +00:00
bmilekic
334e3de936 o Untangle the confusion with the malloc flags {M_WAITOK, M_NOWAIT} and
the mbuf allocator flags {M_TRYWAIT, M_DONTWAIT}.
o Fix a bpf_compat issue where malloc() was defined to just call
  bpf_alloc() and pass the 'canwait' flag(s) along.  It's been changed
  to call bpf_alloc() but pass the corresponding M_TRYWAIT or M_DONTWAIT
  flag (and only one of those two).

Submitted by: Hiten Pandya <hiten@unixdaemons.com> (hiten->commit_count++)
2002-12-19 22:58:27 +00:00
trhodes
54b54c92cc Fix some grammar nits. Mainly the use of a' or an' where the opposite
is required.

PR:		33559
Submitted by:	Marc Olzheim <marcolz@ilse.nl>
2002-12-19 22:56:20 +00:00