Commit graph

131457 commits

Author SHA1 Message Date
Yaroslav Tykhiy e5f16dad59 Admit my infertility in public: I had the honour of being mentored by jkh,
but I've had no mentees of my own yet.
2007-04-04 10:17:34 +00:00
Robert Watson 5e3f7694b1 Replace custom file descriptor array sleep lock constructed using a mutex
and flags with an sxlock.  This leads to a significant and measurable
performance improvement as a result of access to shared locking for
frequent lookup operations, reduced general overhead, and reduced overhead
in the event of contention.  All of these are imported for threaded
applications where simultaneous access to a shared file descriptor array
occurs frequently.  Kris has reported 2x-4x transaction rate improvements
on 8-core MySQL benchmarks; smaller improvements can be expected for many
workloads as a result of reduced overhead.

- Generally eliminate the distinction between "fast" and regular
  acquisisition of the filedesc lock; the plan is that they will now all
  be fast.  Change all locking instances to either shared or exclusive
  locks.

- Correct a bug (pointed out by kib) in fdfree() where previously msleep()
  was called without the mutex held; sx_sleep() is now always called with
  the sxlock held exclusively.

- Universally hold the struct file lock over changes to struct file,
  rather than the filedesc lock or no lock.  Always update the f_ops
  field last. A further memory barrier is required here in the future
  (discussed with jhb).

- Improve locking and reference management in linux_at(), which fails to
  properly acquire vnode references before using vnode pointers.  Annotate
  improper use of vn_fullpath(), which will be replaced at a future date.

In fcntl(), we conservatively acquire an exclusive lock, even though in
some cases a shared lock may be sufficient, which should be revisited.
The dropping of the filedesc lock in fdgrowtable() is no longer required
as the sxlock can be held over the sleep operation; we should consider
removing that (pointed out by attilio).

Tested by:	kris
Discussed with:	jhb, kris, attilio, jeff
2007-04-04 09:11:34 +00:00
Alexey Dokuchaev f2f72fff6e Add myself. 2007-04-04 07:30:34 +00:00
Xin LI 04533fc68e Use *_EMPTY macros when appropriate. 2007-04-04 07:29:53 +00:00
Ruslan Ermilov 3baf957931 Sort as requested. 2007-04-04 06:33:37 +00:00
Kip Macy fa0521c0e9 Make DMA tags per-queue to facilate parallel mappings
Defer mbuf allocation and initialization until after data has already been
received in a cluster

This reduces cpu utilization somewhat, but it only improves the rx path.
Recent changes to TCP appear to make us rate limited by the TX path.

This is the first step in reducing mbuf management overhead for manipulating
clusters.

MFC after: 3 days
2007-04-04 05:29:18 +00:00
Kip Macy e0bfe940a4 m_extadd does not appear to do the right thing for the case of clusters
allocated from UMA - add m_cljset to correspond to m_cljget

MFC after: 3 days
2007-04-04 04:08:57 +00:00
Alexander Kabaev a6a026d5f8 Cast away const qualifier to squash GCC warning. 2007-04-04 03:29:02 +00:00
Alexander Kabaev 7e2f16ba72 First argument of MD5Final is an array of unsigned characters.
Declare 'digest' local variable accordingly.
2007-04-04 03:24:01 +00:00
Alexander Kabaev edb2e5dca3 Include string.h for non-kernel builds to get proper memcpy prototype. 2007-04-04 03:16:59 +00:00
Alexander Kabaev d8164209b3 Include string.h for non-kernel builds to get proper strcpy, strlen
prototypes.
2007-04-04 03:14:15 +00:00
Colin Percival 17c0c70552 Add test to confirm that piping a tar archive created by bsdtar through
'bsdtar -cf- @-' doesn't alter it.
2007-04-04 03:12:15 +00:00
Alexander Kabaev 9160afee7c Do not assign result of (char *) cast to u_char * variable. 2007-04-04 03:10:42 +00:00
Alexander Kabaev c5384974d9 Use correct u_int and socklen_t types for parameters if function is
expecting them, not int.
2007-04-04 02:59:54 +00:00
Alexander Kabaev 3aebdb89ad Add include directives for string.h and stdlib.h to get proper function
prototypess of memset, memcpy and malloc respectively.
2007-04-04 02:40:59 +00:00
Li-Wen Hsu 506f0b8148 Add myself.
Approved by:     clsung (mentor)
2007-04-04 02:34:33 +00:00
Alexander Kabaev 84da49ceb2 Include string.h to get proper memcpy prototype. 2007-04-04 02:28:48 +00:00
Li-Wen Hsu d408e77e25 Add myself, my mentor/mentee relationship.
Approved by:     clsung (mentor)
2007-04-04 02:24:10 +00:00
Jung-uk Kim eef2b291e9 Import amd64 assembly implementations of div(3) family from NetBSD.
Obtained from:	NetBSD
2007-04-04 01:19:54 +00:00
Kip Macy ab43ffd2f6 add helper functions for mapping size to zonez and types
eliminate duplicated zone lookup switch statements
2007-04-04 00:31:49 +00:00
Chin-San Huang 385e723f67 - Remove the leading zero from the day of month.
Noticed by:	ru@
Approved by:	delphij@ (mentor)
MFC after:	1 week
2007-04-04 00:14:36 +00:00
Kip Macy 59a31e6acf fix typo 2007-04-04 00:11:22 +00:00
Kip Macy e2bc106690 style fixes and make sure that the lock is treated as released in the sharers == 0 case
not that this is somewhat racy because a new sharer can come in while we're updating stats
2007-04-04 00:01:05 +00:00
Colin Percival 41948c2530 Parse SCHILY.dev and SCHILY.ino fields. These are ignored when extracting
files, but used during archive creation.  This change unbreaks
# tar -cf rcp.tar /bin/rcp
# tar -cf rcp-copy.tar @rcp.tar
# cmp rcp.tar rcp-copy.tar
2007-04-03 23:53:55 +00:00
Kip Macy afc0bfbd90 Fixes to sx for newsx - fix recursed case and move out of inline
Submitted by: Attilio Rao <attilio@freebsd.org>
2007-04-03 22:58:21 +00:00
Kip Macy 70fe8436c8 move lock_profile calls out of the macros and into kern_mutex.c
add check for mtx_recurse == 0 when releasing sleep lock
2007-04-03 22:52:31 +00:00
Julian Elischer 1bd69ee131 Since we switched to using monatomically increasing timestamps,
they have been reported back to the userland as being in 1970.
Add boot time to the timestamp to give the time in the scale of the 'current'
real timescale.  Not perfect if you change the time a lot but good enough
to keep all the rules correct relative to each other correct in terms
of time relative to "now".
2007-04-03 22:45:50 +00:00
Matteo Riondato 74e69f9e66 Add the "-p" option, which allows to specify a port which the daemon
should bind to.

