Re: CVS commit: src/sys

2020-04-24 Thread Jason Thorpe


> On Apr 24, 2020, at 3:39 AM, Kamil Rytarowski  wrote:
> 
> This is a good idea (and preexisting in other kernels), unfortunately we
> had locking issues in rust. If a multithreaded process is forked, we
> shall create a replica of a calling thread and keep mutexes functional.
> We tried to preserve the caller's LWP to guarantee this.
> 
> This problem can be back. I don't ask to revert or revisit this change,
> but if it will be back, we shall find a solution for it.

This has been fixed by joerg@ in ld.elf_so already.

-- thorpej



Re: CVS commit: src/sys

2020-04-24 Thread Kamil Rytarowski
On 24.04.2020 05:22, Jason R Thorpe wrote:
> Module Name:  src
> Committed By: thorpej
> Date: Fri Apr 24 03:22:06 UTC 2020
> 
> Modified Files:
>   src/sys/compat/linux/common: linux_exec.c linux_sched.c
>   src/sys/kern: kern_exec.c kern_exit.c kern_fork.c kern_lwp.c
>   kern_proc.c sys_lwp.c
>   src/sys/sys: lwp.h proc.h
> 
> Log Message:
> Overhaul the way LWP IDs are allocated.  Instead of each LWP having it's
> own LWP ID space, LWP IDs came from the same number space as PIDs.  The
> lead LWP of a process gets the PID as its LID.  If a multi-LWP process's
> lead LWP exits, the PID persists for the process.
> 
> In addition to providing system-wide unique thread IDs, this also lets us
> eliminate the per-process LWP radix tree, and some associated locks.
> 
> Remove the separate "global thread ID" map added previously; it is no longer
> needed to provide this functionality.
> 
> Nudged in this direction by ad@ and chs@.
> 

This is a good idea (and preexisting in other kernels), unfortunately we
had locking issues in rust. If a multithreaded process is forked, we
shall create a replica of a calling thread and keep mutexes functional.
We tried to preserve the caller's LWP to guarantee this.

This problem can be back. I don't ask to revert or revisit this change,
but if it will be back, we shall find a solution for it.



signature.asc
Description: OpenPGP digital signature


Re: CVS commit: src/tests/lib/libc/sys

2020-04-24 Thread Kamil Rytarowski
On 24.04.2020 05:25, Jason R Thorpe wrote:
> Module Name:  src
> Committed By: thorpej
> Date: Fri Apr 24 03:25:20 UTC 2020
> 
> Modified Files:
>   src/tests/lib/libc/sys: t_ptrace_wait.c t_ptrace_x86_wait.h
> 
> Log Message:
> Update for new LWP behavior -- as of 9.99.59, the LWP ID of a single-LWP
> process is the PID, not 1.
> 

Thanks. These tests shall not rely on specific LWP numbers and I will
remove the asserts.



signature.asc
Description: OpenPGP digital signature