Commit 32e8656
Audra Mitchell
mm: multi-gen LRU: use {ptep,pmdp}_clear_young_notify()
JIRA: https://issues.redhat.com/browse/RHEL-104908
Conflicts:
Context conflict in include/linux/mmzone.h due to missing:
745b13e ("mm/mglru: remove CONFIG_MEMCG")
7eb2d01 ("mm/mglru: remove CONFIG_TRANSPARENT_HUGEPAGE")
Context conflicts in mm/rmap.c due to downstream RHEL-only commit:
7535c3f ("Revert "mm: add vma_has_recency()"")
Context conflicts in mm/vmscan.c due to missing commits:
7eb2d01 ("mm/mglru: remove CONFIG_TRANSPARENT_HUGEPAGE")
61dd3f2 ("mm/mglru: add CONFIG_LRU_GEN_WALKS_MMU")
This patch is a backport of the following upstream commit:
commit 1d4832b
Author: Yu Zhao <[email protected]>
Date: Sat Oct 19 01:29:39 2024 +0000
mm: multi-gen LRU: use {ptep,pmdp}_clear_young_notify()
When the MM_WALK capability is enabled, memory that is mostly accessed by
a VM appears younger than it really is, therefore this memory will be less
likely to be evicted. Therefore, the presence of a running VM can
significantly increase swap-outs for non-VM memory, regressing the
performance for the rest of the system.
Fix this regression by always calling {ptep,pmdp}_clear_young_notify()
whenever we clear the young bits on PMDs/PTEs.
[[email protected]: fix link-time error]
Link: https://lkml.kernel.org/r/[email protected]
Fixes: bd74fda ("mm: multi-gen LRU: support page table walks")
Signed-off-by: Yu Zhao <[email protected]>
Signed-off-by: James Houghton <[email protected]>
Reported-by: David Stevens <[email protected]>
Cc: Axel Rasmussen <[email protected]>
Cc: David Matlack <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Oliver Upton <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Sean Christopherson <[email protected]>
Cc: Wei Xu <[email protected]>
Cc: <[email protected]>
Cc: kernel test robot <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Audra Mitchell <[email protected]>1 parent 6c24349 commit 32e8656
3 files changed
+56
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
| 501 | + | |
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| |||
590 | 590 | | |
591 | 591 | | |
592 | 592 | | |
593 | | - | |
| 593 | + | |
594 | 594 | | |
| 595 | + | |
595 | 596 | | |
596 | 597 | | |
597 | 598 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
820 | 820 | | |
821 | 821 | | |
822 | 822 | | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
827 | 826 | | |
828 | | - | |
829 | | - | |
| 827 | + | |
830 | 828 | | |
831 | 829 | | |
832 | 830 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
3214 | 3215 | | |
3215 | 3216 | | |
3216 | 3217 | | |
3217 | | - | |
| 3218 | + | |
| 3219 | + | |
3218 | 3220 | | |
3219 | 3221 | | |
3220 | 3222 | | |
| |||
3226 | 3228 | | |
3227 | 3229 | | |
3228 | 3230 | | |
| 3231 | + | |
| 3232 | + | |
| 3233 | + | |
3229 | 3234 | | |
3230 | 3235 | | |
3231 | 3236 | | |
| 3237 | + | |
| 3238 | + | |
| 3239 | + | |
3232 | 3240 | | |
3233 | 3241 | | |
3234 | 3242 | | |
3235 | 3243 | | |
3236 | | - | |
| 3244 | + | |
| 3245 | + | |
3237 | 3246 | | |
3238 | 3247 | | |
3239 | 3248 | | |
| |||
3245 | 3254 | | |
3246 | 3255 | | |
3247 | 3256 | | |
| 3257 | + | |
| 3258 | + | |
| 3259 | + | |
3248 | 3260 | | |
3249 | 3261 | | |
3250 | 3262 | | |
| 3263 | + | |
| 3264 | + | |
| 3265 | + | |
3251 | 3266 | | |
3252 | 3267 | | |
3253 | 3268 | | |
| |||
3257 | 3272 | | |
3258 | 3273 | | |
3259 | 3274 | | |
3260 | | - | |
3261 | | - | |
3262 | | - | |
3263 | | - | |
3264 | 3275 | | |
3265 | 3276 | | |
3266 | 3277 | | |
| |||
3315 | 3326 | | |
3316 | 3327 | | |
3317 | 3328 | | |
3318 | | - | |
| 3329 | + | |
3319 | 3330 | | |
3320 | 3331 | | |
3321 | 3332 | | |
3322 | | - | |
3323 | | - | |
3324 | | - | |
3325 | | - | |
3326 | 3333 | | |
3327 | 3334 | | |
3328 | 3335 | | |
3329 | 3336 | | |
3330 | | - | |
3331 | | - | |
| 3337 | + | |
| 3338 | + | |
3332 | 3339 | | |
3333 | 3340 | | |
3334 | 3341 | | |
| |||
3394 | 3401 | | |
3395 | 3402 | | |
3396 | 3403 | | |
3397 | | - | |
3398 | | - | |
| 3404 | + | |
3399 | 3405 | | |
3400 | 3406 | | |
3401 | 3407 | | |
3402 | | - | |
| 3408 | + | |
| 3409 | + | |
3403 | 3410 | | |
3404 | 3411 | | |
3405 | 3412 | | |
3406 | 3413 | | |
| 3414 | + | |
| 3415 | + | |
| 3416 | + | |
| 3417 | + | |
3407 | 3418 | | |
3408 | 3419 | | |
3409 | 3420 | | |
3410 | 3421 | | |
3411 | | - | |
| 3422 | + | |
3412 | 3423 | | |
3413 | 3424 | | |
3414 | 3425 | | |
| |||
3472 | 3483 | | |
3473 | 3484 | | |
3474 | 3485 | | |
3475 | | - | |
3476 | 3486 | | |
| 3487 | + | |
3477 | 3488 | | |
3478 | 3489 | | |
3479 | 3490 | | |
3480 | | - | |
3481 | | - | |
3482 | | - | |
3483 | | - | |
3484 | | - | |
3485 | | - | |
3486 | | - | |
3487 | | - | |
3488 | | - | |
| 3491 | + | |
| 3492 | + | |
3489 | 3493 | | |
3490 | 3494 | | |
3491 | 3495 | | |
3492 | 3496 | | |
3493 | | - | |
| 3497 | + | |
| 3498 | + | |
3494 | 3499 | | |
3495 | 3500 | | |
3496 | 3501 | | |
| |||
3948 | 3953 | | |
3949 | 3954 | | |
3950 | 3955 | | |
3951 | | - | |
| 3956 | + | |
3952 | 3957 | | |
3953 | 3958 | | |
3954 | 3959 | | |
3955 | 3960 | | |
3956 | 3961 | | |
3957 | | - | |
| 3962 | + | |
3958 | 3963 | | |
3959 | 3964 | | |
3960 | 3965 | | |
| |||
3969 | 3974 | | |
3970 | 3975 | | |
3971 | 3976 | | |
| 3977 | + | |
| 3978 | + | |
| 3979 | + | |
3972 | 3980 | | |
3973 | | - | |
| 3981 | + | |
3974 | 3982 | | |
3975 | 3983 | | |
3976 | 3984 | | |
3977 | | - | |
| 3985 | + | |
3978 | 3986 | | |
3979 | 3987 | | |
3980 | 3988 | | |
3981 | 3989 | | |
3982 | 3990 | | |
3983 | 3991 | | |
3984 | 3992 | | |
| 3993 | + | |
| 3994 | + | |
| 3995 | + | |
3985 | 3996 | | |
3986 | 3997 | | |
3987 | 3998 | | |
| |||
3995 | 4006 | | |
3996 | 4007 | | |
3997 | 4008 | | |
3998 | | - | |
| 4009 | + | |
3999 | 4010 | | |
4000 | 4011 | | |
4001 | 4012 | | |
| |||
4005 | 4016 | | |
4006 | 4017 | | |
4007 | 4018 | | |
4008 | | - | |
| 4019 | + | |
4009 | 4020 | | |
4010 | 4021 | | |
4011 | 4022 | | |
4012 | | - | |
4013 | | - | |
4014 | | - | |
4015 | 4023 | | |
4016 | 4024 | | |
4017 | 4025 | | |
4018 | 4026 | | |
4019 | | - | |
4020 | | - | |
| 4027 | + | |
| 4028 | + | |
4021 | 4029 | | |
4022 | 4030 | | |
4023 | 4031 | | |
| |||
4049 | 4057 | | |
4050 | 4058 | | |
4051 | 4059 | | |
| 4060 | + | |
| 4061 | + | |
4052 | 4062 | | |
4053 | 4063 | | |
4054 | 4064 | | |
| |||
0 commit comments