Commit Graph

205836 Commits

Author SHA1 Message Date
Garance A Drosehn
20696c6e3c I'm still interested in reviewing any code changes to lpr & friends
(lpc, lpd, lpq, etc).
2015-11-16 22:08:49 +00:00
Andriy Voskoboinyk
7c2e8d335d wpi(4): import r289674
Switch PCI register reads from using magic numbers to using the names
defined in pcireg.h

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D4185
2015-11-16 21:55:11 +00:00
John Baldwin
1941909336 Only use a power of 2 for the number of receive and transmit queues.
Using other values causes VMXNET3_CMD_ENABLE to fail.  The Linux
driver also enforces this restriction.

Reviewed by:	bryanv
MFC after:	1 week
Sponsored by:	Norse
Differential Revision:	https://reviews.freebsd.org/D4139
2015-11-16 21:36:50 +00:00
Jung-uk Kim
2409c5b0cc Remove duplicate manual pages.
Reported by:	brd
2015-11-16 21:36:15 +00:00
Marius Strobl
e9f8886ee1 With r290566 in place it turned out that WOL previously only worked by
accident with RTL8168G and later chips when the interface actually was
brought up. This is due to the fact that with these MAC variants, RXDV
gate needs be disabled for WOL to work. So do just that in re_setwol()
when IFCAP_WOL is requested.
Reported and tested by: dhw

MFC after:	3 days
2015-11-16 21:13:57 +00:00
Bryan Drewery
804baa3822 Revert r290944. It was wrong. 2015-11-16 21:05:38 +00:00
Bryan Drewery
5a16e0b461 Fix error case for bmake to echo 0.
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-11-16 20:31:00 +00:00
Bryan Drewery
a55fda252b Avoid FSCHG for INSTALL_AS_USER as well.
PR:		194189
X-MFC-With:	r290628
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-11-16 20:18:38 +00:00
Craig Rodrigues
3634bb8e13 Add include of signal.h for signal() prototype. 2015-11-16 17:28:04 +00:00
Craig Rodrigues
67436074b5 Replace __svc_fdset with svc_fdset.
FreeBSD lacks __svc_fdset and __svc_fdsetsize.
2015-11-16 17:25:27 +00:00
Craig Rodrigues
4fa5f53548 Do not use SA_LEN() to dereference sa_len.
FreeBSD lacks the SA_LEN() macro.
2015-11-16 17:11:11 +00:00
Craig Rodrigues
21f6783298 Add include of time.h for tzset() prototype. 2015-11-16 17:08:51 +00:00
Craig Rodrigues
350ed59982 Replace __dead with __dead2.
FreeBSD lacks __dead.
2015-11-16 17:08:05 +00:00
Craig Rodrigues
66b5c05d95 Add include of sys/param.h for MAXHOSTNAMELEN 2015-11-16 17:06:33 +00:00
Craig Rodrigues
ab905b04a2 Replace __dead with __dead2.
FreeBSD lacks __dead.
2015-11-16 17:03:52 +00:00
Craig Rodrigues
cc7c29bf9a Replace HOST_NAME_MAX with MAXHOSTNAMELEN.
FreeBSD lacks HOST_NAME_MAX.
2015-11-16 17:02:34 +00:00
Craig Rodrigues
468878d99a Remove reference to EAI_NODATA.
It does not exist on FreeBSD.
2015-11-16 16:58:09 +00:00
Craig Rodrigues
28b524fb19 Add include of <string.h> for strlen() prototype. 2015-11-16 16:52:56 +00:00
Craig Rodrigues
f6fe55842b Convert Makefile to FreeBSD style.
Add libopenbsd to link line for imsg.
2015-11-16 16:51:18 +00:00
Craig Rodrigues
9e7c127f8d Import ypldap from OpenBSD.
ypldap -- Intended to be a drop-in replacement for ypserv, gluing in a
LDAP directory and thus providing support for users and groups stored in
LDAP for the get{pw,gr}ent family of functions.
2015-11-16 16:48:43 +00:00
Jonathan T. Looney
5eaa6f01f5 Improve accuracy of PMC sampling frequency
The code tracks a counter which is the number of events until the next
sample. On context switch in, it loads the saved counter. On context
switch out, it tries to calculate a new saved counter.

