All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
To: David Daney <ddaney@caviumnetworks.com>
Cc: David Daney <ddaney.cavm@gmail.com>, <linux-mips@linux-mips.org>,
	<ralf@linux-mips.org>, David Daney <david.daney@cavium.com>,
	<stable@vger.kernel.org>
Subject: Re: MIPS: Make set_pte() SMP safe.
Date: Tue, 4 Aug 2015 13:58:53 -0700	[thread overview]
Message-ID: <55C1278D.5090705@imgtec.com> (raw)
In-Reply-To: <55C1250B.2090508@caviumnetworks.com>

David,

On 08/04/2015 01:48 PM, David Daney wrote:
> I think the best way to think about it is to ignore vmap, and consider 
> the semantics of set_pte().
> ...
> You can go around in circles all you want trying to indirectly avoid 
> using the buddy-PTE from another thread, but I think it is best to 
> make set_pte() have easily understood semantics (and semantics that 
> match those of other architectures) and not clobber things in 
> unexpected ways.

My primary interest here is not a semantics of set_pte() but the 
followup of your finding, I tried test it: if guard page logic doesn't 
work anymore (as I can judge basing on your observations) then it calls 
back my old optimization in flush_cache_vmap(start, end) and similar. 
Right now it flushes the whole cache because if it tries to flush a 
guard page (and it THERE IS such attempt in some mm/*.c) it does TLB 
exception and I have a hard lock in do_page_fault().

Issue is significant for some GPU/display drivers which calls flushing 
VMALLOC area pretty often.

WARNING: multiple messages have this Message-ID (diff)
From: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
To: David Daney <ddaney@caviumnetworks.com>
Cc: David Daney <ddaney.cavm@gmail.com>,
	linux-mips@linux-mips.org, ralf@linux-mips.org,
	David Daney <david.daney@cavium.com>,
	stable@vger.kernel.org
Subject: Re: MIPS: Make set_pte() SMP safe.
Date: Tue, 4 Aug 2015 13:58:53 -0700	[thread overview]
Message-ID: <55C1278D.5090705@imgtec.com> (raw)
Message-ID: <20150804205853.rN_HTbbauL-Zo0v68ip5juKuYvgN2s-ggvmygKBE_l0@z> (raw)
In-Reply-To: <55C1250B.2090508@caviumnetworks.com>

David,

On 08/04/2015 01:48 PM, David Daney wrote:
> I think the best way to think about it is to ignore vmap, and consider 
> the semantics of set_pte().
> ...
> You can go around in circles all you want trying to indirectly avoid 
> using the buddy-PTE from another thread, but I think it is best to 
> make set_pte() have easily understood semantics (and semantics that 
> match those of other architectures) and not clobber things in 
> unexpected ways.

My primary interest here is not a semantics of set_pte() but the 
followup of your finding, I tried test it: if guard page logic doesn't 
work anymore (as I can judge basing on your observations) then it calls 
back my old optimization in flush_cache_vmap(start, end) and similar. 
Right now it flushes the whole cache because if it tries to flush a 
guard page (and it THERE IS such attempt in some mm/*.c) it does TLB 
exception and I have a hard lock in do_page_fault().

Issue is significant for some GPU/display drivers which calls flushing 
VMALLOC area pretty often.

  reply	other threads:[~2015-08-04 20:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-04  0:48 [PATCH] MIPS: Make set_pte() SMP safe David Daney
2015-08-04  0:48 ` David Daney
2015-08-04 19:15 ` Leonid Yegoshin
2015-08-04 19:15   ` Leonid Yegoshin
2015-08-04 20:01   ` David Daney
2015-08-04 20:01     ` David Daney
2015-08-04 20:32     ` Leonid Yegoshin
2015-08-04 20:32       ` Leonid Yegoshin
2015-08-04 20:36       ` Leonid Yegoshin
2015-08-04 20:36         ` Leonid Yegoshin
2015-08-04 20:38         ` David Daney
2015-08-04 20:38           ` David Daney
2015-08-04 20:47           ` Leonid Yegoshin
2015-08-04 20:47             ` Leonid Yegoshin
2015-08-04 20:48       ` David Daney
2015-08-04 20:48         ` David Daney
2015-08-04 20:58         ` Leonid Yegoshin [this message]
2015-08-04 20:58           ` Leonid Yegoshin
2015-08-24  3:28 ` [PATCH] " Joshua Kinard
  -- strict thread matches above, loose matches on Subject: below --
2015-08-04  0:48 David Daney
2015-08-04  0:48 David Daney
2015-08-04  0:48 David Daney

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=55C1278D.5090705@imgtec.com \
    --to=leonid.yegoshin@imgtec.com \
    --cc=david.daney@cavium.com \
    --cc=ddaney.cavm@gmail.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=stable@vger.kernel.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 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.