Messages in this thread | | | From | Yu Zhao <> | Date | Thu, 14 Apr 2022 16:14:55 -0600 | Subject | Re: [PATCH v10 06/14] mm: multi-gen LRU: minimal implementation |
| |
On Thu, Apr 14, 2022 at 3:40 PM Andrew Morton <akpm@linux-foundation.org> wrote: > > On Thu, 14 Apr 2022 14:36:03 -0600 Yu Zhao <yuzhao@google.com> wrote: > > > > or it is only something > > > meaningful for the internal code? > > > > This is how swappiness is interpreted. > > > > > if so, can we rename it to > > > something else? otherwise, it is quite confusing. > > > > Feel free to suggest something. > > It is confusing, swap_preference?
It's still largely swappiness -- the original swappiness is twisted a bit around the corners (0, 1 and 200) to make it more suitable for internal use.
I vote for __swappiness or lrugen_swappiness, which look ugly to me but it captures what this variable actually is, i.e., an overridden version of the original swappiness. And similar for lru_gen_mm_walk *walk vs mm_walk *walk.
In other languages where polymorphism is supported, there are established naming conversions. In this patchset, I just used the same variable name when two things are closely related but distinguishable from the _contexts_ they are used.
| |