delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/02/23/17:12:40

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:cc:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=dC+x1AfqtePgJPoxoI+wYLVnyFFP+mFk/2/bCMR4xb9nZ6Axw2dFY
7cW/5vnriZR3pSj4e+tz9JnPmwxm6Nv0iEG8DfEcyhZgWUhvTEzhJ5twCve31mpZ
4Jr77Vi+uWXfbMqCqAQIM+ub2qk8hgMJgwJx0kdwk/ojt0HQqf+Xik=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:cc:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=nvpno5Jh+zsWIt2HWiGbilQrCww=; b=fmdFNOP8zwWDPZSASkdC0lEgqOkw
uetiFh3QbliG7oqpn08WGNnnLDwTfYkzTOlvIfmhx2+N4CTsgOYDvKM3GhMFWLUU
f2XSQXCVZI5O9q7My4jMpUykHD7/sAfIsFm49t4SflSLghaIEysF0jgocgbSVxjh
qSAHMh+K4dXF0Io=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-100.9 required=5.0 tests=BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=timer
X-HELO: mout.kundenserver.de
Date: Sat, 23 Feb 2019 23:11:41 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: Ken Brown <kbrown AT cornell DOT edu>
Cc: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Re: The timerfd functions slow down emacs
Message-ID: <20190223221141.GB4133@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: Ken Brown <kbrown AT cornell DOT edu>, "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
References: <04048cc3-091a-b55c-372b-bde29273d952 AT cornell DOT edu> <1df3d7ce-1427-cbd4-0978-7236b1903440 AT cornell DOT edu> <20190223191542 DOT GS4256 AT calimero DOT vinschen DOT de> <0f2789ab-5722-c0de-6176-d4e1aaff9f81 AT cornell DOT edu> <20190223210152 DOT GA4133 AT calimero DOT vinschen DOT de> <c316e5bd-0929-fc8a-0e3d-cc5671416866 AT cornell DOT edu>
MIME-Version: 1.0
In-Reply-To: <c316e5bd-0929-fc8a-0e3d-cc5671416866@cornell.edu>
User-Agent: Mutt/1.11.3 (2019-02-01)

--A6N2fC+uXW/VQSAv
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Feb 23 21:24, Ken Brown wrote:
> On 2/23/2019 4:01 PM, Corinna Vinschen wrote:
> > On Feb 23 20:48, Ken Brown wrote:
> >> On 2/23/2019 2:15 PM, Corinna Vinschen wrote:
> >>> Below's the NSSTC I used to test my timerfd implementation (based on
> >>> another STC to show a problem in POSIX timers).  From what I can tell=
 it
> >>> works as desired.  If you find a problem, please point it out or send=
 a
> >>> patch.
> >>
> >> Thanks, that saved me a lot of time.  I was in the process of creating=
 a test
> >> case when your mail arrived.
> >>
> >> Your test works fine.  For example:
> >>
> >> $ gcc timerfd_test.c -o timerfd_test
> >>
> >> $ ./timerfd_test.exe 3 1 10
> >> 0.000: timer started 52379
> >> 2.988: 52379 read: 1; total=3D1
> >> 3.988: 52379 read: 1; total=3D2
> >> 4.989: 52379 read: 1; total=3D3
> >> 5.987: 52379 read: 1; total=3D4
> >> 7.001: 52379 read: 1; total=3D5
> >> 7.987: 52379 read: 1; total=3D6
> >> 9.001: 52379 read: 1; total=3D7
> >> 9.987: 52379 read: 1; total=3D8
> >> 10.987: 52379 read: 1; total=3D9
> >> 11.997: 52379 read: 1; total=3D10
> >>
> >> But if I change CLOCK_MONOTONIC by CLOCK_REALTIME in the call to timer=
fd_create,
> >> then I get the following:
> >=20
> > Only in timerfd_create?  Not in clock_gettime?  If you don't
> > do that, you're using a different clock with entirely different
> > values for the starttime.
> >=20
> > Actually, this testcase started with CLOCK_REALTIME in both calls.
> > If I revert to that, I get:
> >=20
> > )$ ./timerfd 3 1 10
> > 0.000: timer started 644
> > 3.001: 644 read: 1; total=3D1
> > 4.001: 644 read: 1; total=3D2
> > 5.017: 644 read: 1; total=3D3
> > 6.001: 644 read: 1; total=3D4
> > 7.001: 644 read: 1; total=3D5
> > 8.009: 644 read: 1; total=3D6
> > 9.002: 644 read: 1; total=3D7
> > 10.001: 644 read: 1; total=3D8
> > 11.010: 644 read: 1; total=3D9
> > 12.017: 644 read: 1; total=3D10
> >=20
> > I tested this STC with differnt clocks, but it's important to
> > use the same cloack for clock_gettime and timerfd_create.
>=20
> Yes, that was careless of me.  I now get the same results as you.  I'll h=
ave to=20
> go back to the emacs sources and see what else might be different there.

You're right, nevertheless.  Select on timerfd returns immediately.
I (hope I) fixed that in git and uploaded new developer snapshots to
https://cygwin.com/snapshots/

Please try especially with emacs.

If that works as desired, I release 3.0.2 pretty soon.


Thanks,
Corinna

--=20
Corinna Vinschen
Cygwin Maintainer

--A6N2fC+uXW/VQSAv
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlxxxR0ACgkQ9TYGna5E
T6Cm7w/7BIOv20GsshOHNskQW33leC88RRkPpt6M3fNv65QSFzLuCBlHdhfMwJPg
FfB/xcxa+W/NXh+Yd3JLGZvNFbhCSCbMRG9m6zDXpZtovzGAYRTV4pGcgbwLbDAe
gOENxD6oOLzMTBRYdH7D9rO4aey7E6G55qy1cehQ4uEC/YfRnH4mzmuQEcMXiqz4
FOJ7TSyYitb/z/7V8eTmzAmq7/uXID74G+uJ9kczTNOet4HffNHRLJzJz7GmQISP
NmfOHsgLn1QhqIApwMx07ZcZ24bedAvtFIxdzOYhK2AIw2Yvv+pM4uO7faZ7io60
HURVBgNz9GFr6vJk+FYZKzz4drGQAGqt3Qu0JhmVHe4seFQ70gwNJjfFZuQ2Sump
DcGXMhofIL3wW4uFZGlsGU7sTHDlXN9sdEczBpPOdfypoAUQUrJmm7+on7PE6sEP
aYOxmjs/iWY5EIUvO7OIM7blLySErxiTgxcMgMoEMPCA3/gCE8e91YZ7ZIq6Zem5
Yu1QDoaDxtuLU5P71FgwTJv77Os4Sy7iwC5rtxNq5Hi9SCQ2nQOKlwlkL+TprNCx
PD2amKuW2sA+FXoERqIcpznpf3OgftqQKMfdzFUjcA20wGMqaMwA6Jzn0F8hW6wZ
tpfiRvxQFq/dGz0pYLAafE+qEYtLPykAmIR9mON/MbDGVHirZoo=
=FauL
-----END PGP SIGNATURE-----

--A6N2fC+uXW/VQSAv--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019