linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Tiwei Bie <tiwei.bie@linux.dev>
To: johannes@sipsolutions.net
Cc: richard@nod.at, anton.ivanov@cambridgegreys.com,
	linux-um@lists.infradead.org, linux-arch@vger.kernel.org,
	tiwei.btw@antgroup.com, tiwei.bie@linux.dev
Subject: Re: [PATCH 9/9] um: Add initial SMP support
Date: Sun, 10 Aug 2025 12:33:34 +0800	[thread overview]
Message-ID: <20250810043334.530444-1-tiwei.bie@linux.dev> (raw)
In-Reply-To: <20250730041838.1821401-1-tiwei.bie@linux.dev>

On Wed, 30 Jul 2025 12:18:38 +0800, Tiwei Bie wrote:
> On Tue, 29 Jul 2025 17:37:24 +0200, Johannes Berg wrote:
[...]
> > 
> > IOW, I think you've stumbled across an inconsistency in the generic
> > files, and hence we should fix that, rather than having each
> > architecture paper over it.
> 
> That does make sense. I will prepare a patch for that. Thanks!

Hmm, this issue might be a bit tricky to resolve.. The root cause
is that smp_cond_load_relaxed() provided by asm/barrier.h relies
on cpu_relax() [1][2], but the corresponding header isn't included.
The reason why it's not included might be that asm/processor.h
includes too many dependencies, which prevents barrier.h from
including it. I haven't come up with an ideal way to address it
yet. Fortunately, smp_cond_load_relaxed() is a macro, so cpu_relax()
is needed only when smp_cond_load_relaxed() is invoked inside a
function (i.e., when it's expanded during preprocessing).

As for this series, I realized that I should implement spinlock in
$SUBARCH (i.e., in a $SUBARCH native way, which won't require the
above workaround anymore), similar to how atomic and barrier are
implemented. I'll take that approach in the next version.

Thanks again for the review!

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/asm-generic/barrier.h?h=v6.16#n253
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/um/asm/barrier.h?h=v6.16#n27

Regards,
Tiwei


  reply	other threads:[~2025-08-10  4:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-27  6:29 [PATCH 0/9] um: Add SMP support Tiwei Bie
2025-07-27  6:29 ` [PATCH 1/9] um: Stop tracking virtual CPUs via mm_cpumask() Tiwei Bie
2025-07-27  6:29 ` [PATCH 2/9] um: Remove unused cpu_data and current_cpu_data macros Tiwei Bie
2025-07-27  6:29 ` [PATCH 3/9] um: vdso: Implement __vdso_getcpu() via syscall Tiwei Bie
2025-07-27  6:29 ` [PATCH 4/9] um: Preserve errno within signal handler Tiwei Bie
2025-07-27  6:29 ` [PATCH 5/9] um: Turn signals_* into thread-local variables Tiwei Bie
2025-07-27  6:29 ` [PATCH 6/9] um: Determine sleep based on need_resched() Tiwei Bie
2025-07-27  6:29 ` [PATCH 7/9] um: Define timers on a per-CPU basis Tiwei Bie
2025-07-27  6:29 ` [PATCH 8/9] um: Support directing IO signals to calling thread Tiwei Bie
2025-07-27  6:29 ` [PATCH 9/9] um: Add initial SMP support Tiwei Bie
2025-07-28 10:47   ` Johannes Berg
2025-07-28 15:28     ` Randy Dunlap
2025-07-28 16:04     ` Tiwei Bie
2025-07-28 16:27       ` Johannes Berg
2025-07-29 15:06         ` Tiwei Bie
2025-07-29 15:37           ` Johannes Berg
2025-07-30  4:18             ` Tiwei Bie
2025-08-10  4:33               ` Tiwei Bie [this message]
2025-07-28 13:55   ` Johannes Berg
2025-07-28 16:06     ` Tiwei Bie

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=20250810043334.530444-1-tiwei.bie@linux.dev \
    --to=tiwei.bie@linux.dev \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-um@lists.infradead.org \
    --cc=richard@nod.at \
    --cc=tiwei.btw@antgroup.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 NNTP newsgroup(s).