linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Catalin Marinas <catalin.marinas@arm.com>,
	Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will@kernel.org>, Marc Zyngier <maz@kernel.org>,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	 Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [GIT PULL] arm64 fixes for 5.15-rc5
Date: Fri, 8 Oct 2021 13:25:51 -0700	[thread overview]
Message-ID: <CAHk-=whWZ4OxfKQwKVrRc-E9=w-ygKdVFn_HcAMW-DW8SgranQ@mail.gmail.com> (raw)
In-Reply-To: <YWCPyK+xotTgUMy/@arm.com>

On Fri, Oct 8, 2021 at 11:37 AM Catalin Marinas <catalin.marinas@arm.com> wrote:
>
> Pingfan Liu (2):
>       kernel/irq: make irq_{enter,exit}() in handle_domain_irq() arch optional
>       arm64: entry: avoid double-accounting IRQ RCU entry

Ugh. This is *really* ugly. And it seems to be going exactly the wrong way.

I read the commit descriptions, and it still doesn't answer the
fundamental question of why arm64 needs to do the accounting in
arch-specific code, and disable the generic code.

It says

    To fix this, we must perform all the accounting from the architecture
    code. We prevent the IRQ domain code from performing any accounting by
    selecting HAVE_ARCH_IRQENTRY, and must call irq_enter_rcu() and
    irq_exit_rcu() around invoking the root IRQ handler.

but at no point does it actually explain *why* all the accounting
needs to be done by the architecture code.

Yes, yes, I read the previous paragraph. But why isn't the fix to just
stop doing the double accounting in the arm64 specific code?

Instead it doubles down on that "let's do this non-arch-specific
accounting in arch-specific code", making the common code uglier and
weaker.

I initially pulled this, and then I just unpulled in disgust.

Please explain why arm64 does this bad thing, and why the fix isn't
"fix arm64", but instead "make the generic code uglier and harder to
maintain and follow".

Really, from all the explanations those commits give, the natural
thing to do would be "just fix arm64".

So if that really isn't the answer, then the explanations are clearly lacking.

                   Linus

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-10-08 20:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08 18:36 [GIT PULL] arm64 fixes for 5.15-rc5 Catalin Marinas
2021-10-08 20:25 ` Linus Torvalds [this message]
2021-10-11 10:47   ` Mark Rutland
2021-10-11 19:54     ` Linus Torvalds
2021-10-12 13:18       ` Thomas Gleixner
2021-10-12 14:02         ` Mark Rutland
2021-10-12 15:39           ` Thomas Gleixner
2021-10-21 15:57           ` Mark Rutland
2021-10-17  7:42       ` Pingfan Liu

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='CAHk-=whWZ4OxfKQwKVrRc-E9=w-ygKdVFn_HcAMW-DW8SgranQ@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.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 NNTP newsgroup(s).