Problems:

1. The saved counter was shared by all threads in a process. However, this
means that all threads would be initially loaded with the same saved
counter. However, that could result in sampling more often than once every
X number of events.

2. The calculation to determine a new saved counter was backwards. It
added when it should have subtracted, and subtracted when it should have
added. Assume a single-threaded process with a reload count of 1000 events.
Assuming the counter on context switch in was 100 and the counter on context
switch out was 50 (meaning the thread has "consumed" 50 more events), the
code would calculate a new saved counter of 150 (instead of the proper 50).

Fix:

1. As soon as the saved counter is used to initialize a monitor for a
thread on context switch in, set the saved counter to the reload count.
That way, subsequent threads to use the saved counter will get the full
reload count, assuring we sample at least once every X number of events
(across all threads).

2. Change the calculation of the saved counter. Due to the change to the
saved counter in #1, we simply need to add (modulo the reload count) the
remaining counter time we retrieve from the CPU when a thread is context
switched out.

Differential Revision:	https://reviews.freebsd.org/D4122
Approved by:	gnn (mentor)
MFC after:	1 month
Sponsored by:	Juniper Networks
2015-11-16 15:22:15 +00:00
Jonathan T. Looney
e64ba55dd2 Change the driver stats to what they really are: unsigned values.
When pmcstat exits after some samples were dropped, give the user an
idea of how many were lost. (Granted, these are global numbers, but
they may still help quantify the scope of the loss.)

Differential Revision:	https://reviews.freebsd.org/D4123
Approved by:	gnn (mentor)
MFC after:	1 month
Sponsored by:	Juniper Networks
2015-11-16 15:16:09 +00:00
Baptiste Daroussin
1d211085ac Bring back a couple of ISO8859-15 locales:
- af_ZA.ISO8859-15
- en_AU.ISO8859-15
- en_CA.ISO8859-15
- en_NZ.ISO8859-15
- en_US.ISO8859-15
- fr_CA.ISO8859-15
2015-11-16 12:58:47 +00:00
Baptiste Daroussin
fdce42be6c Add missing alias for zh_CN.UTF-8 2015-11-16 09:48:09 +00:00
Andrey V. Elsukov
0c80e7df43 Use explicitly specified ivsize instead of blocksize when we mean IV size.
Set zero ivsize for enc_xform_null and remove special handling from
xform_esp.c.

Reviewed by:	gnn
Differential Revision:	https://reviews.freebsd.org/D1503
2015-11-16 07:10:42 +00:00
Enji Cooper
e742867ba4 Remove directory made obsolete by r290905
MFC after: 1 week
X-MFC with: r290905
X-MFC note: stable/10 only
Sponsored by: EMC / Isilon Storage Division
2015-11-16 06:56:45 +00:00
Konstantin Belousov
76386c7ecd Rework the test which raises OOM condition. Right now, the code
checks for the swap space consumption plus checks that the amount of
the free pages exceeds some limit, in case pagedeamon did not coped
with the page shortage in one of the late passes.  This is wrong
because it does not account for the presence of the reclamaible pages
in the queues which are not selectable for reclaim immediately.  E.g.,
on the swap-less systems, large active queue easily triggered OOM.

Instead, only raise OOM when pagedaemon is unable to produce a free
page in several back-to-back passes.  Track the failed passes per
pagedaemon thread.

The number of passes to trigger OOM was selected empirically and
tested both on small (32M-64M i386 VM) and large (32G amd64)
configurations.  If the specifics of the load require tuning, sysctl
vm.pageout_oom_seq sets the number of back-to-back passes which must
fail before OOM is raised.  Each pass takes 1/2 of seconds.  Less the
value, more sensible the pagedaemon is to the page shortage.

In future, some heuristic to calculate the value of the tunable might
be designed based on the system configuration and load.  But before it
can be done, the i/o system must be fixed to reliably time-out
pagedaemon writes, even if waiting for the memory to proceed.  Then,
code can account for the in-flight page-outs and postpone OOM until
all of them finished, which should reduce the need in tuning.  Right
now, ignoring the in-flight writes and the counter allows to break
deadlocks due to write path doing sleepable memory allocations.

Reported by:	Dmitry Sivachenko, bde, many others
Tested by:	pho, bde, tuexen (arm)
Reviewed by:	alc
Discussed with:	bde, imp
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2015-11-16 06:26:26 +00:00
Marcelo Araujo
650dae4419 Don't need cast malloc.
Approved by:		rodrigc (mentor)
Differential Revision:	D4175
2015-11-16 06:17:12 +00:00
Adrian Chadd
27ddeed4a3 Add QCA9533 to the list of SoCs that require IRQ's be ACKed. 2015-11-16 06:15:01 +00:00
Konstantin Belousov
3949873f7a Do not use vmspace_resident_count() for the OOM process selection.
Residency count track the number of pte entries installed into the
current pmap, which does not reflect the consumption of the physical
memory by the address map.  Due to several mechanisms like pv entries
reclamation, copy on write etc. the resident pte entries count may be
much less than the amount of physical memory kept by the process.

Provide the OOM-specific vm_pageout_oom_pagecount() function which
estimates the amount of reclamaible memory which could be stolen if
the process is killed.

Reported and tested by:	pho
Reviewed by:	alc
Comments text by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2015-11-16 06:02:11 +00:00
Konstantin Belousov
b98acc0a1b VM daemon works in parallel with the pagedaemon threads, and, among
other actions, swaps out kernel stacks of the processes.  On the other
hand, currentl OOM logic which selects a process to kill in the
critical condition, skips process with swapped-out thread.  Under some
loads, this results in the big(gest) process being ignored by OOM.

Do not skip a process which has inhibited thread due to the swap-out,
in the OOM selection loop.  Note that killing such process requires
the thread stack page-in, but sometimes this is the only way to
recover.

Reported and tested by:	pho
Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	3 weeks
2015-11-16 05:52:04 +00:00
Enji Cooper
e30a620063 Integrate tools/regression/pipe in to the FreeBSD test suite as
tests/sys/kern/pipe

- Fix style(9) bugs
- Fix compiler warnings
- Use `nitems(x)` instead of `sizeof(x) / sizeof(*x)` pattern

The testcases will be converted over to ATF eventually, but for now will be
integrated in as plain C tests

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-16 05:38:40 +00:00
Enji Cooper
392acbdc05 Port contrib/netbsd-tests/kernel/t_mqueue.c to FreeBSD
- Add missing headers
- Ensure mqueuefs is loaded
- Make sure the mqueuefs path is absolute and relative to /
- Cast the result of mq_open returning -1 to (mqd_t) to mute a compiler
  warning

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-16 05:28:14 +00:00
Enji Cooper
a0c963e116 Integrate contrib/netbsd-tests/kernel/t_lockf.c into the FreeBSD test suite as
tests/sys/kern/lockf_test

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-16 04:56:14 +00:00
Enji Cooper
b14427e250 Ignore EINTR from usleep(3) in try_locks(..)
NetBSD's usleep(3) only returns -1/sets errno=EINVAL when `microseconds`
is one million or more

MFC after: 3 days
Submitted by: pho
Sponsored by: EMC / Isilon Storage Division
2015-11-16 04:53:13 +00:00
Adrian Chadd
d6141d33bc Add initial support for the QCA953x ("Honeybee") from Qualcomm Atheros.
The QCA953x SoC is an integrated 2x2 2GHz 11n + MIPS24k core, with
a 5 port FE switch, gige WAN port, and all the same stuff you'd find on
its predecessor - the AR9331.

However, buried deep in here somewhere is also a PCIe EP/RC for various
applications and some other weird bits I don't yet know about.

This is enough to get the reference board up and booting.  I haven't yet
had it pass lots of packets - I need to finalise the ethernet switch
bits and the GMAC configuration (ie, how the ethernet ports and switch
are wired up) and I'll bring that in when I commit the base configuration
files to use the thing.

