Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932470AbXBSSdJ (ORCPT ); Mon, 19 Feb 2007 13:33:09 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932478AbXBSScq (ORCPT ); Mon, 19 Feb 2007 13:32:46 -0500 Received: from e35.co.us.ibm.com ([32.97.110.153]:43383 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932472AbXBSSc3 (ORCPT ); Mon, 19 Feb 2007 13:32:29 -0500 From: Adam Litke Subject: [PATCH 6/7] free_pgtable_range for hugetlb Date: Mon, 19 Feb 2007 10:32:27 -0800 To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, agl@us.ibm.com Message-Id: <20070219183227.27318.12572.stgit@localhost.localdomain> In-Reply-To: <20070219183123.27318.27319.stgit@localhost.localdomain> References: <20070219183123.27318.27319.stgit@localhost.localdomain> Content-Type: text/plain; charset=utf-8; format=fixed Content-Transfer-Encoding: 8bit User-Agent: StGIT/0.11 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1691 Lines: 48 Signed-off-by: Adam Litke --- fs/hugetlbfs/inode.c | 1 + mm/memory.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 1016694..3461f9b 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -567,6 +567,7 @@ static struct pagetable_operations_struct hugetlbfs_pagetable_ops = { .pin_pages = follow_hugetlb_page, .unmap_page_range = unmap_hugepage_range, .change_protection = hugetlb_change_protection, + .free_pgtable_range = hugetlb_free_pgd_range, }; static struct inode_operations hugetlbfs_dir_inode_operations = { diff --git a/mm/memory.c b/mm/memory.c index aa6b06e..442e6b2 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -279,15 +279,15 @@ void free_pgtables(struct mmu_gather **tlb, struct vm_area_struct *vma, anon_vma_unlink(vma); unlink_file_vma(vma); - if (is_vm_hugetlb_page(vma)) { - hugetlb_free_pgd_range(tlb, addr, vma->vm_end, + if (has_pt_op(vma, free_pgtable_range)) { + pt_op(vma, free_pgtable_range)(tlb, addr, vma->vm_end, floor, next? next->vm_start: ceiling); } else { /* * Optimization: gather nearby vmas into one call down */ while (next && next->vm_start <= vma->vm_end + PMD_SIZE - && !is_vm_hugetlb_page(next)) { + && !has_pt_op(next, free_pgtable_range)) { vma = next; next = vma->vm_next; anon_vma_unlink(vma); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/