From: Johannes Berg <johannes@sipsolutions.net>
To: Anton Ivanov <anton.ivanov@cambridgegreys.com>,
linux-um@lists.infradead.org
Subject: Re: [RFC PATCH 0/3] um: clean up mm creation - another attempt
Date: Mon, 25 Sep 2023 16:44:06 +0200 [thread overview]
Message-ID: <d6ac37b196ebc0443997a942f8efb16a69e424fc.camel@sipsolutions.net> (raw)
In-Reply-To: <4b5764f0-d2c0-12ce-56bb-73c07ab59ebc@cambridgegreys.com>
On Mon, 2023-09-25 at 15:27 +0100, Anton Ivanov wrote:
> On 25/09/2023 14:33, Johannes Berg wrote:
> > On Mon, 2023-09-25 at 14:29 +0100, Anton Ivanov wrote:
> > > I have rebased the preempt patch on top of these series.
> > >
> > > PREEMPT works with some performance decrease.
> > >
> > > VOLUNTARY deadlocks early in boot around the time it starts loading modules.
> > >
> > > non-preemptible deadlocks very early in boot.
> > >
> >
> > Well I guess that means there's still some issue in here? Hmm.
> >
> > Now I don't understand anything anymore, I guess.
>
> PEBKAC. The tree got corrupted somewhere during rebase. Reapplying everything on top of a clean master fixed it.
>
> So it all works.
OK, whew. At least now I no longer _completely_ doubt the mental model I
have of UML VM :-)
> With some performance penalties compared to the old approach, but works.
I still find this odd though, I don't see what the flush would possibly
do in a new (mm host) process that's not achievable in arch_dup_mmap()?
OK, so let's see - arch_dup_mmap() is _earlier_ than the fork_handler,
because that only happens on the very first switch into the process.
This is only when it gets scheduled. So we'd be looking for something
that copy_process() changes in the MM after copy_mm() and before it can
get scheduled?
I guess we could even move the flush it into copy_thread(), which is a
simpler patch too, but it felt a bit wrong, since that's about the
(guest!) process, not the mm.
But basically I don't see anything there - fork syscall tail-calls
kernel_clone(), which doesn't really do anything with the result of
copy_process() except wake it up, and copy_process() doesn't really do
anything either?
johannes
_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um
next prev parent reply other threads:[~2023-09-25 14:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 22:37 [RFC PATCH 0/3] um: clean up mm creation - another attempt Johannes Berg
2023-09-22 22:37 ` [RFC PATCH 1/3] um/x86: remove ldt mutex and use mmap lock instead Johannes Berg
2023-09-22 22:37 ` [RFC PATCH 2/3] um: clean up init_new_context() Johannes Berg
2023-09-22 22:37 ` [RFC PATCH 3/3] um: don't force-flush in mm/userspace process start Johannes Berg
2023-09-25 13:29 ` [RFC PATCH 0/3] um: clean up mm creation - another attempt Anton Ivanov
2023-09-25 13:33 ` Johannes Berg
2023-09-25 13:34 ` Anton Ivanov
2023-09-25 14:27 ` Anton Ivanov
2023-09-25 14:44 ` Johannes Berg [this message]
2023-09-25 15:20 ` Anton Ivanov
2023-09-26 12:16 ` Anton Ivanov
2023-09-26 12:38 ` Johannes Berg
2023-09-26 13:04 ` Anton Ivanov
2023-09-27 9:52 ` Benjamin Berg
2023-09-27 9:59 ` Anton Ivanov
2023-09-27 10:42 ` Benjamin Berg
2024-01-17 17:17 ` Benjamin Berg
2024-01-17 19:45 ` Anton Ivanov
2024-01-17 19:54 ` Benjamin Berg
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=d6ac37b196ebc0443997a942f8efb16a69e424fc.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=anton.ivanov@cambridgegreys.com \
--cc=linux-um@lists.infradead.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).