stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable <stable@vger.kernel.org>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Jesper Dangaard Brouer <brouer@redhat.com>,
	Vlastimil Babka <vbabka@suse.cz>,
	Matteo Croce <mcroce@linux.microsoft.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm: fix struct page layout on 32-bit systems
Date: Tue, 18 May 2021 01:53:43 +0100	[thread overview]
Message-ID: <YKMQFz5PpI65lc+R@casper.infradead.org> (raw)
In-Reply-To: <CAHk-=wiH2++_KaaunpNYWD6YiMuU_VyCHgO-1RbvGUq=0_mAJg@mail.gmail.com>

On Mon, May 17, 2021 at 05:02:01PM -0700, Linus Torvalds wrote:
> On Mon, May 17, 2021 at 4:37 PM Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > I don't mind that rule, but what's the advantage of introducing a new
> > name for that? IOW, I get the feeling that almost all of this
> > could/should just be "don't use non-head pages".
> 
> Put another way: I've often wanted to remove the (quite expensive)
> "compund_head()" calls out of the code page functions, and move them
> into the callers (and in most cases they probably just end up
> disappearing entirely, because the callers fundamentally always have a
> proper head page).
> 
> It feels like this is what the folio patches do, they just spend a
> *lot* of effort doing so incrementally by renaming things and
> duplicating functionality, rather than just do it (again
> incrementally) by just doing one compound_head() movement at a time..

I tried that, and I ended up in whack-a-mole hell trying to
figure out all the places that weren't expecting to see a
head page.  If you look at the master branch from that repo:
https://git.infradead.org/users/willy/pagecache.git/shortlog

it basically redefines a THP to be arbitrary order and then tries to
ram through using head pages everywhere.  It's definitely missing a few
spots in the writeback code that get the accounting entirely wrong.
So I decided a new type was in order to distinguish between the
places which do need to see a struct page (vmf->page being one)
and those that are dealing with pages for accounting purposes.

  reply	other threads:[~2021-05-18  0:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-16 12:18 [PATCH] mm: fix struct page layout on 32-bit systems Matthew Wilcox (Oracle)
2021-05-16 12:31 ` Matthew Wilcox
2021-05-17 10:06   ` Greg KH
2021-05-16 16:29 ` Linus Torvalds
2021-05-16 18:22   ` Matthew Wilcox
2021-05-16 18:27     ` Linus Torvalds
2021-05-16 19:09       ` Matthew Wilcox
2021-05-16 19:22         ` Linus Torvalds
2021-05-17  2:42           ` Matthew Wilcox
2021-05-17 22:18             ` Linus Torvalds
2021-05-17 23:02               ` Matthew Wilcox
2021-05-17 23:37                 ` Linus Torvalds
2021-05-18  0:02                   ` Linus Torvalds
2021-05-18  0:53                     ` Matthew Wilcox [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-05-10 15:32 [PATCH] mm: Fix " Matthew Wilcox (Oracle)
2021-05-10 16:38 ` Matteo Croce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YKMQFz5PpI65lc+R@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=brouer@redhat.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=mcroce@linux.microsoft.com \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).