From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755463AbbB0W7K (ORCPT ); Fri, 27 Feb 2015 17:59:10 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:47844 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754770AbbB0W7I (ORCPT ); Fri, 27 Feb 2015 17:59:08 -0500 From: Mike Kravetz To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Nadia Yvette Chambers , Andrew Morton , Davidlohr Bueso , Aneesh Kumar , Joonsoo Kim , Mike Kravetz Subject: [RFC 0/3] hugetlbfs: optionally reserve all fs pages at mount time Date: Fri, 27 Feb 2015 14:58:08 -0800 Message-Id: <1425077893-18366-1-git-send-email-mike.kravetz@oracle.com> X-Mailer: git-send-email 2.1.0 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hugetlbfs allocates huge pages from the global pool as needed. Even if the global pool contains a sufficient number pages for the filesystem size at mount time, those global pages could be grabbed for some other use. As a result, filesystem huge page allocations may fail due to lack of pages. Add a new hugetlbfs mount option 'reserved' to specify that the number of pages associated with the size of the filesystem will be reserved. If there are insufficient pages, the mount will fail. The reservation is maintained for the duration of the filesystem so that as pages are allocated and free'ed a sufficient number of pages remains reserved. Mike Kravetz (3): hugetlbfs: add reserved mount fields to subpool structure hugetlbfs: coordinate global and subpool reserve accounting hugetlbfs: accept subpool reserved option and setup accordingly fs/hugetlbfs/inode.c | 15 +++++++++++++-- include/linux/hugetlb.h | 7 +++++++ mm/hugetlb.c | 37 +++++++++++++++++++++++++++++-------- 3 files changed, 49 insertions(+), 10 deletions(-) -- 2.1.0