> > Previously, I also considered converting anon_vma's rb_tree to a > > mapletree. If one entry records a single VMA, the average overhead > > could be less than two longs per VMA. > > > > However, unlike rb_tree, mapletree does not support storing multiple > > elements under a single key. The key would need to look like > > (vma_id/mm_id + pgoff). On 32-bit platforms, since 64-bit mapletree > > keys are not supported yet, the remaining > > 12 bits are not enough for vma_id/mm_id. > > > > Because of this limitation, I later started thinking about ways to > > reduce anon_vma allocations instead. > > > > I will try to find some time next week to analyze the cow-context > > design and code more thoroughly, and then write up a summary. > > Tao, > > This response is so full of misunderstandings it's not really worth me > responding to any of it. You've even hallucinated an imaginary field which is > REALLY suspicious. > > You've no mm expertise or history and came up with this in a few hours. I > asked Claude to analyse it and it puts it at 75-80% chance of being solely LLM- > generated from cow_context.c. > > I simply don't have the time to deal with this, so unfortunately I'm going to > have to withdraw the suggestion of further discussion with you on this topic. > > I am working on the scalable CoW project and will solicit opinions of those > with relevant expertise. > > We are not interested in your approach or analysis. > > Thanks, Lorenzo You said discussion was welcome, yet when someone offered even a small comment, you refused to continue the discussion. If I had known you would be this inconsistent, I would not have replied to you in the first place. This will be my last reply to you. I will not respond again. Consider the following test case: Process P creates 1000 VMAs with mmap, named vma_1, vma_2, ..., vma_1000. Then it forks child processes C_1, C_2, ..., C_1000. Each child process C_k keeps only vma_k and munmaps all other vma_i. With the current anon_vma, reclaim walking each page only needs to handle two VMAs (vma_k in process P and vma_k in process C_k). But under the CoW approach, reclaiming each page needs to walk 1000 processes, then spend O(log(#remap_entries)) time to check whether a remap_entry exists, and then O(log(#vmas)) time to locate the VMA. Both the code complexity and the time complexity of the reverse walk are much higher than the current anon_vma approach.
On Mon, Jun 1, 2026 at 9:46 AM wangtao <tao.wangtao@honor.com> wrote: [...] > > You said discussion was welcome, yet when someone offered even a > small comment, you refused to continue the discussion. > > If I had known you would be this inconsistent, I would not have > replied to you in the first place. > > This will be my last reply to you. I will not respond again. > Hi Tao, Please don't walk away from the linux-mm community. I read your patchset and found it quite valuable. It not only reduces memory overhead, but also eliminates rmap costs for exclusive folios. Since I'm not very confident discussing technical topics in English, I wrote a blog post in Chinese about your patchset: https://mp.weixin.qq.com/s/k00tzhTl8HbL3k4G6ev4SA I have to admit that I found the implementation quite complex and in need of significant improvement. However, I think the underlying idea is very interesting and worth exploring further. I'm looking forward to seeing a v2 RFC with a cleaner and simpler implementation while preserving the core concept. Regardless of whether it ultimately gets merged, I hope the discussion can continue. Best regards, Barry
On 6/2/26 11:15 AM, Barry Song wrote: > On Mon, Jun 1, 2026 at 9:46 AM wangtao <tao.wangtao@honor.com> wrote: > [...] >> >> You said discussion was welcome, yet when someone offered even a >> small comment, you refused to continue the discussion. >> >> If I had known you would be this inconsistent, I would not have >> replied to you in the first place. >> >> This will be my last reply to you. I will not respond again. > > Hi Tao, > > Please don't walk away from the linux-mm community. I read your > patchset and found it quite valuable. It not only reduces memory > overhead, but also eliminates rmap costs for exclusive folios. > > Since I'm not very confident discussing technical topics in English, > I wrote a blog post in Chinese about your patchset: > > https://mp.weixin.qq.com/s/k00tzhTl8HbL3k4G6ev4SA The cover letter and commit messages should have been elaborated to a much greater degree instead of making people guess the design and intent from the code. > I have to admit that I found the implementation quite complex and > in need of significant improvement. > However, I think the underlying> idea is very interesting and worth exploring further. No. What it is trying to achieve is ambitious, but the idea itself is not worth exploring further as-is unless the correctness and complexity concerns are addressed. > I'm looking forward to seeing a v2 RFC with a cleaner and simpler > implementation while preserving the core concept. I'm afraid this encouragement would mislead us in the wrong direction, where all of us end up wasting time. There isn't much point in posting v2 without addressing fundamental questions about the design. > Regardless of whether it ultimately gets merged, I hope the discussion > can continue. Regarding the "improving the reverse mapping subsystem" topic, a more constructive direction would be to carefully revisit the design decisions and discuss what we can do about them (that's exactly what Lorenzo has been doing). But that's not the first thing I would recommend to a relatively new contributor given that it's really complicated and even the people who have designed and reworked the reverse mapping subsystem over the past 20+ years haven't come up with a fundamentally better design. Reverse mapping is a frustratingly complicated subsystem. Without carefully revisiting the current design, there is not much hope of improving things at the design level, even slightly. What I would recommend to new people instead is: 1) starting by reviewing other people's work, so that you have enough time to learn the historical context and subtleties of the subsystem without making intrusive changes (which also keeps in touch with the community), and 2) making progress on smaller tasks with less intrusive changes, to gradually build trust and be able to do more valuable work. Unfortunately, looking at how this thread went, I see that the author is now in a worse position than an entirely new contributor. -- Cheers, Harry / Hyeonggon
On Wed, Jun 3, 2026 at 3:57 AM Harry Yoo <harry@kernel.org> wrote: > > > > On 6/2/26 11:15 AM, Barry Song wrote: > > On Mon, Jun 1, 2026 at 9:46 AM wangtao <tao.wangtao@honor.com> wrote: > > [...] > >> > >> You said discussion was welcome, yet when someone offered even a > >> small comment, you refused to continue the discussion. > >> > >> If I had known you would be this inconsistent, I would not have > >> replied to you in the first place. > >> > >> This will be my last reply to you. I will not respond again. > > > > Hi Tao, > > > > Please don't walk away from the linux-mm community. I read your > > patchset and found it quite valuable. It not only reduces memory > > overhead, but also eliminates rmap costs for exclusive folios. > > > > Since I'm not very confident discussing technical topics in English, > > I wrote a blog post in Chinese about your patchset: > > > > https://mp.weixin.qq.com/s/k00tzhTl8HbL3k4G6ev4SA > The cover letter and commit messages should have been elaborated to a > much greater degree instead of making people guess the design and intent > from the code. Indeed. The cover letter does not clearly tell the story, and yesterday I needed quite some time to understand what the patchset was trying to achieve. > > > I have to admit that I found the implementation quite complex and > > in need of significant improvement. > > > However, I think the underlying> idea is very interesting and worth > exploring further. > > No. What it is trying to achieve is ambitious, but the idea itself is > not worth exploring further as-is unless the correctness and complexity > concerns are addressed. Can we give Tao more time to address the concerns and explain the correctness of the approach? That said, I don't think the patchset is entirely without merit. The idea that caught my attention is whether knowing that a process is guaranteed to be a leaf process could allow us to simplify parts of the rmap machinery and reduce some of the associated overhead. Assuming that a fork server (e.g. systemd or zygote) is preferable to having each application perform its own fork(), Linux already largely relies on fork servers in practice. Matthew also pointed out that calling fork() in multithreaded applications is a terrible idea [1]. This may suggest that, in general, processes outside of a fork-server model should avoid using fork(). If we were to introduce an API such as prctl(PR_SET_NOFORK) or something similar, could we eliminate a significant portion of the rmap-related overhead for such leaf processes, while still avoiding the complexity of the lazy allocation scheme proposed by Tao? I assume that the vast majority of processes in a real system are leaf processes? It also seems somewhat unusual that a few Android applications invoke fork() directly in a multithreaded context, while most use the zygote to create multiple processes for an app. Perhaps the Android framework should discourage this pattern entirely, and require applications to create child processes via the zygote? If, in real-world systems, more than 95% of processes are leaf processes, could that imply that the rmap design might be reconsidered for a different optimization path? [1] https://marc.info/?l=linuxppc-embedded&m=177912107460825&w=2 > > > I'm looking forward to seeing a v2 RFC with a cleaner and simpler > > implementation while preserving the core concept. > > I'm afraid this encouragement would mislead us in the wrong direction, > where all of us end up wasting time. > > There isn't much point in posting v2 without addressing fundamental > questions about the design. I suggested a v2 because the current patchset does not clearly state what it is trying to achieve. A revised version might help clarify the intent and make it easier to understand. Even if the overall complexity (such as lazy allocation) makes it hard to move forward, we may still be able to learn from it and gain some useful inspiration. > > > Regardless of whether it ultimately gets merged, I hope the discussion > > can continue. > > Regarding the "improving the reverse mapping subsystem" topic, a more > constructive direction would be to carefully revisit the design > decisions and discuss what we can do about them (that's exactly what > Lorenzo has been doing). I have no doubt at all about Lorenzo’s expertise in rmap and many other mm areas. That is well understood and widely recognized. I just think that hearing more perspectives could help us gain additional insight and inspiration. > > But that's not the first thing I would recommend to a relatively new > contributor given that it's really complicated and even the people who > have designed and reworked the reverse mapping subsystem over the past > 20+ years haven't come up with a fundamentally better design. > > Reverse mapping is a frustratingly complicated subsystem. Without > carefully revisiting the current design, there is not much hope of > improving things at the design level, even slightly. > > What I would recommend to new people instead is: > > 1) starting by reviewing other people's work, so that you have enough > time to learn the historical context and subtleties of the subsystem > without making intrusive changes (which also keeps in touch with the > community), and > > 2) making progress on smaller tasks with less intrusive changes, to > gradually build trust and be able to do more valuable work. > Yes, that is a good approach for new contributors. > Unfortunately, looking at how this thread went, I see that the author is > now in a worse position than an entirely new contributor. > > -- > Cheers, > Harry / Hyeonggon Thanks Barry
On 2026/6/2 10:15, Barry Song wrote: > On Mon, Jun 1, 2026 at 9:46 AM wangtao <tao.wangtao@honor.com> wrote: > [...] >> >> You said discussion was welcome, yet when someone offered even a >> small comment, you refused to continue the discussion. >> >> If I had known you would be this inconsistent, I would not have >> replied to you in the first place. >> >> This will be my last reply to you. I will not respond again. >> > > Hi Tao, > > Please don't walk away from the linux-mm community. I read your > patchset and found it quite valuable. It not only reduces memory > overhead, but also eliminates rmap costs for exclusive folios. > > Since I'm not very confident discussing technical topics in English, > I wrote a blog post in Chinese about your patchset: > > https://mp.weixin.qq.com/s/k00tzhTl8HbL3k4G6ev4SA > > I have to admit that I found the implementation quite complex and > in need of significant improvement. However, I think the underlying > idea is very interesting and worth exploring further. > > I'm looking forward to seeing a v2 RFC with a cleaner and simpler > implementation while preserving the core concept. > > Regardless of whether it ultimately gets merged, I hope the discussion > can continue. Same here :) Tao, please don't let this thread get you down. No first RFC is perfect, and the idea still looks worth discussing :) Thanks for working on this! Cheers, Lance
On Tue, Jun 02, 2026 at 10:46:35AM +0800, Lance Yang wrote: > > > On 2026/6/2 10:15, Barry Song wrote: > > On Mon, Jun 1, 2026 at 9:46 AM wangtao <tao.wangtao@honor.com> wrote: > > [...] > > > > > > You said discussion was welcome, yet when someone offered even a > > > small comment, you refused to continue the discussion. > > > > > > If I had known you would be this inconsistent, I would not have > > > replied to you in the first place. > > > > > > This will be my last reply to you. I will not respond again. > > > > > > > Hi Tao, > > > > Please don't walk away from the linux-mm community. I read your > > patchset and found it quite valuable. It not only reduces memory > > overhead, but also eliminates rmap costs for exclusive folios. > > > > Since I'm not very confident discussing technical topics in English, > > I wrote a blog post in Chinese about your patchset: > > > > https://mp.weixin.qq.com/s/k00tzhTl8HbL3k4G6ev4SA > > > > I have to admit that I found the implementation quite complex and > > in need of significant improvement. However, I think the underlying > > idea is very interesting and worth exploring further. > > > > I'm looking forward to seeing a v2 RFC with a cleaner and simpler > > implementation while preserving the core concept. > > > > Regardless of whether it ultimately gets merged, I hope the discussion > > can continue. > > Same here :) > > Tao, please don't let this thread get you down. No first RFC is > perfect, and the idea still looks worth discussing :) > > Thanks for working on this! Guys, this isn't helpful. We aren't extending anon_vma, and I am working on replacing it, that's the bottom line. I have presented compelling evidence suggesting this is AI generated. In response I got more AI-generated nonsense. There's no trust, the code and analysis are all wrong, end of discussion. > > Cheers, Lance > Thanks, Lorenzo P.S. maintainership is utterly thankless, and I don't really expect much in return, but honestly reading this, given the case I've made here, was really quite disappointing.
On Tue, Jun 2, 2026 at 11:37 PM Lorenzo Stoakes <ljs@kernel.org> wrote: > > On Tue, Jun 02, 2026 at 10:46:35AM +0800, Lance Yang wrote: > > > > > > On 2026/6/2 10:15, Barry Song wrote: > > > On Mon, Jun 1, 2026 at 9:46 AM wangtao <tao.wangtao@honor.com> wrote: > > > [...] > > > > > > > > You said discussion was welcome, yet when someone offered even a > > > > small comment, you refused to continue the discussion. > > > > > > > > If I had known you would be this inconsistent, I would not have > > > > replied to you in the first place. > > > > > > > > This will be my last reply to you. I will not respond again. > > > > > > > > > > Hi Tao, > > > > > > Please don't walk away from the linux-mm community. I read your > > > patchset and found it quite valuable. It not only reduces memory > > > overhead, but also eliminates rmap costs for exclusive folios. > > > > > > Since I'm not very confident discussing technical topics in English, > > > I wrote a blog post in Chinese about your patchset: > > > > > > https://mp.weixin.qq.com/s/k00tzhTl8HbL3k4G6ev4SA > > > > > > I have to admit that I found the implementation quite complex and > > > in need of significant improvement. However, I think the underlying > > > idea is very interesting and worth exploring further. > > > > > > I'm looking forward to seeing a v2 RFC with a cleaner and simpler > > > implementation while preserving the core concept. > > > > > > Regardless of whether it ultimately gets merged, I hope the discussion > > > can continue. > > > > Same here :) > > > > Tao, please don't let this thread get you down. No first RFC is > > perfect, and the idea still looks worth discussing :) > > > > Thanks for working on this! > > Guys, this isn't helpful. > > We aren't extending anon_vma, and I am working on replacing it, that's the > bottom line. Not trying to challenge your bottom line. As explained to Harry, I have no doubt about your expertise in rmap and many other mm areas, and I deeply respect your work on rmap. With more discussion, we might gain additional insight and inspiration. What Tao has inspired me with is the idea that if we assume most real-world processes are leaf processes, could we simplify parts of the design? This is why I suggested a v2, to improve the clarity of the cover letter and make the code easier to understand, and to see whether there is something worth considering further, even if it is not suitable for merging. > > I have presented compelling evidence suggesting this is AI generated. In > response I got more AI-generated nonsense. There's no trust, the code and > analysis are all wrong, end of discussion. I am not an AI expert, and I do not really use AI in kernel work, so I am not really sure what counts as AI versus non-AI. Sorry. > > > > > Cheers, Lance > > > > Thanks, Lorenzo > > P.S. maintainership is utterly thankless, and I don't really expect much in > return, but honestly reading this, given the case I've made here, was > really quite disappointing. Understood. I see your position, and I personally have great respect and appreciation for your work on maintenance. Sorry if my words came across as disappointing. Best Regards Barry
On Wed, Jun 03, 2026 at 07:03:53AM +0800, Barry Song wrote: > On Tue, Jun 2, 2026 at 11:37 PM Lorenzo Stoakes <ljs@kernel.org> wrote: > > > > On Tue, Jun 02, 2026 at 10:46:35AM +0800, Lance Yang wrote: > > > > > > > > > On 2026/6/2 10:15, Barry Song wrote: > > > > On Mon, Jun 1, 2026 at 9:46 AM wangtao <tao.wangtao@honor.com> wrote: > > > > [...] > > > > > > > > > > You said discussion was welcome, yet when someone offered even a > > > > > small comment, you refused to continue the discussion. > > > > > > > > > > If I had known you would be this inconsistent, I would not have > > > > > replied to you in the first place. > > > > > > > > > > This will be my last reply to you. I will not respond again. > > > > > > > > > > > > > Hi Tao, > > > > > > > > Please don't walk away from the linux-mm community. I read your > > > > patchset and found it quite valuable. It not only reduces memory > > > > overhead, but also eliminates rmap costs for exclusive folios. > > > > > > > > Since I'm not very confident discussing technical topics in English, > > > > I wrote a blog post in Chinese about your patchset: > > > > > > > > https://mp.weixin.qq.com/s/k00tzhTl8HbL3k4G6ev4SA > > > > > > > > I have to admit that I found the implementation quite complex and > > > > in need of significant improvement. However, I think the underlying > > > > idea is very interesting and worth exploring further. > > > > > > > > I'm looking forward to seeing a v2 RFC with a cleaner and simpler > > > > implementation while preserving the core concept. > > > > > > > > Regardless of whether it ultimately gets merged, I hope the discussion > > > > can continue. > > > > > > Same here :) > > > > > > Tao, please don't let this thread get you down. No first RFC is > > > perfect, and the idea still looks worth discussing :) > > > > > > Thanks for working on this! > > > > Guys, this isn't helpful. > > > > We aren't extending anon_vma, and I am working on replacing it, that's the > > bottom line. > > Not trying to challenge your bottom line. As explained to Harry, I > have no doubt about your expertise in rmap and many other mm > areas, and I deeply respect your work on rmap. Thanks I appreciate that. I don't mean to be 'mean' here, I'm only acting in what I feel are the best interests of mm and the kernel. > > With more discussion, we might gain additional insight and > inspiration. What Tao has inspired me with is the idea that if we > assume most real-world processes are leaf processes, could we > simplify parts of the design? Maybe I didn't express it clearly enough at LSF, but this is entirely a key point of my CoW context design :) It's true most stuff is leaf, and yes we can take advantage of this, and CoW context allows us to do it while also unravelling the issues with anon_vma. I am actually thinking of doing some incremental changes as part of my work possibly if I can. I maybe need to expedite that to bring some clarity to things here... > > This is why I suggested a v2, to improve the clarity of the cover > letter and make the code easier to understand, and to see whether > there is something worth considering further, even if it is not > suitable for merging. Right, I see. Again I'm really trying to tread a fine line here between the technical discussion and not pouring more and more time into a discussion that's not useful to me or the community. See [0] as to my reasoning on this :) [0]:https://lore.kernel.org/all/ah887A5VkXOcmq-g@lucifer/ > > > > > I have presented compelling evidence suggesting this is AI generated. In > > response I got more AI-generated nonsense. There's no trust, the code and > > analysis are all wrong, end of discussion. > > I am not an AI expert, and I do not really use AI in kernel work, > so I am not really sure what counts as AI versus non-AI. Sorry. No worries! > > > > > > > > > Cheers, Lance > > > > > > > Thanks, Lorenzo > > > > P.S. maintainership is utterly thankless, and I don't really expect much in > > return, but honestly reading this, given the case I've made here, was > > really quite disappointing. > > Understood. I see your position, and I personally have great > respect and appreciation for your work on maintenance. Sorry if > my words came across as disappointing. Thanks, appreciate it. And no worries! > > Best Regards > Barry Cheers, Lorenzo
On Tue, Jun 02, 2026 at 04:37:14PM +0100, Lorenzo Stoakes wrote: > On Tue, Jun 02, 2026 at 10:46:35AM +0800, Lance Yang wrote: > > > > > > On 2026/6/2 10:15, Barry Song wrote: > > > On Mon, Jun 1, 2026 at 9:46 AM wangtao <tao.wangtao@honor.com> wrote: > > > [...] > > > > > > > > You said discussion was welcome, yet when someone offered even a > > > > small comment, you refused to continue the discussion. > > > > > > > > If I had known you would be this inconsistent, I would not have > > > > replied to you in the first place. > > > > > > > > This will be my last reply to you. I will not respond again. > > > > > > > > > > Hi Tao, > > > > > > Please don't walk away from the linux-mm community. I read your > > > patchset and found it quite valuable. It not only reduces memory > > > overhead, but also eliminates rmap costs for exclusive folios. > > > > > > Since I'm not very confident discussing technical topics in English, > > > I wrote a blog post in Chinese about your patchset: > > > > > > https://mp.weixin.qq.com/s/k00tzhTl8HbL3k4G6ev4SA > > > > > > I have to admit that I found the implementation quite complex and > > > in need of significant improvement. However, I think the underlying > > > idea is very interesting and worth exploring further. > > > > > > I'm looking forward to seeing a v2 RFC with a cleaner and simpler > > > implementation while preserving the core concept. > > > > > > Regardless of whether it ultimately gets merged, I hope the discussion > > > can continue. > > > > Same here :) > > > > Tao, please don't let this thread get you down. No first RFC is > > perfect, and the idea still looks worth discussing :) > > > > Thanks for working on this! > > Guys, this isn't helpful. > > We aren't extending anon_vma, and I am working on replacing it, that's the > bottom line. > > I have presented compelling evidence suggesting this is AI generated. In > response I got more AI-generated nonsense. There's no trust, the code and > analysis are all wrong, end of discussion. 100% agree. I think plenty of technical/process/etc reasons as to why this idea/contribution is not mergeable have been listed. Overriding this with "keep it up!!!111!11!!" is not helpful. -- Pedro
© 2016 - 2026 Red Hat, Inc.