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:18:33 +0800	[thread overview]
Message-ID: <151a4a19-552c-4e85-a4fc-897ab292a48f@huawei.com> (raw)
In-Reply-To: <20240904135422.dfb9d92a998d7bb26baa5326@linux-foundation.org>



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.



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

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04  9:58 Kefeng Wang
2024-09-04 20:54 ` Andrew Morton
2024-09-05  1:18   ` Kefeng Wang [this message]
2024-09-05  1:26     ` Kefeng Wang

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=151a4a19-552c-4e85-a4fc-897ab292a48f@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