Re: [LSF/MM/BPF TOPIC] Restricting or migrating unmovable kernel allocations from slow tier

Byungchul Park
2025-02-10T07:02:58Z

On Fri, Feb 07, 2025 at 03:57:45AM -0500, Gregory Price wrote:
> On Fri, Feb 07, 2025 at 04:20:24PM +0900, Byungchul Park wrote:
> > On Sat, Feb 01, 2025 at 02:04:17PM +0000, Matthew Wilcox wrote:
> >
> > We can work with from the easiest object
>
> >e.g. page table
>
> It's more efficient and easier to change page sizes than it is to make
> page tables migratable.
>
> It's also easier to reclaim cold pages eating up significantly more
> memory than the page table (which describes pages at ~8 bytes per page).

Sorry for leaving comments in an excited manner last time. Lemme focus
on what to consider and how to resolve them:

Case 1. A system with no or little non-DRAM capacity

You are right. It'd be easier to reclaim cold pages eating up
ZONE_NORMAL. ZONE_NORMAL in DRAM probably can cover whole memory.

Case 2. A system with very huge non-DRAM capacity

ZONE_NORMAL in DRAM might not be able to cover whole memory. So
either allowing ZONE_NORMAL in non-DRAM or allowing some kernel
objects to be placed in ZONE_MOVABLE would be required.

If all the guys agree with Matthew - a system should never be able to
equipped with very huge non-DRAM memory, then yes, we might not need
the discussion.

Case 3. A system with a capacity between huge and little non-DRAM

ZONE_NORMAL in DRAM might or might not be able to cover whole memory.
Quite big amount of kernel object would be still required. Of course,
properly reclaiming cold pages eating up ZONE_NORMAL in DRAM might
work for the purpose. At the same time, any efforts to reduce the
ZONE_NORMAL cost would help and mitigate the pressure on ZONE_NORMAL
in DRAM. Here, the efforts include e.g. reducing size of kernel
object, making some kernel objects migratable, and so on.

Same. If this case is also the one that Matthew and others think
is not realistic, then yes, we might not need the discussion. If not,
we need to consider the issue.

Byungchul