All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: WANG Xuerui <kernel@xen0n.name>
Cc: Huacai Chen <chenhuacai@kernel.org>,
	Huacai Chen <chenhuacai@loongson.cn>,
	Thomas Gleixner <tglx@linutronix.de>,
	loongarch@lists.linux.dev, Xuefeng Li <lixuefeng@loongson.cn>,
	Guo Ren <guoren@kernel.org>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] LoongArch: Fix the !CONFIG_SMP build for irqchip drivers
Date: Thu, 11 Aug 2022 07:56:33 +0100	[thread overview]
Message-ID: <87lervb74u.wl-maz@kernel.org> (raw)
In-Reply-To: <1359c52d-5194-7306-0e76-cde97b5aa31c@xen0n.name>

On Thu, 11 Aug 2022 01:58:15 +0100,
WANG Xuerui <kernel@xen0n.name> wrote:
> 
> On 8/10/22 23:38, Huacai Chen wrote:
> 
> > Hi, Marc,
> > 
> > On Wed, Aug 10, 2022 at 7:01 PM Marc Zyngier <maz@kernel.org> wrote:
> >> On 2022-08-10 11:31, Huacai Chen wrote:
> >>> 1, Guard get_ipi_irq() in CONFIG_SMP;
> >>> 2, Define cpu_logical_map() for the EIOINTC driver;
> >>> 3, Make eiointc_set_irq_affinity() return early for !CONFIG_SMP.
> >>> 
> >>> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
> >> Frankly, the real question is why do you even bother? As far as
> >> I can tell, LoongArch has no UP system.
> >> 
> >> arm64 crossed that bridge a long time ago, and we never looked
> >> back, because these systems hardly exist.
> >> 
> >> I'd rather you simply have a CONFIG_SMP always set to 'y', and
> >> be done with it forever.
> > LoongArch also has low-end processors (even LoongArch64). Though we
> > haven't translate all documents at
> > https://loongson.github.io/LoongArch-Documentation/ in time, there are
> > currently 4 LoongArch64 processors: Loongson-2K500 (single-core),
> > Loongon-2K1000 (dual-core), Loongson-3A5000 (quad-core) and
> > Loongson-3C5000 (16-core). So we indeed need a UP configuration.
> > Thanks.
> 
> I remember seeing an alternatives mechanism in the works for
> LoongArch. If such alternatives mechanism is to be upstreamed in short
> order, why make SMP one more build-time time option that developers
> have to decide upon? It's not like SMP code would break, or run with
> unacceptable overhead, on UP systems AFAIK, so it's probably better to
> not preemptively support so many *possibilities* that haven't been
> realized so the *current* maintainability suffers. Practically one
> can't buy the LoongArch 2K line of products anywhere right now, and
> the few companies developing for it are likely not using upstream
> kernels anyway, so it's not like we can't wait either.

And that's exactly my point. Yes, it is always possible to build a UP
system. But is it worth *maintaining* a configuration option for this?
I seriously doubt it.

My advise is to stick to SMP only for now (it will run just fine on a
UP machine), and only if upstream users find it completely
unacceptable should a !SMP option be introduced, or make it a runtime
decision (32bit ARM has had SMP_ON_UP support for a long time).

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2022-08-11  6:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 10:31 [PATCH] LoongArch: Fix the !CONFIG_SMP build for irqchip drivers Huacai Chen
2022-08-10 11:01 ` Marc Zyngier
2022-08-10 15:38   ` Huacai Chen
2022-08-11  0:58     ` WANG Xuerui
2022-08-11  6:56       ` Marc Zyngier [this message]
2022-08-11  8:44         ` Huacai Chen

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=87lervb74u.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=chenhuacai@kernel.org \
    --cc=chenhuacai@loongson.cn \
    --cc=guoren@kernel.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kernel@xen0n.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=loongarch@lists.linux.dev \
    --cc=tglx@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.