linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Israel Batista <linux@israelbatista.dev.br>,
	Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
	osandov@osandov.com, linux-debuggers@vger.kernel.org
Subject: Re: [PATCH v2 3/3] mm: change type of parameter for memory_notify
Date: Thu, 30 Oct 2025 12:34:06 +0100	[thread overview]
Message-ID: <9385ec9c-c002-4781-8f1f-a9eb29b2ff40@redhat.com> (raw)
In-Reply-To: <f7dd549e-7dd3-4fdf-89f7-ef6993376809@israelbatista.dev.br>

On 30.10.25 12:16, Israel Batista wrote:
> 
> 
> On 10/30/25 07:56, Lorenzo Stoakes wrote:
>> This seems fine, but I can see a whole bunch of others like:
>>
>> kcore_callback()
>> mm_compute_batch_notifier()
>> page_ext_callback()
>> reserve_mem_notiifer()
>> etc.
>>
>> So I think worth chasing all of these down?
>>
> 
> Yeah, I figured there were other cases and was originally planning to
> include them in the patch series. The problem is they are notifier
> callbacks and changing the type from unsingned long to enum
> memory_block_state would break compatibility with the type notifier_fn_t
> found in include/linux/notifier.h:
> 
> typedef	int (*notifier_fn_t)(struct notifier_block *nb,
> 			unsigned long action, void *data);
> 
> So I think it's not worth the trouble for now.

We could just cat from unsigned long -> type at the beginning of all 
these notifiers to have us then work with the actual type.

-- 
Cheers

David / dhildenb



  reply	other threads:[~2025-10-30 11:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-29 19:56 [PATCH v2 0/3] mm: Convert memory block states (MEM_*) macros to Israel Batista
2025-10-29 19:56 ` [PATCH v2 1/3] mm: convert memory block states (MEM_*) macros to enum Israel Batista
2025-10-30 10:52   ` Lorenzo Stoakes
2025-10-30 11:31   ` David Hildenbrand
2025-10-29 19:56 ` [PATCH v2 2/3] mm: change type of state in struct memory_block Israel Batista
2025-10-29 20:59   ` Randy Dunlap
2025-10-30 11:00   ` Lorenzo Stoakes
2025-10-30 11:32   ` David Hildenbrand
2025-10-29 19:56 ` [PATCH v2 3/3] mm: change type of parameter for memory_notify Israel Batista
2025-10-30 10:56   ` Lorenzo Stoakes
2025-10-30 11:16     ` Israel Batista
2025-10-30 11:34       ` David Hildenbrand [this message]
2025-10-30 12:00         ` Israel Batista
2025-10-30 14:57 ` [PATCH v2 0/3] mm: Convert memory block states (MEM_*) macros to Mike Rapoport

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=9385ec9c-c002-4781-8f1f-a9eb29b2ff40@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-debuggers@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux@israelbatista.dev.br \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=osandov@osandov.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