Message ID | 20220409093500.10329-6-linmiaohe@huawei.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | A few cleanup and fixup patches for vmscan | expand |
On Sat, 2022-04-09 at 17:34 +0800, Miaohe Lin wrote: > We should activate swap-backed executable folios (e.g. tmpfs) after first > usage so that executable code gets yet better chance to stay in memory. > > Suggested-by: Huang, Ying <ying.huang@intel.com> > Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> > Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Reviewed-by: Huang, Ying <ying.huang@intel.com> Best Regards, Huang, Ying > --- > mm/vmscan.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mm/vmscan.c b/mm/vmscan.c > index 0e5818970998..cc1193e320c2 100644 > --- a/mm/vmscan.c > +++ b/mm/vmscan.c > @@ -1412,9 +1412,9 @@ static enum page_references folio_check_references(struct folio *folio, > return PAGEREF_ACTIVATE; > > > > > /* > - * Activate file-backed executable folios after first usage. > + * Activate executable folios after first usage. > */ > - if ((vm_flags & VM_EXEC) && !folio_test_swapbacked(folio)) > + if (vm_flags & VM_EXEC) > return PAGEREF_ACTIVATE; > > > > > return PAGEREF_KEEP;
diff --git a/mm/vmscan.c b/mm/vmscan.c index 0e5818970998..cc1193e320c2 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1412,9 +1412,9 @@ static enum page_references folio_check_references(struct folio *folio, return PAGEREF_ACTIVATE; /* - * Activate file-backed executable folios after first usage. + * Activate executable folios after first usage. */ - if ((vm_flags & VM_EXEC) && !folio_test_swapbacked(folio)) + if (vm_flags & VM_EXEC) return PAGEREF_ACTIVATE; return PAGEREF_KEEP;
We should activate swap-backed executable folios (e.g. tmpfs) after first usage so that executable code gets yet better chance to stay in memory. Suggested-by: Huang, Ying <ying.huang@intel.com> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> --- mm/vmscan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)