Commit Graph

92904 Commits

Author SHA1 Message Date
davidxu
f782f106dd Set GSBASE for kse. Finally make libkse work on AMD64. 2003-07-31 09:03:36 +00:00
davidxu
c970c3739c Fix some typos, correctly jump into UTS. 2003-07-31 08:50:01 +00:00
davidxu
33260f08b8 sysctlbyname needs size_t type, not int. 2003-07-31 08:26:58 +00:00
julian
1e4ad4f4d5 Have a go at unbreaking the tinderbox by fixing a debug printf.
The other option would be to remove it, but I can imagine it may be useful
for the forseeable future as we fiddle with segments in KSE and thr libraries,
2003-07-31 08:20:24 +00:00
des
7000eed3cf Braino in previous commit: lists are comma-separated. 2003-07-31 07:52:06 +00:00
des
0703427773 Make the experimental platforms tinderbox extra verbose. 2003-07-31 07:47:25 +00:00
ru
f87e8906d6 From now on, Alpha releases will come with NO_FLOPPIES.
Approved by:	consensus on freebsd-alpha

A replacement (miniboot.iso) is currently under development.
2003-07-31 07:28:58 +00:00
ru
c32c5cf1e2 Revert last delta, sys/conf/kern.pre.mk,v 1.33 does the job.
OK'ed by:	scottl
2003-07-31 07:13:54 +00:00
das
4a73cae22c Cross-reference arc4random(3). 2003-07-31 06:18:34 +00:00
das
06982489ad The upper end of the range of arc4random(3) is 2**32-1, not 2**31-1. 2003-07-31 06:18:24 +00:00
scottl
07dd39c720 Allocate the S/G list in the tag, not on the stack. The enforces the rule
that while many maps can exist and be loaded per tag, bus_dmamap_load() and
friends can only be called on one map at a time from the tag.  This is
enforced via the mutex arguments in the tag.

Fixing this bug means that s/g lists can be arbitrarily long in length, and
also removes an ugly GNU-ism from the code.  No API or ABI change is
incurred.  Similar changes for other platforms is forthcoming.
2003-07-31 05:34:20 +00:00
marcel
f947353bea In set_mcontext(), store the (user) stack pointer and the thread
pointer in the PCB of the corresponding thread if it's not the
current thread.  This is needed for thr_create() to setup the
newly created thread from the context provided by the application.

This commit finalizes supporting libthr.
2003-07-31 05:27:00 +00:00
bmilekic
7246ed5007 Make sure that when the PV ENTRY zone is created in pmap, that it's
created not only with UMA_ZONE_VM but also with UMA_ZONE_NOFREE.  In
the i386 case in particular, the pmap code would hook a special
page allocation routine that allocated from kernel_map and not kmem_map,
and so when/if the pageout daemon drained the zones, it could actually
push out slabs from the PV ENTRY zone but call UMA's default page_free,
which resulted in pages allocated from kernel_map being freed to
kmem_map; bad.  kmem_free() ignores the return value of the
vm_map_delete and just returns.  I'm not sure what the exact
repercussions could be, but it doesn't look good.

In the PAE case on i386, we also set-up a zone in pmap, so be
conservative for now and make that zone also ZONE_NOFREE and
ZONE_VM.  Do this for the pmap zones for the other archs too,
although in some cases it may not be entirely necessarily.  We'd
rather be safe than sorry at this point.

Perhaps all UMA_ZONE_VM zones should by default be also
UMA_ZONE_NOFREE?

May fix some of silby's crashes on the PV ENTRY zone.
2003-07-31 03:39:51 +00:00
davidxu
5ae6a349c2 Update manual for i386_set_ldt to reflect newly added features.
Submitted by: julian
2003-07-31 02:13:48 +00:00
davidxu
ff39c53c72 Enhance i386_set_ldt to allow application to dynamic allocate
or free a LDT entry. The function has following prototype:
  int i386_set_ldt(int start_sel, union descriptor *descs, int num_sels);

Added Features:
o If start_sel is 0, num_sels is 1 and the descriptor pointed to by descs
  is legal, then i386_set_ldt() will allocate a descriptor and return its
  selector numbe

o If num_descs is 1, start_sels is valid, and descs is NULL, then
  i386_set_ldt() will free that descriptor (making it available to be real-
  located again later).

o If num_descs is 0, start_sels is 0 and descs is NULL then, as a special
  case, i386_set_ldt() will free all descriptors.

