Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: bill_carson@126.com (rocky)
To: linux-arm-kernel@lists.infradead.org
Subject: Question about free_pgd_slow ?
Date: Sat, 5 Mar 2011 18:19:27 +0800 (CST)	[thread overview]
Message-ID: <14bf5cc1.490f.12e858767f5.Coremail.bill_carson@126.com> (raw)
In-Reply-To: <AANLkTi=obVFm=cwDyUCXQvEK3rDYberc9YWRVkv6_qZ=@mail.gmail.com>


At 2011-03-02 23:52:03?"Rabin Vincent" <rabin@rab.in> wrote:>On Fri, Feb 25, 2011 at 09:05, rocky <bill_carson@126.com> wrote:>> free_pgd_slow in arch/arm/mm/pgd.c  free the 4 pages at pgd level,l>> while could I ask a question about why free the page by pointed by pgd>> index 0 ?>>Besides the 16k for the pgd, it frees the second level* page table>referenced at index 0 of the pgd.>>(* - of course it frees pud+pmd+pte, but on current ARM this folds down>to just the second level page table.)>>On ARM, FIRST_USER_ADDRESS is set to PAGE_SIZE because the vectors may>need to be placed at 0x0.  Since the tables for that translation have to>always be active, functions like exit_mmap() will not free the 0th>secondary level page table (see the calls to free_pgtables() there).  So>we free it here when we're freeing the pgd.
Thanks Rabin
I dig the code more deeper,
exit_mmap called free_pgtables by setting floor with FIRST_USER_ADDRESS, 
then in free_pgd_range , vma->start first aligned with PMD_MASK before compared with floor, 
PMD_MASK for arm is 2M aligned ,so that means 0~0x200000 virtual address mapping is free in
free_pgd_slow.

But I still dont get it, 
why is that  low vector mapping must always be active even though the task is going to exit?

rocky



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20110305/374de67a/attachment-0001.html>

  reply	other threads:[~2011-03-05 10:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-25  3:35 Question about free_pgd_slow ? rocky
2011-03-02 15:52 ` Rabin Vincent
2011-03-05 10:19   ` rocky [this message]
2011-03-07 14:44     ` Rabin Vincent
2011-03-09  2:49       ` rocky

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=14bf5cc1.490f.12e858767f5.Coremail.bill_carson@126.com \
    --to=bill_carson@126.com \
    --cc=linux-arm-kernel@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