Re: [PATCH v5 00/27] Memory Folios

2021-04-01 Thread Johannes Weiner
On Thu, Apr 01, 2021 at 05:05:37AM +, Al Viro wrote: > On Tue, Mar 30, 2021 at 10:09:29PM +0100, Matthew Wilcox wrote: > > > That's a very Intel-centric way of looking at it. Other architectures > > support a multitude of page sizes, from the insane ia64 (4k, 8k, 16k, then > > every power of

Re: [PATCH v5 00/27] Memory Folios

2021-04-01 Thread Matthew Wilcox
On Thu, Apr 01, 2021 at 05:05:37AM +, Al Viro wrote: > On Tue, Mar 30, 2021 at 10:09:29PM +0100, Matthew Wilcox wrote: > > > That's a very Intel-centric way of looking at it. Other architectures > > support a multitude of page sizes, from the insane ia64 (4k, 8k, 16k, then > > every power of

Re: [PATCH v5 00/27] Memory Folios

2021-03-31 Thread Al Viro
On Tue, Mar 30, 2021 at 10:09:29PM +0100, Matthew Wilcox wrote: > That's a very Intel-centric way of looking at it. Other architectures > support a multitude of page sizes, from the insane ia64 (4k, 8k, 16k, then > every power of four up to 4GB) to more reasonable options like (4k, 32k, > 256k, 2

Re: [PATCH v5 00/27] Memory Folios

2021-03-31 Thread Matthew Wilcox
On Wed, Mar 31, 2021 at 02:14:00PM -0400, Johannes Weiner wrote: > Anyway, we digressed quite far here. My argument was simply that it's > conceivable we'll switch to a default allocation block and page size > that is larger than the smallest paging size supported by the CPU and > the kernel. (Vari

Re: [PATCH v5 00/27] Memory Folios

2021-03-31 Thread Johannes Weiner
On Tue, Mar 30, 2021 at 10:09:29PM +0100, Matthew Wilcox wrote: > On Tue, Mar 30, 2021 at 03:30:54PM -0400, Johannes Weiner wrote: > > Hi Willy, > > > > On Mon, Mar 29, 2021 at 05:58:32PM +0100, Matthew Wilcox wrote: > > > I'm going to respond to some points in detail below, but there are a > > >

Re: [PATCH v5 00/27] Memory Folios

2021-03-31 Thread Christoph Hellwig
On Tue, Mar 30, 2021 at 03:30:54PM -0400, Johannes Weiner wrote: > > Eventually, I want to make struct page optional for allocations. It's too > > small for some things (allocating page tables, for example), and overly > > large for others (allocating a 2MB page, networking page_pool). I don't >

Re: [PATCH v5 00/27] Memory Folios

2021-03-30 Thread Matthew Wilcox
On Tue, Mar 30, 2021 at 03:30:54PM -0400, Johannes Weiner wrote: > Hi Willy, > > On Mon, Mar 29, 2021 at 05:58:32PM +0100, Matthew Wilcox wrote: > > I'm going to respond to some points in detail below, but there are a > > couple of overarching themes that I want to bring out up here. > > > > Gran

Re: [PATCH v5 00/27] Memory Folios

2021-03-30 Thread Johannes Weiner
Hi Willy, On Mon, Mar 29, 2021 at 05:58:32PM +0100, Matthew Wilcox wrote: > I'm going to respond to some points in detail below, but there are a > couple of overarching themes that I want to bring out up here. > > Grand Vision > > > I haven't outlined my long-term plan. Partly beca

Re: [PATCH v5 00/27] Memory Folios

2021-03-29 Thread Matthew Wilcox
On Mon, Mar 29, 2021 at 05:58:32PM +0100, Matthew Wilcox wrote: > In broad strokes, I think that having a Power Of Two Allocator > with Descriptor (POTAD) is a useful foundational allocator to have. > The specific allocator that we call the buddy allocator is very clever for > the 1990s, but touche

Re: [PATCH v5 00/27] Memory Folios

2021-03-29 Thread Matthew Wilcox
I'm going to respond to some points in detail below, but there are a couple of overarching themes that I want to bring out up here. Grand Vision I haven't outlined my long-term plan. Partly because it is a _very_ long way off, and partly because I think what I'm doing stands on its

Re: [PATCH v5 00/27] Memory Folios

2021-03-26 Thread Johannes Weiner
On Wed, Mar 24, 2021 at 06:24:21AM +, Matthew Wilcox wrote: > On Tue, Mar 23, 2021 at 08:29:16PM -0400, Johannes Weiner wrote: > > On Mon, Mar 22, 2021 at 06:47:44PM +, Matthew Wilcox wrote: > > > On Mon, Mar 22, 2021 at 01:59:24PM -0400, Johannes Weiner wrote: > One of the patches I haven'

Re: [PATCH v5 00/27] Memory Folios

2021-03-23 Thread Matthew Wilcox
On Tue, Mar 23, 2021 at 08:29:16PM -0400, Johannes Weiner wrote: > On Mon, Mar 22, 2021 at 06:47:44PM +, Matthew Wilcox wrote: > > On Mon, Mar 22, 2021 at 01:59:24PM -0400, Johannes Weiner wrote: > > > On Sat, Mar 20, 2021 at 05:40:37AM +, Matthew Wilcox (Oracle) wrote: > > > > This series

Re: [PATCH v5 00/27] Memory Folios

2021-03-23 Thread Johannes Weiner
On Mon, Mar 22, 2021 at 06:47:44PM +, Matthew Wilcox wrote: > On Mon, Mar 22, 2021 at 01:59:24PM -0400, Johannes Weiner wrote: > > On Sat, Mar 20, 2021 at 05:40:37AM +, Matthew Wilcox (Oracle) wrote: > > > This series introduces the 'struct folio' as a replacement for > > > head-or-base pag

Re: [PATCH v5 00/27] Memory Folios

2021-03-23 Thread David Howells
Johannes Weiner wrote: > So I fully agree with the motivation behind this patch. But I do > wonder why it's special-casing the commmon case instead of the rare > case. It comes at a huge cost. Short term, the churn of replacing > 'page' with 'folio' in pretty much all instances is enormous. > >

Re: [PATCH v5 00/27] Memory Folios

2021-03-23 Thread Christoph Hellwig
On Mon, Mar 22, 2021 at 01:59:24PM -0400, Johannes Weiner wrote: > If that is the case, shouldn't there in the long term only be very > few, easy to review instances of things like compound_head(), > PAGE_SIZE etc. deep in the heart of MM? And everybody else should 1) > never see tail pages and 2)

Re: [PATCH v5 00/27] Memory Folios

2021-03-22 Thread Matthew Wilcox
On Mon, Mar 22, 2021 at 01:59:24PM -0400, Johannes Weiner wrote: > On Sat, Mar 20, 2021 at 05:40:37AM +, Matthew Wilcox (Oracle) wrote: > > This series introduces the 'struct folio' as a replacement for > > head-or-base pages. This initial set reduces the kernel size by > > approximately 6kB,

Re: [PATCH v5 00/27] Memory Folios

2021-03-22 Thread Johannes Weiner
On Sat, Mar 20, 2021 at 05:40:37AM +, Matthew Wilcox (Oracle) wrote: > Managing memory in 4KiB pages is a serious overhead. Many benchmarks > exist which show the benefits of a larger "page size". As an example, > an earlier iteration of this idea which used compound pages got a 7% > performa

Re: [PATCH v5 00/27] Memory Folios

2021-03-21 Thread Matthew Wilcox
On Sat, Mar 20, 2021 at 05:40:37AM +, Matthew Wilcox (Oracle) wrote: > Current tree at: > https://git.infradead.org/users/willy/pagecache.git/shortlog/refs/heads/folio > > (contains another ~100 patches on top of this batch, not all of which are > in good shape for submission) I've fixed the

[PATCH v5 00/27] Memory Folios

2021-03-19 Thread Matthew Wilcox (Oracle)
Managing memory in 4KiB pages is a serious overhead. Many benchmarks exist which show the benefits of a larger "page size". As an example, an earlier iteration of this idea which used compound pages got a 7% performance boost when compiling the kernel using kernbench without any particular tuning