Commit Graph

210705 Commits

Author SHA1 Message Date
Allan Jude
87ed2b7f5a A new implementation of the loader block cache
The block cache implementation in loader has proven to be almost useless, and in worst case even slowing down the disk reads due to insufficient cache size and extra memory copy.
Also the current cache implementation does not cache reads from CDs, or work with zfs built on top of multiple disks.
Instead of an LRU, this code uses a simple hash (O(1) read from cache), and instead of a single global cache, a separate cache per block device.
The cache also implements limited read-ahead to increase performance.
To simplify read ahead management, the read ahead will not wrap over bcache end, so in worst case, single block physical read will be performed to fill the last block in bcache.

Booting from a virtual CD over IPMI:
0ms latency, before: 27 second, after: 7 seconds
60ms latency, before: over 12 minutes, after: under 5 minutes.

Submitted by:	Toomas Soome <tsoome@me.com>
Reviewed by:	delphij (previous version), emaste (previous version)
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D4713
2016-04-18 23:09:22 +00:00
Simon J. Gerraty
30e2910007 Allow -f dirdeps.mk some/dir with no TARGET_MACHINE spec
Use $MACHINE if target does not specify.

Reviewed by:	bdrewery
2016-04-18 22:00:26 +00:00
Bryan Drewery
f31828ed9c META_MODE: Don't hide the .depend rm -f command.
Otherwise the build command changes every build.  META_MODE will
only remove it if something changes to warrant rebuilding
the file.

Sponsored by:	EMC / Isilon Storage Division
2016-04-18 21:11:55 +00:00
Bryan Drewery
e1dfa6572d Update meta2deps to fix crash when using -X with M2D_EXCLUDES. 2016-04-18 21:05:19 +00:00
Andriy Voskoboinyk
2cf5e9365d libc: do not include <sys/types.h> where <sys/param.h> was already included
According to style(9):
> normally, include <sys/types.h> OR <sys/param.h>, but not both.
(<sys/param.h> already includes <sys/types.h> when LOCORE is not defined).
2016-04-18 21:05:15 +00:00
Simon J. Gerraty
51c71d3e03 Update dirdeps.mk et al
dirdeps.mk: move logic to handle -f dirdeps.mk to inside check
for first read of dirdeps.mk

Also fix handling of WITHOUT_DIRDEPS_BELOW

gendirdeps.mk: pass M2D_EXCLUDES to meta2deps

meta.autodep.mk: if we build with nofilemon, leave a cookie to
prevent updating dependencies until cleaned.

Reviewed by:	bdrewery
2016-04-18 20:56:21 +00:00
Sean Bruno
ae6bd5b7be Correct possible underflow conditions when checking for available space
in the tx h/w ring buffer.

Reviewed by:	gnn jeb.j.cramer@intel.com
MFC after:	1 week
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D5918
2016-04-18 20:33:44 +00:00
Michael Tuexen
b1deed45e6 Address issues found by the XCode code analyzer. 2016-04-18 20:16:41 +00:00
Glen Barber
fcede88bbd Add MK_AUTO_OBJ=no to ${MAKE} invocation if PKG_VERSION needs to be
created to avoid creating ${.OBJDIR}.

The duplicate REVISION/BRANCH/VERSION evaluation will be addressed
separately.

Sponsored by:	The FreeBSD Foundation
2016-04-18 19:27:51 +00:00
Bryan Drewery
f62610d7bb Follow-up r298220: Don't pass down META_MODE which will still enable it.
Reported by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by:	EMC / Isilon Storage Division
2016-04-18 18:39:43 +00:00
Bryan Drewery
d7698c0722 META_MODE: Disable during installworld and similar.
META_MODE may create cookies during staging of files to WORLDTMP that would
also prevent installation of the files to the final DESTDIR, since the cookie
already exists.  This is not yet the case but will be soon.  Prevent other
similar issues by disabling META_MODE for any top-level install targets.

Sponsored by:	EMC / Isilon Storage Division
2016-04-18 18:14:05 +00:00
Bryan Drewery
29fbb8071f Cause an error during 'make install' if trying to compile with CC.
This is limited to src-tree builds, meaning not extended to ports or other
out-of-tree builds.

This will help ensure that read-only OBJDIRS will be respected at install-time
by causing a more consistent failure for those who don't use a read-only
OBJDIR.  It also will cause Jenkins to yell.  This is a better solution than
trying to see CC=false as has been attempted and discussed before.

Of course this is only relevant for files generated by CC.

Disable this for META_MODE since it will detect the CFLAGS/command
change and force a rebuild.

Sponsored by:	EMC / Isilon Storage Division
2016-04-18 18:14:02 +00:00
Bryan Drewery
09fb6bff29 Follow-up r297842: Rework header generation to fix always rebuilding.
This reworks the handling of common headers to just include the needed
logic rather than invoke MAKE.  This avoids the problem listed in r297842
and avoids other dependency tracking issues.

Pointyhat to:	bdrewery
Reported by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by:	EMC / Isilon Storage Division
2016-04-18 18:13:58 +00:00
Bryan Drewery
b964b94376 META_MODE: Clean .meta files with 'make cleandepend'.
Sponsored by:	EMC / Isilon Storage Division
2016-04-18 18:12:12 +00:00
Pedro F. Giffuni
c4c510be1e Reuse our roundup2() macro instead of reinventing the wheel.
Obtained from:	DragonflyBSD
2016-04-18 17:30:33 +00:00
Pedro F. Giffuni
6b2d5217d7 Re-use our roundup2() macro instead of reinventing the wheel.
Obtained from:	DragonflyBSD
2016-04-18 16:25:37 +00:00
Pedro F. Giffuni
9929cc5dd0 libipsec: use NULL instead of zero for pointers. 2016-04-18 15:08:31 +00:00
Pedro F. Giffuni
46266845a4 rbootd: use NULL instead of zero for pointers. 2016-04-18 15:05:48 +00:00
Alan Somers
f94033f407 Add the ability to read a SAS device's Target Port NAA designator
sys/cam/scsi/scsi_all.h
sys/cam/scsi/scsi_all.c
	Add the scsi_devid_is_port_naa helper function

Reviewed by:	ken
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D5975
2016-04-18 15:01:59 +00:00
Pedro F. Giffuni
6e4fcca0f8 ftpd: replace malloc + memset 0 with calloc.
It is faster and usually safer.
Use NULL instead of zero for the pointer.
2016-04-18 15:01:49 +00:00
Pedro F. Giffuni
d5808ebf65 libstand: use NULL instead of zero for pointers. 2016-04-18 14:45:56 +00:00
Marcelo Araujo
7a4b1114b1 Use NULL instead of 0 for pointers.
strchr(3) will return NULL if the character does not appear in the
string.

MFC after:	2 weeks.
2016-04-18 14:44:01 +00:00
Pedro F. Giffuni
5eadfbfcd0 libbluetooth: use NULL instead of zero for pointers. 2016-04-18 14:41:30 +00:00
Pedro F. Giffuni
50a7cc95da rexec(3): use NULL instead of zero for pointers. 2016-04-18 14:37:26 +00:00
Marcelo Araujo
ff129d6f87 User NULL instead of 0 for pointers.
gethostbyname(3) will return NULL in case of an error.

MFC after:	2 weeks.
2016-04-18 14:12:42 +00:00
Marcelo Araujo
edf6b683e8 Use NULL instead of 0 for pointers.
strchr(3) will return NULL if the character does not appear in the
string.

MFC after:	2 weeks.
2016-04-18 14:08:35 +00:00
Ed Maste
c0e5e7f3d2 Replace ${CURDIR}/../.. with ${CURDIR:H:H} in elftoolchain
This produces a nicer path in debug info and build logs.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2016-04-18 13:13:59 +00:00
Michael Tuexen
f8ee69bf81 Fix signed/unsigned warnings. 2016-04-18 11:39:41 +00:00
Andrew Turner
9ca014f67b Pull the MSI/MSI-X handling functions out to help with INTRNG integration.
Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-04-18 10:37:50 +00:00
Sergey Kandaurov
48ac3a2af5 Fixed indentation, minor style. 2016-04-18 09:56:41 +00:00
Michael Tuexen
a39ddef038 Fix a warning about an unused variable. 2016-04-18 09:39:46 +00:00
Michael Tuexen
98d5fd976b Put panic() calls under INVARIANTS. 2016-04-18 09:29:14 +00:00
Xin LI
b97b6d27f2 Fix tinderbox LINT build. 2016-04-18 08:24:13 +00:00
Enji Cooper
9c7defc3bf Minor cosmetic cleanup
- Remove spurious trailing whitespace in licensing header
- Remove unnecessary semi-colon after comment [*]

