Commit Graph

181451 Commits

Author SHA1 Message Date
Steve Kargl
1783063f18 ld80/s_expl.c:
* In the special case x = -Inf or -NaN, use a micro-optimization
  to eliminate the need to access u.xbits.man.

* Fix an off-by-one for small arguments |x| < 0x1p-65.

ld128/s_expl.c:

* In the special case x = -Inf or -NaN, use a micro-optimization
  to eliminate the need to access u.xbits.manh and u.xbits.manl.

* Fix an off-by-one for small arguments |x| < 0x1p-114.

Obtained from:	bde
2013-06-03 18:51:34 +00:00
Steve Kargl
31407861b8 ld80/s_expl.c:
* Update the evaluation of the polynomial.  This allows the removal
  of the now unused variables t23 and t45.

ld128/s_expl.c:

* Update the evaluation of the polynomial and the intermediate
  result t.  This update allows several numerical constants to be
  written as double rather than long double constants.   Update
  the constants as appropriate.

Obtained from:	bde
2013-06-03 18:40:00 +00:00
Steve Kargl
199b8e343d Rename a few P2, P3, ... coefficients to A2, A3, ... missed in
my previous commit.
2013-06-03 18:18:08 +00:00
Steve Kargl
f3049ab5f3 Update a comment to reflect that we are using an endpoint of
an interval instead of a midpoint.
2013-06-03 18:14:18 +00:00
Steve Kargl
ad36b00fcb Add a u suffix to the IEEEl2bits unions o_threshold and u_threshold,
and use macros to access the e component of the unions.  This allows
the portions of the code in ld80 to be identical to the ld128 code.

Obtained from:	bde
2013-06-03 18:07:04 +00:00
Steve Kargl
4aa8c9453f Introduce the macro LOG2_INTERVAL, which is log2(number of intervals).
Use the macroi as a micro-optimization to convert a subtraction and
division to a shift.

Obtained from:	bde
2013-06-03 17:51:08 +00:00
John Baldwin
24150d37d3 - Fix a couple of inverted panic messages for shared/exclusive mismatches
of a lock within a single thread.
- Fix handling of interlocks in WITNESS by properly requiring the interlock
  to be held exactly once if it is specified.
2013-06-03 17:41:11 +00:00
Steve Kargl
03e1315345 Whitespace. 2013-06-03 17:40:52 +00:00
Konstantin Belousov
9138579845 Assert that interrupts are enabled in the trap handlers on x86 before
calling generic code to deliver signals.

Discussed with:	bde
Tested by:	pho
MFC after:	1 week
2013-06-03 17:40:05 +00:00
John Baldwin
95d28652af - Handle the recursed/not recursed flags with RA_RLOCKED in rw_assert().
- Tweak a panic message.
2013-06-03 17:38:57 +00:00
Konstantin Belousov
d39116f5d5 Be more generous when donating the current thread time to the owner of
the vnode lock while iterating over the free vnode list.  Instead of
yielding, pause for 1 tick.  The change is reported to help in some
virtualized environments.

Submitted by:	Roger Pau Monn? <roger.pau@citrix.com>
Discussed with:	jilles
Tested by:	pho
MFC after:	2 weeks
2013-06-03 17:36:43 +00:00
Steve Kargl
bb23de67bb * Rename the polynomial coefficients from P2, P3, ... to A2, A3, ....
The names now coincide with the name used in PTP Tang's paper.

* Rename the variable from s to tbl to better reflect that
  this is a table, and to be consistent with the naming scheme
  in s_exp2l.c

Reviewed by:	bde (as part of larger diff)
2013-06-03 17:36:26 +00:00
Konstantin Belousov
be6ec55376 Remove irrelevant comments.
Discussed with:	alc
MFC after:	3 days
2013-06-03 17:30:40 +00:00
Navdeep Parhar
7bbe4d1f68 cxgbe(4): t4fw_cfg must be explicitly loaded if the driver is being
loaded via loader.conf.

Submitted by:	jwd@
MFC after:	3 days
2013-06-03 17:30:21 +00:00
Steve Kargl
b419a5506a * Style(9). Start non-Copyright fancy formatted comments with /**.
Reviewed by:	bde (as part of larger diff)
2013-06-03 17:24:46 +00:00
Steve Kargl
a1d69112c1 ld80/s_expl.c:
* Update Copyright years to include 2013.

ld128/s_expl.c:

* Correct and update Copyright years.  This code originated from
  the ld80 version, so it should reflect the same time period.

Reviewed by:	bde (as part of larger diff)
2013-06-03 17:21:43 +00:00
Ed Schouten
49111f0092 Add libiconv based versions of *c16*() and *c32*().
I initially thought wchar_t was locale independent, but this seems to be
only the case on Linux. This means that we cannot depend on the *wc*()
routines to implement *c16*() and *c32*(). Instead, use the Citrus
libiconv that is part of libc.

I'll see if there is anything I can do to make the existing functions
somewhat useful in case the system is built without libiconv in the
nearby future. If not, I'll simply remove the broken implementations.

Reviewed by:	jilles, gabor
2013-06-03 17:17:56 +00:00
Jason Evans
f8ca2db1f8 Update jemalloc to version 3.4.0. 2013-06-03 14:36:28 +00:00
Ed Maste
9bdb572a00 Switch to 2-clause license
Approved by:	luigi@
2013-06-03 13:11:48 +00:00
Andre Oppermann
33e0730e2d Specify a maximum TSO length limiting the segment chain to what the
Xen host side can handle after defragmentation.

This prevents the driver from throwing away too long TSO chains and
improves the performance on Amazon AWS instances with 10GigE virtual
interfaces to the normally expected throughput.

Submitted by:	cperciva (earlier version)
Reviewed by:	cperciva
Tested by:	cperciva
MFC after:	1 week
2013-06-03 13:00:33 +00:00
Andre Oppermann
3c914c547e Allow drivers to specify a maximum TSO length in bytes if they are
limited in the amount of data they can handle at once.

Drivers can set ifp->if_hw_tsomax before calling ether_ifattach() to
change the limit.

The lowest allowable size is IP_MAXPACKET / 8 (8192 bytes) as anything
less wouldn't be very useful anymore.  The upper limit is still at
IP_MAXPACKET (65536 bytes).  Raising it requires further auditing of
the IPv4/v6 code path's as the length field in the IP header would
overflow leading to confusion in firewalls and others packet handler on
the real size of the packet.

The placement into "struct ifnet" is a bit hackish but the best place
that was found.  When the stack/driver boundary is updated it should
be handled in a better way.

Submitted by:	cperciva (earlier version)
Reviewed by:	cperciva
Tested by:	cperciva
MFC after:	1 week (using spare struct members to preserve ABI)
2013-06-03 12:55:13 +00:00
Ed Maste
acbbd07aca Switch to 2-clause license
Approved by:	bms@
2013-06-03 12:43:09 +00:00
David Schultz
0921e73008 Bump __FreeBSD_version for the addition of the following functions to libm:
cacos, cacosf, cacosh, cacoshf,
  casin, casinf, casinh, casinhf,
  catan, catanf, catanh, catanhf,
  logl, log2l, log10l, log1pl
I am hoping kargl@ will commit expl and expm1l soon, in which case this
bump will cover those, too.

Requested by:	danfe
2013-06-03 09:33:51 +00:00
David Schultz
8ffb5b838e Add more tests for log functions. A few are commented out because the
long double versions don't pass yet.  (They are rather nit-picky cases,
so there's ongoing discussion with Bruce about whether it is worth the
performance cost.)
2013-06-03 09:15:15 +00:00
David Schultz
25a4d6bfda Add logl, log2l, log10l, and log1pl.
Submitted by:	bde
2013-06-03 09:14:31 +00:00
Konstantin Belousov
1e65d73c74 Do not map the shared page COW. If the process wired its address
space, fork(2) would cause shadowing of the physical object and
copying of the shared page into private copy, effectively preventing
updates for the exported timehands structure and stopping the clock.

Specify the maximum allowed permissions for the page to be read and
execute, preventing write from the user mode.

Reported and tested by:	<huanghwh@yahoo.com>
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2013-06-03 04:32:53 +00:00
Konstantin Belousov
91ddaeb725 Since the cause of the problems with the __fillcontextx() was
identified, unify the code of check_deferred_signal() for all
architectures, making the variant under #ifdef x86 common.

Tested by:	marius (sparc64)
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2013-06-03 04:22:42 +00:00
Konstantin Belousov
07d46f9c18 MFamd64: when printing the trap information, show the %esp value.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2013-06-03 04:19:21 +00:00
Konstantin Belousov
92fab43f7f When auto-sizing the buffer cache, limit the amount of physical memory
used as the estimation of size, to 32GB.  This provides around 100K of
buffer headers and corresponding KVA for buffer map at the peak.
Sizing the cache larger is not useful, also resulting in the wasting
and exhausting of KVA for large machines.

Reported and tested by:	bdrewery
Sponsored by:	The FreeBSD Foundation
2013-06-03 04:16:48 +00:00
Konstantin Belousov
aed1e745d0 The vm_page lock is not needed around the call to vm_page_insert().
Submitted by:	alc
MFC after:	1 week
2013-06-03 04:11:42 +00:00
Alan Cox
b417181250 Require that the page lock is held, instead of the object lock, when
clearing the page's PGA_REFERENCED flag.  Since we are typically
manipulating the page's act_count field when we are clearing its
PGA_REFERENCED flag, the page lock is already held everywhere that we clear
the PGA_REFERENCED flag.  So, in fact, this revision only changes some
comments and an assertion.  Nonetheless, it will enable later changes to
object locking in the pageout code.

Introduce vm_page_assert_locked(), which completely hides the implementation
details of the page lock from the caller, and use it in
vm_page_aflag_clear().  (The existing vm_page_lock_assert() could not be
used in vm_page_aflag_clear().)  Over the coming weeks, I expect that we'll
either eliminate or replace the various uses of vm_page_lock_assert() with
vm_page_assert_locked().

Reviewed by:	attilio
Sponsored by:	EMC / Isilon Storage Division
2013-06-03 01:22:54 +00:00
Brian Somers
6a3193a773 Move ppp.8.m4 back to ppp.8 and de-ifdef it.
Requested by: joel

MFC after:	1 week
2013-06-02 23:56:38 +00:00
Devin Teske
dd5cc066af Like r250701, introduce another handy function for truncating variables to a
specific byte-length. Works like vsnprintf(3).
2013-06-02 23:25:27 +00:00
Devin Teske
f8e121ed61 Fix a typo. In this case, the typo caused the f_noyes() invocation to
display a global instead of the passed-argument; however since the global
always has the same value as the passed argument, it made no difference in
the realtime operation.
2013-06-02 23:23:29 +00:00
Devin Teske
e4cb6ac115 Fix a bug in which the user's choice to Cancel was not recognized. This was
caused by the standard (and correct) behavior of the shell to discard the
return status of lvalue-operands in a pipe-chain.

The solution is to not pipe the file-acquisition directly into sort(1) but
instead store the output (allowing immediate testing of the return status)
and later sort it.
2013-06-02 23:20:46 +00:00
Devin Teske
faf9d0ce1c Fix a bug that would cause a spurious warning to appear to appear in an
edge-case. The case was that you have been through the FTP setup once before
and on the second time through, you cancel at the re-selection of a new FTP
server.

The spurious warning was "device_media: not found" and was caused because
the underlying call to f_device_network_down() did not check to see if the
network device existed before attempting to shut it down.

Add checks to make sure we don't forge ahead unless the device exists.
2013-06-02 23:18:27 +00:00
Devin Teske
538d68ea69 Fix a bug in which the user's choice to Cancel was not properly recognized. 2013-06-02 23:15:12 +00:00
Devin Teske
3b4e309862 Change the name of a couple of functions in `usermgmt/user_input.subr' to
make their purpose more clear by their names:

	f_dialog_input_change() and
	f_dialog_input_expire()

Are now (respectively):

	f_dialog_input_expire_password() and
	f_dialog_input_expire_account()

Upon revisit to this portion of code, the former names were too confusing.
2013-06-02 23:12:32 +00:00
Devin Teske
10908a6f19 Fix a copy/paste error within a comment. 2013-06-02 23:08:21 +00:00
Devin Teske
80ae9845f5 Add some additional debugging to the common media library. 2013-06-02 23:06:33 +00:00
Devin Teske
c01472c194 Make some obvious consolidations in local declaration for readability. 2013-06-02 23:05:01 +00:00
Devin Teske
51c41087d1 Standardize NULL initialization to be consistent. 2013-06-02 23:02:56 +00:00
Devin Teske
80433743e3 Use f_isset() (introduced by r250317) instead of `f_quietly f_getvar ...'. 2013-06-02 22:54:36 +00:00
Devin Teske
42ade6a964 Make proper use of locals in f_dialog_init(). 2013-06-02 22:45:54 +00:00
Devin Teske
f4844f65a9 Improvements to whitespace and comments. 2013-06-02 22:34:40 +00:00
Devin Teske
5b4765c331 Fix option processing from the library layer to address unexpected
behavior(s); e.g., `-Xd' versus `-dX' did not produce the same results.

The libraries common.subr and dialog.subr automatically process the
arguments passed to the program and enable/disable functionality without the
need to process the arguments within your program. For example, if "$@"
contains `-d', common.subr will see this and enable debugging regardless of
whether you process "$@" yourself or not (this automatic processing can
easily be disabled for custom scripts that don't want it; see the afore-
mentioned scripts for additional details).

NOTE: common.subr stores a copy of "$@" in $ARGV for convenient (and
repeated) processing by libraries such as dialog.subr which provide such
transparent functionality for the consuming script(s).

However, the libraries don't know if a program wants to accept `extra'
options. Flags are not really a problem, because the library can be
programmed to silently ignore unknown flags. The trouble comes into play
when the program wants to define an option that takes an argument.

For example:

	bsdconfig -D logfile -X

In the above example, the library uses getopts to process $ARGV and if it
doesn't know that `-D' takes an argument, the option processing will
prematurely terminate on `logfile' (this is standard/correct behavior for
getopts but is undesired in our situation where we have partially off-loaded
main argument processing).

The problem is solved by allowing the program to define an extra set of
options to be included in each library's handling of $ARGV. Only options
that require arguments are truly necessary to be pre-specified in this new
manner.
2013-06-02 22:04:39 +00:00
Devin Teske
052f89691c Standardize the way functions build their arguments leading up to a dialog
invocation. Specifically, "top-load" your arguments and in the order in-
which they will be displayed. For example, many [if not all] widgets display
information in the following order, top-to-bottom (visually):

+ backtitle (displayed behind the widget at top-left)
+ title (at the top of the `window')
+ prompt text (just below the title and above whatever widget you choose)
+ Depending on widget, _one_ of the following:
  - menu list
  - radio list
  - check list
  - text input box with initial text
  - [Xdialog(1)] 2x or 3x text input boxes
  - [dialog(1)] a multi-part form
  - progress bar
  - etc. (many more widget choices)
+ buttons (right below the selected widget)
+ [dialog(1)] the hline (displayed at bottom of `window')

NOTE: Xdialog(1) accepts and silently ignores --hline

When building local arguments for your dialog invocation, if the value can't
be cleanly loaded into a local, add "# Calculated below" to the end of the
local declaration while retaining the block order of argument declarations.

Move other local declarations that are not associated with this top-loading
the dialog arguments to right-above where they are first-used.

Also, standardize on the names of the arguments. For example, always use
$prompt (instead of sometimes $msg and sometimes $prompt); use $menu_list
or $shell_list or $radio_list for those respective widgets; ad nauseum.

While we're doing this, flush-out full arguments for many invocations that
were passing NULL strings (making it unapparent if you were staring at this
one invocation what argument that NULL string was supposed to represent).

Last, while we're in startup/rcconf let's remove the unnecessary use of a
GLOBAL (RCCONF_MENU_LIST) for the menu_list.
2013-06-02 20:02:50 +00:00
Alan Cox
eeff88a7ca Remove unnecessary #include's. 2013-06-02 18:10:16 +00:00
Eitan Adler
a96469b791 Correct check to see if file changes.
Reported by:	swildner@DragonFlyBSD.org
Reviewed by:	des
2013-06-02 18:10:07 +00:00
Eitan Adler
08aa7c869f Add 'static' where able. 2013-06-02 17:55:00 +00:00