Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cygwin: pipe: Fix a regression that raw_write() slows down #227

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

dscho
Copy link
Collaborator

@dscho dscho commented Sep 3, 2024

It was reported to the Cygwin mailing list that a grep on a large file was much slower than it used to be. This is a backport of the fix.

After the commit 7f3c225, writing to pipe extremely slows down.
This is because cygwait(select_sem, 10, cw_cancel) is called even
when write operation is already completed. With this patch, the
cygwait() is called only if the write operation is not completed.

Backported-from: 37ab3e0d55 (Cygwin: pipe: Fix a regression that raw_write() slows down, 2024-09-01)
Addresses: https://cygwin.com/pipermail/cygwin/2024-August/256398.html
Fixes: 7f3c225 ("Cygwin: pipe: handle signals explicitely in raw_write")
Reported-by: Jim Reisert AD1C <[email protected]>
Reviewed-by: Corinna Vinschen <[email protected]>
Signed-off-by: Takashi Yano <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho self-assigned this Sep 3, 2024
@lazka
Copy link
Member

lazka commented Sep 3, 2024

lgtm

@dscho dscho merged commit 2bfb773 into msys2:msys2-3.5.4 Sep 4, 2024
1 check passed
dscho added a commit to dscho/MSYS2-packages that referenced this pull request Sep 4, 2024
lazka pushed a commit to msys2/MSYS2-packages that referenced this pull request Sep 4, 2024
@dscho dscho deleted the slow-pipe-write-fix branch September 5, 2024 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants