linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Berg <benjamin@sipsolutions.net>
To: Anton Ivanov <anton.ivanov@cambridgegreys.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	linux-um@lists.infradead.org
Subject: Re: [RFC PATCH 0/3] um: clean up mm creation - another attempt
Date: Wed, 27 Sep 2023 12:42:26 +0200	[thread overview]
Message-ID: <54b803469e63dd23d90a70fa2f356124cc230be6.camel@sipsolutions.net> (raw)
In-Reply-To: <a38bf57b-c11f-7b27-63a3-d5a4bb028819@cambridgegreys.com>

Hi,

On Wed, 2023-09-27 at 10:59 +0100, Anton Ivanov wrote:
> [SNIP]
> 
> I was just looking at all the workaround which are in place to
> prevent guest processes doing a syscall on the host. If this is
> prohibited at a higher level we should get quite a boost as all these
> PTRACE_PEEKs will become unnecessary.

Are you maybe looking at the fallback code if "local_using_sysemu" is
not set? That code should be dropped either way, we can assume
PTRACE_SYSEMU support these days, so the code in e.g. handle_trap can
be removed. I had a patch for that already.

Benjamin

> 
> >     2. Maybe we can disable/cripple page access tracking? If we
> > assume
> >        initially mark all pages as accessed by userspace (i.e.
> >        pte_mkyoung), then we avoid a minor page fault on first
> > access.
> >        Doing that will mess with page eviction though.
> >     3. Do DAX (direct_access) for files. i.e. mmap files directly
> > in the
> >        host kernel rather than through UM.
> >        With a hostfs like file system, one should be able to add an
> >        intermediate block device that maps host files to physical
> > pages,
> >        then do DAX in the FS.
> >        For disk images, the existing iomem infrastructure should be
> >        usable, this should work with any DAX enabled filesystems
> > (ext2,
> >        ext4, xfs, virtiofs, erofs).
> 
> I had some plans to do a ubd gen 2 which uses mmap and/or this. They
> are
> presently way on the backburner. We can do some of that once we push
> the new VM changes.
> 
> > 
> > Benjamin
> > 
> > > 
> > > > 2. The preemption patches work fine on top (all 3 cases). The
> > > > performance difference stays.
> > > 
> > > OK.
> > > 
> > > > 3. We do not have anything of value to add in term of
> > > > cond_resched() to the drivers :(
> > > > Most drivers are fairly simplistic with no safe points to add
> > > > this.
> > > 
> > > Yeah, not surprised by this.
> > > 
> > > > 6. Do we still need force_flush_all() in the arch_dup_mmap()?
> > > > This
> > > > works with a non-forced tlb flush
> > > > using flush_tlb_mm(mm);
> > > 
> > > Maybe not, does it make a difference though?
> > > 
> > > > 7. In all cases, UML is doing something silly.
> > > > The CPU usage while doing find -type f -exec cat {} > /dev/null
> > > > measured from outside in non-preemptive and
> > > > PREEMPT_VOLUNTARY stays around 8-15%. The UML takes a
> > > > sabbatical
> > > > for the remaining 85 instead of actually
> > > > doing work. PREEMPT is slightly better at 60, but still far
> > > > from
> > > > 100%. It just keeps going into idle and I
> > > > cannot understand why.
> > > 
> > > Is it just waiting for IO?
> > > 
> > > johannes
> > > 
> > > _______________________________________________
> > > linux-um mailing list
> > > linux-um@lists.infradead.org
> > > http://lists.infradead.org/mailman/listinfo/linux-um
> > > 
> > 
> > 
> 


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

  reply	other threads:[~2023-09-27 10:42 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
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 [this message]
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=54b803469e63dd23d90a70fa2f356124cc230be6.camel@sipsolutions.net \
    --to=benjamin@sipsolutions.net \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=johannes@sipsolutions.net \
    --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).