History log of /dragonfly/sys/platform/vkernel64/x86_64/autoconf.c (Results 1 – 25 of 30)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# d873d672 31-Mar-2023 Sascha Wildner <saw@online.de>

vkernel/autoconf: Add missing opt_swap.h include to get at NSWBUF_MIN.


Revision tags: v6.4.0, v6.4.0rc1, v6.5.0, v6.2.2, v6.2.1, v6.2.0, v6.3.0, v6.0.1
# 5936d3e8 20-May-2021 Aaron LI <aly@aaronly.me>

vm: Change {buffer,clean,pager}_map globals to pointer type

Similar to the previous commit that changes global 'kernel_map' to type
of 'struct vm_map *', change related globals 'buffer_map', 'clean_

vm: Change {buffer,clean,pager}_map globals to pointer type

Similar to the previous commit that changes global 'kernel_map' to type
of 'struct vm_map *', change related globals 'buffer_map', 'clean_map'
and 'pager_map' to pointer type, i.e., 'struct vm_map *'.

No functional changes.

show more ...


# 1eeaf6b2 20-May-2021 Aaron LI <aly@aaronly.me>

vm: Change 'kernel_map' global to type of 'struct vm_map *'

Change the global variable 'kernel_map' from type 'struct vm_map' to a
pointer to this struct. This simplify the code a bit since all
inv

vm: Change 'kernel_map' global to type of 'struct vm_map *'

Change the global variable 'kernel_map' from type 'struct vm_map' to a
pointer to this struct. This simplify the code a bit since all
invocations take its address. This change also aligns with NetBSD's
'kernal_map' that it's also a pointer, which also helps the porting of
NVMM.

No functional changes.

show more ...


Revision tags: v6.0.0, v6.0.0rc1, v6.1.0
# 551a28f6 10-Dec-2020 Sascha Wildner <saw@online.de>

vkernel: Add extra space.


Revision tags: v5.8.3, v5.8.2, v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3, v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0
# c9678a7e 22-May-2019 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Reduce/refactor nbuf and maxvnodes calculations.

* The prime motivation for this commit is to target about 1/20
(5%) of physical memory for use by the kernel. These changes
significant

kernel - Reduce/refactor nbuf and maxvnodes calculations.

* The prime motivation for this commit is to target about 1/20
(5%) of physical memory for use by the kernel. These changes
significantly reduce kernel memory usage on systems with less
than 4GB of ram (and more specific for systems with less
than 1TB of ram), and also emplace more reasonable caps on
systems with 128GB+ of ram.

These changes return 100-200MB of ram to userland on systems
with 1GB of ram, and return around 6.5GB of ram on systems
with 128G of ram.

* The nbuf calculation and related code documentation was a bit
crufty, still somewhat designed for an earlier era and was
calculating about twice the stated 5% target. For systems with
128GB of ram or less the calculation was simply creating too many
filesystem buffers, allowing as much as 10% of physical memory to
be locked up by the buffer cache.

Particularly on small systems, this 10% plus other kernel overheads
left a lot less memory available for user programs than we would
have liked. This work gets us closer to the 5% target.

* Change the base calculation from 1/10 of physical memory to 1/20
of physical memory, cutting the number of buffers in half on
most systems. The code documentation stated 1/20 but was actually
calculating 1/10.

* On large memory systems > 100GB the number of buffers is now capped
at around 400000 or so (allowing the buffer cache to use around
6.5 GBytes). This cap was previously based on a relatively
disconnected parameter relating to available memory in early boot,
and when triggered it actually miscalculating nbufs to be double
the intended number.

The new cap is based on a fixed maximum of 500MB worth of
struct bufs, roughly similar to the original intention. This
change reduces the number of buffers reserved on system with
more than around 100GB of ram from around 12GB worth of data
down to 6.5GB.

* With the BKVABIO work eliminating most SMP invltlbs on buffer
recyclement, there is no real reason to need a huge buffer
cache. Just make sure its big enough on large-memory machines
to fully cache the likely live datasets for things like bulk
compiles and such.

* For kern.maxvnodes (which can be changed at run-time if you
desire), the base calcualtion on systems with less than 1GB
of ram has been cut in half (~60K vnodes to ~30K vnodes). It
will ramp up more slowly until it roughly matches the prior
calculation at 4GB of system memory. On systems with enough
memory, maxvnodes is now explicitly capped at 4M.

There generally is no need to allow an excessive number of vnodes
to be cached.

