lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 25 May 2013 10:22:44 +0800
From:	Jianguo Wu <wujianguo@...wei.com>
To:	Tang Chen <tangchen@...fujitsu.com>
CC:	<akpm@...ux-foundation.org>, <mgorman@...e.de>, <mingo@...hat.com>,
	<hpa@...or.com>, <minchan@...nel.org>, <wency@...fujitsu.com>,
	<laijs@...fujitsu.com>, <yinghai@...nel.org>,
	<jiang.liu@...wei.com>, <tj@...nel.org>,
	<liwanp@...ux.vnet.ibm.com>, <isimatu.yasuaki@...fujitsu.com>,
	<kamezawa.hiroyu@...fujitsu.com>, <linux-mm@...ck.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/4] mem-hotplug: Do not free LOCAL_NODE_DATA pages to
 buddy system in hot-remove procedure.

On 2013/5/24 17:30, Tang Chen wrote:

> In memory hot-remove procedure, we free pagetable pages to buddy system.
> But for local pagetable pages, do not free them to buddy system because
> they were skipped in offline procedure. The memory block they reside in
> could have been offlined, and we won't offline it again.
> 
> Signed-off-by: Tang Chen <tangchen@...fujitsu.com>
> ---
>  mm/memory_hotplug.c |    8 ++++++++
>  1 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index 21d6fcb..c30e819 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -119,6 +119,14 @@ void __ref put_page_bootmem(struct page *page)
>  		INIT_LIST_HEAD(&page->lru);
>  
>  		/*
> +		 * Do not free pages with local node kernel data (for now, just
> +		 * local pagetables) to the buddy system because we skipped
> +		 * these pages when offlining the corresponding block.
> +		 */
> +		if (type == LOCAL_NODE_DATA)
> +			return;

Hi Tang,

I think this should be check in free_pagetable(), like:

diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 474e28f..08fe80e 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -725,7 +725,7 @@ static void __meminit free_pagetable(struct page *page, int order)
                if (magic == SECTION_INFO || magic == MIX_SECTION_INFO) {
                        while (nr_pages--)
                                put_page_bootmem(page++);
-           } else
+         } else if (magic != LOCAL_NODE_DATA)
                        __free_pages_bootmem(page, order);
        } else
                free_pages((unsigned long)page_address(page), order);

Thanks,
Jianguo Wu.

> +
> +		/*
>  		 * Please refer to comment for __free_pages_bootmem()
>  		 * for why we serialize here.
>  		 */



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