Commit Graph

255726 Commits

Author SHA1 Message Date
Mateusz Guzik
c6d3272b73 vfs: add vn_seqc_read_notmodify 2021-01-06 07:28:07 +00:00
Mateusz Guzik
65f775157e seqc: add seqc_read_notmodify
The routine can be used when the caller does not expect to ever have to
wait for anything. Checking later with seqc_consistent retains all the
guarantees.
2021-01-06 07:28:06 +00:00
Mateusz Guzik
71a6a0b545 cache: skip checking for spurious slashes if possible
Tested by:	pho
2021-01-06 07:28:06 +00:00
Mateusz Guzik
33f3e81df5 cache: combine fast path enabled status into one flag
Tested by:	pho
2021-01-06 07:28:06 +00:00
Mateusz Guzik
dbbbc07cc3 cache: split handling of 0 and non-0 error codes
Tested by:	pho
2021-01-06 07:07:24 +01:00
Mateusz Guzik
a1a8f8ada1 cache: deinline state handling
The intent is to reduce branchfest when finishing the lookup.

Tested by:	pho
2021-01-06 07:05:22 +01:00
Mateusz Guzik
05803be000 cache: stop setting cn_nameptr on entry as matches cn_pnbuf already
While here tidy up other asserts.
2021-01-06 07:03:41 +01:00
Kristof Provost
fda7daf063 pfctl: Stop sharing pf_ruleset.c with the kernel
Now that we've split up the datastructures used by the kernel and
userspace there's essentually no more overlap between the pf_ruleset.c
code used by userspace and kernelspace.

Copy the userspace bits to the pfctl directory and stop using the kernel
file.

Reviewed by:	philip
MFC after:	2 weeks
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D27764
2021-01-05 23:35:37 +01:00
Kristof Provost
5a3b9507d7 pf: Convert pfi_kkif to use counter_u64
Improve caching behaviour by using counter_u64 rather than variables
shared between cores.

The result of converting all counters to counter(9) (i.e. this full
patch series) is a significant improvement in throughput. As tested by
olivier@, on Intel Xeon E5-2697Av4 (16Cores, 32 threads) hardware with
Mellanox ConnectX-4 MCX416A-CCAT (100GBase-SR4) nics we see:

