History log of /netbsd-src/sys/kern/init_main.c (Results 1 – 25 of 550)
Revision Date Author Comments
# 4fb61a8a 29-Dec-2024 jmmv <jmmv@NetBSD.org>

Fix SPLASHSCREEN_IMAGE handling

This allows a kernel compiled with options:

options SPLASHSCREEN
makeoptions SPLASHSCREEN_IMAGE="path/to/image"

to correctly display the built-in image,

Fix SPLASHSCREEN_IMAGE handling

This allows a kernel compiled with options:

options SPLASHSCREEN
makeoptions SPLASHSCREEN_IMAGE="path/to/image"

to correctly display the built-in image, which was previously failing to be
initialized by init_main.c. Note that init_main.c was already checking for
makeoptions_SPLASHSCREEN_IMAGE and SPLASHSCREEN_IMAGE inconsistently in two
places, and now it doesn't anymore.

show more ...


# 7dff59c8 05-Mar-2024 thorpej <thorpej@NetBSD.org>

Revert previous until I can diagnose a failure reported by gson.


# 33021732 05-Mar-2024 thorpej <thorpej@NetBSD.org>

Early in main(), assert that curcpu() evaluates as the primary CPU and
stash away a pointer to it as the boot CPU for quick reference later.


# 29964953 17-Jan-2024 hannken <hannken@NetBSD.org>

Protect kernel hooks exechook, exithook and forkhook with rwlock.
Lock as writer on establish/disestablish and as reader on list traverse.

For exechook ride "exec_lock" as it is already take as read

Protect kernel hooks exechook, exithook and forkhook with rwlock.
Lock as writer on establish/disestablish and as reader on list traverse.

For exechook ride "exec_lock" as it is already take as reader when
traversing the list. Add local locks for exithook and forkhook.

Move exec_init before signal_init as signal_init calls exechook_establish()
that needs "exec_lock".

PR kern/39913 "exec, fork, exit hooks need locking"

show more ...


# 59e0001f 23-Sep-2023 ad <ad@NetBSD.org>

Repply this change with a couple of bugs fixed:

- Do away with separate pool_cache for some kernel objects that have no special
requirements and use the general purpose allocator instead. On one o

Repply this change with a couple of bugs fixed:

- Do away with separate pool_cache for some kernel objects that have no special
requirements and use the general purpose allocator instead. On one of my
test systems this makes for a small (~1%) but repeatable reduction in system
time during builds presumably because it decreases the kernel's cache /
memory bandwidth footprint a little.
- vfs_lockf: cache a pointer to the uidinfo and put mutex in the data segment.

show more ...


# ef0f79c8 12-Sep-2023 ad <ad@NetBSD.org>

Back out recent change to replace pool_cache with then general allocator.
Will return to this when I have time again.


# cbcf86cb 10-Sep-2023 ad <ad@NetBSD.org>

- Do away with separate pool_cache for some kernel objects that have no special
requirements and use the general purpose allocator instead. On one of my
test systems this makes for a small (~1%)

- Do away with separate pool_cache for some kernel objects that have no special
requirements and use the general purpose allocator instead. On one of my
test systems this makes for a small (~1%) but repeatable reduction in system
time during builds presumably because it decreases the kernel's cache /
memory bandwidth footprint a little.
- vfs_lockf: cache a pointer to the uidinfo and put mutex in the data segment.

show more ...


# 792ae95f 02-Sep-2023 riastradh <riastradh@NetBSD.org>

heartbeat(9): Move #ifdef HEARTBEAT to sys/heartbeat.h.

Less error-prone this way, and the callers are less cluttered.


# 12861a66 07-Jul-2023 riastradh <riastradh@NetBSD.org>

heartbeat(9): New mechanism to check progress of kernel.

This uses hard interrupts to check progress of low-priority soft
interrupts, and one CPU to check progress of another CPU.

If no progress ha

heartbeat(9): New mechanism to check progress of kernel.

This uses hard interrupts to check progress of low-priority soft
interrupts, and one CPU to check progress of another CPU.

If no progress has been made after a configurable number of seconds
(kern.heartbeat.max_period, default 15), then the system panics --
preferably on the CPU that is stuck so we get a stack trace in dmesg
of where it was stuck, but if the stuckness was detected by another
CPU and the stuck CPU doesn't acknowledge the request to panic within
one second, the detecting CPU panics instead.

This doesn't supplant hardware watchdog timers. It is possible for
hard interrupts to be stuck on all CPUs for some reason too; in that
case heartbeat(9) has no opportunity to complete.

Downside: heartbeat(9) relies on hardclock to run at a reasonably
consistent rate, which might cause trouble for the glorious tickless
future. However, it could be adapted to take a parameter for an
approximate number of units that have elapsed since the last call on
the current CPU, rather than treating that as a constant 1.

XXX kernel revbump -- changes struct cpu_info layout

show more ...


# 1dd4eae2 26-Oct-2022 riastradh <riastradh@NetBSD.org>

kern/init_main.c: Get extern lwp0 from sys/lwp.h.


# ea119a1a 21-Jul-2022 simonb <simonb@NetBSD.org>

Removed unused opt_wapbl.h include.


# 4066ef22 18-Jun-2022 andvar <andvar@NetBSD.org>

fix typos in word "functions" in comments, mainly s/fuctions/functions/.


# afc8fd54 19-Mar-2022 hannken <hannken@NetBSD.org>

