public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "carlos at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug stdio/27777] fclose does a linear search, takes ages when many FILE* are opened
Date: Thu, 25 Apr 2024 10:52:35 +0000 [thread overview]
Message-ID: <bug-27777-131-l3nxqQgQwM@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27777-131@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=27777
--- Comment #3 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Alexandre Ferrieux from comment #2)
> Hi,
> Since that was (exactly) 3 years ago, I assume some parts have evolved in
> between. Would love to contribute: can you point me to the official git repo
> ?
The issue still remains :-)
68 for (f = &_IO_list_all->file._chain; *f; f = &(*f)->_chain)
69 if (*f == (FILE *) fp)
70 {
71 *f = fp->file._chain;
72 break;
73 }
The interesting think here would be to write a microbenchmark that shows the
degenerate case of the performance, like we have for empty critical sections.
(a) Write benchtests/bench-file-unlink.c has lots of open descriptors and times
the unlink time indirectly (worst case).
(b) Change implementation and show the performance improves.
References:
Contribution Checklist:
https://sourceware.org/glibc/wiki/Contribution%20checklist
Testing Builds:
https://sourceware.org/glibc/wiki/Testing/Builds
Good luck!
--
You are receiving this mail because:
You are on the CC list for the bug.
next prev parent reply other threads:[~2024-04-25 10:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-24 21:50 [Bug stdio/27777] New: fclose does a linear search, takes ages when " alexandre.ferrieux at orange dot com
2021-04-24 21:51 ` [Bug stdio/27777] fclose does a linear search, takes ages when many " alexandre.ferrieux at orange dot com
2024-04-24 17:05 ` carlos at redhat dot com
2024-04-24 21:12 ` alexandre.ferrieux at orange dot com
2024-04-25 10:52 ` carlos at redhat dot com [this message]
2024-04-25 14:17 ` sam at gentoo dot org
2024-04-25 16:20 ` alexandre.ferrieux at orange dot com
2024-04-26 14:23 ` alexandre.ferrieux at orange dot com
2024-05-17 21:14 ` cvs-commit at gcc dot gnu.org
2024-05-17 21:15 ` hjl.tools at gmail dot com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-27777-131-l3nxqQgQwM@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=glibc-bugs@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).