Re: [PATCH v6 00/12] mempolicy2, mbind2, and weighted interleave

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

 




[sorry for the resend, fixed mailing list address]

Gregory Price <gourry.memverge-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx>
writes:

> Weighted interleave is a new interleave policy intended to make
> use of heterogeneous memory environments appearing with CXL.
>
> To implement weighted interleave with task-local weights, we
> need new syscalls capable of passing a weight array. This is
> the justification for mempolicy2/mbind2 - which are designed
> to be extensible to capture future policies as well.

I might be late to the party here, but it's not clear to me you really
need the redesigned system calls. set_mempolicy has one argument left
so it can be enhanced with a new pointer dependending on a bit in mode.
For mbind() it already uses all arguments, but it has a flags argument.

But it's unclear to me if a fully flexible weight array is really needed
here anyways. Can some common combinations be encoded in flags instead?
I assume it's mainly about some nodes getting preference depending on some attribute

So if you add such a attribute, perhaps configurable in sysfs, and then
have flags like give weight + 1 on attribute, give weight + 2 on attribute
give weight + 4 on attribute. If more are needed there are more bits.
That would be a much more compact and simpler interface.

For set_mempolicy either add a flags argument or encode in mode.

It would also shrink the whole patchkit dramatically and be less risky.

You perhaps underestimate the cost and risk of designing complex kernel
interfaces, it all has to be hardened audited fuzzed deployed etc.

-Andi





[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