On Tue, Jan 02, 2024 at 05:27:18PM -0700, Yu Zhao wrote: [...] > > Helper aside, I disagree with this point about coupling with the > > proactive flag. > > Sure. But I would like to hear a *concrete* counterexample. > > > The fact that the only user currently is proactive > > reclaim > > Yes, that's a fact, and we should make the decision based on the > current known facts. > > > doesn't imply to me that the interface (in scan_control) > > should be coupled to the use-case. > > Future always has its uncertainty which I would not worry so much about. > > > It's easier to reason about a > > swappiness field that overrides swappiness for all scans that set it > > regardless of the users. > > For example? And how likely would that happen in the next few years? My argument isn't that making the interface more generic will be worthwhile due to some future use-case. Rather my argument is that making the interface more generic makes the code simpler. All else being equal, having sc->swappiness behave the same regardless of sc->proactive makes vmscan.c and struct scan_control easier to follow. That being said - I'm fine with conceding this point - particularly since both you and Michal appear to feel similarly. I'll make the corresponding change and send out a new version.