From: Paul Mackerras <paulus@samba.org>
To: Badari Pulavarty <pbadari@us.ibm.com>
Cc: linuxppc-dev@ozlabs.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
anton@au1.ibm.com, linux-mm <linux-mm@kvack.org>
Subject: Re: [RFC][PATCH] remove section mappinng
Date: Sat, 26 Jan 2008 12:24:59 +1100 [thread overview]
Message-ID: <18330.35819.738293.742989@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <1201277105.26929.36.camel@dyn9047017100.beaverton.ibm.com>
Badari Pulavarty writes:
> Here is the code I cooked up, it seems to be working fine.
> But I have concerns where I need your help.
>
> In order to invalidate htab entries, we need to find the "slot".
> But I can only find the hpte group. Is it okay to invalidate the
> first entry in the group ? Do I need to invalidate the entire group ?
You do need to find the correct slot. (I suppose you could invalidate
the entire group, but that would be pretty gross.)
Note that in the CONFIG_DEBUG_PAGEALLOC case we use 4k pages and keep
a map of the slot numbers in linear_map_hash_slots[]. But in that
case I assume that the generic code would have already unmapped all
the pages of the LMB that you're trying to hot-unplug.
In the non-DEBUG_PAGEALLOC case on a System p machine, the hash table
will be big enough that the linear mapping entries should always be in
slot 0. So just invalidating slot 0 would probably work in practice,
but it seems pretty fragile. We might want to use your new
htab_remove_mapping() function on a bare-metal system with a smaller
hash table in future, for instance.
Have a look at pSeries_lpar_hpte_updateboltedpp. It calls
pSeries_lpar_hpte_find to find the slot for a bolted HPTE. You could
do something similar. In fact maybe the best approach is to do a
pSeries_lpar_hpte_remove_bolted() and not try to solve the more
general problem.
Paul.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-01-26 1:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-25 16:05 Badari Pulavarty
2008-01-26 1:24 ` Paul Mackerras [this message]
2008-01-28 22:19 ` Badari Pulavarty
2008-02-07 0:09 ` Paul Mackerras
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=18330.35819.738293.742989@cargo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=anton@au1.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=pbadari@us.ibm.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