On Wed, Jan 15, 2025 at 06:06:25AM -0600, Donet Tom wrote:Sure. Thank you.
... snip ...
Thank you for taking the time to do this, I don't have enough background
with MGLRU to have done this quickly. I'll pull this onto my branch and
carry it if you don't mind so we can keep things tracked.
I'll send you an updated RFC before i send out v4 and add appropriate tags.
I am also thinking on the same. I will come back with some tests which
This difference also impacts read latency:Do you have a thought on a good test we can use to compare these
For MGLRU, the first read shows higher latency due to the combined
overhead of accessing a lower tier and performing promotion.
For LRU, the first 3–4 reads typically exhibit lower latency since
promotion does not occur immediately.
strategies?
Yes, I agree. After the first access, it gets promoted, but if those pages
We decided against promotion on first-access because there are many
easy-to-imagine scenarios where that will clearly harm performance.
Could you please let me know what workload you are planning?
We're planning to do some workload testing soon so we can get actual
benefit numbers.
Sounds good to me.
+promo_candid:I am considering putting this in some inline wrapper with some likely()
+ if (!folio_test_isolated(folio) &&
+ (sysctl_numa_balancing_mode & NUMA_BALANCING_MEMORY_TIERING) &&
+ numa_pagecache_promotion_enabled) {
tags to clean this up a bit and optimize the fall-through cases since
i've seen some measurable differences when left as-is.
Thoughts on this are welcome
+ memcg = folio_memcg(folio);Also curious, why only promote when the folio is a member of a memcg?
+ if (memcg) {
~Gregory