For HAMMER1 you can set vfs.hammer.double_buffer=1 to cause it
to cache data from the underlying device, allowing it to utilize
all available free(ish) memory regardless of the maxvnodes setting.

HAMMER2 caches disk blocks in the underlying device by default.
The vnode-based vm_object caches decompressed data, so we want
to have enough vnodes for nominal heavily parallel bulk operations
to avoid unnecessary re-lookups of the vnode as well as avoid having
to decompress the same thing over and over again.

In both cases an excessively high kern.maxvnodes actually wastes
memory on both HAMMER1 and HAMMER2... or at least makes the pageout
daemon's job more difficult.

* Remove vfs.maxmallocbufspace. It is no longer connected to
anything.

show more ...


Revision tags: v5.4.3, v5.4.2, v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1, v5.2.2
# fb3cf125 29-May-2018 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Add support for MosChip PCIe serial com, and console support

* Add support for the MosChip PCIe serial com (brand is typically
'StarTech' 'Natikve PCI Express RS232 serial adapter card wi

kernel - Add support for MosChip PCIe serial com, and console support

* Add support for the MosChip PCIe serial com (brand is typically
'StarTech' 'Natikve PCI Express RS232 serial adapter card with
16550 UART'.

* Add late console support. Console operation works the same
way, set it up in /boot/loader.conf. Typically:

sio0.flags=0x00
sio4.flags=0x30
sio4.baud=115200
#set boot_serial="YES" <-- commented out, do not set this

Note that at the point a late-configured serial port
wants to become the console, syscons is probably already
the console, so you have to use flags 0x30 instead of
0x10 to force it to change the console.

* Note, you do not have to set boot_serial="YES", because it
won't really help since the adapter isn't accessible to the
boot loader or to the kernel until the PCIe device probes
in the middle of the boot sequence.

* The kernel now retests for consoles at the end of its normal
configuration sequence, which allows the now-available
sioN devices from PCIe card(s) to become the console.

* Remove syscons sccnterm() code that tried to undo the syscons
console designation. This code was never called in the past
because the system console couldn't actually change once
selected. But now it can, and the code completely blows up
syscons for numerous reasons. Just leave the console
designation intact from syscons's point of view (the main
system will be vectored elsewhere so syscons will simply
not receive new kernel console reads and writes).

* Add a siocntxwait() call before changing com parameters,
since we are potentially changing the baud rate here.

* Change how the SIO driver assigns baud rates for the console
to handle late-console configurations. Also, allow sio*.baud
variables in loader.conf to override the default com rate.

* Add entries for com5 and com6 to /etc/remote, and default to
a more reasonable baud rate of 115200.

show more ...


Revision tags: v5.2.1, v5.2.0, v5.3.0, v5.2.0rc
# 466d4f43 19-Dec-2017 zrj <rimvydas.jasinskas@gmail.com>

kernel/pc64: Adjust some references to already removed i386.

While there, perform some whitespace fixes.
No functional change.


Revision tags: v5.0.2, v5.0.1, v5.0.0, v5.0.0rc2, v5.1.0, v5.0.0rc1
# 8d4553cb 24-Sep-2017 Sascha Wildner <saw@online.de>

kernel: Remove no longer used FFS_ROOT option.

Last used in code removed in 8840cec90a57df5e7c0f84c3c3c1e9abea7f2632.

While here, remove some no longer necessary opt_ffs.h #includes.


# 8840cec9 09-Sep-2017 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Remove kernel 'bootdev' variable

* The 'bootdev' variable is no longer used. It used to default-out the
root mount to UFS using boot device info passed-in from the boot code,
but that

kernel - Remove kernel 'bootdev' variable

* The 'bootdev' variable is no longer used. It used to default-out the
root mount to UFS using boot device info passed-in from the boot code,
but that was disconnected long ago and this code no longer serves
any purpose.

* We have depended on vfs.root.mountfrom in /boot/loader.conf to tell
the kernel where the root mount is for a long time now.

show more ...


Revision tags: v4.8.1, v4.8.0, v4.6.2, v4.9.0, v4.8.0rc
# 12b70cea 27-Jan-2017 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Remove ffs_rawread()

* Remove ffs_rawread(), because we will be removing vmapbuf/vunmapbuf soon
as well (because it isn't safe).


# 3091de50 17-Dec-2016 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Tag vm_map_entry structure, slight optimization to zalloc, misc.

* Tag the vm_map_entry structure, allowing debugging programs to
break-down how KMEM is being used more easily.

This re

kernel - Tag vm_map_entry structure, slight optimization to zalloc, misc.

* Tag the vm_map_entry structure, allowing debugging programs to
break-down how KMEM is being used more easily.

This requires an additional argument to vm_map_find() and most
kmem_alloc*() functions.

* Remove the page chunking parameter to zinit() and zinitna(). It was
only being used degeneratively. Increase the chunking from one page
to four pages, which will reduce the amount of vm_map_entry spam in
the kernel_map.

* Use atomic ops when adjusting zone_kern_pages.

show more ...


Revision tags: v4.6.1, v4.6.0, v4.6.0rc2, v4.6.0rc, v4.7.0
# dc6a6bd2 18-Jul-2016 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Refactor buffer cache code in preparation for vm_page repurposing

* Keep buffer_map but no longer use vm_map_findspace/vm_map_delete to manage
buffer sizes. Instead, reserve MAXBSIZE of

kernel - Refactor buffer cache code in preparation for vm_page repurposing

* Keep buffer_map but no longer use vm_map_findspace/vm_map_delete to manage
buffer sizes. Instead, reserve MAXBSIZE of unallocated KVM for each buffer.

* Refactor the buffer cache management code. bufspace exhaustion now has
hysteresis, bufcount works just about the same.

* Start work on the repurposing code (currently disabled).

show more ...


# 2f0acc22 17-Jul-2016 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Improve physio performance

* See http://apollo.backplane.com/DFlyMisc/nvme_sys03.txt

* Hash the pbuf system. This chops down spin-lock collisions
at high transaction rates (>150K IOPS)

kernel - Improve physio performance

* See http://apollo.backplane.com/DFlyMisc/nvme_sys03.txt

* Hash the pbuf system. This chops down spin-lock collisions
at high transaction rates (>150K IOPS) by 1000x.

* Implement a pbuf with pre-allocated kernel memory that we
copy into, avoiding page table manipulations and thus
avoiding system-wide invltlb/invlpg IPIs.

* This increases NVMe IOPS tests with three cards from
150K-200K IOPS to 950K IOPS using physio (random read,
4K blocks, from urandom-filled partition, with many
process threads, from 3 NVMe cards in parallel).

* Further adjustments to the vkernel build.

show more ...


Revision tags: v4.4.3, v4.4.2
# 2c64e990 25-Jan-2016 zrj <rimvydas.jasinskas@gmail.com>

Remove advertising header from sys/

Correct BSD License clause numbering from 1-2-4 to 1-2-3.

Some less clear cases taken as it was done of FreeBSD.


Revision tags: v4.4.1, v4.4.0, v4.5.0, v4.4.0rc
# 46bd5001 18-Nov-2015 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Improve netbooted root NFS mounts and allow tunable overrides.

* Add two tunables and set the default read-ahead for netbooted root
mounts to 4.

nfsroot.iosize defaults to 8192
nfsro

kernel - Improve netbooted root NFS mounts and allow tunable overrides.

* Add two tunables and set the default read-ahead for netbooted root
mounts to 4.

nfsroot.iosize defaults to 8192
nfsroot.rahead defaults to 4

* The default iosize must remain 8192 as many NFS servers can't handle
32768, but if your nfs server is on a DragonFly box you can override it
in your /boot/loader.conf, setting it to 32768.

With the improved read-ahead default, read performance should improve
significantly on netbooted root mounts. With the combination of the new
default read ahead and nfsroot.iosize=32768, read performance should be
able to max-out a GigE link (100+ MBytes/sec) (assuming the originating
storage can push that rate).

* Does not effect add-on nfs mounts in /etc/fstab which already used a
reasonable read-ahead setting.

show more ...


Revision tags: v4.2.4, v4.3.1
# 96a1eea0 23-Jul-2015 Sascha Wildner <saw@online.de>

i386 removal, part 21/x: Remove obsolete i386 specific USERCONFIG bits.

Even though some of this code was copied over to x86_64, this platform
never had the kernel support.


Revision tags: v4.2.3, v4.2.1, v4.2.0, v4.0.6, v4.3.0, v4.2.0rc, v4.0.5
# f3f3eadb 12-Mar-2015 Sascha Wildner <saw@online.de>

kernel: Move semicolon from the definition of SYSINIT() to its invocations.

This affected around 70 of our (more or less) 270 SYSINIT() calls.

style(9) advocates the terminating semicolon to be sup

kernel: Move semicolon from the definition of SYSINIT() to its invocations.

This affected around 70 of our (more or less) 270 SYSINIT() calls.

style(9) advocates the terminating semicolon to be supplied by the
invocation too, because it can make life easier for editors and other
source code parsing programs.

show more ...


Revision tags: v4.0.4
# 55d4a94a 02-Mar-2015 Sepherosa Ziehau <sephe@dragonflybsd.org>

ifnet: Make rest of ifnet accessing MPSAFE


Revision tags: v4.0.3, v4.0.2, v4.0.1, v4.0.0, v4.0.0rc3, v4.0.0rc2, v4.0.0rc, v4.1.0, v3.8.2, v3.8.1, v3.6.3, v3.8.0, v3.8.0rc2, v3.9.0, v3.8.0rc, v3.6.2, v3.6.1, v3.6.0
# ca667d3c 14-Nov-2013 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Fine-grain getnewbuf() and related vfs/bio data structures (2)

* Fix bug where bufinit() was being called prior to SMP initialization,
so it was only initializing the queues for one cpu i

kernel - Fine-grain getnewbuf() and related vfs/bio data structures (2)

* Fix bug where bufinit() was being called prior to SMP initialization,
so it was only initializing the queues for one cpu instead of all of
them.

show more ...


Revision tags: v3.7.1, v3.6.0rc, v3.7.0, v3.4.3, v3.4.2, v3.4.0, v3.4.1, v3.4.0rc, v3.5.0
# 923b8527 22-Feb-2013 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Fix performance issue due to buffer fragmentation

* Systems with a lot of memory have very large buffer pools. Defragmenting
these pools can be expensive. Often the buffer_map becomes f

kernel - Fix performance issue due to buffer fragmentation

* Systems with a lot of memory have very large buffer pools. Defragmenting
these pools can be expensive. Often the buffer_map becomes full well
before the bufspace actually hits its limits. Filesystems such as HAMMER
which use large buffer sizes (64K) are more likely to cause the problem.

The result is extremely bad I/O performance for data not in the buffer
cache which requires a new buffer to be instantiated.

* To solve this we double the size of the buffer_map's KVA area on
64-bit systems while leaving the maximum buffer space allowed the
same. The larger virtual space greatly reduces KVA allocation
failures due to fragmentation.

* This solves significant performance issues on monster with its 64G
of ram, but should improve performance on any 64-bit system by
reducing buffer cache defrag iterations.

* Also fix a possible intermediate value overflow in vlrureclaim().

show more ...


Revision tags: v3.2.2
# 1918fc5c 24-Oct-2012 Sascha Wildner <saw@online.de>

kernel: Make SMP support default (and non-optional).

The 'SMP' kernel option gets removed with this commit, so it has to
be removed from everybody's configs.

Reviewed-by: sjg
Approved-by: many


Revision tags: v3.2.1, v3.2.0, v3.3.0
# f86b3b54 15-Sep-2012 Matthew Dillon <dillon@apollo.backplane.com>

kernel - fix builds

* Fix a few kprintf()'d %d -> %ld for nbufs.

Reported-by: vsrinivas


# 74d62460 15-Sep-2012 Matthew Dillon <dillon@apollo.backplane.com>

kernel - remove bounds on buffer cache nbuf count for 64-bit

* Remove arbitrary 1GB buffer cache limitation

* Adjusted numerous 'int' fields to 'long'. Even though nbuf is not
likely to exceed 2

kernel - remove bounds on buffer cache nbuf count for 64-bit

* Remove arbitrary 1GB buffer cache limitation

* Adjusted numerous 'int' fields to 'long'. Even though nbuf is not
likely to exceed 2 billion buffers, byte calculations using the
variable began overflowing so just convert that and various other
variables to long.

* Make sure we don't blow-out the temporary valloc() space in early boot
due to nbufs being too large.

* Unbound 'kern.nbuf' specifications in /boot/loader.conf as well.

show more ...


# 716a081c 06-Sep-2012 Sascha Wildner <saw@online.de>

kernel: Use NULL for pointers in some places.


Revision tags: v3.0.3, v3.0.2, v3.0.1
# 14aee18d 16-Feb-2012 Sascha Wildner <saw@online.de>

kernel: Remove opt_bus.h references where they are not needed.

It only defines BUS_DEBUG (if set) and BUS_DEBUG is only used in
subr_bus.c, so it doesn't need to be included anywhere else.


12