maple_tree: Fix handle of invalidated state in mas_wr_store_setup()
Subsystems (3)
PATCH 1/1 maple_tree: Fix handle of invalidated state in mas_wr_store_setup()
If an invalidated maple state is encountered during write, reset the maple state to MAS_START. This will result in a re-walk of the tree to the correct location for the write.
--- lib/maple_tree.c | 3 +++ 1 file changed, 3 insertions(+)
lib/maple_tree.c +3 -0
@@ -5620,6 +5620,9 @@ static inline void mte_destroy_walk(struct maple_enode *enode,static void mas_wr_store_setup (struct ma_wr_state *wr_mas) { +if (unlikely (mas_is_paused (wr_mas->mas))) +mas_reset (wr_mas->mas); +if (!mas_is_start (wr_mas->mas)) {if (mas_is_none (wr_mas->mas)) {mas_reset (wr_mas->mas);
Signature · 1 line
2.35.1
Quoted 7 lines · On Mon, 9 Jan 2023 16:55:42 +0000 Liam Howlett <[email protected]> wrote:
If an invalidated maple state is encountered during write, reset the maple state to
MAS_START. This will result in a re-walk of the tree to the correct location for the write.Reported-by SeongJae Park <[email protected]>Signed-off-by Liam R. Howlett <[email protected]>
I confirmed this patch fixes the boot failure issue. Nevertheless, the 'make install' issue on my system is still not fixed.
Thanks,
SJ
Quoted 21 lines
--- lib/maple_tree.c | 3 +++ 1 file changed, 3 insertions(+)lib/maple_tree.c +3
-0@@ -5620,6 +5620,9 @@ static inline void mte_destroy_walk(struct maple_enode *enode,static void mas_wr_store_setup (struct ma_wr_state *wr_mas) { +if (unlikely (mas_is_paused (wr_mas->mas))) +mas_reset (wr_mas->mas); +if (!mas_is_start (wr_mas->mas)) {if (mas_is_none (wr_mas->mas)) {mas_reset (wr_mas->mas);Signature · 1 line
2.35.1
Andrew Morton
maintainerQuoted 5 lines · On Mon, 9 Jan 2023 19:22:48 +0000 SeongJae Park <[email protected]> wrote:
Quoted 3 lines · On Mon, 9 Jan 2023 16:55:42 +0000 Liam Howlett <[email protected]> wrote:
If an invalidated maple state is encountered during write, reset the maple state to
MAS_START. This will result in a re-walk of the tree to the correct location for the write.
Can we think of a Fixes: for this?
Quoted 8 lines
Quoted 3 lines
Reported-by SeongJae Park <[email protected]>Signed-off-by Liam R. Howlett <[email protected]>Tested-by SeongJae Park <[email protected]>I confirmed this patch fixes the boot failure issue. Nevertheless, the 'make install' issue on my system is still not fixed.
Is this a mainline issue or an mm-unstable issue?
Hi Andrew,
Quoted 14 lines · On Mon, 9 Jan 2023 15:40:12 -0800 Andrew Morton <[email protected]>…
Quoted 5 lines · On Mon, 9 Jan 2023 19:22:48 +0000 SeongJae Park <[email protected]> wrote:
Quoted 3 lines · On Mon, 9 Jan 2023 16:55:42 +0000 Liam Howlett <[email protected]> wrote:
If an invalidated maple state is encountered during write, reset the maple state to
MAS_START. This will result in a re-walk of the tree to the correct location for the write.Can we think of a Fixes: for this?
Quoted 4 lines
Quoted 3 lines
Reported-by SeongJae Park <[email protected]>Signed-off-by Liam R. Howlett <[email protected]>
Quoted 6 lines
Quoted 4 lines
Tested-by SeongJae Park <[email protected]>I confirmed this patch fixes the boot failure issue. Nevertheless, the 'make install' issue on my system is still not fixed.
Is this a mainline issue or an mm-unstable issue?
It's mm-unstable issue:
https://lore.kernel.org/linux-mm/[email protected]/
Thanks,
SJ
Quoted 13 lines · SeongJae Park
Hi Andrew,
Quoted 9 lines · On Mon, 9 Jan 2023 15:40:12 -0800 Andrew Morton <[email protected]>…
Quoted 5 lines · On Mon, 9 Jan 2023 19:22:48 +0000 SeongJae Park <[email protected]> wrote:
Quoted 3 lines · On Mon, 9 Jan 2023 16:55:42 +0000 Liam Howlett <[email protected]> wrote:
If an invalidated maple state is encountered during write, reset the maple state to
MAS_START. This will result in a re-walk of the tree to the correct location for the write.Can we think of a Fixes: for this?
It wasn't really an issue until I wrote the vma iterator store function.
You can put this before (mm-unstable git id..) 9df3d25a97ec ("mm: expand vma iterator interface")
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Reported-by SeongJae Park <[email protected]>Signed-off-by Liam R. Howlett <[email protected]>Tested-by SeongJae Park <[email protected]>
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
I confirmed this patch fixes the boot failure issue. Nevertheless, the 'make install' issue on my system is still not fixed.
Is this a mainline issue or an mm-unstable issue?
It's mm-unstable issue:
https://lore.kernel.org/linux-mm/[email protected]/
Yes, just mm-unstable.
Andrew Morton
maintainerQuoted 13 lines · On Tue, 10 Jan 2023 14:21:15 +0000 Liam Howlett <[email protected]> wrote:
Quoted 12 lines · SeongJae Park
Hi Andrew,
Quoted 8 lines · On Mon, 9 Jan 2023 15:40:12 -0800 Andrew Morton <[email protected]>…
Quoted 5 lines · On Mon, 9 Jan 2023 19:22:48 +0000 SeongJae Park <[email protected]> wrote:
Quoted 3 lines · On Mon, 9 Jan 2023 16:55:42 +0000 Liam Howlett <[email protected]> wrote:
If an invalidated maple state is encountered during write, reset the maple state to
MAS_START. This will result in a re-walk of the tree to the correct location for the write.
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Can we think of a Fixes: for this?
It wasn't really an issue until I wrote the vma iterator store function.
You can put this before (mm-unstable git id..)
9df3d25a97ec("mm: expand vma iterator interface")
I have dropped "mm: expand vma iterator interface"'s series. Should we retain this patch as a standalone thing and is the changelog still appropriate?
Quoted 20 lines · Andrew Morton
Quoted 18 lines · On Tue, 10 Jan 2023 14:21:15 +0000 Liam Howlett <[email protected]> wrote:
Quoted 13 lines · SeongJae Park
Hi Andrew,
Quoted 9 lines · On Mon, 9 Jan 2023 15:40:12 -0800 Andrew Morton <[email protected]>…
Quoted 5 lines · On Mon, 9 Jan 2023 19:22:48 +0000 SeongJae Park <[email protected]> wrote:
Quoted 3 lines · On Mon, 9 Jan 2023 16:55:42 +0000 Liam Howlett <[email protected]> wrote:
If an invalidated maple state is encountered during write, reset the maple state to
MAS_START. This will result in a re-walk of the tree to the correct location for the write.Can we think of a Fixes: for this?
It wasn't really an issue until I wrote the vma iterator store function.
Quoted 6 lines
Quoted 2 lines
You can put this before (mm-unstable git id..)
9df3d25a97ec("mm: expand vma iterator interface")I have dropped "mm: expand vma iterator interface"'s series. Should we retain this patch as a standalone thing and is the changelog still appropriate?
No, just drop it and I'll re-spin v3 to include maple tree fixes on the top.