[PATCH v3 2/2] powerpc/mm/radix: Free PUD table when freeing pagetable

Bharata B Rao bharata at linux.ibm.com
Wed Jul 31 16:19:20 AEST 2019


On Tue, Jul 30, 2019 at 02:37:16PM -0500, Reza Arbab wrote:
> On Fri, Jul 26, 2019 at 10:34:40AM +0530, Bharata B Rao wrote:
> > remove_pagetable() isn't freeing PUD table. This causes memory
> > leak during memory unplug. Fix this.
> 
> On x86, this is intentional. See
> 
> af2cf278ef4f ("x86/mm/hotplug: Don't remove PGD entries in remove_pagetable()")
> 98fe3633c5a4 ("x86/mm/hotplug: Fix BUG_ON() after hot-remove by not freeing PUD")
> 
> Does their reasoning apply to powerpc as well?

x86 seems to maintain some global pgd list that needs to sync'ed up
when PGD entry is freed. Since powerpc doesn't have that equivalent
I don't see that reasoning applying here. However if there is more
to it than just this, then I am not sure.

Regards,
Bharata.



More information about the Linuxppc-dev mailing list