lkml.org 
[lkml]   [2022]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v14 01/10] mm/demotion: Add support for explicit memory tiers
On Fri, Aug 12, 2022 at 1:58 PM Aneesh Kumar K.V
<aneesh.kumar@linux.ibm.com> wrote:

[snip]

> diff --git a/include/linux/memory-tiers.h b/include/linux/memory-tiers.h
> new file mode 100644
> index 000000000000..bc7c1b799bef
> --- /dev/null
> +++ b/include/linux/memory-tiers.h
> @@ -0,0 +1,15 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef _LINUX_MEMORY_TIERS_H
> +#define _LINUX_MEMORY_TIERS_H
> +
> +/*
> + * Each tier cover a abstrace distance chunk size of 128
> + */
> +#define MEMTIER_CHUNK_BITS 7
> +#define MEMTIER_CHUNK_SIZE (1 << MEMTIER_CHUNK_BITS)
> +/*
> + * Smaller abstract distance value imply faster(higher) memory tiers.
> + */
> +#define MEMTIER_ADISTANCE_DRAM (4 * MEMTIER_CHUNK_SIZE)

This will make the abstract distance of DRAM the start of its memory
tier. So that any memory type that is slightly slower than DRAM will
be put in a lower memory tier. So I think it's better to put the DRAM
at the middle of its memory tier by default. For example,

4 * MEMTIER_CHUNK_SIZE + MEMTIER_CHUNK_SIZE / 2

> +
> +#endif /* _LINUX_MEMORY_TIERS_H */

[snip]

Best Regards,
Huang, Ying

\
 
 \ /
  Last update: 2022-08-16 11:51    [W:0.119 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site