| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
| |
ok gnezdo@ semarie@ mpi@
|
|
|
|
|
| |
of code which thinks it could be done elsewhere.
ok kurt
|
|
|
|
| |
ok patrick@
|
|
|
|
|
|
|
|
|
|
|
| |
device references causing a hang while trying to remove the same
interface since the reference count will never reach zero. Instead of
returning, break out of the switch in order to ensure that tun_put()
gets called.
ok deraadt@ mvs@
Reported-by: syzbot+2ca11c73711a1d0b5c6c@syzkaller.appspotmail.com
|
|
|
|
|
|
| |
the top(1) wait column.
ok mvs@
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
are started before syslogd(8). This resulted in ugly sendsyslog(2)
dropped logs and the real message was lost.
Create a temporary stash for log messages within the kernel. It
has a limited size of 100 messages, and each message is truncated
to 8192 bytes. When the stash is exhausted, the well-known dropped
message is generated with a counter. After syslogd(8) has setup
everything, it sends a debug line through libc to flush the kernel
stash. Then syslogd receives all messages from the kernel before
the usual logs.
OK deraadt@ visa@
|
|
|
|
| |
From Thaison Nguyen
|
|
|
|
|
|
|
|
|
|
| |
already calculates _usable_ memory and updates physmem (if it is 0),
whereas ofw_read_mem_regions() was counting usable+unuseable memory.
ie. 4G or more on some machines. powerpc's 32-bit pagetable cannot use memory
beyond 4G phys addr.
(On a 4G machine, physmem64 was calculated as 0, which caused the installer's
auto-diskabel code to place /tmp on the b partition).
ok gkoehler, works for kurt also
|
| |
|
|
|
|
|
|
| |
Kill SINGLE_PTRACE and use SINGLE_SUSPEND which has almost the same semantic.
This diff did not properly kill SINGLE_PTRACE and broke RAMDISK kernels.
|
| |
|
|
|
|
| |
from Fredrik Engberg
|
| |
|
|
|
|
| |
from Fredrik Engberg
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There may be multiple matching devices on a single uhidev device but
the first device that responds to UHIDEV_CLAIM_ALLREPORTID will
block the others from attaching.
Change this to UHIDEV_CLAIM_MULTIPLE_REPORTID and require any
devices wanting some/all report ids to fill in the claimed array in
uhidev_attach_arg with just the reports it needs. uhidev can then
run match routines for other drivers with the available report ids.
ok anton
|
|
|
|
| |
ok patrick@
|
|
|
|
|
|
|
| |
support for multiple linear ranges for voltage regulators and use for all
rkpmic ICs.
ok kettenis@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ASIDs. This should only happen on systems with 8-bit ASIDs, which are
currently unsupported in OpenBSD.
The new scheme uses "generations". Whenever we run out of ASIDs we bump
the generation and flush the complete TLB. The pmaps of processes that
are currently on the CPU are carried over into the new generation. This
implementation relies on the scheduler lock to make sure this happens
without any (known) races.
ok patrick@, mpi@
|
|
|
|
|
|
|
|
| |
Ze big lock is currently necessary to ensure that two sibling threads
are not racing against each other when processing signals. However it
is not strickly necessary to unpark sibling threads.
ok claudio@
|
|
|
|
|
|
|
|
| |
single_thread_set() is modified to explicitly indicated when waiting until
sibling threads are parked is required. This is obviously not required if
a traced thread is switching away from a CPU after handling a STOP signal.
ok claudio@
|
|
|
|
|
|
|
|
| |
to do syscalls directly. Go executables now use shared libc like all other
dynamic binaries. This makes the "where are syscalls done from" checker
strict for all binaries, and also opens the door to change the underlying
syscall ABI to the kernel in the future very easily (if we find cause).
ok jsing
|
|
|
|
|
|
|
| |
lld11 no longer quietly aligns this when given an address, so we do the
alignment explicitly.
ok kettenis@
|
|
|
|
|
|
|
| |
LocalX. In that case, resolving the reference must be done before
resetting the LocalX variable. test daniel
ok kettenis
|
|
|
|
| |
ok kettenis@
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
pass the uint64_t that ether_input has already converted from a
real ethernet address into carp_input so it can use it without
having to do its own conversion.
tested by hrvoje popovski
tested by me on amd64 and sparc64
ok patrick@ jmatthew@
|
|
|
|
|
|
|
|
|
|
| |
domain per pagetable, there's no need for a backpointer to the domain
in the pagetable entry descriptor. There can't be any other domain.
Also since there's no list, no list entry member is needed either.
This reduces early allocation to half of the previous size. I think
it's possible to reduce it even further and not need a pagetable entry
descriptor at all, but I need to think about that a bit more.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of the IOVA allocation. As far as I can see the current "best solution"
is to cache IOVA ranges in percpu magazines. I don't think we have this
issue at all thanks to bus_dmamap_create(9). The map is created ahead
of time, and we know the maximum size of the DMA transfer. Since with
smmu(4) we have IOVA per domain, allocating IOVA 'early' is essentially
free. But pagetable mapping also incurs a performance penalty, since we
allocate pagetable entry descriptors through pools. Since we have the
IOVA early, we can allocate those early as well. This allocation is a
bit more expensive though, but can be optimized further.
All this means that there is no allocation overhead in hot code paths.
The "only" thing remaining is assigning IOVA to the segments, adjusting
the pagetable mappings, and flushing the IOTLB on unload. Maybe there's
a way to do a combined flush for NICs, because we give a list of mbufs
to the network stack and we could do the IOTLB invalidation only once
right before we hand over the mbuf list to the upper layers.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
tested on amd64 and sparc64.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
this applies the tricks with addresses from veb and etherbridge
code to the normal ethernet input processing. it basically loads
the destination address from the packet and the interface ethernet
address into uint64_ts for comparison.
tested by hrvoje popovski and chris cappuccio
tested here on amd64, arm64, and sparc64
ok claudio@ jmatthew@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
obviously reduces the overhead of IOVA allocation, but instead you have the
problem of doubly mapped pages, and making sure a page is only unmapped once
the last user is gone. My initial attempt, modeled after apldart(4), calls
the allocator for each segment. Unfortunately this introduces a performance
penalty which reduces performance from around 700 Mbit/s to about 20 Mbit/s,
or even less, in a simple single stream tcpbench scenario. Most mbufs from
userland seem to have at least 3 segments. Calculating the needed IOVA space
upfront reduces this penalty. IOVA allocation overhead could be reduced once
and for all if it is possible to reserve IOVA during bus_dmamap_create(9), as
it is only called upon creation and basically never for each DMA cycle. This
needs some more thought.
With this we now put the pressure on the PTED pools instead. Additionally, but
not part of this diff, percpu pools for the PTEDs seem to reduce the overhead
for that single stream tcpbench scenario to 0.3%. Right now this means we're
hitting a different bottleneck, not related to the IOMMU. The next bottleneck
will be discovered once forwarding is unlocked. Though it should be possible
to benchmark the current implementation, and different designs, using a cycles
counter.
With IOVA allocation it's not easily possible to correlate memory passed to
bus_dmamem_map(9) with memory passed to bus_dmamap_load(9). So far my code
try to use the same cachability attributes as the kenrel uses for its userland
mappings. For the devices we support, there seems to be no need so far. If
this ever gives us any trouble in the feature, I'll have a look and fix it.
While drivers should call bus_dmamap_unload(9) before bus_dmamap_destroy(9),
the API explicitly states that bus_dmamap_destroy(9) should unload the map
if it is still loaded. Hence we need to do exactly that. I actually have
found one network driver which behaves that way, and the developer intends
to change the network driver's behaviour.
|
|
|
|
|
|
|
| |
or which regions need to be reserved. As it turns out, a region we should
not map is the PCIe address space. Making a PCIe device try to do DMA to
an address in PCIe address space will obviously not make its way to SMMU
and host memory. We'll probably have to add an API for that.
|
|
|
|
|
|
|
|
|
|
|
| |
Thank you Apple (not)!
Add an initial attempt to support such systems. This isn't good enough
since the kernel will hang once you create more than 127 processes.
But it makes things work reasonably well until you reach that limit
which is good enough to build things on the machine itself.
ok patrick@
|