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]
Message-ID: <f5d5fd353d744ce2b267bfe27db26b1f@tencent.com>
Date:   Thu, 29 Aug 2019 12:36:29 +0000
From:   tonnylu(陆志刚) <tonnylu@...cent.com>
To:     Matthew Wilcox <willy@...radead.org>,
        zhigang lu <luzhigang001@...il.com>
CC:     "mike.kravetz@...cle.com" <mike.kravetz@...cle.com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        hzhongzhang(张昊中) <hzhongzhang@...cent.com>,
        knightzhang(张宗明) <knightzhang@...cent.com>
Subject: 答复: [PATCH] mm/hugetlb: avoid looping to the same hugepage if !pages and !vmas(Internet mail)



-----邮件原件-----
发件人: Matthew Wilcox <willy@...radead.org> 
发送时间: 2019年8月29日 19:55
收件人: zhigang lu <luzhigang001@...il.com>
抄送: mike.kravetz@...cle.com; linux-mm@...ck.org; linux-kernel@...r.kernel.org; tonnylu(陆志刚) <tonnylu@...cent.com>; hzhongzhang(张昊中) <hzhongzhang@...cent.com>; knightzhang(张宗明) <knightzhang@...cent.com>
主题: Re: [PATCH] mm/hugetlb: avoid looping to the same hugepage if !pages and !vmas(Internet mail)

On Thu, Aug 29, 2019 at 07:37:22PM +0800, zhigang lu wrote:
> This change greatly decrease the time of mmaping a file in hugetlbfs.
> With MAP_POPULATE flag, it takes about 50 milliseconds to mmap a
> existing 128GB file in hugetlbfs. With this change, it takes less
> then 1 millisecond.

You're going to need to find a new way of sending patches; this patch is
mangled by your mail system.


> @@ -4391,6 +4391,17 @@ long follow_hugetlb_page(struct mm_struct *mm,
> struct vm_area_struct *vma,
>   break;
>   }
>   }
> +
> + if (!pages && !vmas && !pfn_offset &&
> +     (vaddr + huge_page_size(h) < vma->vm_end) &&
> +     (remainder >= pages_per_huge_page(h))) {
> + vaddr += huge_page_size(h);
> + remainder -= pages_per_huge_page(h);
> + i += pages_per_huge_page(h);
> + spin_unlock(ptl);
> + continue;
> + }

The concept seems good to me.  The description above could do with some
better explanation though.

Thanks, Willy. I will add more explanation and resend the patches in plain text mode.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