linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Kefeng Wang <wangkefeng.wang@huawei.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: <linux-mm@kvack.org>
Subject: Re: [PATCH] mm: migrate: remove unused includes
Date: Thu, 5 Sep 2024 09:26:47 +0800	[thread overview]
Message-ID: <f2ed01fc-db54-4e3e-a6a1-c77cd665f808@huawei.com> (raw)
In-Reply-To: <151a4a19-552c-4e85-a4fc-897ab292a48f@huawei.com>



On 2024/9/5 9:18, Kefeng Wang wrote:
> 
> 
> On 2024/9/5 4:54, Andrew Morton wrote:
>> On Wed, 4 Sep 2024 17:58:49 +0800 Kefeng Wang 
>> <wangkefeng.wang@huawei.com> wrote:
>>
>>> Some includes are not need anymore, remove them.
>>>
>>
>> Please define "not needed".  Does migrate.c simply not refer to
> Agree.
> 
>> anything which these headers provide?  Or does migrate.c already pick
>> up these headers via nested includes?
>>
>> If the latter then that can be a problem - build breakage under rare
>> configs, or as code generally evolves.  Not a *big* problem - we detect
>> and fix such things quickly, but I do think general good practice is to
>> directly include whatever the .c file requires.
> 
> Yes, I could add more infos,
> 
> random.h not needed since commit 6c542ab75714 ("mm/demotion: build 
> demotion targets based on explicit memory tiers"), all functions moved
> into memory-tiers.
> 
> nsproxy.h not needed since commit 228ebcbe634a ("Uninline 
> find_task_by_xxx set of functions"), no nsproxy, we only call
> find_task_by_vpid() now.
> 
> hugetlb_cgroup.h not needed since commit ab5ac90aecf5 ("mm, hugetlb: do 
> not rely on overcommit limit during migration"), move_hugetlb_state() is
> called and it belongs to hugetlb.h, which is already included.
> 
> 
> memremap.h, userfaultfd_k.h and oom.h are introduced for zone device
> page migration, but all functions are moved into migrate_device.c, so no
> needed too.

and for balloon_compaction.h, we have more general movable_operations
for non-lru movable page migration, so it could be dropped.

> 
> 


      reply	other threads:[~2024-09-05  1:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04  9:58 [PATCH] mm: migrate: remove unused includes Kefeng Wang
2024-09-04 20:54 ` Andrew Morton
2024-09-05  1:18   ` Kefeng Wang
2024-09-05  1:26     ` Kefeng Wang [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=f2ed01fc-db54-4e3e-a6a1-c77cd665f808@huawei.com \
    --to=wangkefeng.wang@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.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).