Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752755Ab1FCFQN (ORCPT ); Fri, 3 Jun 2011 01:16:13 -0400 Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:45043 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752215Ab1FCFQM (ORCPT ); Fri, 3 Jun 2011 01:16:12 -0400 Date: Fri, 3 Jun 2011 01:16:09 -0400 From: Christoph Hellwig To: Hugh Dickins Cc: Christoph Hellwig , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 3/14] tmpfs: take control of its truncate_range Message-ID: <20110603051609.GC16721@infradead.org> References: <20110601003942.GB4433@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1593 Lines: 35 On Wed, Jun 01, 2011 at 09:58:18AM -0700, Hugh Dickins wrote: > (i915 isn't really doing hole-punching there, I think it just found it > a useful interface to remove the page-and-swapcache without touching > i_size. Parentheses because it makes no difference to your point.) Keeping i_size while removing pages on tmpfs fits the defintion of hole punching for me. Not that it matters anyway. > When I say "shmem", I am including the !SHMEM-was-TINY_SHMEM case too, > which goes to ramfs. Currently i915 has been configured to disable that > possibility, though we insisted on it originally: there may or may not be > good reason for disabling it - may just be a side-effect of the rather > twisted unintuitive SHMEM/TMPFS dependencies. Hmm, the two different implementations make everything harder. Also because we don't even implement the hole punching in !SHMEM tmpfs. > Fine, I'll add tmpfs PUNCH_HOLE later on. And wire up madvise MADV_REMOVE > to fallocate PUNCH_HOLE, yes? Yeah. One thing I've noticed is that the hole punching doesn't seem to do the unmap_mapping_range. It might be worth to audit that from the VM point of view. > Would you like me to remove the ->truncate_range method from > inode_operations completely? Doing that would be nice. Do we always have the required file struct for ->fallocate in the callers? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/