Am 02.04.2021 um 16:22 schrieb Oleksandr Gavenko via Cygwin:
On 2021-03-29, Corinna Vinschen via Cygwin-announce via Cygwin wrote:

- Allow to start Windows Store executables via their "app execution
   aliases".  Handle these aliases (which are special reparse points)
   as symlinks to the actual executables.
User voice: cool!

   # ls -l /cygdrive/c/Users/$USERNAME/AppData/Local/Microsoft/WindowsApps/ | grep 
'[-]>'
   lrwxrwxrwx 1 user user  99 2020-11-26 13:24 Alpine.exe -> 
/cygdrive/c/Program 
Files/WindowsApps/36828agowa338.AlpineWSL_1.5.0.0_x64__my43bytk1c4nr/Alpine.exe
   lrwxrwxrwx 1 user user 107 2021-02-12 20:52 debian.exe -> 
/cygdrive/c/Program 
Files/WindowsApps/TheDebianProject.DebianGNULinux_1.3.0.0_x64__76v4gfsz19hv4/debian.exe
   lrwxrwxrwx 1 user user 121 2021-02-25 14:59 ubuntu.exe -> 
/cygdrive/c/Program 
Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_2004.2021.222.0_x64__79rhkp1fndgsc/ubuntu.exe

WindowsApps is already in PATH (not sure who added) and allows to start WSL
distros from Cygwin!
Note that if you do this within mintty, you will lose a subtle part of the terminal features by the Windows ConPTY terminal emulation enforced in this case. To avoid that, the wslbridge2 gateway should be used instead, which is implicitly involved when running mintty with option --WSL. I guess it would be useful to have wslbridge2 as a cygwin package in order to support this.
Thomas


Before I started debian/alpine via "Win + R" and conhost was used which
doesn't support Shift+Insert (although they added Ctrl+Shift+V to paste).

I use Shift+Ins a lot in Mintty. And Shift+PgUp/PgDown which is absent in
conhost.

- Revamped pseudo console support.  Conditionally activating it only when
  a non-cygwin application is run.
I reread latest mails to see if anyone reported about mintty CPU usage.

I read about a new version and updated and problems seems disappeared but I'm
not sure about who is responsible:

/var/log/setup.log:

   2021/04/02 15:56:32    1 install cygwin           3.2.0-1
   2021/04/02 15:56:32    2   erase cygwin           3.1.7-1

   2021/04/02 15:56:32   15 install mintty           3.4.7-1
   2021/04/02 15:56:32   16   erase mintty           3.4.6-1

Basically all mintty processes took about 1-1.5% cpu load. 5 minnty caused
7-10% CPU load (and electrical bills + fan noise) even when terminals were
idling.

Now each idling mintty takes 0.06-.11% CPU load (reported by procexp).

I took stack reports from procexp before updates. There are 2 threads caused
CPU load (first took 0.7% CPU, second 0.5% CPU on average) and the picture
reproduced 100%:

   ntoskrnl.exe!KeSynchronizeExecution+0x5b66
   ntoskrnl.exe!KeWaitForMutexObject+0x1460
   ntoskrnl.exe!KeWaitForMutexObject+0x98f
   ntoskrnl.exe!KeWaitForMutexObject+0x233
   ntoskrnl.exe!ExWaitForRundownProtectionRelease+0x7dd
   ntoskrnl.exe!KeWaitForMutexObject+0x3a29
   ntoskrnl.exe!KeWaitForMutexObject+0x1787
   ntoskrnl.exe!KeWaitForMutexObject+0x98f
   ntoskrnl.exe!KeDelayExecutionThread+0x122
   ntoskrnl.exe!SeReleaseSubjectContext+0x21bf
   ntoskrnl.exe!setjmpex+0x7c15
   ntdll.dll!NtDelayExecution+0x14
   KERNELBASE.dll!SleepEx+0x9e
   cygwin1.dll!feinitialise+0x5b43a
   cygwin1.dll!setprogname+0x3041
   cygwin1.dll!setprogname+0x3656
   cygwin1.dll!setprogname+0x4126
   cygwin1.dll!setprogname+0x41d4
   KERNEL32.dll!BaseThreadInitThunk+0x14
   ntdll.dll!RtlUserThreadStart+0x21

   ntoskrnl.exe!KeSynchronizeExecution+0x5b66
   ntoskrnl.exe!KeWaitForMutexObject+0x1460
   ntoskrnl.exe!KeWaitForMutexObject+0x98f
   ntoskrnl.exe!KeWaitForMutexObject+0x233
   ntoskrnl.exe!ExWaitForRundownProtectionRelease+0x7dd
   ntoskrnl.exe!KeWaitForMutexObject+0x3a29
   ntoskrnl.exe!KeWaitForMutexObject+0x1787
   ntoskrnl.exe!KeWaitForMutexObject+0x98f
   ntoskrnl.exe!KeWaitForMultipleObjects+0x2be
   ntoskrnl.exe!ObWaitForMultipleObjects+0x2f0
   ntoskrnl.exe!FsRtlCancellableWaitForMultipleObjects+0x229
   ntoskrnl.exe!setjmpex+0x7c15
   ntdll.dll!NtWaitForMultipleObjects+0x14
   KERNELBASE.dll!WaitForMultipleObjectsEx+0xf0
   KERNELBASE.dll!WaitForMultipleObjects+0xe
   cygwin1.dll!setprogname+0x445c
   cygwin1.dll!acl_get_perm+0x4ee0
   cygwin1.dll!setprogname+0x3041
   cygwin1.dll!setprogname+0x3656
   cygwin1.dll!setprogname+0x4126
   cygwin1.dll!setprogname+0x41d4
   KERNEL32.dll!BaseThreadInitThunk+0x14
   ntdll.dll!RtlUserThreadStart+0x21

With new Cygwin DLL & mintty the picture was changed to a single thread
consuming 0.06-0.11% CPU:

   ntoskrnl.exe!KeSynchronizeExecution+0x5b66
   ntoskrnl.exe!KeWaitForMutexObject+0x1460
   ntoskrnl.exe!KeWaitForMutexObject+0x98f
   ntoskrnl.exe!KeWaitForMutexObject+0x233
   ntoskrnl.exe!ExWaitForRundownProtectionRelease+0x7dd
   ntoskrnl.exe!KeWaitForMutexObject+0x3a29
   ntoskrnl.exe!KeWaitForMutexObject+0x1787
   ntoskrnl.exe!KeWaitForMutexObject+0x98f
   ntoskrnl.exe!KeWaitForMultipleObjects+0x2be
   ntoskrnl.exe!ObWaitForMultipleObjects+0x2f0
   ntoskrnl.exe!FsRtlCancellableWaitForMultipleObjects+0x229
   ntoskrnl.exe!setjmpex+0x7c15
   ntdll.dll!NtWaitForMultipleObjects+0x14
   KERNELBASE.dll!WaitForMultipleObjectsEx+0xf0
   KERNELBASE.dll!WaitForMultipleObjects+0xe
   cygwin1.dll!_assert+0x460c
   cygwin1.dll!acl_get_perm+0x52b0
   cygwin1.dll!_assert+0x31f1
   cygwin1.dll!_assert+0x3806
   cygwin1.dll!_assert+0x42d6
   cygwin1.dll!_assert+0x4384
   KERNEL32.dll!BaseThreadInitThunk+0x14
   ntdll.dll!RtlUserThreadStart+0x21

Next time I try to use real profiler for report, have to get familiar with
good one.


--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to