Fix locking after opendisk(), VOP_IOCTL() needs an unlocked vnode,
vn_rdwr() needs flag IO_NODELOCKED.


# a0fb64e9 18-Mar-2022 riastradh <riastradh@NetBSD.org>

entropy(9): Establish the softint a little earlier.

Just need to wait until softint_establish and high-priority xcalls
will work, no later than that. Doing this earlier gives us slightly
more of a

entropy(9): Establish the softint a little earlier.

Just need to wait until softint_establish and high-priority xcalls
will work, no later than that. Doing this earlier gives us slightly
more of a chance to ensure cprng_fast and ssp get entropy from
hardware RNG devices that rely on interrupts.

show more ...


# 7c674e8e 26-Jan-2022 andvar <andvar@NetBSD.org>

remove double t from targeted, add missing r to arbitrary
And fix few more typos along the way in comments and man pages.


# e0c42eff 01-Apr-2021 simonb <simonb@NetBSD.org>

Expose olde style intrcnt interrupt accounting via event counters.
This code will be garbage collected once our last legacy intrcnt
user is update to native evcnts.


# d54d6b7a 05-Dec-2020 thorpej <thorpej@NetBSD.org>

Refactor interval timers to make it possible to support types other than
the BSD/POSIX per-process timers:

- "struct ptimer" is split into "struct itimer" (common interval timer
data) and "struct

Refactor interval timers to make it possible to support types other than
the BSD/POSIX per-process timers:

- "struct ptimer" is split into "struct itimer" (common interval timer
data) and "struct ptimer" (per-process timer data, which contains a
"struct itimer").

- Introduce a new "struct itimer_ops" that supplies information about
the specific kind of interval timer, including it's processing
queue, the softint handle used to schedule processing, the function
to call when the timer fires (which adds it to the queue), and an
optional function to call when the CLOCK_REALTIME clock is changed by
a call to clock_settime() or settimeofday().

- Rename some fuctions to clearly identify what they're operating on
(ptimer vs itimer).

- Use kmem(9) to allocate ptimer-related structures, rather than having
dedicated pools for them.

Welcome to NetBSD 9.99.77.

show more ...


# 4b096338 12-Nov-2020 simonb <simonb@NetBSD.org>

Set a better default for MAXFILES on larger RAM machines if not
otherwise specified the kernel config file. Arbitary numbers are
20,000 files for 16GB RAM or more and 10,000 files for 1GB RAM or
mor

Set a better default for MAXFILES on larger RAM machines if not
otherwise specified the kernel config file. Arbitary numbers are
20,000 files for 16GB RAM or more and 10,000 files for 1GB RAM or
more.

TODO: Adjust this and other values totally dynamically.

show more ...


# 9133d44e 04-Nov-2020 chs <chs@NetBSD.org>

In uvmpd_tryownerlock(), if the initial try-lock of the owner lock fails
then rather than do more try-locks and eventually sleep for a tick,
take a hold on the current owner's lock, drop the page int

In uvmpd_tryownerlock(), if the initial try-lock of the owner lock fails
then rather than do more try-locks and eventually sleep for a tick,
take a hold on the current owner's lock, drop the page interlock,
and acquire the lock that we took the hold on in a blocking fashion.
After we get the lock, check if the lock that we acquired is still
the lock for the owner of the page that we're interested in.
If the owner hasn't changed then can proceed with this page,
otherwise we will skip this page and move on to a different page.
This dramatically reduces the amount of time that the pagedaemon
sleeps trying to get locks, since even 1 tick is an eternity to sleep
in this context and it was easy to trigger that case in practice,
and with this new method the pagedaemon only very rarely actually blocks
to acquire the lock that it wants since the object locks are adaptive,
and when the pagedaemon does block then the amount of time it spends
sleeping will be generally be much less than 1 tick.

show more ...


# da697e67 08-Sep-2020 riastradh <riastradh@NetBSD.org>

ipi: Split up initialization into two parts.

First part runs early so ipi_register can be used in module
initialization, e.g. via pktqueue_create; second part runs after CPUs
have been detected.


# 99c7e1fd 07-Sep-2020 thorpej <thorpej@NetBSD.org>

Add the ability to set an alternate cnmagic in the kernel config
file, e.g.:

options CNMAGIC="\"+++++\""


# 261d3f19 27-Aug-2020 riastradh <riastradh@NetBSD.org>

Move address hashing from init_main.c to kern_sysctl.c.

This way rump gets it automatically. Make sure blake2s is in
librumpkern.so, not just in librumpkern_crypto.so, for this to work.


# 1d0978b8 26-Aug-2020 christos <christos@NetBSD.org>

Instead of returning 0 when sysctl kern.expose_address=0, return a random
hashed value of the data. This allows sockstat to work without exposing
kernel addresses or being setgid kmem.


# 4b8a875a 11-Jun-2020 ad <ad@NetBSD.org>

uvm_availmem(): give it a boolean argument to specify whether a recent
cached value will do, or if the very latest total must be fetched. It can
be called thousands of times a second and fetching th

uvm_availmem(): give it a boolean argument to specify whether a recent
cached value will do, or if the very latest total must be fetched. It can
be called thousands of times a second and fetching the totals impacts not
only the calling LWP but other CPUs doing unrelated activity in the VM
system.

show more ...


# 0eaaa024 23-May-2020 ad <ad@NetBSD.org>

Move proc_lock into the data segment. It was dynamically allocated because
at the time we had mutex_obj_alloc() but not __cacheline_aligned.


12345678910>>...22