[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1445033310-13155-1-git-send-email-mike.kravetz@oracle.com>
Date: Fri, 16 Oct 2015 15:08:27 -0700
From: Mike Kravetz <mike.kravetz@...cle.com>
To: linux-mm@...ck.org, linux-kernel@...r.kernel.org
Cc: Dave Hansen <dave.hansen@...ux.intel.com>,
Naoya Horiguchi <n-horiguchi@...jp.nec.com>,
Hugh Dickins <hughd@...gle.com>,
Davidlohr Bueso <dave@...olabs.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Mike Kravetz <mike.kravetz@...cle.com>
Subject: [PATCH 0/3] hugetlbfs fallocate hole punch race with page faults
The hugetlbfs fallocate hole punch code can race with page faults. The
result is that after a hole punch operation, pages may remain within the
hole. No other side effects of this race were observed.
In preparation for adding userfaultfd support to hugetlbfs, it is desirable
to plug or significantly shrink this hole. This patch set uses the same
mechanism employed in shmem (see commit f00cdc6df7).
hugetlb_fault_mutex_table is already used in hugetlbfs for fault
synchronization, and there is no swap for hugetlbfs. So, this code is
simpler than in shmem. In fact, the hugetlb_fault_mutex_table could be
used for races with small hole punch operations. However, we need something
that will work for large holes as well.
Mike Kravetz (3):
mm/hugetlb: Define hugetlb_falloc structure for hole punch race
mm/hugetlb: Setup hugetlb_falloc during fallocate hole punch
mm/hugetlb: page faults check for fallocate hole punch in progress and
wait
fs/hugetlbfs/inode.c | 26 +++++++++++++++++++++++---
include/linux/hugetlb.h | 10 ++++++++++
mm/hugetlb.c | 37 +++++++++++++++++++++++++++++++++++++
3 files changed, 70 insertions(+), 3 deletions(-)
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists