This patch supplies an implementation of the CPU_SET(3) processor
affinity macros as documented on the relevant Linux man page.
---
winsup/cygwin/include/sys/cpuset.h | 62 +++---
winsup/cygwin/sched.cc | 8 ++--
2 files changed, 60 insertions(+), 10
Corinna Vinschen wrote:
On Jun 26 01:48, Mark Geisert wrote:
Corinna Vinschen wrote:
On Jun 25 00:54, Mark Geisert wrote:
---
winsup/utils/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in
index b64f457e7
Correct the string conversion calls so both argv elements get converted
at full precision.
---
winsup/utils/cygwin-console-helper.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/utils/cygwin-console-helper.cc
b/winsup/utils/cygwin-console-helper.cc
index
Have sched_getaffinity() interface like glibc's, and provide an
undocumented internal interface __sched_getaffinity_sys() like the Linux
kernel's sched_getaffinity() for benefit of taskset(1).
---
newlib/libc/include/sched.h| 3 +++
winsup/cygwin/common.din | 1 +
Corinna Vinschen wrote:
On Jun 25 00:54, Mark Geisert wrote:
---
winsup/utils/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in
index b64f457e7..cebf39572 100644
--- a/winsup/utils/Makefile.in
+++ b/winsup
Have sched_getaffinity() interface like glibc's, and provide an
undocumented internal interface __sched_getaffinity_sys() like the Linux
kernel's sched_getaffinity() for benefit of taskset(1).
---
newlib/libc/include/sched.h| 1 +
winsup/cygwin/common.din | 1 +
Corinna Vinschen wrote:
Hi Mark,
On Jun 24 22:25, Mark Geisert wrote:
Return what the documentation says, instead of a misreading of it.
---
winsup/cygwin/sched.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/sched.cc b/winsup/cygwin/sched.cc
index
---
winsup/utils/Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in
index b64f457e7..cebf39572 100644
--- a/winsup/utils/Makefile.in
+++ b/winsup/utils/Makefile.in
@@ -64,7 +64,7 @@ MINGW_BINS := ${addsuffix
Return what the documentation says, instead of a misreading of it.
---
winsup/cygwin/sched.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/cygwin/sched.cc b/winsup/cygwin/sched.cc
index e7b44d319..8f24bf80d 100644
--- a/winsup/cygwin/sched.cc
+++
This patch set implements the Linux syscalls sched_getaffinity,
sched_setaffinity, pthread_getaffinity_np, and pthread_setaffinity_np.
Linux has a straightforward view of the cpu sets used in affinity masks.
They are simply long (1024-bit) bit masks. This code emulates that view
while internally
groups always have 64 logical
processors. I'm just trying to get the control structures laid out. A
later version will deal with smaller-sized processor groups.
On Apr 28 22:38, Mark Geisert wrote:
There are a couple of multi-group affinity operations that cannot be done
without heroic measures
There are a couple of multi-group affinity operations that cannot be done
without heroic measures. Those are marked with XXX in the code. Further
discussion would be helpful to me.
---
newlib/libc/include/sched.h | 13 ++
winsup/cygwin/common.din| 4 +
---
newlib/libc/include/sched.h | 4 +++
winsup/cygwin/sched.cc | 68 +
2 files changed, 72 insertions(+)
diff --git a/newlib/libc/include/sched.h b/newlib/libc/include/sched.h
index 1016235bb..e3a5b97e5 100644
--- a/newlib/libc/include/sched.h
+++
---
winsup/doc/new-features.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml
index e3786e545..7cc449764 100644
--- a/winsup/doc/new-features.xml
+++ b/winsup/doc/new-features.xml
@@ -4,7 +4,7 @@
What's new and
Internally track resultant byte counts as ssize_t, but return 0 as int
for success indication, per POSIX.
---
winsup/cygwin/aio.cc | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/winsup/cygwin/aio.cc b/winsup/cygwin/aio.cc
index fe63dec04..7d5d98299 100644
---
Corinna Vinschen wrote:
On Aug 4 01:44, Mark Geisert wrote:
Oops. Something that iozone testing had found but I regarded as an
iozone bug. Re-reading the man pages set me straight.
---
winsup/cygwin/aio.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin
Oops. Something that iozone testing had found but I regarded as an
iozone bug. Re-reading the man pages set me straight.
---
winsup/cygwin/aio.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/aio.cc b/winsup/cygwin/aio.cc
index fe63dec04..571a9621b 100644
Hi Corinna,
On Thu, 26 Jul 2018, Corinna Vinschen wrote:
On Jul 25 15:06, Yaakov Selkowitz wrote:
From discussion on IRC:
corinna, just sent a patch for _POSIX_ASYNCHRONOUS_IO as a
follow-up to the AIO feature, but am still wondering about
_[POSIX|PC]_ASYNC_IO
[snip]
in
(Let's try that again from the correct directory...)
This is believed to be the final patch set implementing POSIX AIO. It
incorporates updates and fixes for all issues brought up over several
review cycles the last few months. The implementation has been tested
with a couple different
This is the core of the AIO implementation: aio.cc and aio.h. The
latter is used within the Cygwin DLL by aio.cc and the fhandler* modules,
as well as by user programs wanting the AIO functionality.
---
winsup/cygwin/aio.cc| 1005 +++
This code is where the AIO implementation is wired into existing Cygwin
mechanisms for file and device I/O: the fhandler* functions. It makes
use of an existing internal routine prw_open to supply a "shadow fd"
that permits asynchronous operations on a file the user app accesses
via its own fd.
Updates to misc files to integrate AIO into the Cygwin source tree.
Much of it has to be done when adding any new syscalls. There are
some updates to limits.h for AIO-specific limits. And some doc mods.
---
winsup/cygwin/Makefile.in | 1 +
winsup/cygwin/common.din |
Corinna Vinschen wrote:
Hi Mark,
there's just one problem left:
[...]
+
+ QueryUnbiasedInterruptTime ();
Nice idea to use QueryUnbiasedInterruptTime. The problem here is just
that QueryUnbiasedInterruptTime has been introduced with Windows 7, but
we still support Windows Vista :}
We
This code is where the AIO implementation is wired into existing Cygwin
mechanisms for file and device I/O: the fhandler* functions. It makes
use of an existing internal routine prw_open to supply a "shadow fd"
that permits asynchronous operations on a file the user app accesses
via its own fd.
This is the core of the AIO implementation: aio.cc and aio.h. The
latter is used within the Cygwin DLL by aio.cc and the fhandler* modules,
as well as by user programs wanting the AIO functionality.
---
winsup/cygwin/aio.cc| 1006 +++
---
winsup/cygwin/signal.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
index e581d28da..de3e88697 100644
--- a/winsup/cygwin/signal.cc
+++ b/winsup/cygwin/signal.cc
@@ -640,6 +640,8 @@ sigtimedwait (const sigset_t *set, siginfo_t *info,
Corinna Vinschen wrote:
Mark,
I think there's a bug in sigtimedwait. I just found the problem while
looking into this aio_suspend stuff:
On Jul 17 16:51, Corinna Vinschen wrote:
+ res = sigtimedwait (, , to);
You're giving the timeout value verbatim to sigtimedwait().
Let's have a look
Corinna Vinschen wrote:
Hey Mark,
I just belatedly noticed a few problems in aiosuspend:
On Jul 15 01:20, Mark Geisert wrote:
+static int
+aiosuspend (const struct aiocb *const aiolist[],
+ int nent, const struct timespec *timeout)
+{
+ /* Returns lowest list index of completed aios
Corinna Vinschen wrote:
On Jul 15 01:20, Mark Geisert wrote:
+ if (aio)
+ status = NtReadFile (prw_handle, aiocb->aio_win_event, NULL, NULL,
+>aio_win_iosb, buf, count, , NULL);
+ else
+ status = NtReadFile (prw_handle, NULL, NULL, NULL,
Corinna Vinschen wrote:
Hi Mark,
this looks good. Inline comments as usual.
Thank you; OK.
On Jul 15 01:20, Mark Geisert wrote:
[...]
+static int
+aiochkslot (struct aiocb *aio)
+{
+ /* Sanity check.. make sure this AIO is not already busy */
+ for (int slot = 0; slot < AIO_MAX; ++s
This is the core of the AIO implementation: aio.cc and aio.h. The
latter is used within the Cygwin DLL by aio.cc and the fhandler* modules,
as well as by user programs wanting the AIO functionality.
---
winsup/cygwin/aio.cc| 984
This code is where the AIO implementation is wired into existing Cygwin
mechanisms for file and device I/O: the fhandler* functions. It makes
use of an existing internal routine prw_open to supply a "shadow fd"
that permits asynchronous operations on a file the user app accesses
via its own fd.
Updates to misc files to integrate AIO into the Cygwin source tree.
Much of it has to be done when adding any new syscalls. There are
some updates to limits.h for AIO-specific limits. And some doc mods.
---
winsup/cygwin/Makefile.in | 1 +
winsup/cygwin/common.din |
This is intended to be the final patch set implementing POSIX AIO. The
string XXX marks issues I'm specifically requesting comments on. I
think there are only two of these XXXs left, both in aio.cc. Questions,
comments, or suggestions are all welcome.
Thanks & Regards,
..mark
"Hell is
On Wed, 2 May 2018, Brian Inglis wrote:
On 2018-05-02 02:21, Mark Geisert wrote:
I found a discrepancy in the Cygwin source tree and would like input on how to
resolve it...
On Thu, 19 Apr 2018, Corinna Vinschen wrote:
+static void
+aionotify (struct aiocb *aio)
+{
+ /* if signal notification
Hi Corinna,
I found a discrepancy in the Cygwin source tree and would like input on
how to resolve it...
On Thu, 19 Apr 2018, Corinna Vinschen wrote:
+static void
+aionotify (struct aiocb *aio)
+{
+ /* if signal notification wanted, send AIO-complete signal */
+ //XXX Is sigqueue() the best
Updates to misc files to integrate AIO into the Cygwin source tree.
Much of it has to be done when adding any new syscalls. There are
some updates to limits.h for AIO-specific limits. And some doc mods.
This is the 2nd WIP patch set for AIO. The string XXX marks issues
I'm specifically
This is the core of the AIO implementation: aio.cc and aio.h. The
latter is used within Cygwin by aio.cc and the fhandler* modules, as
well as by user programs wanting the AIO functionality.
This is the 2nd WIP patch set for AIO. The string XXX marks issues
I'm specifically requesting comments
This is the 2nd WIP patch set for AIO. The string XXX marks issues
I'm specifically requesting comments on, but feel free to comment or
suggest changes on any of this code.
The code is working for both non-stress and stress situations I can
provoke with a test program I have. The code only
This code is where the AIO implementation is wired into existing Cygwin
mechanisms for file and device I/O: the fhandler* functions. It makes
use of an existing internal routine prw_open to supply a "shadow fd"
that permits asynchronous operations on a file the user app accesses
via its own fd.
---
winsup/cygwin/include/aio.h | 78 +
1 file changed, 78 insertions(+)
create mode 100644 winsup/cygwin/include/aio.h
diff --git a/winsup/cygwin/include/aio.h b/winsup/cygwin/include/aio.h
new file mode 100644
index 0..d6ca56517
---
---
winsup/cygwin/aio.cc | 580 +++
1 file changed, 580 insertions(+)
create mode 100644 winsup/cygwin/aio.cc
diff --git a/winsup/cygwin/aio.cc b/winsup/cygwin/aio.cc
new file mode 100644
index 0..01bf2e479
--- /dev/null
+++
---
winsup/cygwin/Makefile.in | 1 +
winsup/cygwin/common.din | 8
winsup/cygwin/include/cygwin/version.h | 4 +++-
winsup/cygwin/include/limits.h | 12 ++--
winsup/doc/posix.xml | 16
5 files changed, 26
On Thu, 22 Feb 2018, David Macek wrote:
On 2018-02-21 14:05, Corinna Vinschen wrote:
The patch is malformed. It claims to contain 7 lines (6 lines context,
one line changed), but actually it has only 4 lines context. Please
check your git settings.
On 21. 2. 2018 22:56, Brian Inglis wrote:
This new function returns the name of the calling thread; works for both
cygthreads and pthreads. All calls to cygthread::name(/*void*/) replaced
by calls to mythreadname(/*void*/).
---
winsup/cygwin/exceptions.cc | 4 ++--
winsup/cygwin/fhandler_tty.cc | 2 +-
winsup/cygwin/strace.cc
---
winsup/cygwin/exceptions.cc | 4 ++--
winsup/cygwin/fhandler_tty.cc | 2 +-
winsup/cygwin/strace.cc | 2 +-
winsup/cygwin/thread.cc | 17 +
winsup/cygwin/thread.h| 3 +++
5 files changed, 24 insertions(+), 4 deletions(-)
diff --git
On Thu, 21 Dec 2017, Corinna Vinschen wrote:
On Dec 21 00:29, Mark Geisert wrote:
On Wed, 20 Dec 2017, Corinna Vinschen wrote:
Hi Mark,
A lot to discuss here.
Yes, but first let me say I'd call these "speculative" patches, things I
found necessary during aio library developme
gram whose pthreads are making Cygwin
syscalls. The code in this block allows to get the user-supplied pthread
name for use in strace logging, rather than having "unknown thread 0x###"
displayed.
On Dec 20 00:08, Mark Geisert wrote:
Add support to cygwin_internal() for setting
Add support to cygwin_internal() for setting a cygthread name and getting or
setting a pthread name. Also add support for getting the internal i/o handle
for a given file descriptor.
---
winsup/cygwin/cygthread.cc | 40 +++--
winsup/cygwin/cygthread.h
On Mon, 18 Dec 2017, Corinna Vinschen wrote:
Hi Mark,
[...]
as I wrote on Friday, the patch looks good to me. I just need a
contributors license agreement from you per the "Before you get started"
section on https://cygwin.com/contrib.html
Hi Corinna,
Y'all should have one from me on file
On Thu, 14 Dec 2017, Corinna Vinschen wrote:
Hi Mark,
Thanks for sigtimedwait! Two questions:
On Dec 13 22:54, Mark Geisert wrote:
diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc
index 69c5e2aad..0599d8a3e 100644
--- a/winsup/cygwin/signal.cc
+++ b/winsup/cygwin/signal.cc
Abstract out common code from sigwait/sigwaitinfo/sigtimedwait to implement the
latter.
---
winsup/cygwin/common.din | 1 +
winsup/cygwin/include/cygwin/version.h | 3 ++-
winsup/cygwin/signal.cc| 36 --
winsup/cygwin/thread.cc
Abstract out common code from sigwait/sigwaitinfo/sigtimedwait to implement the
latter.
---
winsup/cygwin/common.din | 1 +
winsup/cygwin/include/cygwin/version.h | 3 ++-
winsup/cygwin/signal.cc| 32 ++--
winsup/cygwin/thread.cc
Just closing out this email thread...
On Fri, 1 Dec 2017, Mark Geisert wrote:
On Fri, 1 Dec 2017, Corinna Vinschen wrote:
On Dec 1 10:30, Corinna Vinschen wrote:
On Dec 1 00:44, Mark Geisert wrote:
And then pwrite() creates its own handle (or reuses one (!)) to avoid
messing up the seek
On Sat, 2 Dec 2017, Corinna Vinschen wrote:
On Dec 1 13:46, Mark Geisert wrote:
I'm open to using overlapped I/O for the usual read & write cases of aio but
there are some extensions I have in mind that don't allow for overlapped so
I think I need to have threads handle them. I might com
On Fri, 1 Dec 2017, Corinna Vinschen wrote:
On Dec 1 10:30, Corinna Vinschen wrote:
On Dec 1 00:44, Mark Geisert wrote:
[...]
I'd better take this info back to "the lab" and do some more digging. Thanks
very much for these details and your earlier replies.
On Thu, 30 Nov 2017, Corinna Vinschen wrote:
On Nov 30 01:50, Mark Geisert wrote:
Yes, I believe that's correct. But in my aio implementation for Cygwin, I'm
not using overlapped I/O or any kind of async or nonblocking write. I'm
using separate threads to do plain vanilla blocking writes (via
On Wed, 29 Nov 2017, Corinna Vinschen wrote:
On Nov 29 13:36, Corinna Vinschen wrote:
On Nov 29 13:04, Corinna Vinschen wrote:
- If you do async IO, you have to handle STATUS_PENDING gracefully:
- The IO_STATUS_BLOCK given to NtWriteFile *must* exist for the
entire time the operation
On Wed, 29 Nov 2017, I wrote:
I added the printf()s and, what do you know, it shows all the NtWriteFile()s
That's an American English idiom and is not meant to be taken literally.
It's like "How about that?" or "Can you believe it?". Perhaps y'all
Corinna Vinschen wrote:
On Nov 28 02:28, Mark Geisert wrote:
Corinna Vinschen wrote:
On Nov 28 00:03, Mark Geisert wrote:
Mark Geisert wrote:
---
winsup/cygwin/fhandler_disk_file.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/fhandler_disk_file.cc
Corinna Vinschen wrote:
On Nov 28 00:03, Mark Geisert wrote:
Mark Geisert wrote:
---
winsup/cygwin/fhandler_disk_file.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/fhandler_disk_file.cc
b/winsup/cygwin/fhandler_disk_file.cc
index 5dfcae4d9
Mark Geisert wrote:
---
winsup/cygwin/fhandler_disk_file.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/fhandler_disk_file.cc
b/winsup/cygwin/fhandler_disk_file.cc
index 5dfcae4d9..2ead9948c 100644
[...]
Oops, I neglected to include an explanatory
---
winsup/cygwin/fhandler_disk_file.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/winsup/cygwin/fhandler_disk_file.cc
b/winsup/cygwin/fhandler_disk_file.cc
index 5dfcae4d9..2ead9948c 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++
instead of bash has the build running 5%-10% faster.
Cheers,
..mark
From fb9db7a75c7e391f451cb1df3c1e8463ef4c7bf3 Mon Sep 17 00:00:00 2001
From: Mark Geisert <m...@maxrnd.com>
Date: Wed, 5 Apr 2017 22:20:09 -0700
Subject: [PATCH] Remove "function" from line to avoid dash objecting t
Václav Haisman wrote:
Hi.
I have noticed that Cygwin's spinlock goes into heavy sleeping code
for each spin. It seems it would be a good idea to actually try to
spin a bit first. There is this 'pause' instruction which let's the
CPU make such busy loops be less busy. Here is a patch to do this.
adc25dc19ade01fe42d4a4446a24b45ddd01f106 Mon Sep 17 00:00:00 2001
From: Mark Geisert <m...@maxrnd.com>
Date: Thu, 10 Mar 2016 23:56:56 -0800
Subject: [PATCH] Documentation covering profiling Cygwin programs.
---
winsup/doc/gprof.xml | 250 +
On Thu, 10 Mar 2016, Corinna Vinschen wrote:
On Mar 10 10:39, Corinna Vinschen wrote:
On Mar 10 00:35, Mark Geisert wrote:
This is Version 4 incorporating review comments of Version 3. This is just
the code patch; a separate doc patch is forthcoming.
Uhm...
+ long divisor
ctl): Call pthread_atfork() to set profile_child callback.
Thank you,
..mark
>From e65fb126be97090f92e9ee919a87116feaaffa49 Mon Sep 17 00:00:00 2001
From: Mark Geisert <m...@maxrnd.com>
Date: Fri, 19 Feb 2016 22:58:31 -0800
Subject: [PATCH] Support profiling of multi-threaded apps.
This
ctl): Call pthread_atfork() to set profile_child callback.
Thanks,
..mark
From 56b79572a654293e940a03d016833f07157dbef1 Mon Sep 17 00:00:00 2001
From: Mark Geisert <m...@maxrnd.com>
Date: Fri, 19 Feb 2016 22:58:31 -0800
Subject: [PATCH] Support profiling of multi-threaded apps.
This patch set m
On Tue, 23 Feb 2016, Corinna Vinschen wrote:
On Feb 22 23:36, Mark Geisert wrote:
On Mon, 22 Feb 2016, Jon Turney wrote:
There doesn't seem to be anything specific to profiling about this, so it
could be written in a more generic way, as "call a callback function for
each thread".
Hi Jon,
On Mon, 22 Feb 2016, Jon Turney wrote:
Thanks for this. A few comments inline.
On 20/02/2016 08:16, Mark Geisert wrote:
+/* Called from profil.c to sample all non-main thread PC values for
profiling */
+extern "C" void
+cygheap_profthr_all (void (*profthr_byhandl
On Mon, 22 Feb 2016, Corinna Vinschen wrote:
One is, for completeness it would be nice if you could add a
description to the git comment along the lines of your original
comment so we have a description in the log.
Sorry, can't parse this; git newbie here. Did you mean the 'git commit'
I'm
Version 2 incorporating review comments of version 1.
Change log relative to winsup/cygwin:
* include/sys/cygwin.h: Add CW_CYGHEAP_PROFTHR_ALL.
* cygheap.cc (cygheap_profthr_all): New C-callable function that
runs cygheap's threadlist handing each pthread's thread handle
On Thu, 18 Feb 2016, Corinna Vinschen wrote:
On Feb 17 22:35, Mark Geisert wrote:
I do see that a case could be made for general profiling documentation in
winsup/doc/programming.xml but that's more than I want to take on at the
moment.
It doesn't have to be part of the source patch
On Thu, 18 Feb 2016, Jon Turney wrote:
Thanks for this.
On 17/02/2016 05:28, Mark Geisert wrote:
There is a behavioral change that ought to be documented somewhere: If
a gmon.out file exists when a profiled application exits, the app will
now dump its profiling info into another file
I've attached a patch set modifying Cygwin's profiling support to sample PC
values of all an application's threads, not just the main thread. There is no
change to how profiling is requested: just compile and link the app with "-pg"
as usual. The profiling info is dumped into file gmon.out as
Hope I'm doing this correctly. Here is the ChangeLog entry followed by
the patch. I wasn't sure if patch originator or patch committer, if
different, gets their name in the ChangeLog entry. Patch rationale
available on request.
Cheers,
..mark
2013-12-31 Mark Geisert m
Missed this in proofreading...
+installed; you at least need literalg++/literal, literalmake/literal,
..should be..
+installed; you at least need literalgcc-g++/literal,
literalmake/literal,
..mark
101 - 178 of 178 matches
Mail list logo