linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Luiz Capitulino <luizcap@redhat.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	yuzhao@google.com, pasha.tatashin@soleen.com
Cc: akpm@linux-foundation.org, hannes@cmpxchg.org, muchun.song@linux.dev
Subject: Re: [PATCH v2 4/4] mm: page_owner: use new iteration API
Date: Fri, 28 Feb 2025 10:09:35 +0100	[thread overview]
Message-ID: <a8eb1d44-5b11-4127-b79d-8464a3b0cb4c@redhat.com> (raw)
In-Reply-To: <7ca09134-271e-48aa-b965-14fddd0504d9@redhat.com>

>> To be precise, can't we simply do the following on top?
> 
> Yes, that looks good and I like how the new API allows for simpler code.
> 
> My only concern is that if the user is not familiar with the page_ext
> internals, it might not be clear what page_ext_put() is actually
> protecting in which case it looks wrong that we're using a reference
> returned by get_page_owner() after releasing the lock. If you think
> that that's not an issue then I can apply this change on top.

The page_ext stuff only protects the page_ext itself, not any data 
stored in there. So I assume this should be just fine.

(most of these cases shouldn't need any protection, because the page_ext 
should not actually ever vanish here for memory that we are holding in 
our hands; but we decided to just add it everywhere for consistency)

-- 
Cheers,

David / dhildenb



      reply	other threads:[~2025-02-28  9:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24 21:59 [PATCH v2 0/4] mm: page_ext: Introduce " Luiz Capitulino
2025-02-24 21:59 ` [PATCH v2 1/4] mm: page_ext: make lookup_page_ext() public Luiz Capitulino
2025-02-25 16:38   ` David Hildenbrand
2025-02-25 22:29     ` Luiz Capitulino
2025-02-26 17:07       ` David Hildenbrand
2025-02-24 21:59 ` [PATCH v2 2/4] mm: page_ext: add an iteration API for page extensions Luiz Capitulino
2025-02-25 16:39   ` David Hildenbrand
2025-02-24 21:59 ` [PATCH v2 3/4] mm: page_table_check: use new iteration API Luiz Capitulino
2025-02-25 16:40   ` David Hildenbrand
2025-02-24 21:59 ` [PATCH v2 4/4] mm: page_owner: " Luiz Capitulino
2025-02-25 16:44   ` David Hildenbrand
2025-02-25 22:30     ` Luiz Capitulino
2025-02-27 13:50       ` David Hildenbrand
2025-02-27 20:50         ` Luiz Capitulino
2025-02-28  9:09           ` David Hildenbrand [this message]

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=a8eb1d44-5b11-4127-b79d-8464a3b0cb4c@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luizcap@redhat.com \
    --cc=muchun.song@linux.dev \
    --cc=pasha.tatashin@soleen.com \
    --cc=yuzhao@google.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