Message ID | 20231215071604.946a433bbc05a6409faf5a33@linux-foundation.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [GIT,PULL] hotfixes for 6.7-rc6 | expand |
The pull request you sent on Fri, 15 Dec 2023 07:16:04 -0800:
> git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm tags/mm-hotfixes-stable-2023-12-15-07-11
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/a62aa88ba1a386e9b6953083b1ceb2fe027238b9
Thank you!
On Fri, 15 Dec 2023 at 07:16, Andrew Morton <akpm@linux-foundation.org> wrote: > > Yu Zhao (4): > mm/mglru: fix underprotected page cache > mm/mglru: try to stop at high watermarks > mm/mglru: respect min_ttl_ms with memcgs > mm/mglru: reclaim offlined memcgs harder Entirely unrelated to this pull request (which I already pulled and pushed out, as noted by pr-tracker-bot), since I looked at these it just reminded me about a question I've had for a while... Do we have any long-term (or even short-term?) plans to just make mglru be the one and only model? Yes, right now it's not just a Kconfig choice, but a real technical issue too: it depends on having enough flags available, so we have that "cannot use it on 32-bit with sparsemem". But I'm hoping there is a plan or a workaround for that? Because I feel like we really don't want to keep this "two different models" situation around forever. Linus
On Fri, 15 Dec 2023 12:11:42 -0800 Linus Torvalds <torvalds@linux-foundation.org> wrote: > On Fri, 15 Dec 2023 at 07:16, Andrew Morton <akpm@linux-foundation.org> wrote: > > > > Yu Zhao (4): > > mm/mglru: fix underprotected page cache > > mm/mglru: try to stop at high watermarks > > mm/mglru: respect min_ttl_ms with memcgs > > mm/mglru: reclaim offlined memcgs harder > > Entirely unrelated to this pull request (which I already pulled and > pushed out, as noted by pr-tracker-bot), since I looked at these it > just reminded me about a question I've had for a while... > > Do we have any long-term (or even short-term?) plans to just make > mglru be the one and only model? I hope so, but I haven't heard specific plans. Things are still stabilizing, but it seems we're a fair way down that exponential curve. > Yes, right now it's not just a Kconfig choice, but a real technical > issue too: it depends on having enough flags available, so we have > that "cannot use it on 32-bit with sparsemem". > > But I'm hoping there is a plan or a workaround for that? Hopefully Yu can talk to that. > Because I feel like we really don't want to keep this "two different > models" situation around forever. > Sure. Some diehards are still using slab :(
On Fri, Dec 15, 2023 at 1:22 PM Andrew Morton <akpm@linux-foundation.org> wrote: > > On Fri, 15 Dec 2023 12:11:42 -0800 Linus Torvalds <torvalds@linux-foundation.org> wrote: > > > On Fri, 15 Dec 2023 at 07:16, Andrew Morton <akpm@linux-foundation.org> wrote: > > > > > > Yu Zhao (4): > > > mm/mglru: fix underprotected page cache > > > mm/mglru: try to stop at high watermarks > > > mm/mglru: respect min_ttl_ms with memcgs > > > mm/mglru: reclaim offlined memcgs harder > > > > Entirely unrelated to this pull request (which I already pulled and > > pushed out, as noted by pr-tracker-bot), since I looked at these it > > just reminded me about a question I've had for a while... > > > > Do we have any long-term (or even short-term?) plans to just make > > mglru be the one and only model? > > I hope so, but I haven't heard specific plans. I don't know when we'll get there, if we can get there at all. But we have been steadily moving toward that goal: 1. We worked with all major distros that follow the mainline closely to switch to MGLRU this summer (Arch, Debian, Fedora, Gentoo and Ubuntu). 2. We hired more kernel developers after we demonstrated the ability to substantially lower hardware cost by overcommitting memory at scale. There has been a short-term plan, i.e., moving some of folio->flags to the lower bits of folio->lru so that we can drop the Kconfig constraint. I have discussed this with Willy but never acted on it. My priority has been to surface more of our ideas that can potentially save users money on memory to the community. I'm CC'ing our team leads. Please feel free to let us know your preference on the priority. Thanks.
On Fri, 15 Dec 2023 at 20:57, Yu Zhao <yuzhao@google.com> wrote: > > There has been a short-term plan, i.e., moving some of folio->flags to > the lower bits of folio->lru so that we can drop the Kconfig > constraint. I have discussed this with Willy but never acted on it. My > priority has been to surface more of our ideas that can potentially > save users money on memory to the community. I'm CC'ing our team > leads. Please feel free to let us know your preference on the > priority. This is definitely a "eventually" thing on my wishlist, so I was more just wanting to hear that there is a plan, and somebody working on it.. Thanks, Linus
On Sat, Dec 16, 2023 at 04:16:45PM -0800, Linus Torvalds wrote: > On Fri, 15 Dec 2023 at 20:57, Yu Zhao <yuzhao@google.com> wrote: > > > > There has been a short-term plan, i.e., moving some of folio->flags to > > the lower bits of folio->lru so that we can drop the Kconfig > > constraint. I have discussed this with Willy but never acted on it. My > > priority has been to surface more of our ideas that can potentially > > save users money on memory to the community. I'm CC'ing our team > > leads. Please feel free to let us know your preference on the > > priority. > > This is definitely a "eventually" thing on my wishlist, so I was more > just wanting to hear that there is a plan, and somebody working on > it.. "eventually" we should get rid of LRUs altogether. They're no good for a modern CPU. https://lore.kernel.org/linux-mm/ZTc7SHQ4RbPkD3eZ@casper.infradead.org/ I don't have much more in the way of thoughts on what this might look like beyond that email. I'm inclined towards something incredibly simple like taking each 4MB chunk of memory in turn; freeing inactive pages and marking active pages as inactive.
On Sun, 17 Dec 2023 15:40:19 +0000 Matthew Wilcox <willy@infradead.org> wrote: > On Sat, Dec 16, 2023 at 04:16:45PM -0800, Linus Torvalds wrote: > > On Fri, 15 Dec 2023 at 20:57, Yu Zhao <yuzhao@google.com> wrote: > > > > > > There has been a short-term plan, i.e., moving some of folio->flags to > > > the lower bits of folio->lru so that we can drop the Kconfig > > > constraint. I have discussed this with Willy but never acted on it. My > > > priority has been to surface more of our ideas that can potentially > > > save users money on memory to the community. I'm CC'ing our team > > > leads. Please feel free to let us know your preference on the > > > priority. > > > > This is definitely a "eventually" thing on my wishlist, so I was more > > just wanting to hear that there is a plan, and somebody working on > > it.. > > "eventually" we should get rid of LRUs altogether. They're no good for > a modern CPU. > > https://lore.kernel.org/linux-mm/ZTc7SHQ4RbPkD3eZ@casper.infradead.org/ > OK, but... What of the cost of physical I/O? If a computationally more expensive scan results in less I/O (hopefully) then the balance is altered?