public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Seth Jennings <sjenning@linux•vnet.ibm.com>
To: Benjamin Herrenschmidt <benh@kernel•crashing.org>
Cc: Brian King <brking@linux•vnet.ibm.com>,
	Robert Jennings <rcj@linux•vnet.ibm.com>,
	linuxppc-dev@lists•ozlabs.org, Nitin Gupta <ngupta@vflare•org>,
	Dave Hansen <dave@linux•vnet.ibm.com>
Subject: Re: tlb flushing on Power
Date: Fri, 10 Feb 2012 13:14:06 -0600	[thread overview]
Message-ID: <4F356C7E.3070608@linux.vnet.ibm.com> (raw)
In-Reply-To: <1328735054.2903.29.camel@pasglop>

On 02/08/2012 03:04 PM, Benjamin Herrenschmidt wrote:
> 
>> You can look at https://lkml.org/lkml/2012/1/9/389 in zsmalloc-main.c,
>> zs_[un]map_object() functions for the currently uses of set_pte() and
>> __flush_tlb_one().
>>
>>> set_pte() is long gone on all archs really (or if it's still there it's
>>> not meant to be used as is), use set_pte_at().
>>
>> Problem with set_pte_at() for us is that we don't have an mm_struct to pass
>> because the mapping is not for a userspace process but for the kernel itself.
> 
> Then use init_mm

Thanks, that's what I was looking for.

>> However, I do think this is the portable function we need to be using. Just
>> need to figure out what to pass in for the mm_struct param.
>>
>>> __flush_tlb_one() doesn't mean anything as an arch independent
>>> functionality. We have a local_flush_tlb_page() that -might- do what you
>>> want but why in hell is that patch not using proper existing
>>> interfaces ?
>>
>> flush_tlb_page() is the portable function we should be using.  However,
>> again, it requires a vma_area_struct.  I'm not sure what we should be
>> passing there.
> 
> Do you need this to be CPU local flush or global ? In the later, 
> flush_tlb_kernel_range() is the right API.
> 
> If you want per-cpu, we'll have to add a new arch hook.

We have interrupts disabled, due to the get_cpu_var() on the percpu variable
zs_map_area in zs_map_object(), while the allocation is mapped.  So a CPU local
would be what we need.

--
Seth

  reply	other threads:[~2012-02-10 19:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4F2160B3.60708@linux.vnet.ibm.com>
2012-01-26 14:41 ` tlb flushing on Power Brian King
2012-01-26 21:39   ` Benjamin Herrenschmidt
2012-01-26 22:30     ` Dave Hansen
2012-01-27  2:40       ` Benjamin Herrenschmidt
2012-02-08 17:39     ` Seth Jennings
2012-02-08 21:04       ` Benjamin Herrenschmidt
2012-02-10 19:14         ` Seth Jennings [this message]
2012-02-16 17:11           ` Seth Jennings
2012-02-16 20:31             ` Benjamin Herrenschmidt
2012-03-05 17:56               ` Seth Jennings
2012-03-07  5:28                 ` Michael Neuling
2012-03-07 21:18                   ` Seth Jennings

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=4F356C7E.3070608@linux.vnet.ibm.com \
    --to=sjenning@linux$(echo .)vnet.ibm.com \
    --cc=benh@kernel$(echo .)crashing.org \
    --cc=brking@linux$(echo .)vnet.ibm.com \
    --cc=dave@linux$(echo .)vnet.ibm.com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=ngupta@vflare$(echo .)org \
    --cc=rcj@linux$(echo .)vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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