linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc/vas: do not set uses_vas for kernel windows
Date: Fri, 9 Feb 2018 20:57:24 -0800	[thread overview]
Message-ID: <20180210045724.GA28183@us.ibm.com> (raw)
In-Reply-To: <20180208091838.27992-1-npiggin@gmail.com>

Nicholas Piggin [npiggin@gmail.com] wrote:
> cp_abort is only required or user windows, because kernel context
> must not be preempted between a copy/paste pair.

Yes, that is a good optimization.

> 
> Without this patch, the init task gets used_vas set when it runs
> the nx842_powernv_init initcall, which opens windows for kernel
> usage.
> 
> used_vas is then never cleared anywhere, so it gets propagated
> into all other tasks. It's a property of the address space, so it
> should really be cleared when a new mm is created (or in dup_mmap
> if the mmaps are marked as VM_DONTCOPY). For now we seem to have
> no such driver, so leave that for another patch.

If the parent process has the paste address mapped, the child inherits
those mappings - so we can't clear the ->used_vas in a process until
it has unmapped all the send windows right?

If VM_DONCOPY is set, then we can clear it.

> 
> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>

Reviewed-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>

  reply	other threads:[~2018-02-10  4:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08  9:18 [PATCH] powerpc/vas: do not set uses_vas for kernel windows Nicholas Piggin
2018-02-10  4:57 ` Sukadev Bhattiprolu [this message]
2018-02-14  5:43 ` Michael Ellerman

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=20180210045724.GA28183@us.ibm.com \
    --to=sukadev@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@gmail.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).