PR:		bin/94920
Reviewed by:	alfred@
MFC after:	1 week
2007-04-03 21:15:00 +00:00
Matteo Riondato 69f129c9f1 Add the "-p" option, which allows to specify a port which the daemon
should bind to.

PR:		bin/100969
Reviewed by:	alfred@
MFC after:	1 week
2007-04-03 20:58:28 +00:00
Alexander Kabaev 844b016555 Add entry for bsd.symver.mk.
Pointed out by: ru
2007-04-03 20:15:59 +00:00
Pawel Jakub Dawidek a5ee605621 Add myself. 2007-04-03 19:22:41 +00:00
Brian Somers b29cf88e96 Fix a typo 2007-04-03 19:14:39 +00:00
Alexander Kabaev 7ca8e6a670 Prepare rtld for symbol versioning. Disable it by default for now. 2007-04-03 19:01:06 +00:00
Ruslan Ermilov 0d1778eac6 Kill whitespace at EOL. 2007-04-03 18:57:09 +00:00
Alexander Kabaev 2da4e4706d Break out Version.map generation code from bsd.lib.mk into a
separate bsd.symver.mk file. Include bsd.symver.mk in bsd.lib.mk
to maintain the status quo.
2007-04-03 18:56:05 +00:00
Alexander Kabaev f82d4eed2f Add entry for dl_iterate_phdr. 2007-04-03 18:38:01 +00:00
Kip Macy 8289600ce7 skip call to _lock_profile_obtain_lock_success entirely if acquisition time is non-zero
(i.e. recursing or adding sharers)
2007-04-03 18:36:27 +00:00
Alexander Kabaev 832a21869c Add stub for dl_iterate_phdr. 2007-04-03 18:35:20 +00:00
Alexander Kabaev 585b090609 Add dl_iterate_phdr function prototype and corresponding dl_phdr_info
structure definition.
2007-04-03 18:33:41 +00:00
Alexander Kabaev 49f90ad282 Implement dl_iterate_phdr function.
Convert boolean flags in internal Obj_Entry structure into bitfields.
Properly check for loaded segment alignment in map_object.
2007-04-03 18:31:20 +00:00
Alexander Kabaev fb6395da91 Use u_int for variable manipulated by atomic ops to match atomic
ops function prototypes.
2007-04-03 18:28:13 +00:00
Kip Macy 802d9610eb Remove unneccessary LO_CONTESTED flag 2007-04-03 17:57:50 +00:00
Brian Somers 5de699ca22 Add entries for myself 2007-04-03 16:56:05 +00:00
Brian Somers eac3a02cfa Sort 2007-04-03 16:50:26 +00:00
Mark Peek a5d8788d0d This commit was generated by cvs2svn to compensate for changes in r168305,
which included commits to RCS files with non-trunk default branches.
2007-04-03 15:51:53 +00:00
Mark Peek 4f796ffc7b Import vendor patch to fix postcmd regression in tcsh-6.15.00. 2007-04-03 15:51:53 +00:00
Pawel Jakub Dawidek 89f75c2a04 - Protect against specifing journal less than 100MB and against journal
which size is not multiple of sector size.

  Reported by:	Eric Anderson <anderson@centtech.com>

- Improve wording in error message. I'm sorry, I don't remember who
  submitted this one.
2007-04-03 15:29:16 +00:00
Chin-San Huang e64bec2cfb - Remove the deprecated ``/stand'' hierarchy.
PR:		docs/111137
Submitted by:	Niclas Zeising
Approved by:	delphij@ (mentor)
2007-04-03 15:23:01 +00:00
Roman Kurakin 0898dcc278 s/if_vlan/vlan/
Noted by: brueffer
2007-04-03 14:36:18 +00:00
Robert Watson 6246c6e2a7 Fix use after free bug: use temporary variable to hold next entry in linked
list while freeing current entry, rather than using the free'd entry's next
pointer.

Found with:	Coverity Prevent(tm)
CID:		1333
2007-04-03 12:45:10 +00:00