Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753278AbbEHOy3 (ORCPT ); Fri, 8 May 2015 10:54:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43979 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752861AbbEHOy0 (ORCPT ); Fri, 8 May 2015 10:54:26 -0400 Message-ID: <554CCE17.9000800@redhat.com> Date: Fri, 08 May 2015 10:54:15 -0400 From: Rik van Riel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Ingo Molnar CC: Dave Hansen , Dan Williams , Linus Torvalds , Linux Kernel Mailing List , Boaz Harrosh , Jan Kara , Mike Snitzer , Neil Brown , Benjamin Herrenschmidt , Heiko Carstens , Chris Mason , Paul Mackerras , "H. Peter Anvin" , Christoph Hellwig , Alasdair Kergon , "linux-nvdimm@lists.01.org" , Mel Gorman , Matthew Wilcox , Ross Zwisler , Martin Schwidefsky , Jens Axboe , "Theodore Ts'o" , "Martin K. Petersen" , Julia Lawall , Tejun Heo , linux-fsdevel , Andrew Morton Subject: Re: [PATCH v2 00/10] evacuate struct page from the block layer, introduce __pfn_t References: <20150507173641.GA21781@gmail.com> <554BA748.9030804@linux.intel.com> <20150507191107.GB22952@gmail.com> <554CBE17.4070904@redhat.com> <20150508140556.GA2185@gmail.com> In-Reply-To: <20150508140556.GA2185@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1602 Lines: 41 On 05/08/2015 10:05 AM, Ingo Molnar wrote: > * Rik van Riel wrote: >> Memory trends point in one direction, file size trends in another. >> >> For persistent memory, we would not need 4kB page struct pages >> unless memory from a particular area was in small files AND those >> files were being actively accessed. [...] > > Average file size on my system's /usr is 12.5K: > > triton:/usr> ( echo -n $(echo $(find . -type f -printf "%s\n") | sed 's/ /+/g' | bc); echo -n "/"; find . -type f -printf "%s\n" | wc -l; ) | bc > 12502 > >> [...] Large files (mapped in 2MB chunks) or inactive small files >> would not need the 4kB page structs around. > > ... they are the utter uncommon case. 4K is here to stay, and for a > very long time - until humans use computers I suspect. There's a bit of an 80/20 thing going on, though. The average file size may be small, but most data is used by large files. Additionally, a 2MB pmem area that has no small files on it that are currently open will also not need 4kB page structs. A system with 2TB of pmem might still only have a few thousand small files open at any point in time. The rest of the memory is either in large files, or in small files that have not been opened recently. We can reclaim the struct pages of 4kB pages that are not currently in use. -- All rights reversed -- 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/