Re: [PATCH] mm: migrate: remove unused includes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 2024/9/5 4:54, Andrew Morton wrote:
On Wed, 4 Sep 2024 17:58:49 +0800 Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> 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.





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux