From: Alan Modra <amodra@gmail.com>
To: "Clément Chigot" <chigot@adacore.com>
Cc: binutils@sourceware.org
Subject: Re: PR30724, cygwin ld performance regression since 014a602b86
Date: Thu, 10 Aug 2023 07:51:05 +0930 [thread overview]
Message-ID: <ZNQRUaS0Cqar4Chr@squeak.grove.modra.org> (raw)
In-Reply-To: <CAJ307EhaA4SnO+JaxWeYoO6mCmkUAEGdLQ+OEbB3X6kDMSD3ew@mail.gmail.com>
On Wed, Aug 09, 2023 at 04:42:48PM +0200, Clément Chigot wrote:
> On Wed, Aug 9, 2023 at 1:21 AM Alan Modra <amodra@gmail.com> wrote:
> >
> > According to the reporter of this bug the newlib fseek implementation
> > is likely slowed down by locking and fflush, only attempting to
> > optimise seeks when the file is opened read-only. Thus when writing
> > the output we get a dramatic slowdown due to commit 014a602b86.
> >
> > Clément would you please check that this doesn't regress anything on
> > mingw.
>
> I'm not seeing any and the issue fixed by 014a602b86 is still fixed so
> it looks good.
> However, I have a question regarding the purpose of bfd_io_force.
It's a flag used to modify the operation of bfd_seek rather than being
the last IO operation performed. Perhaps I should have done without
that enum value, as all uses of bfd_io_force could be replaced with
bfd_io_seek and given the same result, unless we have code that is
doing multiple bfd_seeks without intervening bfd_reads or bfd_writes.
> Unless bfd_seek fails, it would be overridden right away. So are there
> cases where bfd_seek fails and bfd doesn't report an error, continuing
> to perform inputs/outputs as if nothing happens ?
Yes, there are cases where code in binutils and gdb does this. They
are all bugs. I have a patch, just didn't post yet.
--
Alan Modra
Australia Development Lab, IBM
prev parent reply other threads:[~2023-08-09 22:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 23:21 Alan Modra
2023-08-09 14:42 ` Clément Chigot
2023-08-09 22:21 ` Alan Modra [this message]
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=ZNQRUaS0Cqar4Chr@squeak.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=chigot@adacore.com \
/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).