x FreeBSD 20201223: inet packets-per-second
+ FreeBSD 20201223 with pf patches: inet packets-per-second
+--------------------------------------------------------------------------+
|                                                                        + |
| xx                                                                     + |
|xxx                                                                    +++|
||A|                                                                       |
|                                                                       |A||
+--------------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x   5       9216962       9526356       9343902     9371057.6     116720.36
+   5      19427190      19698400      19502922      19546509     109084.92
Difference at 95.0% confidence
        1.01755e+07 +/- 164756
        108.584% +/- 2.9359%
        (Student's t, pooled s = 112967)

Reviewed by:	philip
MFC after:	2 weeks
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D27763
2021-01-05 23:35:37 +01:00
Kristof Provost
26c841e2a4 pf: Allocate and free pfi_kkif in separate functions
Factor out allocating and freeing pfi_kkif structures. This will be
useful when we change the counters to be counter_u64, so we don't have
to deal with that complexity in the multiple locations where we allocate
pfi_kkif structures.

No functional change.

MFC after:	2 weeks
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D27762
2021-01-05 23:35:37 +01:00
Kristof Provost
320c11165b pf: Split pfi_kif into a user and kernel space structure
No functional change.

MFC after:	2 weeks
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D27761
2021-01-05 23:35:37 +01:00
Kristof Provost
c3adacdad4 pf: Change pf_krule counters to use counter_u64
This improves the cache behaviour of pf and results in improved
throughput.

MFC after:	2 weeks
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D27760
2021-01-05 23:35:37 +01:00
Kristof Provost
c7bdafe2f1 pf: Remove unused fields from pf_krule
The u_* counters are used only to communicate with userspace, as
userspace cannot use counter_u64. As pf_krule is not passed to userspace
these fields are now obsolete.

MFC after:	2 weeks
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D27759
2021-01-05 23:35:36 +01:00
Kristof Provost
e86bddea9f pf: Split pf_rule into kernel and user space versions
No functional change intended.

MFC after:	2 weeks
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D27758
2021-01-05 23:35:36 +01:00
Kristof Provost
dc865dae89 pf: Migrate pf_rule and related structs to pf.h
As part of the split between user and kernel mode structures we're
moving all user space usable definitions into pf.h.

No functional change intended.

MFC after:      2 weeks
Sponsored by:   Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D27757
2021-01-05 23:35:36 +01:00
Kristof Provost
fbbf270eef pf: Use counter_u64 in pf_src_node
Reviewd by:	philip
MFC after:      2 weeks
Sponsored by:   Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D27756
2021-01-05 23:35:36 +01:00
Kristof Provost
17ad7334ca pf: Split pf_src_node into a kernel and userspace struct
Introduce a kernel version of struct pf_src_node (pf_ksrc_node).

This will allow us to improve the in-kernel data structure without
breaking userspace compatibility.

Reviewed by:	philip
MFC after:	2 weeks
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D27707
2021-01-05 23:35:36 +01:00
Alexander Motin
4d86ab429e Fix devinfo typo.
Submitted by:	Nick Wolff <darkfiberiru@gmail.com>
MFC after: 	1 week
Differential Revision:	https://reviews.freebsd.org/D27981
2021-01-05 14:56:23 -05:00
Emmanuel Vadot
cb00fc7c4d arm64: genet: Add bcm2711-genet-v5 compatible
Later dtb from the RPI Foundation removed the brcm,genet-v5 compatible
for some unknown reason, add brcm,bcm2711-genet-v5 to the list of compatible
device for if_genet
2021-01-05 20:50:43 +01:00
Baptiste Daroussin
009c1100e5 UPDATING: we are now in 2021, bye 2020
Reported by:	N.J. Mann <njm@njm.me.uk>
2021-01-05 17:17:51 +01:00
Ed Maste
613a08cfa2 rtld: map without PROT_EXEC for relocation
This makes text segment relocation work under W^X.

Submitted by:	Greg V <greg@unrelenting.technology> (original version)
Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D27953
2021-01-05 10:57:14 -05:00
Baptiste Daroussin
bed70f83ac ncurses: document the change requires a clean build
Reporter by:	cy
2021-01-05 16:38:58 +01:00
Mateusz Piotrowski
d41149a8e9 Add some examples to script.1
While here:

- Split synopsis into two parts. The first explains how to record
  sessions, while the second one explains how to replay (some of)
  the recorded sessions.
- Fix the -width argument of the environment variables list.

MFC after:	1 week
2021-01-05 16:32:27 +01:00
Mateusz Piotrowski
225afb6cad Improve readability of the options list
MFC after:	3 days
2021-01-05 15:46:56 +01:00
Baptiste Daroussin
821aa63a09 ncurses: only keep the version with widechar support
Only keep the widechar version of ncurses as libncursesw.so.9

Keep the old name to avoid breaking the ABI compatibility (the non
widechar version libncurses.so.9 is not binary compatible with
libncursesw.so.9) since all ports and base are already only linking
against the widechar version we can simply remove libncurses.so.9

Since the .9 version only lived in the dev branch and never ended in a
release, it is simply removed and not added to any binary compat
package.

Add symlinks to keep build time compatibility for anyone linking against
-lncurses
2021-01-05 14:01:32 +01:00
Andrew Turner
9fd96b416c Add the missing pmcstat log entries
Sponsored by:	Innovate UK
2021-01-05 10:03:05 +00:00
Andrew Turner
a7d8bd8c23 Add missing structs to pmclog_entry
This is used to size allocations so needs to incude all log structs
to ensure its size is correct.

Sponsored by:	Innovate UK
2021-01-05 10:03:05 +00:00
Toomas Soome
58661b3ba9 loader: only use vidc_install_font() with vga controller
If the controller does not support VGA, we should not
touch VGA registers.
2021-01-05 00:49:18 +02:00
Toomas Soome
8c1dda1171 loader: vidc_load_palette() does not need arguments
Remove left over argument from vidc_load_palette.
2021-01-05 00:49:08 +02:00
Alan Cox
7beeacb27b Honor the vm page's PG_NODUMP flag on arm and i386.
Reviewed by:	kib, markj
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D27949
2021-01-04 16:15:42 -06:00
Alexander V. Chernikov
9c0ff6a8bb Remove now-unused RT_GATEWAY* definitions.
They were used to simplify nexthop transition, hence not needed
 anymore.
2021-01-04 21:45:46 +00:00
Mariusz Zaborski
459511895e cap_sysctl: expose structures and variables
Expose structures and variables that may be used on systems
build without Casper support.
2021-01-04 20:56:07 +01:00
Mariusz Zaborski
8c121177f0 casper: convert macros to inline functions
In libcasper, the first argument to the function is a structure that
represents a connection to Casper. On systems without Casper, macros
are used to interpose the Casper functions to standard libc ones.
This may cause errors/warnings that the variable is not used.
With the inline function, there is no such problem.
2021-01-04 20:55:35 +01:00
Mariusz Zaborski
3810732829 lib9p: fix building on systems without capser
PR:		252353
2021-01-04 20:48:48 +01:00
Andrew Turner
12d053032b Support overflow count in hwpmc on arm64
We increment the overflow count when receiving an overflow interrupt
with special care to check if it happens while reading the event counter.

Sponsored by:	Innovate UK
2021-01-04 17:14:41 +00:00
Toomas Soome
b2a8d7a9b5 loader: fix powerpc build with gfx_fb
Need to add stub data and gfx functions to make linking happy.
2021-01-04 16:57:58 +00:00
Toomas Soome
e24d4e72c0 loader: fix mips build with gfx_fb
Need to add stub data and gfx functions to make linking happy.
2021-01-04 16:57:50 +00:00
Emmanuel Vadot
e5df46055a arm64: rockchip: rk_clk_mux: Tell the clk framework if we didn't change the clock
Otherwise the clk framework will not pass the freq change request to the clock
parents.
Fix d03fd8ede2
Reported by:	br
2021-01-04 17:30:00 +01:00
Emmanuel Vadot
f61a3898bb include: Use INCSGROUPS for a few files
Instead of using install directly use INCSGROUPS for them.
All those files are the ones we installed when the directory have more .h
files that we don't want to install so they aren't using the LSUBDIR stuff.

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D27612
2021-01-04 16:36:43 +01:00
Emmanuel Vadot
b6cc69322a include: Tag the last includes files as part of the -dev package
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D27618
2021-01-04 16:36:39 +01:00
Emmanuel Vadot
4401fa9bf1 pkgbase: rename PKGSIGNKEY to PKG_REPO_SIGNING_KEY
this way, it'll be automatically picked up by poudriere
That's quite handy when building pkgbase!

Submitted by:	Mina Galić <me@igalic.co>
Reviewed By: bapt, bcr (manpages)
Differential Revision: https://reviews.freebsd.org/D27690
2021-01-04 16:24:14 +01:00
Emmanuel Vadot
53a27d8955 bsd.incs.mk: Add support to override tags for a specific include group
With this patch if a Makefile is using the INCSGROUPS mechanisms it can
override the default package for specific includes files using
GROUPPACKAGE=	     mynewpackage

While here add a few comments after endif/endfor so it's easier to read.

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D27611
2021-01-04 16:21:32 +01:00
Emmanuel Vadot
e3ff9a1f2e pkgbase: Put the last rc files in the rc package
Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D27718
2021-01-04 16:21:13 +01:00
Emmanuel Vadot
066a8c691e pkgbase: Install atf and kyua in the tests package
While here make sure that all tests dirs are taggued correctly.

Reviewed by:	bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D27714
2021-01-04 16:20:47 +01:00
Emmanuel Vadot
b0995124cd pkgbase: Install libxo test files in the tests package
Reviewed by:	bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D27713
2021-01-04 16:20:26 +01:00
Emmanuel Vadot
735a585e80 mk: Set the DIR tags based on the files one
Otherwise we loose the info as we use bsd.dirs.mk for creating directories.

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D27712
2021-01-04 16:20:04 +01:00
Emmanuel Vadot
a22cde7c02 pkgbase: Put ppp in it's own package
ppp uses libalias modules which now belong in the natd package.
Avoid bringing a dependancy on natd for the utilities package.

Reviewed by:	bapt
Differential Revision:	https://reviews.freebsd.org/D27711
2021-01-04 16:19:36 +01:00
Emmanuel Vadot
c92017ce5b pkgbase: Put libalias in the natd package
natd is the main user of the libalias* modules, put them together.

Reviewed by:	bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D27710
2021-01-04 16:19:08 +01:00
Emmanuel Vadot
6b68fdbbf7 pkgbase: Put zoneinfo file in their own package
Those files take some amount of diskspace and one might not want them
installed on some situation (mfsdisk, small embedded system etc ...)

Reviewed by:	bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D27709
2021-01-04 16:18:36 +01:00
Emmanuel Vadot
2d486ba15f pkgbase: Move bectl to the runtime package
runtime contain what is needed to boot in single user and repair a
system, bectl could be handy to have in this situation.

Differential Revision:	https://reviews.freebsd.org/D27708
2021-01-04 16:17:12 +01:00