jeff [Sun, 1 Feb 2004 10:38:13 +0000 (10:38 +0000)]
- Allow interactive tasks to use the maximum time-slice. This is not as
detrimental as I thought it would be in the case of massive process
storms from a shell and it makes regular desktop usage noticeably
better.
silby [Sun, 1 Feb 2004 07:56:44 +0000 (07:56 +0000)]
Rewrite sendfile's header support so that headers are now sent in the first
packet along with data, instead of in their own packet. When serving files
of size (packetsize - headersize) or smaller, this will result in one less
packet crossing the network. Quick testing with thttpd and http_load has
shown a noticeable performance improvement in this case (350 vs 330 fetches
per second.)
Included in this commit are two support routines, iov_to_uio, and m_uiotombuf;
these routines are used by sendfile to construct the header mbuf chain that
will be linked to the rest of the data in the socket buffer.
jeff [Sun, 1 Feb 2004 06:20:18 +0000 (06:20 +0000)]
- Disable ithread binding in all cases for now. This doesn't make as much
sense with sched_4bsd as it does with sched_ule.
- Use P_NOLOAD instead of the absence of td->td_ithd to determine whether or
not a thread should be accounted for in sched_tdcnt.
jeff [Sun, 1 Feb 2004 06:15:17 +0000 (06:15 +0000)]
- Fix a problem where we did not drain the cache of buckets in the zone
when uma_reclaim() was called. This was introduced when the zone
working-set algorithm was removed in favor of using the per cpu caches
as the working set.
rwatson [Sun, 1 Feb 2004 05:56:51 +0000 (05:56 +0000)]
Coalesce pipe allocations and frees. Previously, the pipe code
would allocate two 'struct pipe's from the pipe zone, and malloc a
mutex.
- Create a new "struct pipepair" object holding the two 'struct
pipe' instances, struct mutex, and struct label reference. Pipe
structures now have a back-pointer to the pipe pair, and a
'pipe_present' flag to indicate whether the half has been
closed.
- Perform mutex init/destroy in zone init/destroy, avoiding
reallocating the mutex for each pipe. Perform most pipe structure
setup in zone constructor.
- VM memory mappings for pageable buffers are still done outside of
the UMA zone.
- Change MAC API to speak 'struct pipepair' instead of 'struct pipe',
update many policies. MAC labels are also handled outside of the
UMA zone for now. Label-only policy modules don't have to be
recompiled, but if a module is recompiled, its pipe entry points
will need to be updated. If a module actually reached into the
pipe structures (unlikely), that would also need to be modified.
These changes substantially simplify failure handling in the pipe
code as there are many fewer possible failure modes.
On half-close, pipes no longer free the 'struct pipe' for the closed
half until a full-close takes place. However, VM mapped buffers
are still released on half-close.
Some code refactoring is now possible to clean up some of the back
references, etc; this patch attempts not to change the structure
of most of the pipe implementation, only allocation/free code
paths, so as to avoid introducing bugs (hopefully).
This cuts about 8%-9% off the cost of sequential pipe allocation
and free in system call tests on UP and SMP in my micro-benchmarks.
May or may not make a difference in macro-benchmarks, but doing
less work is good.
Reviewed by: juli, tjr
Testing help: dwhite, fenestro, scottl, et al
jeff [Sun, 1 Feb 2004 02:48:36 +0000 (02:48 +0000)]
- Add a new member to struct kseq called ksq_sysload. This is intended to
track the load for the sched_load() function. In the SMP case this member
is not defined because it would be redundant with the ksg_load member
which already tracks the non ithd load.
- For sched_load() in the UP case simply return ksq_sysload. In the SMP
case traverse the list of kseq groups and sum up their ksg_load fields.
jeff [Sun, 1 Feb 2004 02:46:47 +0000 (02:46 +0000)]
- Keep a variable 'sched_tdcnt' that is used for the local implementation
of sched_load(). This variable tracks the number of running and runnable
non ithd threads. This removes the need to traverse the proc table and
discover how many threads are runnable.
jeff [Sun, 1 Feb 2004 02:44:35 +0000 (02:44 +0000)]
- Add a sched API entry point that returns the system load. This load should
not include any ithreads.
- Document the difference between sched_load() and sched_runnable() as they
are very similar.
das [Sat, 31 Jan 2004 23:16:09 +0000 (23:16 +0000)]
Fix the handling of negative hexadecimal numbers in integer formats.
Note that this bug is unrelated to recent work in this area; it seems
to have been present since revision 1.1.
brooks [Sat, 31 Jan 2004 22:59:03 +0000 (22:59 +0000)]
Use memcpy plus a manual NUL termination when copying the interface name
from the sdl because strlcpy requires that the source string be
NUL-terminated unlike strncpy.
Submitted by: Peter Jeremy <PeterJeremy at optushome dot com dot au>
phk [Sat, 31 Jan 2004 10:40:25 +0000 (10:40 +0000)]
Introduce the SO_BINTIME option which takes a high-resolution timestamp
at packet arrival.
For benchmarking purposes SO_BINTIME is preferable to SO_TIMEVAL
since it has higher resolution and lower overhead. Simultaneous
use of the two options is possible and they will return consistent
timestamps.
This introduces an extra test and a function call for SO_TIMEVAL, but I have
not been able to measure that.
ru [Sat, 31 Jan 2004 09:41:05 +0000 (09:41 +0000)]
Catch up with the 20040130 src/UPDATING entry, and spell libpthread
as -lpthread. (Alpha and SPARC64 still spell it -lkse, but we hope
this to change by 5.3-RELEASE.)
ru [Sat, 31 Jan 2004 08:15:57 +0000 (08:15 +0000)]
Overhaul of kerberos5/ makefiles. Most significant changes are:
- Dropped support for standalone builds, this was only partially
supported anyway, and required so much magic in makefiles that
made life dangerous (e.g., by using the custom yacc rules).
- Got rid of .OBJDIR in makefiles -- makes building of individual
files possible again.
- Made the .x.c transformations -j safe.
- Reprogrammed LDADD to fix static build of some utilities that
was broken.
- Fixed LDFLAGS and DPADD in the WITH_OPENLDAP case -- positively
affects the contents of .depend files.
- Removed redundant .h's from SRCS, only kept those that are
generated.
- libkrb5/ INCS were bogusly installed again with libgssapi/.
- Made build-tools real tools with their own makefiles in
separate directories. This allows us to properly track
their dependencies, etc.
- Faster build, 21% less of makefile code!
Approved by: nectar
Reviewed by: markm
Silence on: arch
alc [Sat, 31 Jan 2004 05:42:58 +0000 (05:42 +0000)]
Remove unnecessary vm object reference and deallocate calls from ffs_read()
and ffs_write(). These calls trace their origins to the dead vfs_ioopt
code, first appearing in revision 1.39 of ufs_readwrite.c.
marcel [Sat, 31 Jan 2004 05:05:45 +0000 (05:05 +0000)]
Now that libpthread is the default threading library, remove the
compatibility link from libc_r to libpthread (previously a link
from libc_r to libkse).
bde [Sat, 31 Jan 2004 02:51:41 +0000 (02:51 +0000)]
Removed XXX comments about some libraries only being in the secure
distribution. This is not the place to document this, especially
now that the secure distribution is the normal one.
marcel [Fri, 30 Jan 2004 20:52:54 +0000 (20:52 +0000)]
In Write_Disk(), fix the non-error case where we returned to the
caller without closing the disk device and freeing allocated
memory. Not closing the disk device prevents GEOM from retasting
after spoiling.
sos [Fri, 30 Jan 2004 19:16:08 +0000 (19:16 +0000)]
Be more robust in the probe. We dont want to get into a loop with
reinitting when we try to identify devices. If they dont interrupt
on identify we retry once. If this fails we simply ignore that device.
harti [Fri, 30 Jan 2004 15:34:57 +0000 (15:34 +0000)]
Use the official ng_timeout function to trigger sending. This means,
that we can get rid of of all the spl*() calls, because ng_timeout
handles the locking issues.
simokawa [Fri, 30 Jan 2004 14:28:11 +0000 (14:28 +0000)]
Use device_identify and bus_add_child methods to add a firewire
bus on fwohci. This should fix attach failure caused by a race
between firewire and fwochi initialization for the kernel module.
nyan [Fri, 30 Jan 2004 14:10:24 +0000 (14:10 +0000)]
Update the MINIMALDOCPORTS variable.
- Add ports/Tools to get some scripts.
- Add missing dependency (print/ghostscript-gnu-nox11). [1]
- Remove unused ports (devel/bison and textproc/mkcatalog). [1]
deischen [Fri, 30 Jan 2004 12:13:17 +0000 (12:13 +0000)]
Change libkse back to libpthread and make it the default
thread library for i386, amd64, and ia64. For alpha
and sparc64 the library is not changed and remains libkse,
and links are installed so that libpthread -> libc_r.
The gcc -pthread option will be changed in a separate
commit so that it links to -lpthread instead of -lc_r.
scottl [Fri, 30 Jan 2004 07:04:39 +0000 (07:04 +0000)]
Take the plunge and make this driver be INTR_FAST. This re-arranges the
interrupt handler so that no locks are needed, and schedules the
command completion routine with a taskqueue_fast. This also corrects the
locking in the command thread and removes the need for operation flags.
Simple load tests show that this is now considerably faster than FreeBSD 4.x
in the SMP case when multiple i/o tasks are running.
jhb [Thu, 29 Jan 2004 19:01:58 +0000 (19:01 +0000)]
- Tweak order of arch fs options to stick all floppy options together and
all MFS root options together and in the same order on all archs.
- Drop support for using the no longer existing 2.88 floppy image for CD
booting on i386 via the EMUL_BOOT variable.
- Use a stock loader on the boot floppy rather than one without forth.
- Force the gzip of the mfsroot in release.9 to succeed. This is useful
when doing lots of rereleases when testing floppy changes.
- If an acpi kernel module exists, stick it on the boot floppy and for
now always load it after the kernel.
harti [Thu, 29 Jan 2004 16:01:57 +0000 (16:01 +0000)]
These scripts run the protocol test suites for the SSCOP, SSCF-UNI and
UNI protocols. The actual test suites are not in these directories because
of their size. One needs to install the atmsupport port (the script
will remind you, if it cannot find the port).
The SSCOP test suite includes booth the ETSI and the ITU-T test suite,
the SSCF-UNI test suite is home grown and the UNI test suite is the
P2MP ETSI test suite. Others may follow.
bde [Thu, 29 Jan 2004 12:35:11 +0000 (12:35 +0000)]
Fixed breakage of scheduling in rev.1.29 of subr_4bsd.c. The
"scheduler" here has very little to do with scheduling. It is actually
the swapper, and it really must be the last SYSINIT'ed item like its
comment says, since proc0 metamorphoses into swapper by calling
scheduler() last in mi_start(), and scheduler() never returns.. Rev.1.29
of subr_4bsd.c broke this by adding another SI_ORDER_FIRST item
(kproc_start() for schedcpu_thread() onto the SI_SUB_RUN_SCHEDULER_LIST.
The sorting of SYSINITs with identical orders (at all levels) is
apparently nondeterministic, so this resulted in schedule() sometimes
being called second last and schedcpu_thread() not being called at all.
This quick fix just changes the code to almost match the comment
(SI_ORDER_FIRST -> SI_ORDER_ANY). "LAST" is misspelled "ANY", and
there is no way to ensure that there is only 1 very lst SYSINIT.
A more complete fix would remove the SYSINIT obfuscation.
mtm [Thu, 29 Jan 2004 12:03:17 +0000 (12:03 +0000)]
I update the rwlock code in libthr to be more standards compliant and
what do I get for my troubles? libc breaks offcourse!
Reimplement a hack (in libthr) that allows libc to use
rwlocks without initializing them first. The hack was reimplemented
so that only a private libc version of the rwlock locking functions
initializes an uninitialized rwlock. The application version will
correctly fail.
mtm [Thu, 29 Jan 2004 09:44:36 +0000 (09:44 +0000)]
When suspending a thread if the timeout was very short or
the system call got interrupted and the absolute timeout is
converted to a relative timeout, it may happen that we get a
negative number. In such a case, simply set the timeout to
zero so that if the event that the thread wants to wait for has
happened it can still return successfully, but if it hasn't
happened then the thread doesn't suspend indefinitely. This should
fix certain applications (including mozilla) that seem to hang
indefinitely sometimes.
Noticed and debugged by: Morten Johansen <root@morten-johansen.net>
wpaul [Thu, 29 Jan 2004 03:16:58 +0000 (03:16 +0000)]
Go back to using AUTHMODE_AUTO if WEP is on. In some cases, the Centrino
won't associate in BSS mode if you use AUTHMODE_SHARED. I probably don't
understand enough to know when SHARED should be used vs. OPEN or WPA.
For now, go back to what works.
mjacob [Thu, 29 Jan 2004 02:40:43 +0000 (02:40 +0000)]
Fix longstanding buglet- for centrally handled CTIO2s we were checking the wrong
bit for this being the last CTIO2. It didn't matter since it really was the
last CTIO2 and the resources recycled, but still....
grehan [Thu, 29 Jan 2004 00:45:41 +0000 (00:45 +0000)]
When UMA_MD_SMALL_ALLOC is defined, pmap_kextract will be called
for direct-mapped addresses. Assume that any address less than KVA
is one of these and return it. Also assert that an address is KVA
does have a valid mapping - callers of pmap_kextract don't check
the return value, since they assume that they have a valid virtual
address.
grehan [Thu, 29 Jan 2004 00:32:22 +0000 (00:32 +0000)]
Implement UMA_MD_SMALL_ALLOC, since the BAT registers allow direct
addressing of memory. Makes a substantial improvement for apps that
stress the limited amount of KVM on PPC (e.g. untarring the ports tree).