Re: [PATCH 02/35] mm: support direct memory reservation

From: Randy Dunlap
Date: Thu Oct 08 2020 - 16:34:29 EST


On 10/8/20 12:53 AM, yulei.kernel@xxxxxxxxx wrote:
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index a1068742a6df..da15d4fc49db 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -980,6 +980,44 @@
> The filter can be disabled or changed to another
> driver later using sysfs.
>
> + dmem=[!]size[KMG]
> + [KNL, NUMA] When CONFIG_DMEM is set, this means
> + the size of memory reserved for dmemfs on each numa

NUMA

> + memory node and 'size' must be aligned to the default
> + alignment that is the size of memory section which is
> + 128M on default on x86_64. If set '!', such amount of

by default

> + memory on each node will be owned by kernel and dmemfs
> + own the rest of memory on each node.

owns

> + Example: Reserve 4G memory on each node for dmemfs
> + dmem = 4G

IIRC, you don't want spaces in this example.
Or did you check? Does the kernel's command line parser accept & ignore spaces like these?


> +
> + dmem=[!]size[KMG]:align[KMG]
> + [KNL, NUMA] Ditto. 'align' should be power of two and
> + it's not smaller than the default alignment. Also

drop "it's"

> + 'size' must be aligned to 'align'.
> + Example: Bad dmem parameter because 'size' misaligned
> + dmem=0x40200000:1G
> +
> + dmem=size[KMG]@addr[KMG]
> + [KNL] When CONFIG_DMEM is set, this marks specific
> + memory as reserved for dmemfs. Region of memory will be
> + used by dmemfs, from addr to addr + size. Reserving a
> + certain memory region for kernel is illegal so '!' is
> + forbidden. Should not assign 'addr' to 0 because kernel
> + will occupy fixed memory region begin at 0 address.

beginning

> + Ditto, 'size' and 'addr' must be aligned to default
> + alignment.
> + Example: Exclude memory from 5G-6G for dmemfs.
> + dmem=1G@5G
> +
> + dmem=size[KMG]@addr[KMG]:align[KMG]
> + [KNL] Ditto. 'align' should be power of two and it's

Drop "it's"

> + not smaller than the default alignment. Also 'size'
> + and 'addr' must be aligned to 'align'. Specially,
> + '@addr' and ':align' could occur in any order.
> + Example: Exclude memory from 5G-6G for dmemfs.
> + dmem=1G:1G@5G
> +
> driver_async_probe= [KNL]
> List of driver names to be probed asynchronously.
> Format: <driver_name1>,<driver_name2>...


--
~Randy
Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>