loongarch.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Guo Ren <guoren@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Huacai Chen <chenhuacai@kernel.org>,
	 Huacai Chen <chenhuacai@loongson.cn>,
	loongarch@lists.linux.dev,
	 linux-arch <linux-arch@vger.kernel.org>,
	Xuefeng Li <lixuefeng@loongson.cn>,
	 Xuerui Wang <kernel@xen0n.name>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	 Peter Zijlstra <peterz@infradead.org>,
	Will Deacon <will@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	 Rui Wang <wangrui@loongson.cn>
Subject: Re: [PATCH V2 2/2] LoongArch: Add qspinlock support
Date: Sat, 25 Jun 2022 08:22:32 +0200	[thread overview]
Message-ID: <CAK8P3a0s3PkeV350puaJ3kPkUQjV3k0c5c3E1m1skUq7n86QMA@mail.gmail.com> (raw)
In-Reply-To: <CAJF2gTSzUu5-C76LQs7KzV+U+qC5D1D-RVk4fHexHTJXLK6dqQ@mail.gmail.com>

On Sat, Jun 25, 2022 at 4:42 AM Guo Ren <guoren@kernel.org> wrote:
> > In that case, you probably need a boot-time check for this feature bit
> > to refuse booting a kernel with qspinlock enabled when it has more than
> > one active CPU but does not support the random backoff,
> Do you mean we should combine ticket-lock into qspinlock, and let the
> machine choose during boot-time?

That is not what I meant here. It would be great if it could be done, but
I doubt this is possible without adding excessive complexity.

> From Peter's comment, seems the arch is broken without a strong fwd guarantee.
> https://lore.kernel.org/linux-riscv/YGwKpmPkn5xIxIyx@hirez.programming.kicks-ass.net/
>
> I'm not sure qspinlock guys would welcome ticket-lock getting into the
> qspinlock data structure (Although ticket-lock is also made by peter).

What I meant is that a kernel that is not safe to run on hardware
without the necessary guarantees should just refuse to boot, the
same way that we tend to warn when the CPU instruction set
version is too old for what the kernel was built against.


         Arnd

  reply	other threads:[~2022-06-25  6:22 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23  4:47 [PATCH V2 1/2] LoongArch: Add subword xchg/cmpxchg emulation Huacai Chen
2022-06-23  4:47 ` [PATCH V2 2/2] LoongArch: Add qspinlock support Huacai Chen
2022-06-23  5:44   ` Guo Ren
2022-06-23  7:56     ` Huacai Chen
2022-06-23  8:26       ` Arnd Bergmann
2022-06-23  8:32         ` Guo Ren
2022-06-23 13:05         ` Huacai Chen
2022-06-23 14:04           ` Arnd Bergmann
2022-06-25  2:42             ` Guo Ren
2022-06-25  6:22               ` Arnd Bergmann [this message]
2022-06-25  6:54             ` Huacai Chen
2022-06-25 11:48               ` Arnd Bergmann
2022-06-25 14:25                 ` Huacai Chen
2022-06-23  6:49 ` [PATCH V2 1/2] LoongArch: Add subword xchg/cmpxchg emulation Guo Ren
2022-06-23  8:04   ` Huacai Chen
2022-06-23  8:43     ` Guo Ren

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=CAK8P3a0s3PkeV350puaJ3kPkUQjV3k0c5c3E1m1skUq7n86QMA@mail.gmail.com \
    --to=arnd@arndb.de \
    --cc=chenhuacai@kernel.org \
    --cc=chenhuacai@loongson.cn \
    --cc=guoren@kernel.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kernel@xen0n.name \
    --cc=linux-arch@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=loongarch@lists.linux.dev \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=wangrui@loongson.cn \
    --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).