From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933480Ab2EYTR4 (ORCPT ); Fri, 25 May 2012 15:17:56 -0400 Received: from e35.co.us.ibm.com ([32.97.110.153]:34395 "EHLO e35.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932656Ab2EYTRz (ORCPT ); Fri, 25 May 2012 15:17:55 -0400 From: John Stultz To: LKML Cc: John Stultz , Andrew Morton , Android Kernel Team , Robert Love , Mel Gorman , Hugh Dickins , Dave Hansen , Rik van Riel , Dmitry Adamushko , Dave Chinner , Neil Brown , Andrea Righi , "Aneesh Kumar K.V" , Taras Glek , Mike Hommey Subject: [PATCH 0/4] [RFC] Fallocate Volatile Ranges Date: Fri, 25 May 2012 12:17:32 -0700 Message-Id: <1337973456-19533-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.3.2.146.gca209 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12052519-6148-0000-0000-000006276E33 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org So here's the first pass at re-implementing the volatile range idea using the fallocate interface, as suggested by Dave Chinner. The range tree code is mostly unchanged. The volatile range management code has been somewhat abstracted out as helper functions that allow filesystems to get the same logic but leaving it to the filesystem to handle the page purging. Finally there is the tmpfs enablement for FALLOC_FL_MARK_VOLATILE. This is all done on top of Hugh/Cong's tmpfs FALLOC_FL_PUNCH_HOLE enablement. I've only managed to do minimal testing at this point, but I wanted to get this out before the long-weekend holiday in the US. Few of the things still on my todo list: * Move the volatile mapping hash to be per volatile_fs_head * Kill the extra hash locking * Keep track of unpurged pages in volatile_fs_head, to avoid running through the lru at shrink time. Your thoughts and feedback will be appreciated! thanks -john CC: Andrew Morton CC: Android Kernel Team CC: Robert Love CC: Mel Gorman CC: Hugh Dickins CC: Dave Hansen CC: Rik van Riel CC: Dmitry Adamushko CC: Dave Chinner CC: Neil Brown CC: Andrea Righi CC: Aneesh Kumar K.V CC: Taras Glek CC: Mike Hommey Hugh Dickins (1): tmpfs: support fallocate FALLOC_FL_PUNCH_HOLE John Stultz (3): [RFC] Range tree implementation [RFC] Add volatile range management code [RFC] tmpfs: Add FALLOC_FL_MARK_VOLATILE/UNMARK_VOLATILE handlers fs/open.c | 3 +- include/linux/falloc.h | 7 +- include/linux/rangetree.h | 53 +++++ include/linux/volatile.h | 43 ++++ lib/Makefile | 2 +- lib/rangetree.c | 107 ++++++++++ mm/Makefile | 2 +- mm/shmem.c | 175 +++++++++++++++- mm/volatile.c | 493 +++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 868 insertions(+), 17 deletions(-) create mode 100644 include/linux/rangetree.h create mode 100644 include/linux/volatile.h create mode 100644 lib/rangetree.c create mode 100644 mm/volatile.c -- 1.7.3.2.146.gca209