Reviewed by: julian
2003-07-31 02:11:04 +00:00
kan
176747be72 Bump __FreeBSD_version to indicate GCC 3.3.1-pre import.
Reminded by:	kris
2003-07-31 01:45:35 +00:00
peter
8dd9d4012a When ktracing context switches, make sure we record involuntary switches.
Otherwise, when we get a evicted from the cpu, there is no record of it.
This is not a default ktrace flag.
2003-07-31 01:36:24 +00:00
peter
1c887bc40f Deal with 'options KSTACK_PAGES' being a global option. 2003-07-31 01:31:32 +00:00
peter
19f0a8f822 Cosmetic: fix some disorder of #include "opt_...." files 2003-07-31 01:29:09 +00:00
peter
827caad7ba Remove leftover relic of pmap_new_thread() etc. 2003-07-31 01:28:41 +00:00
peter
c7106c6a3c KSTACK_PAGES is a global option. 2003-07-31 01:27:18 +00:00
peter
a6f20d5795 Cosmetic: fix disorder of opt_kstack_pages.h include. 2003-07-31 01:26:40 +00:00
peter
6dab4e8092 Add #include "opt_kstack_pages.h" and "opt_kstack_max_pages.h" to remain
in sync with the backend machdep code.  When cpu_thread_init() does not
have the same idea of KSTACK_PAGES as the thing that created the kstack,
all hell breaks loose.

Bad alc! no cookie! :-)
2003-07-31 01:25:05 +00:00
marcel
12712482f7 In cpu_thread_setup(), set md_pcbpaddr to the physical address of
the pcb. We use the physical address for context switching.
While here, fix a nearby style(9) bug.
2003-07-31 01:05:34 +00:00
davidxu
176657958f Use correct signal when calling sigexit. 2003-07-30 23:11:37 +00:00
pb
edb5fbc5cc Remove test in pipe_write() which causes write(2) to return EAGAIN
on a non-blocking pipe in cases where select(2) returns the file
descriptor as ready for write. This in turns causes libc_r, for
one, to busy wait in such cases.

Note: it is a quick performance fix, a more complex fix might be
required in case this turns out to have unexpected side effects.

Reviewed by:	silby
MFC after:	3 days
2003-07-30 22:50:37 +00:00
scottl
72fb563d45 Enforce -fno-strict-aliasing to override the converse that is implied by
-O2 and -Os.

Reviewed by:	peter
2003-07-30 22:11:36 +00:00
jhb
097409346f Whitespace nit. 2003-07-30 20:59:36 +00:00
jhb
97e378fb00 When complaining about a sleeping thread owning a mutex, display the
thread's pid to make debugging easier for people who don't want to have to
use the intended tool for these panics (witness).

Indirectly prodded by:	kris
2003-07-30 20:42:15 +00:00
bde
7cf11d8bc8 Fixed style bugs in rev.1.94 before MFCing it (for large C asm statements,
use "\n\" instead of "\" at the end of each source line, and don't use
semicolons).  Fixed some older style bugs on the same lines (mainly
English errors in comments).
2003-07-30 20:16:04 +00:00
gallatin
d9d2001c48 Make this at least compile on 64 bit platforms. Its been breaking
the alpha tinderbox for far too long.
2003-07-30 20:09:22 +00:00
mtm
68ebedbe5d Apply some sort of order to the FILES list. 2003-07-30 20:05:20 +00:00
mtm
1a8b3fdc54 Add two files (early.sh and gbde) that previously were not
hooked up to the build.
2003-07-30 19:53:40 +00:00
bmilekic
7c379c85d8 Plug a race and a leak in UMA.
1) The race has to do with zone destruction.  From the zone destructor we
   would lock the zone, set the working set size to 0, then unlock the zone,
   drain it, and then free the structure.  Within the window following the
   working-set-size set to 0 and unlocking of the zone and the point where
   in zone_drain we re-acquire the zone lock, the uma timer routine could
   have fired off and changed the working set size to something non-zero,
   thereby potentially preventing us from completely freeing slabs before
   destroying the zone (and thus leaking them).

2) The leak has to do with zone destruction as well.  When destroying a
   zone we would take care to free all the buckets cached in the zone, but
   although we would drain the pcpu cache buckets, we would not free them.
   This resulted in leaking a couple of bucket structures (512 bytes each)
   per cpu on SMP during zone destruction.

While I'm here, also silence GCC warnings by turning uma_slab_alloc()
from inline to real function.  It's too big to be an inline.

Reviewed by: JeffR
2003-07-30 18:55:15 +00:00
alc
fc6d1980cc The introduction of vm object locking has caused witness to reveal
a long-standing mistake in the way a portion of a pipe's KVA is
allocated.  Specifically, kmem_alloc_pageable() is inappropriate
for use in the "direct" case because it allows a preceding vm map entry
and vm object to be extended to support the new KVA allocation.
However, the direct case KVA allocation should not have a backing
vm object.  This is corrected by using kmem_alloc_nofault().

Submitted by:	tegge (with the above explanation by me)
2003-07-30 18:55:04 +00:00
mtm
244ab33e17 tty whacking should occur early, but not so early that the
required commands are not on a mounted file system.

Noticed by: bde
2003-07-30 18:53:59 +00:00
njl
b1c3709a1f Use ACPI_FLUSH_CPU_CACHE() instead of wbinvd(). Verified .o with md5.
Pointed out by:	Mark Santcroos <marks@ripe.net>
2003-07-30 17:20:33 +00:00
tmm
90017ec408 Return 1 from pmap_protect_tte() instead of 0. When used with
tsb_foreach(), 0 signals to terminate the tsb traversal, so when
tsb_foreach() was used in pmap_protect() (which only happens when
the area to be protected is larger than PMAP_TSB_THRESH = 16MB), only
the first tsb entry in the specified range would be protected.

Reported by:	Andrew Belashov <bel@orel.ru>
2003-07-30 16:27:51 +00:00
njl
bcbbd9ea9e Add and document the hw.acpi.ec.poll_timeout tunable. 2003-07-30 16:22:53 +00:00
harti
a622581f06 Fix the code with respect to the assumption that sizeof(long) == 4. 2003-07-30 16:15:49 +00:00
harti
4a8d15f796 Fix what was a common idiom in PDP-11 days: declare a local int and
use the address of that int for read(2). While this happens to work on
LE, it surely is wrong on BE.
2003-07-30 16:02:50 +00:00
harti
6fb9d3d7f5 Make this compile with WARNS=6. 2003-07-30 15:58:08 +00:00
bmilekic
260d19ed7e When generating the zone stats make sure to handle the master zone
("UMA Zone") carefully, because it does not have pcpu caches allocated
at all.  In the UP case, we did not catch this because one pcpu cache
is always allocated with the zone, but for the MP case, we were getting
bogus stats for this zone.

Tested by: Lukas Ertl <le@univie.ac.at>
2003-07-30 15:22:37 +00:00
harti
0d4bdece59 Fix warnings: a variable that was unused, a variable that
was unused unless sun was defined and printing of u_longs
with %x.

PR:		bin/39818
Submitted by:	dan@obluda.cz
MFC after:	1 week
2003-07-30 14:56:25 +00:00
ru
620a1cc125 The -Os kernel build with GCC 3.3.1 also requires -fno-strict-aliasing
to survive.

Discussed with:	bde
Tested on:	i386 and pc98
2003-07-30 14:46:46 +00:00
ru
00c31c560d Initialize the FIXCRYPTO, BINMAKE and related variables (that use
the != operator) only when needed.

This change allows me to check out the current version of release/
makefiles only (co -l) to /tmp/release, and use that directory to
build a release (supplying the correct WORLDDIR).

Without this, attempt to "make release" caused an endless fork bomb
while trying to evaluate FIXCRYPTO, and the only way I could get
away from this on a remote box was to "kill -INT 1", thanks to
tcsh(1) and its internal "kill" command.
2003-07-30 14:33:32 +00:00
harti
ded8a0da62 Rearrange the vcc structure so that the generic getvcc function
can be used and add per-VC statistics.
2003-07-30 14:20:00 +00:00
deischen
1c6cde237e Don't forget to unlock the scheduler lock. Somehow this got removed
from one of my last commits.  This only affected priority ceiling
mutexes.

Pointy hat to:	deischen
2003-07-30 13:28:05 +00:00
harti
538c4f0ff5 Rearrange the fields in the vcc table entry to fit to the requirements
of the generic getvcc function and used that function instead of the home
grown.
2003-07-30 11:32:42 +00:00
bp
e4650a40bd Release contrib/smbfs from the import-only mode. Now changes can be committed
directly without import process. The same about MFCs.

Put a note about nwfs.

Discussed with:	peter
2003-07-30 10:43:13 +00:00