Re: [PATCH] Cygwin: sched_setscheduler: accept SCHED_OTHER, SCHED_FIFO and SCHED_RR

2024-12-02 Thread Brian Inglis
On 2024-12-02 10:33, Christian Franke wrote: Corinna Vinschen wrote: On Nov 29 18:48, Christian Franke wrote: A very first attempt to let sched_setscheduler() do something possibly useful. This patch is on top of Cygwin: setpriority, sched_setparam: add missing process access right Looks qui

Re: [PATCH v3 6/9] Cygwin: cygtls: Prompt system to switch tasks explicitly in lock()

2024-12-02 Thread Corinna Vinschen
On Nov 29 20:59, Takashi Yano wrote: > This patch calls Sleep(0) in the wait loop in lock() to increase the > chance of being unlocked in other threads. The lock(), unlock() and > locked() are moved from sigfe.s to cygtls.h so that allows inline > expansion. > > Addresses: https://cygwin.com/piper

Re: [PATCH] Cygwin: sched_setscheduler: accept SCHED_OTHER, SCHED_FIFO and SCHED_RR

2024-12-02 Thread Christian Franke
ASSI wrote: Christian Franke writes: +nice value sched_priority Windows priority class + 12...19 16 IDLE_PRIORITY_CLASS + 4...11 7...12 BELOW_NORMAL_PRIORITY_CLASS + -43 13...18 NORMAL_PRIORITY_CLASS +-12...-5 19...24

Re: [PATCH] Cygwin: sched_setscheduler: accept SCHED_OTHER, SCHED_FIFO and SCHED_RR

2024-12-02 Thread Corinna Vinschen
On Nov 29 18:48, Christian Franke wrote: > A very first attempt to let sched_setscheduler() do something possibly > useful. > > This patch is on top of > Cygwin: setpriority, sched_setparam: add missing process access right Looks quite nice. If you're confident this is ready for the main branch

Re: [PATCH] Cygwin: setpriority, sched_setparam: add missing process access right

2024-12-02 Thread Corinna Vinschen
On Dec 2 17:14, Christian Franke wrote: > Corinna Vinschen wrote: > > On Nov 29 17:12, Christian Franke wrote: > > > Regression, sorry! > > Shit happens *shrug* > > > > > Subject: [PATCH] Cygwin: setpriority, sched_setparam: add missing process > > > access right > > > > > > set_and_check_winp

Re: [PATCH] Cygwin: setpriority, sched_setparam: add missing process access right

2024-12-02 Thread Christian Franke
Corinna Vinschen wrote: On Nov 29 17:12, Christian Franke wrote: Regression, sorry! Shit happens *shrug* Subject: [PATCH] Cygwin: setpriority, sched_setparam: add missing process access right set_and_check_winprio() also requires PROCESS_QUERY_LIMITED_INFORMATION. Fixes: 153b51ee08ef ("Cy

Re: [PATCH] Cygwin: sched_setscheduler: accept SCHED_OTHER, SCHED_FIFO and SCHED_RR

2024-12-02 Thread Brian Inglis
On 2024-12-02 11:28, ASSI wrote: Christian Franke writes: +nice value sched_priority Windows priority class + 12...19 16 IDLE_PRIORITY_CLASS + 4...11 7...12 BELOW_NORMAL_PRIORITY_CLASS + -43 13...18 NORMAL_PRIORITY_CLASS +

Re: [PATCH] Cygwin: sched_setscheduler: accept SCHED_OTHER, SCHED_FIFO and SCHED_RR

2024-12-02 Thread Christian Franke
Corinna Vinschen wrote: On Nov 29 18:48, Christian Franke wrote: A very first attempt to let sched_setscheduler() do something possibly useful. This patch is on top of Cygwin: setpriority, sched_setparam: add missing process access right Looks quite nice. If you're confident this is ready fo

Re: [PATCH] Cygwin: sched_setscheduler: accept SCHED_OTHER, SCHED_FIFO and SCHED_RR

2024-12-02 Thread ASSI
Christian Franke writes: > +nice value sched_priority Windows priority class > + 12...19 16 IDLE_PRIORITY_CLASS > + 4...11 7...12 BELOW_NORMAL_PRIORITY_CLASS > + -43 13...18 NORMAL_PRIORITY_CLASS > +-12...-5 19...24

Re: [PATCH v3 4/9] Cygwin: signal: Optimize the priority of the sig thread

2024-12-02 Thread Corinna Vinschen
On Nov 29 20:59, Takashi Yano wrote: > Previously, the sig thread ran in THREAD_PRIORITY_HIGHEST priority. > This causes a critical delay in the signal handling in the main > thread if too many signals are received rapidly and the CPU is very > busy. In this case, most of the CPU time is allocated

Re: [PATCH] Cygwin: setpriority, sched_setparam: add missing process access right

2024-12-02 Thread Corinna Vinschen
On Nov 29 17:12, Christian Franke wrote: > Regression, sorry! Shit happens *shrug* > Subject: [PATCH] Cygwin: setpriority, sched_setparam: add missing process > access right > > set_and_check_winprio() also requires PROCESS_QUERY_LIMITED_INFORMATION. > > Fixes: 153b51ee08ef ("Cygwin: setpriori

Re: [PATCH 9/9] Cygwin: signal: Fix a short period of deadlock

2024-12-02 Thread Corinna Vinschen
On Nov 29 20:59, Takashi Yano wrote: > The main thread waits for the sig thread to read the signal pipe by > calling Sleep(10) if writing to the signal pipe has failed. However, > if the signal thread waiting for another signal being handled in the > main thread, the sig thread does not read the si

Re: [PATCH v2 4/7] Cygwin: signal: Optimize the priority of the sig thread

2024-12-02 Thread Corinna Vinschen
On Nov 29 20:58, Takashi Yano wrote: > On Wed, 27 Nov 2024 17:53:53 +0100 > Corinna Vinschen wrote: > Hmmm, just setting THREAD_PRIORITY_NORMAL might be appropriate. > See v3 patch. > > > The culprit of the behaviour you're seeing is the fact that *all* > > cygthread's are running with THREAD_PRIO

Re: [PATCH v3 3/9] Cygwin: signal: Remove queue entry from the queue chain when cleared

2024-12-02 Thread Corinna Vinschen
On Nov 29 20:48, Takashi Yano wrote: > The queue is cleaned up by removing the entries having si_signo == 0 > while processing the queued signals, however, sipacket::process() may > set si_signo in the queue to 0 of the entry already processed but not > succeed by calling sig_clear(). This patch en