[lkml]   [2006]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] hugetlb: powerpc: Actively close unused htlb regions on vma close
    On Fri, 2 Jun 2006, Adam Litke wrote:

    > The following patch introduces a architecture-specific vm_ops.close()
    > hook. For all architectures besides powerpc, this is a no-op. On
    > powerpc, the low and high segments are scanned to locate empty hugetlb
    > segments which can be made available for normal mappings. Comments?

    IA64 has similar issues and uses the hook suggested by Hugh. However, we
    have a permanently reserved memory area. I am a bit surprised about the
    need to make address space available for normal mappings. Is this for 32
    bit powerpc support?

    void hugetlb_free_pgd_range(struct mmu_gather **tlb,
    unsigned long addr, unsigned long end,
    unsigned long floor, unsigned long ceiling)
    * This is called to free hugetlb page tables.
    * The offset of these addresses from the base of the hugetlb
    * region must be scaled down by HPAGE_SIZE/PAGE_SIZE so that
    * the standard free_pgd_range will free the right page tables.
    * If floor and ceiling are also in the hugetlb region, they
    * must likewise be scaled down; but if outside, left unchanged.

    addr = htlbpage_to_page(addr);
    end = htlbpage_to_page(end);
    if (REGION_NUMBER(floor) == RGN_HPAGE)
    floor = htlbpage_to_page(floor);
    if (REGION_NUMBER(ceiling) == RGN_HPAGE)
    ceiling = htlbpage_to_page(ceiling);

    free_pgd_range(tlb, addr, end, floor, ceiling);

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-06-02 22:09    [W:4.590 / U:0.976 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site