lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r0fvktkn.fsf@yhuang6-desk2.ccr.corp.intel.com>
Date: Thu, 28 Mar 2024 09:56:24 +0800
From: "Huang, Ying" <ying.huang@...el.com>
To: Bharata B Rao <bharata@....com>
Cc: <linux-mm@...ck.org>,  <linux-kernel@...r.kernel.org>,
  <akpm@...ux-foundation.org>,  <mingo@...hat.com>,
  <peterz@...radead.org>,  <mgorman@...hsingularity.net>,
  <raghavendra.kt@....com>,  <dave.hansen@...ux.intel.com>,
  <hannes@...xchg.org>
Subject: Re: [RFC PATCH 1/2] sched/numa: Fault count based NUMA hint fault
 latency

Bharata B Rao <bharata@....com> writes:

[snip]

> @@ -1750,25 +1753,20 @@ static bool pgdat_free_space_enough(struct pglist_data *pgdat)
>  }
>  
>  /*
> - * For memory tiering mode, when page tables are scanned, the scan
> - * time will be recorded in struct page in addition to make page
> - * PROT_NONE for slow memory page.  So when the page is accessed, in
> - * hint page fault handler, the hint page fault latency is calculated
> - * via,
> + * For memory tiering mode, when page tables are scanned, the current
> + * hint fault count will be recorded in struct page in addition to
> + * make page PROT_NONE for slow memory page.  So when the page is
> + * accessed, in hint page fault handler, the hint page fault latency is
> + * calculated via,
>   *
> - *	hint page fault latency = hint page fault time - scan time
> + * hint page fault latency = current hint fault count - fault count at scan time
>   *
>   * The smaller the hint page fault latency, the higher the possibility
>   * for the page to be hot.
>   */
> -static int numa_hint_fault_latency(struct folio *folio)
> +static inline int numa_hint_fault_latency(struct folio *folio, int count)
>  {
> -	int last_time, time;
> -
> -	time = jiffies_to_msecs(jiffies);
> -	last_time = folio_xchg_access_time(folio, time);
> -
> -	return (time - last_time) & PAGE_ACCESS_TIME_MASK;
> +	return count - folio_xchg_fault_count(folio, count);
>  }

I found count is task->mm->hint_faults.  That is a process wide
counting.  How do you connect the hotness of a folio with the count of
hint page fault in the process?  How do you compare the hotness of
folios among different processes?

>  /*
> @@ -1794,35 +1792,6 @@ static bool numa_promotion_rate_limit(struct pglist_data *pgdat,
>  	return false;
>  }
>

--
Best Regards,
Huang, Ying

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