The wifi stuff will come much later.  I have to port that support from
Linux ath9k and extend our vendor HAL to support it.

The reference board (AP143) comes with 32MB RAM and 4MB flash, so in order
to use it I need to get USB working fully so I can run root from there.

Thankyou to Qualcomm Atheros for access to the reference design board.

Details:

* Add register definitions from openwrt;
* It looks like a QCA955x but shrunk down to a QCA933x footprint, so
  use the QCA955x bits and fix up the clock detection code to do the
  QCA953x bits (they're very subtly different);
* Teach GPIO about it;
* Teach EHCI about it;
* Teach if_arge about it;
* Teach the CPU detection code about it.

Tested:

* AP143, QCA9533v2 SoC

Obtained from:	Linux, Linux OpenWRT
2015-11-16 04:28:00 +00:00
Enji Cooper
f443c488b0 Add some initial tests for SLIST and STAILQ macros
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-16 04:15:39 +00:00
Enji Cooper
e514d4718a Integrate contrib/netbsd-tests/lib/libcrypt/t_crypt.c in to the FreeBSD
test suite as lib/libcrypt/crypt_test

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-16 04:06:14 +00:00
Enji Cooper
38cad2971d Expect all testcases dealing with invalid salts to fail on FreeBSD
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-16 04:04:05 +00:00
Craig Rodrigues
950e4fbd37 Fix path for symlinks.
Reviewed by:	ngie
2015-11-16 04:02:24 +00:00
Enji Cooper
3e9b602907 Integrate acct(2) testcase in as tests/sys/kern/acct/acct_test
The :encode_tv_random_million testcase fails the epsilon tests a few thousand
times out of one million, so expect the testcase to fail

MFC after: 1 week
Submitted by: keramida
Sponsored by: EMC / Isilon Storage Division
2015-11-16 03:32:12 +00:00
Marcelo Araujo
17c1dcd408 Don't need cast malloc.
Approved by:		rodrigc (mentor)
Differential Revision:	D4117
2015-11-16 03:18:40 +00:00
John-Mark Gurney
9ed7fa550e If you backup a large file that is mostly holes, previously we'd issue
a seek for every block...  For large (Exabyte sized files) this would
issue lots of unneeded seeks, so combine them...

Thanks for the work Jan, sorry took so long to commit...  And an item
completed off the IdeasPage!

Submitted by:	Jan Sucan
2015-11-16 01:29:58 +00:00
Baptiste Daroussin
4ba17eaff6 Fix unused-but-set-variable
Spotted by:	gcc 5.2
2015-11-15 20:44:22 +00:00
Baptiste Daroussin
0dc64c20b4 Remove trailing spaces at end of lines 2015-11-15 20:00:00 +00:00
Baptiste Daroussin
99b47c3cc6 Update the list of files to be removed in case world is built WITHOUT_LOCALES 2015-11-15 19:58:05 +00:00
Enji Cooper
bea1d37ed7 Disable -Wformat with scanfloat_test when compiling with gcc to avoid a
"use of assignment suppression and length modifier together in scanf format"
warning on line 90 (it's intentional)

MFC after: 1 week
X-MFC with: r290537, r290856, r290860
Sponsored by: EMC / Isilon Storage Division
2015-11-15 18:56:58 +00:00
Enji Cooper
6c40e2d68c Add NO_WERROR and WARNS to PROG_OVERRIDE_VARS for bsd.prog.mk compatibility
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2015-11-15 18:51:48 +00:00
Enji Cooper
c519c0a10c Redo r290847: use #ifdef __NetBSD__ on all the non-public APIs to
mute -Wunused-but-set-variable warnings with gcc dealing with the
function calls

X-MFC with: r290847
MFC after: 1 week
Reported by: gcc
Sponsored by: EMC / Isilon Storage Division
2015-11-15 18:49:31 +00:00
Enji Cooper
0fc72683be Fix -Wformat issues
X-MFC with: r290563
MFC after: 1 week
Reported by: gcc
Sponsored by: EMC / Isilon Storage Division
2015-11-15 18:45:04 +00:00