[CIR] Fix mixing of catch-all and type-specific catch handlers (#190285)
If a try block has a catch-all handler and one or more type-specific
catch handlers, we were failing to generate the null type specifier when
lowering from CIR to LLVM IR. This change fixes that problem.
Assisted-by: Cursor / claude-4.6-opus-high
[CIR] Implement cleanups for temporaries with automatic duration (#189754)
This implements handling for cleanup of temporary variables with
automatic storage duration. This is a simplified implementation that
doesn't yet handle the possibility of exceptions being thrown within
this cleanup scope or the cleanup scope being inside a conditional
operation. Support for those cases will be added later.
Fix buildbot failure by explicitly disabling partial reductions in TTI. (#190165)
Partial reductions were previously disabled by default, but by
implementing a generic cost-model in BasicTTIImpl (#189905) this now
accidentally enables the use of those when vectorising loops for targets
that may not support this yet.
Add tiering API
This commit modifies the truenas API to wrap around tiering design
in the following ways:
A new namespace zfs.tier. will be added. This contains global
configuration for systemwide tiering settings. Parameters include
- enabled: whether to enable tiering. This feature requries changes
to global ZFS behavior and we will have various internal checks
that check this value in datastore extend context methods.
- max_concurrent_jobs: the maximum number of concurrent rewrite
jobs (tier migrations for existing data).
- min_available_space: point in available space for a dataset where
tier migrations will error out.
The namespace will also support APIs for managing and querying
[9 lines not shown]
anvil: update to 0.7 and fixed building/running
Now uses my modified version of gio and gio-shader to support NetBSD.
Still need to figure out how to handle the 'extras' since they
require extra go modules. The program does run now!
timerfd: Guard expected performance failure
During the timerfd__periodic_timer_performance test, only expect
failures when the expiration count is less than 400000000. This
prevents the test from being reported as a true failure in environments
where scheduling latency is high enough to delay timerfd wakeups.
Fixes: cb692380f1e0 ("timerfd: Expect periodic timer ...")
MFC after: 1 week
(cherry picked from commit 4b16ff49bf4bf875997fe4c80a0afc0d440b7aac)
timerfd: Expect periodic timer performance failures
The current timerfd implementation fails to correctly count events on a
nanosecond callout interval. The timerfd__periodic_timer_performance
test detects this and reports failure.
Mark this test as an expected failure so it isn't flagged by CI. A link
to the bug report is attached to the test for reference.
While we're here, clean up some minor style and Make issues.
Fixes: 834c1ba793d9 ("timerfd: Add tests")
MFC after: 1 week
(cherry picked from commit cb692380f1e05ffc4184877844e93051f24ed302)
timerfd: Add tests
Take Jan Kokemuller's timerfd tests from the epoll-shim project,
stripping out code that isn't directly related to FreeBSD.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55789
MFC after: 2 weeks
(cherry picked from commit 834c1ba793d900b791e19ff449b1e0b96fb494a0)
timerfd: Wake up on discontinuous jump
If a discontinous realtime clock change occurs and sets any TFD_JUMPED
bits on the timerfd, then wake up waiting readers. This fixes failures
from the timerfd_root__clock_change_notification test case.
MFC after: 2 weeks
(cherry picked from commit b11fba41265ae132acfb05587a6dbf60334d3279)
timerfd: Fix interval callout scheduling
When a timerfd interval callout misses its scheduled activation time, a
differential is calculated based on the actual activation time and the
scheduled activation time. This differential is divided by the timerfd's
interval time and the quotient is added to the timerfd's counter.
Before this change, the next callout was scheduled to activate at:
scheduled activation time + timerfd interval.
This change fixes the scheduling of the next callout to activate at:
actual activation time + timerfd interval - remainder.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55790
MFC after: 2 weeks
(cherry picked from commit 85c0f1a87da1fd1eb3e646e86f70e630c48da91a)
timerfd: Use saturating sbintime conversions
Some timerfd consumers set expirations with timespec tv_sec components
larger than 2^31 - 1. In such cases, converting that timespec to
sbintime results in data loss or sign flip, yielding a shorter
expiration than desired.
To avoid this problem, use saturating timespec-to-sbintime conversion
functions. These will clamp the converted sbintime to SBT_MAX under
circumstances where the normal conversion functions would overflow.
Saturating conversions still result in data loss, but the consequences
are less severe, causing problems only after SBT_MAX (~68 years) of
system uptime elapses.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55792
MFC after: 2 weeks
(cherry picked from commit 0e8f351be7935729bf67dc1b7aa4d178cf154931)
sys/time: Add saturating sbt conversions
When converting from timespec to sbintime, the timespec's 64-bit tv_sec
component is shifted to the left 32 bits, causing any information in the
upper 32 bits to be lost.
This data loss during conversion can turn timespecs with very large
tv_sec counters into sbintimes that represent much smaller time
durations.
Add tstosbt_sat() and tvtosbt_sat(), which are saturating versions of
tstosbt and tvtosbt. With these routines, any overflow resulting from
the conversion is clamped to [-SBT_MAX - 1, SBT_MAX].
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D55791
MFC after: 2 weeks
(cherry picked from commit e3799530b3ba38567f8052b9e107884609fc71ea)
timerfd: Suppress kqueue readability after jump read
Do not report EVFILT_READ after reading a discontinuous clock jump.
This makes the kqueue filter consistent with Linux epoll behavior
and timerfd_poll(), which already checks tfd_jumped != TFD_READ before
reporting POLLIN.
MFC after: 2 weeks
(cherry picked from commit 33345b8834859cf1ad7f1256f3a34b4a7c83e8e8)
timerfd: Expect periodic timer performance failures
The current timerfd implementation fails to correctly count events on a
nanosecond callout interval. The timerfd__periodic_timer_performance
test detects this and reports failure.
Mark this test as an expected failure so it isn't flagged by CI. A link
to the bug report is attached to the test for reference.
While we're here, clean up some minor style and Make issues.
Fixes: 834c1ba793d9 ("timerfd: Add tests")
MFC after: 1 week
(cherry picked from commit cb692380f1e05ffc4184877844e93051f24ed302)
timerfd: Use saturating sbintime conversions
Some timerfd consumers set expirations with timespec tv_sec components
larger than 2^31 - 1. In such cases, converting that timespec to
sbintime results in data loss or sign flip, yielding a shorter
expiration than desired.
To avoid this problem, use saturating timespec-to-sbintime conversion
functions. These will clamp the converted sbintime to SBT_MAX under
circumstances where the normal conversion functions would overflow.
Saturating conversions still result in data loss, but the consequences
are less severe, causing problems only after SBT_MAX (~68 years) of
system uptime elapses.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D55792
MFC after: 2 weeks
(cherry picked from commit 0e8f351be7935729bf67dc1b7aa4d178cf154931)
timerfd: Guard expected performance failure
During the timerfd__periodic_timer_performance test, only expect
failures when the expiration count is less than 400000000. This
prevents the test from being reported as a true failure in environments
where scheduling latency is high enough to delay timerfd wakeups.
Fixes: cb692380f1e0 ("timerfd: Expect periodic timer ...")
MFC after: 1 week
(cherry picked from commit 4b16ff49bf4bf875997fe4c80a0afc0d440b7aac)
sys/time: Add saturating sbt conversions
When converting from timespec to sbintime, the timespec's 64-bit tv_sec
component is shifted to the left 32 bits, causing any information in the
upper 32 bits to be lost.
This data loss during conversion can turn timespecs with very large
tv_sec counters into sbintimes that represent much smaller time
durations.
Add tstosbt_sat() and tvtosbt_sat(), which are saturating versions of
tstosbt and tvtosbt. With these routines, any overflow resulting from
the conversion is clamped to [-SBT_MAX - 1, SBT_MAX].
Reviewed by: imp, markj
Differential Revision: https://reviews.freebsd.org/D55791
MFC after: 2 weeks
(cherry picked from commit e3799530b3ba38567f8052b9e107884609fc71ea)
timerfd: Suppress kqueue readability after jump read
Do not report EVFILT_READ after reading a discontinuous clock jump.
This makes the kqueue filter consistent with Linux epoll behavior
and timerfd_poll(), which already checks tfd_jumped != TFD_READ before
reporting POLLIN.
MFC after: 2 weeks
(cherry picked from commit 33345b8834859cf1ad7f1256f3a34b4a7c83e8e8)
timerfd: Wake up on discontinuous jump
If a discontinous realtime clock change occurs and sets any TFD_JUMPED
bits on the timerfd, then wake up waiting readers. This fixes failures
from the timerfd_root__clock_change_notification test case.
MFC after: 2 weeks
(cherry picked from commit b11fba41265ae132acfb05587a6dbf60334d3279)
timerfd: Fix interval callout scheduling
When a timerfd interval callout misses its scheduled activation time, a
differential is calculated based on the actual activation time and the
scheduled activation time. This differential is divided by the timerfd's
interval time and the quotient is added to the timerfd's counter.
Before this change, the next callout was scheduled to activate at:
scheduled activation time + timerfd interval.
This change fixes the scheduling of the next callout to activate at:
actual activation time + timerfd interval - remainder.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55790
MFC after: 2 weeks
(cherry picked from commit 85c0f1a87da1fd1eb3e646e86f70e630c48da91a)
timerfd: Add tests
Take Jan Kokemuller's timerfd tests from the epoll-shim project,
stripping out code that isn't directly related to FreeBSD.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D55789
MFC after: 2 weeks
(cherry picked from commit 834c1ba793d900b791e19ff449b1e0b96fb494a0)
[libc] Use CMAKE_CROSSCOMPILING_EMULATOR instead searching for `llvm-gpu-loader' (#189417)
Summary:
We already handle this with other targets, we should be able to unify
the handling here.
Merge mvme68k and virt68k bus_dma into the common m68k bus_dma and
remove their local copies. Minor cleanup tweaks to other platforms
that already use the common version.