On Mon, 09 Dec 2024 13:04:43 +0100
Valentin Schneider wrote:
> On 05/12/24 18:31, Petr Tesarik wrote:
> > On Thu, 21 Nov 2024 16:30:16 +0100
> > Peter Zijlstra wrote:
> >
> >> On Thu, Nov 21, 2024 at 07:07:44AM -0800, Dave Hansen wrote:
> >> > On 11/21/24 03:12, Peter Zijlstra wrote:
> >>
On 05/12/24 18:31, Petr Tesarik wrote:
> On Thu, 21 Nov 2024 16:30:16 +0100
> Peter Zijlstra wrote:
>
>> On Thu, Nov 21, 2024 at 07:07:44AM -0800, Dave Hansen wrote:
>> > On 11/21/24 03:12, Peter Zijlstra wrote:
>> > >> I see e.g. ds_clear_cea() clears PTEs that can have the _PAGE_GLOBAL
>> > >>
On Mon, Dec 09, 2024 at 01:04:43PM +0100, Valentin Schneider wrote:
> > But I wonder what exactly was the original scenario encountered by
> > Valentin. I mean, if TLB entry invalidations were necessary to sync
> > changes to kernel text after flipping a static branch, then it might be
> > less ov
Em Tue, 3 Dec 2024 14:07:12 +0100
Mauro Carvalho Chehab escreveu:
>
> The idea is to gradually open media-committers to more people, as each
> phase succeeds, addressing infra, procedures, etc.
>
> My rough idea is to do:
>
> - Phase 0.99: beta testers;
> - Phase 1 is to invite people that reg
(Aside: please try to avoid top-posting on the public lists as it messes up
the flow of conversation; I'll try to piece this back together.)
On Mon, Dec 09, 2024 at 09:30:50AM -0800, Rong Xu wrote:
> On Mon, Dec 9, 2024 at 8:20 AM Will Deacon wrote:
> > On Mon, Nov 18, 2024 at 02:25:40PM -0800, Y
Test event-specific ioctls NTSYNC_IOC_EVENT_SET, NTSYNC_IOC_EVENT_RESET,
NTSYNC_IOC_EVENT_PULSE, NTSYNC_IOC_EVENT_READ for manual-reset events, and
waiting on manual-reset events.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 89 +++
1 file c
Expand the contended wait tests, which previously only covered events and
semaphores, to cover events as well.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 151 +-
1 file changed, 147 insertions(+), 4 deletions(-)
diff --git a/tools/testing
Test basic synchronous functionality of NTSYNC_IOC_WAIT_ALL, and when objects
are considered simultaneously signaled.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 99 ++-
1 file changed, 97 insertions(+), 2 deletions(-)
diff --git a/tools/t
Test contended "wait-for-any" waits, to make sure that scheduling and wakeup
logic works correctly.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 150 ++
1 file changed, 150 insertions(+)
diff --git a/tools/testing/selftests/drivers/ntsync/n
Test event-specific ioctls NTSYNC_IOC_EVENT_SET, NTSYNC_IOC_EVENT_RESET,
NTSYNC_IOC_EVENT_PULSE, NTSYNC_IOC_EVENT_READ for auto-reset events, and
waiting on auto-reset events.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 59 +++
1 file chang
Test contended "wait-for-all" waits, to make sure that scheduling and wakeup
logic works correctly, and that the wait only exits once objects are all
simultaneously signaled.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 98 +++
1 file change
Expand the alert tests to cover alerting a thread mid-wait, to test that the
relevant scheduling logic works correctly.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 62 +++
1 file changed, 62 insertions(+)
diff --git a/tools/testing/selftes
Add an overall explanation of the driver architecture, and complete and precise
specification for its intended behaviour.
Signed-off-by: Elizabeth Figura
---
Documentation/userspace-api/index.rst | 1 +
Documentation/userspace-api/ntsync.rst | 398 +
2 files changed, 3
Wine has tests for its synchronization primitives, but these are more accessible
to kernel developers, and also allow us to test some edge cases that Wine does
not care about.
This patch adds tests for semaphore-specific ioctls NTSYNC_IOC_SEM_POST and
NTSYNC_IOC_SEM_READ, and waiting on semaphores
NT waits can optionally be made "alertable". This is a special channel for
thread wakeup that is mildly similar to SIGIO. A thread has an internal single
bit of "alerted" state, and if a thread is alerted while an alertable wait, the
wait will return a special value, consume the "alerted" state, an
f5b335dc025cfee90957efa90dc72fada0d5abb4 ("misc: ntsync: mark driver as "broken"
to prevent from building") was committed to avoid the driver being used while
only part of its functionality was released. Since the rest of the functionality
has now been committed, revert this.
Signed-off-by: Elizab
Test basic synchronous functionality of NTSYNC_IOC_WAIT_ANY, when objects are
considered signaled or not signaled, and how they are affected by a successful
wait.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 119 ++
1 file changed, 119 inser
On Mon, Nov 18, 2024 at 02:25:40PM -0800, Yabin Cui wrote:
> Select ARCH_SUPPORTS_AUTOFDO_CLANG to allow AUTOFDO_CLANG to be
> selected.
>
> On ARM64, ETM traces can be recorded and converted to AutoFDO profiles.
> Experiments on Android show 4% improvement in cold app startup time
> and 13% impro
This corresponds to the NT syscall NtPulseEvent().
This wakes up any waiters as if the event had been set, but does not set the
event, instead resetting it if it had been signalled. Thus, for a manual-reset
event, all waiters are woken, whereas for an auto-reset event, at most one
waiter is woken.
This corresponds to the NT syscall NtQueryMutant().
This returns the recursion count, owner, and abandoned state of the mutex.
Signed-off-by: Elizabeth Figura
---
drivers/misc/ntsync.c | 28
include/uapi/linux/ntsync.h | 1 +
2 files changed, 29 insertions(+)
Test mutex-specific ioctls NTSYNC_IOC_MUTEX_UNLOCK and NTSYNC_IOC_MUTEX_READ,
and waiting on mutexes.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 196 ++
1 file changed, 196 insertions(+)
diff --git a/tools/testing/selftests/drivers/ntsync
This corresponds to the NT syscall NtQueryEvent().
This returns the signaled state of the event and whether it is manual-reset.
Signed-off-by: Elizabeth Figura
---
drivers/misc/ntsync.c | 26 ++
include/uapi/linux/ntsync.h | 1 +
2 files changed, 27 insertions(+)
Add myself as maintainer, supported by CodeWeavers.
Signed-off-by: Elizabeth Figura
---
MAINTAINERS | 9 +
1 file changed, 9 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 1e930c7a58b1..8c3dd9077fc2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -16708,6 +16708,15 @@ T: g
Test the "alert" functionality of NTSYNC_IOC_WAIT_ALL and NTSYNC_IOC_WAIT_ANY,
when a wait is woken with an alert and when it is woken by an object.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 179 +-
1 file changed, 176 insertions(+), 3 de
Test a more realistic usage pattern, and one with heavy contention, in order to
actually exercise ntsync's internal synchronization.
This test has several threads in a tight loop acquiring a mutex, modifying some
shared data, and then releasing the mutex. At the end we check if the data is
consist
This corresponds to the NT syscall NtQuerySemaphore().
This returns the current count and maximum count of the semaphore.
Signed-off-by: Elizabeth Figura
---
drivers/misc/ntsync.c | 26 ++
include/uapi/linux/ntsync.h | 1 +
2 files changed, 27 insertions(+)
diff
This corresponds to the NT syscall NtCreateMutant().
An NT mutex is recursive, with a 32-bit recursion counter. When acquired via
NtWaitForMultipleObjects(), the recursion counter is incremented by one. The OS
records the thread which acquired it.
The OS records the thread which acquired it. Howe
This corresponds to the NT syscall NtReleaseMutant().
This syscall decrements the mutex's recursion count by one, and returns the
previous value. If the mutex is not owned by the current task, the function
instead fails and returns -EPERM.
Signed-off-by: Elizabeth Figura
---
drivers/misc/ntsync
This corresponds to the NT syscall NtResetEvent().
This sets the event to the unsignaled state, and returns its previous state.
Signed-off-by: Elizabeth Figura
---
drivers/misc/ntsync.c | 24
include/uapi/linux/ntsync.h | 1 +
2 files changed, 25 insertions(+)
d
This is similar to NTSYNC_IOC_WAIT_ANY, but waits until all of the objects are
simultaneously signaled, and then acquires all of them as a single atomic
operation.
Because acquisition of multiple objects is atomic, some complex locking is
required. We cannot simply spin-lock multiple objects simul
This patch series implements a new char misc driver, /dev/ntsync, which is used
to implement Windows NT synchronization primitives.
NT synchronization primitives are unique in that the wait functions both are
vectored, operate on multiple types of object with different behaviour (mutex,
semaphor
This correspond to the NT syscall NtCreateEvent().
An NT event holds a single bit of state denoting whether it is signaled or
unsignaled.
There are two types of events: manual-reset and automatic-reset. When an
automatic-reset event is acquired via a wait function, its state is reset to
unsignale
This corresponds to the NT syscall NtSetEvent().
This sets the event to the signaled state, and returns its previous state.
Signed-off-by: Elizabeth Figura
---
drivers/misc/ntsync.c | 27 +++
include/uapi/linux/ntsync.h | 1 +
2 files changed, 28 insertions(+)
di
This does not correspond to any NT syscall. Rather, when a thread dies, it
should be called by the NT emulator for each mutex, with the TID of the dying
thread.
NT mutexes are robust (in the pthread sense). When an NT thread dies, any
mutexes it owned are immediately released. Acquisition of those
This corresponds to part of the functionality of the NT syscall
NtWaitForMultipleObjects(). Specifically, it implements the behaviour where
the third argument (wait_any) is TRUE, and it does not handle alertable waits.
Those features have been split out into separate patches to ease review.
This p
On Mon, Dec 9, 2024, at 19:58, Elizabeth Figura wrote:
> == Previous versions ==
>
> No changes were made from v5 other than rebasing on top of the 6.13-rc1
> char-misc-next tree.
>
> I would like to repeat a question from the last round of review, though. Two
> changes were suggested related to AP
Enabling an AutoFDO build requires users to explicitly set CONFIG_AUTOFDO_CLANG.
The support code is in Commit 315ad8780a129e82 (kbuild: Add AutoFDO
support for Clang build).
The CONFIG_AUTOFDO_CLANG config, even if selected by the user, will
not be enabled
unless ARCH_SUPPORTS_AUTOFDO_CLANG is pr
On Mon, 9 Dec 2024 13:12:49 +0100
Peter Zijlstra wrote:
> On Mon, Dec 09, 2024 at 01:04:43PM +0100, Valentin Schneider wrote:
>
> > > But I wonder what exactly was the original scenario encountered by
> > > Valentin. I mean, if TLB entry invalidations were necessary to sync
> > > changes to kern
On Monday, 9 December 2024 14:24:36 CST Arnd Bergmann wrote:
> On Mon, Dec 9, 2024, at 19:58, Elizabeth Figura wrote:
> > == Previous versions ==
> >
> > No changes were made from v5 other than rebasing on top of the 6.13-rc1
> > char-misc-next tree.
> >
> > I would like to repeat a question from t
On Mon, Dec 9, 2024 at 10:56 AM Will Deacon wrote:
>
> (Aside: please try to avoid top-posting on the public lists as it messes up
> the flow of conversation; I'll try to piece this back together.)
>
> On Mon, Dec 09, 2024 at 09:30:50AM -0800, Rong Xu wrote:
> > On Mon, Dec 9, 2024 at 8:20 AM Wil
40 matches
Mail list logo