kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Wonkyo Choe <heysid3@gmail.com>
To: Rik van Riel <riel@surriel.com>
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: How to free a page table page
Date: Tue, 6 Apr 2021 15:30:24 +0900	[thread overview]
Message-ID: <CAH81q31v51TA5j_1bmjCaK4XCWt5DtAC8nACJxLwrdkxeO5faA@mail.gmail.com> (raw)
In-Reply-To: <8498076f79fff080107998743272e8aa8a9bc35a.camel@surriel.com>

I really appreciate it! I really needed to know when exactly page
tables get freed.
As I looked at your functions, I ended up figuring out that my kernel (v5.3)
defines HAVE_RCU_TABLE_FREE (I assume this is the default option)
and uses __tlb_remove_table(), which frees pages. Finally, my functions
work on these functions.

Thanks again.

2021년 4월 6일 (화) 오전 11:42, Rik van Riel <riel@surriel.com>님이 작성:
>
> On Tue, 2021-04-06 at 00:39 +0900, Wonkyo Choe wrote:
>
> > 1. In x86, are all page-table pages released at the end of
> > termination
> > by using free_pgtables()?
> > 2. In x86, a page-table page can be freed when there is no entry? In
> > other words, does the Linux kernel
> > release a page-table page on runtime? If so, what function would do
> > this kind of task?
>
> At munmap time, as well as exit and execve time, page
> tables can get freed. Look at the code between sys_munmap()
> and zap_page_range().
>
> --
> All Rights Reversed.



-- 
=======================
최원교 / Wonkyo Choe
Phone. +82 10-5755-4519
=======================

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

      reply	other threads:[~2021-04-06  6:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-05 15:39 How to free a page table page Wonkyo Choe
2021-04-05 22:12 ` linux lover
2021-04-06  2:42 ` Rik van Riel
2021-04-06  6:30   ` Wonkyo Choe [this message]

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=CAH81q31v51TA5j_1bmjCaK4XCWt5DtAC8nACJxLwrdkxeO5faA@mail.gmail.com \
    --to=heysid3@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    --cc=riel@surriel.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).