MFC after: 3 days
Submitted by: pfg [*]
Sponsored by: EMC / Isilon Storage Division
2016-04-18 07:48:27 +00:00
Marcelo Araujo
7fd35136d9 Use NULL instead of 0 for pointers.
malloc will return NULL if it cannot allocate memory.

MFC after:	2 weeks.
2016-04-18 07:47:26 +00:00
Marcelo Araujo
cd5f6a0cc1 strchr(3) will return NULL if it cannot find the character in the
string.
getfsent(3) will return NULL on EOF or error.

MFC after:	2 weeks.
2016-04-18 07:44:53 +00:00
Marcelo Araujo
fb6a35935a Use NULL instead of 0 for pointers.
strchr(3) will return NULL if the character does not appear in the
string.

MFC after:	2 weeks.
2016-04-18 07:40:36 +00:00
Xin LI
3e41d09d08 MFV r298178:
Update file to 5.26.

MFC after:	2 weeks
Relnotes:	yes
2016-04-18 07:36:24 +00:00
Marcelo Araujo
fffa1bd071 User NULL instead of 0 for pointers.
getservent(3) returns NULL on EOF or error.

MFC after:	2 weeks.
2016-04-18 07:14:01 +00:00
Marcelo Araujo
1b56693f8b Use NULL instead of 0 for pointers.
fopen(3) will return NULL in case it cannot open the STREAM.

MFC after:	2 weeks.
2016-04-18 07:09:34 +00:00
Marcelo Araujo
26ac9660a4 Use NULL instead of 0 for pointers.
MFC after:	2 weeks.
2016-04-18 07:05:18 +00:00
Michael Tuexen
f2ea2a2d5f Cleanup debug output. 2016-04-18 06:58:07 +00:00
Michael Tuexen
e187bac213 Don't use anonymous unions. 2016-04-18 06:38:53 +00:00
Michael Tuexen
24a9e1b53b Remove a left-over debug printf(). 2016-04-18 06:32:24 +00:00
Stanislav Galabov
3378bfdb23 Allow RT3350 CPU clock to be detected as part of RT3050/RT3052 detection
OpenWRT's dts files treat RT3050/RT3052/RT3350 within the same SoC dtsi
file, so we need to distinguish between the three dynamically, mainly
because the bit we use to determine the clock speed on RT3050/RT3052
can actually be floating on RT3350 and RT3350 is always at 320MHz.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5983
2016-04-18 06:15:58 +00:00
Marcelo Araujo
d919e0d513 Use NULL instead of 0 for pointers.
realloc will return NULL if it cannot allocate memory.

MFC after:	2 weeks.
2016-04-18 06:12:00 +00:00
Marcelo Araujo
7dbab9554d Use NULL for pointers.
strrchr(3) will return NULL if the character does not appears in
the string.

MFC after:	2 weeks.
2016-04-18 06:02:26 +00:00
Marcelo Araujo
ef1cb629d8 Use NULL instead of 0 for pointers.
Also malloc will return NULL if it cannot allocate memory.

MFC after:	2 weeks.
2016-04-18 05:46:18 +00:00
Marcelo Araujo
6a3f9a213a Use NULL instead of 0.
strtok(3) will return NULL when no more tokens remain.

MFC after:	2 weeks.
2016-04-18 05:26:32 +00:00
Marcelo Araujo
bb0bd931dc The malloc will return NULL if it can't allocate memory.
MFC after:	2 weeks.
2016-04-18 05:19:45 +00:00