linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-mm@kvack.org, Vishal Moola <vishal.moola@gmail.com>,
	Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [RFC PATCH 2/7] mm: Account pagetable memory when allocated
Date: Tue, 11 Nov 2025 16:43:38 +0000	[thread overview]
Message-ID: <aRNnulWuk3TO7VB1@casper.infradead.org> (raw)
In-Reply-To: <d71ad346-e88b-45a8-b873-c7a3def197a1@arm.com>

On Tue, Nov 11, 2025 at 12:39:19PM +0530, Anshuman Khandual wrote:
> > +++ b/mm/memory.c
> > @@ -7280,7 +7280,13 @@ long copy_folio_from_user(struct folio *dst_folio,
> >  struct ptdesc *pagetable_alloc_noprof(gfp_t gfp, unsigned int order)
> >  {
> >  	struct page *page = alloc_frozen_pages_noprof(gfp | __GFP_COMP, order);
> > +	pg_data_t *pgdat;
> >  
> > +	if (!page)
> > +		return NULL;
> 
> Should not this check be moved to the earlier patch instead during
> the page allocation ?

We could, but since page_ptdesc() is only a cast, there's no need to.



  reply	other threads:[~2025-11-11 16:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-20  0:16 [RFC PATCH 0/7] Separate ptdesc from struct page Matthew Wilcox (Oracle)
2025-10-20  0:16 ` [RFC PATCH 1/7] mm: Use frozen pages for page tables Matthew Wilcox (Oracle)
2025-10-20  0:16 ` [RFC PATCH 2/7] mm: Account pagetable memory when allocated Matthew Wilcox (Oracle)
2025-11-11  7:09   ` Anshuman Khandual
2025-11-11 16:43     ` Matthew Wilcox [this message]
2025-10-20  0:16 ` [RFC PATCH 3/7] mm: Mark " Matthew Wilcox (Oracle)
2025-10-20  0:16 ` [RFC PATCH 4/7] pgtable: Remove uses of page->lru Matthew Wilcox (Oracle)
2025-11-11  7:53   ` Anshuman Khandual
2025-11-11 18:46     ` Matthew Wilcox
2025-10-20  0:16 ` [RFC PATCH 5/7] x86: Call preallocate_vmalloc_pages() later Matthew Wilcox (Oracle)
2025-11-11  8:59   ` Anshuman Khandual
2025-11-12 18:36     ` Vishal Moola (Oracle)
2025-11-12 19:31       ` Vishal Moola (Oracle)
2025-11-13 13:53     ` Matthew Wilcox
2025-10-20  0:16 ` [RFC PATCH 6/7] mm: Add alloc_pages_memdesc family of APIs Matthew Wilcox (Oracle)
2025-10-20  0:16 ` [RFC PATCH 7/7] mm: Allocate ptdesc from slab Matthew Wilcox (Oracle)
2025-10-20  6:43 ` [syzbot ci] Re: Separate ptdesc from struct page syzbot ci

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=aRNnulWuk3TO7VB1@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=anshuman.khandual@arm.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --cc=vishal.moola@gmail.com \
    /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