[ add akpm and sfr for next steps ]
Alistair Popple wrote:
> Main updates since v2:
>
> - Rename the DAX specific dax_insert_XXX functions to vmf_insert_XXX
>and have them pass the vmf struct.
>
> - Seperate out the device DAX changes.
>
> - Restore the page share mapping counting and as
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 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,
semaphore,
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
Simplify the user API a bit by returning the fd as return value from the ioctl
instead of through the argument pointer.
Signed-off-by: Elizabeth Figura
---
drivers/misc/ntsync.c | 7 ++-
include/uapi/linux/ntsync.h | 3 +--
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a
Use the more common "release" terminology, which is also the term used by NT,
instead of "post" (which is used by POSIX).
Signed-off-by: Elizabeth Figura
---
drivers/misc/ntsync.c | 10 +-
include/uapi/linux/ntsync.h | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
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 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
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 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 | 26 ++
include/uapi/linux/ntsync.h | 1 +
2 files changed, 27 insertions(+)
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 NtQuerySemaphore().
This returns the current count and maximum count of the semaphore.
Signed-off-by: Elizabeth Figura
---
drivers/misc/ntsync.c | 24
include/uapi/linux/ntsync.h | 1 +
2 files changed, 25 insertions(+)
diff --
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
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 | 24
include/uapi/linux/ntsync.h | 1 +
2 files changed, 25 insertions(+)
d
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 | 187 ++
1 file changed, 187 insertions(+)
diff --git a/tools/testing/selftests/drivers/ntsync
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
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
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 | 93 ++-
1 file changed, 91 insertions(+), 2 deletions(-)
diff --git a/tools/t
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 | 114 ++
1 file changed, 114 inser
On 12/12/2024 3:17 PM, mhkelle...@gmail.com wrote:
From: Michael Kelley
Add documentation on how hibernation works in a guest VM on Hyper-V.
Describe how VMBus devices and the VMBus itself are hibernated and
resumed, along with various limitations.
Signed-off-by: Michael Kelley
---
Document
From: Roman Kisel Sent: Friday, December 13, 2024
10:44 AM
>
> On 12/12/2024 3:17 PM, mhkelle...@gmail.com wrote:
> > From: Michael Kelley
> >
> > Add documentation on how hibernation works in a guest VM on Hyper-V.
> > Describe how VMBus devices and the VMBus itself are hibernated and
> > resu
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 | 91 +++
1 file change
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 | 143 ++
1 file changed, 143 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 manual-reset events, and
waiting on manual-reset events.
Signed-off-by: Elizabeth Figura
---
.../testing/selftests/drivers/ntsync/ntsync.c | 86 +++
1 file c
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 | 56 +++
1 file chang
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 | 145 +-
1 file changed, 141 insertions(+), 4 deletions(-)
diff --git a/tools/testing
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 | 167 +-
1 file changed, 164 insertions(+), 3 de
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 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 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
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 | 385 +
2 files changed, 3
Hi Linus,
On Thu, Dec 5, 2024 at 8:19 PM Linus Torvalds
wrote:
> On Thu, 5 Dec 2024 at 10:16, Geert Uytterhoeven
> wrote:
> > Hence according to the Birthday Paradox, collisions of 12-chararacter
> > git commit IDs are imminent, or already happening.
>
> Note that ambiguous commit IDs are not e
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
Thorsten Leemhuis writes:
> Add a few more specific guidelines on handling regressions to the
> kernel's two most prominent guides about contributing to Linux, as
> developers apparently work with quite different interpretations of what
> Linus expects.
>
> Changes like this were asked for during
Thorsten Leemhuis writes:
> Add a few notes on when to involve Linus in regressions. Part of this
> spells out slightly obvious things infrequent developers might not be
> aware of, while others are based on a recent statement from Linus[1].
>
> This removes equivalent paragraphs from a section i
Thorsten Leemhuis writes:
> Add a few notes on how the interaction with the stable team works when
> it comes to mainline regressions that also affect stable series.
>
> This removes equivalent paragraphs from a section in
> Documentation/process/handling-regressions.rst, which will become mostly
Thorsten Leemhuis writes:
> Add a few notes on the appropriate tags to be used in changes that fix
> regressions.
>
> This removes equivalent paragraphs from a section in
> Documentation/process/handling-regressions.rst, which will become mostly
> obsolete through this and follow-up changes.
>
>
Thorsten Leemhuis writes:
> Provide something more concrete about fixing regressions in a few
> places, as telling people to "expedite" fixing those that reached a
> release deemed for end users is pretty vague. But every situation is
> different, so use the soft phrases like "aim for" and leave
Thorsten Leemhuis writes:
> Add some advice on how to handle regressions as developer, reviewer, and
> maintainer, as resolving regression without unnecessary delays requires
> multiple people working hand in hand.
>
> This removes equivalent paragraphs from a section in
> Documentation/process/h
41 matches
Mail list logo