From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753648AbbD2HFK (ORCPT ); Wed, 29 Apr 2015 03:05:10 -0400 Received: from mail113-251.mail.alibaba.com ([205.204.113.251]:35755 "EHLO us-alimail-mta1.hst.scl.en.alidc.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753507AbbD2HFG (ORCPT ); Wed, 29 Apr 2015 03:05:06 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;FP=0|-1|-1|-1|0|-1|-1|-1;HT=r41f05024;MF=hillf.zj@alibaba-inc.com;PH=DS;RN=10;RT=10;SR=0; Reply-To: "Hillf Danton" From: "Hillf Danton" To: "'Mike Kravetz'" , , Cc: "'Dave Hansen'" , "'Naoya Horiguchi'" , "'David Rientjes'" , "'Hugh Dickins'" , "'Davidlohr Bueso'" , "'Aneesh Kumar'" , "'Christoph Hellwig'" References: <1429827197-677-1-git-send-email-mike.kravetz@oracle.com> In-Reply-To: <1429827197-677-1-git-send-email-mike.kravetz@oracle.com> Subject: Re: [RFC v2 PATCH 0/5] hugetlbfs: add fallocate support Date: Wed, 29 Apr 2015 15:04:02 +0800 Message-ID: <016801d0824a$ace5da80$06b18f80$@alibaba-inc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQHjBJreWIUajXcjj9daLURL1Ntjr50+i5mw Content-Language: zh-cn Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > hugetlbfs is used today by applications that want a high degree of > control over huge page usage. Often, large hugetlbfs files are used > to map a large number huge pages into the application processes. > The applications know when page ranges within these large files will > no longer be used, and ideally would like to release them back to > the subpool or global pools for other uses. The fallocate() system > call provides an interface for preallocation and hole punching within > files. This patch set adds fallocate functionality to hugetlbfs. > > RFC v2: > Addressed alignment and error handling issues noticed by Hillf Danton > New region_del() routine for region tracking/resv_map of ranges > Fixed several issues found during more extensive testing > Error handling in region_del() when kmalloc() fails stills needs > to be addressed > madvise remove support remains > > Mike Kravetz (5): > hugetlbfs: truncate_hugepages() takes a range of pages > hugetlbfs: remove region_truncte() as region_del() can be used > hugetlbfs: New huge_add_to_page_cache helper routine > hugetlbfs: add hugetlbfs_fallocate() > mm: madvise allow remove operation for hugetlbfs > Acked-by: Hillf Danton > fs/hugetlbfs/inode.c | 169 ++++++++++++++++++++++++++++++++++++++++++++++-- > include/linux/hugetlb.h | 8 ++- > mm/hugetlb.c | 110 ++++++++++++++++++++++--------- > mm/madvise.c | 2 +- > 4 files changed, 248 insertions(+), 41 deletions(-) > > -- > 2.1.0