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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 24 Feb 2011 14:43:04 -0800
From:	Dave Hansen <dave@...ux.vnet.ibm.com>
To:	Andi Kleen <andi@...stfloor.org>
Cc:	akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
	linux-mm@...ck.org, Andi Kleen <ak@...ux.intel.com>,
	aarcange@...hat.com
Subject: Re: [PATCH 8/8] Add VM counters for transparent hugepages

On Tue, 2011-02-22 at 17:52 -0800, Andi Kleen wrote:
> @@ -2286,6 +2290,9 @@ void __split_huge_page_pmd(struct mm_struct *mm, pmd_t *pmd)
>  		spin_unlock(&mm->page_table_lock);
>  		return;
>  	}
> +
> +	count_vm_event(THP_SPLIT);
> +
>  	page = pmd_page(*pmd);
>  	VM_BUG_ON(!page_count(page));
>  	get_page(page);

Hey Andi,

Your split counter tracks the split_huge_page_pmd() calls, but misses
plain split_huge_page() calls.  Did you do this on purpose?  Could we
move the counter in to the low-level split function like below?

---

 linux-2.6.git-dave/mm/huge_memory.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN mm/huge_memory.c~move-THP_SPLIT mm/huge_memory.c
--- linux-2.6.git/mm/huge_memory.c~move-THP_SPLIT	2011-02-24 14:37:32.825288409 -0800
+++ linux-2.6.git-dave/mm/huge_memory.c	2011-02-24 14:39:01.767939971 -0800
@@ -1342,6 +1342,8 @@ static void __split_huge_page(struct pag
 	BUG_ON(!PageHead(page));
 	BUG_ON(PageTail(page));
 
+	count_vm_event(THP_SPLIT);
+
 	mapcount = 0;
 	list_for_each_entry(avc, &anon_vma->head, same_anon_vma) {
 		struct vm_area_struct *vma = avc->vma;
@@ -2293,8 +2295,6 @@ void __split_huge_page_pmd(struct mm_str
 		return;
 	}
 
-	count_vm_event(THP_SPLIT);
-
 	page = pmd_page(*pmd);
 	VM_BUG_ON(!page_count(page));
 	get_page(page);

-- Dave

--
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