lkml.org 
[lkml]   [2026]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v7 4/7] mm: pghot: Precision mode for pghot
From
Hi Bharata

On 5/4/26 11:39 AM, Bharata B Rao wrote:
> +#include <linux/pghot.h>
> +#include <linux/jiffies.h>
> +#include <linux/memory-tiers.h>
> +
> +bool pghot_nid_valid(int nid)

I might be missing something, but since pghot_nid_valid() exists in both
pghot-default.c and pghot-precise.c, would it make sense to move it to a
header file as a static inline function?

-Donet


> +{
> + if (nid != NUMA_NO_NODE &&
> + (!numa_valid_node(nid) || nid > PGHOT_NID_MAX ||
> + !node_online(nid) || !node_is_toptier(nid)))
> + return false;
> +
> + return true;
> +}
> +
> +unsigned long pghot_access_latency(unsigned long old_time, unsigned long time)
> +{
> + return jiffies_to_msecs((time - old_time) & PGHOT_TIME_MASK);
> +}
> +
> +bool pghot_update_record(phi_t *phi, int nid, unsigned long now)
> +{

\
 
 \ /
  Last update: 2026-05-04 20:43    [W:0.201 / U:9.030 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog