linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Alex Shi <seakeel@gmail.com>
To: David Hildenbrand <david@redhat.com>,
	alexs@kernel.org, Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	willy@infradead.org, izik.eidus@ravellosystems.com
Subject: Re: [PATCH 3/4] mm/ksm: rename mm_slot_cache to ksm_slot_cache
Date: Thu, 16 May 2024 20:15:16 +0800	[thread overview]
Message-ID: <4c255baa-99e3-4f48-9303-13edb99adc89@gmail.com> (raw)
In-Reply-To: <2e074a0b-7ab6-4381-9216-31f68a738a07@redhat.com>



On 4/30/24 8:57 PM, David Hildenbrand wrote:
>>
>> @@ -2972,7 +2972,7 @@ int __ksm_enter(struct mm_struct *mm)
>>       struct mm_slot *slot;
>>       int needs_wakeup;
>>   -    ksm_slot = mm_slot_alloc(mm_slot_cache);
>> +    ksm_slot = mm_slot_alloc(ksm_slot_cache);
> 
> Similarly, this makes the code more confusion. The pattern in khugepaged is similarly:
> 
> mm_slot = mm_slot_alloc(mm_slot_cache);

Could we rename it to khg_mm_slot_cache in khugepaged?
 
> 
> I don't think we want these renamings.
> 
> E.g., "ksm_mm_slot_cache" might be a bit better than "mm_slot_cache". But then, we are in KSM code ... so I don't really see an improvement.

Thanks for comments and sorry for response late.

yes, ksm_mm_slot_cache is better even in KSM code. As a cscope/tag dependency patient, this change could reduce much of confusing in name searching. And that's why a one-side change satisfies me.
Yes, maybe better naming could make it more readable, any more further help? :)

Thanks a lot!
Alex


  reply	other threads:[~2024-05-16 12:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-28 10:06 [PATCH 1/4] mm/ksm: rename mm_slot members to ksm_slot for better readability alexs
2024-04-28 10:06 ` [PATCH 2/4] mm/ksm: rename variable mm_slot to ksm_slot in unmerge_and_remove_all_rmap_items alexs
2024-04-28 10:06 ` [PATCH 3/4] mm/ksm: rename mm_slot_cache to ksm_slot_cache alexs
2024-04-30 12:57   ` David Hildenbrand
2024-05-16 12:15     ` Alex Shi [this message]
2024-05-22 11:49       ` David Hildenbrand
2024-04-28 10:06 ` [PATCH 4/4] mm/ksm: rename mm_slot for get_next_rmap_item alexs

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=4c255baa-99e3-4f48-9303-13edb99adc89@gmail.com \
    --to=seakeel@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexs@kernel.org \
    --cc=david@redhat.com \
    --cc=izik.eidus@ravellosystems.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.org \
    /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).