]> www.infradead.org Git - users/jedix/linux-maple.git/log
users/jedix/linux-maple.git
6 days agoforce_more issue, rcu detecting issues split_w_structs
Liam R. Howlett [Wed, 11 Jun 2025 15:01:47 +0000 (11:01 -0400)]
force_more issue, rcu detecting issues

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 weeks agoonly expand null when needed, use right->insert_off instead of r_mas->offset
Liam R. Howlett [Thu, 29 May 2025 01:03:32 +0000 (21:03 -0400)]
only expand null when needed, use right->insert_off instead of r_mas->offset

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 weeks agobetter
Liam R. Howlett [Wed, 28 May 2025 17:41:51 +0000 (13:41 -0400)]
better

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
3 weeks agougg, r_parent max check was wrong
Liam R. Howlett [Tue, 27 May 2025 20:19:02 +0000 (16:19 -0400)]
ugg, r_parent max check was wrong

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
3 weeks agofix end piv extend mess
Liam R. Howlett [Tue, 27 May 2025 20:13:36 +0000 (16:13 -0400)]
fix end piv extend mess

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
3 weeks agofix off by one and new root issue
Liam R. Howlett [Tue, 27 May 2025 19:17:32 +0000 (15:17 -0400)]
fix off by one and new root issue

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
3 weeks agomax s issues
Liam R. Howlett [Fri, 23 May 2025 19:01:45 +0000 (15:01 -0400)]
max s issues

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
3 weeks agofix mni from part gaps
Liam R. Howlett [Fri, 23 May 2025 18:56:33 +0000 (14:56 -0400)]
fix mni from part gaps

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
3 weeks agoforce span of null endings and rewind of sd fixed
Liam R. Howlett [Fri, 23 May 2025 16:28:03 +0000 (12:28 -0400)]
force span of null endings and rewind of sd fixed

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
3 weeks agostill failing but differently
Liam R. Howlett [Fri, 23 May 2025 16:16:40 +0000 (12:16 -0400)]
still failing but differently

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
4 weeks agostill broken on triple split
Liam R. Howlett [Sat, 17 May 2025 00:58:12 +0000 (20:58 -0400)]
still broken on triple split

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
4 weeks agobroken
Liam R. Howlett [Fri, 16 May 2025 16:04:04 +0000 (12:04 -0400)]
broken

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
5 weeks agogaps are too small
Liam R. Howlett [Tue, 13 May 2025 19:07:27 +0000 (15:07 -0400)]
gaps are too small

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
5 weeks agoprogress
Liam R. Howlett [Tue, 13 May 2025 19:02:27 +0000 (15:02 -0400)]
progress

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
5 weeks agowip
Liam R. Howlett [Tue, 13 May 2025 14:41:04 +0000 (10:41 -0400)]
wip

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
5 weeks agospanning store new plan
Liam R. Howlett [Sat, 10 May 2025 04:40:48 +0000 (00:40 -0400)]
spanning store new plan

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
5 weeks agospanning store new plan
Liam R. Howlett [Sat, 10 May 2025 04:40:02 +0000 (00:40 -0400)]
spanning store new plan

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
5 weeks agospan_leaf part
Liam R. Howlett [Wed, 7 May 2025 15:23:12 +0000 (11:23 -0400)]
span_leaf part

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
5 weeks agospanning store mess
Liam R. Howlett [Wed, 7 May 2025 00:13:25 +0000 (20:13 -0400)]
spanning store mess

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
5 weeks agospanning store starts now
Liam R. Howlett [Wed, 7 May 2025 00:09:09 +0000 (20:09 -0400)]
spanning store starts now

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agodrop unused functions
Liam R. Howlett [Tue, 6 May 2025 16:49:53 +0000 (12:49 -0400)]
drop unused functions

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agoFix mns_assemble() undefined behaviour with clang
Liam R. Howlett [Tue, 6 May 2025 16:49:44 +0000 (12:49 -0400)]
Fix mns_assemble() undefined behaviour with clang

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agorename mt_wr_split_data() to split_data_by_state()
Liam R. Howlett [Tue, 6 May 2025 16:31:45 +0000 (12:31 -0400)]
rename mt_wr_split_data() to split_data_by_state()

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agomove left_store to split_data struct
Liam R. Howlett [Tue, 6 May 2025 16:23:21 +0000 (12:23 -0400)]
move left_store to split_data struct

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agomas_wr_rebalance reorg
Liam R. Howlett [Tue, 6 May 2025 16:11:17 +0000 (12:11 -0400)]
mas_wr_rebalance reorg

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agomas_wr_rebalance_reduce() rename
Liam R. Howlett [Tue, 6 May 2025 15:51:17 +0000 (11:51 -0400)]
mas_wr_rebalance_reduce() rename

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agomas_wr_rebalance_two() comment
Liam R. Howlett [Tue, 6 May 2025 15:50:39 +0000 (11:50 -0400)]
mas_wr_rebalance_two() comment

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agorename mas_wr_rebalance_calc()
Liam R. Howlett [Tue, 6 May 2025 15:50:13 +0000 (11:50 -0400)]
rename mas_wr_rebalance_calc()

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agomove mas_wr_rebalance_calc()
Liam R. Howlett [Tue, 6 May 2025 15:48:41 +0000 (11:48 -0400)]
move mas_wr_rebalance_calc()

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agomore cleanup
Liam R. Howlett [Tue, 6 May 2025 15:47:46 +0000 (11:47 -0400)]
more cleanup

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agomas_wr_rebalance_two rename
Liam R. Howlett [Tue, 6 May 2025 15:35:58 +0000 (11:35 -0400)]
mas_wr_rebalance_two rename

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agoditch debug and some cleanup
Liam R. Howlett [Tue, 6 May 2025 15:34:24 +0000 (11:34 -0400)]
ditch debug and some cleanup

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agooff by one\n
Liam R. Howlett [Tue, 6 May 2025 15:13:56 +0000 (11:13 -0400)]
off by one\n

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agostill issues
Liam R. Howlett [Tue, 6 May 2025 14:45:41 +0000 (10:45 -0400)]
still issues

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agoenable all testing again
Liam R. Howlett [Fri, 2 May 2025 20:15:48 +0000 (16:15 -0400)]
enable all testing again

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agorebalance_reduce use split_state_setup
Liam R. Howlett [Fri, 2 May 2025 20:15:33 +0000 (16:15 -0400)]
rebalance_reduce use split_state_setup

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agosplit_state_setup() working better
Liam R. Howlett [Fri, 2 May 2025 20:01:06 +0000 (16:01 -0400)]
split_state_setup() working better

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agofix src offset
Liam R. Howlett [Fri, 2 May 2025 19:30:02 +0000 (15:30 -0400)]
fix src offset

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agoditch mni_insert_part, dst_max_off, unfinished, and use src->offset
Liam R. Howlett [Fri, 2 May 2025 19:26:06 +0000 (15:26 -0400)]
ditch mni_insert_part, dst_max_off, unfinished, and use src->offset

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agoadd state_setup() function
Liam R. Howlett [Fri, 2 May 2025 15:18:20 +0000 (11:18 -0400)]
add state_setup() function

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agorebalance left to right functioning well
Liam R. Howlett [Thu, 1 May 2025 18:26:50 +0000 (14:26 -0400)]
rebalance left to right functioning well

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
6 weeks agomas_wr_rebalance: rebalancing, not reducing
Liam R. Howlett [Wed, 30 Apr 2025 20:12:08 +0000 (16:12 -0400)]
mas_wr_rebalance: rebalancing, not reducing

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
7 weeks agorebalance wip
Liam R. Howlett [Fri, 25 Apr 2025 15:50:07 +0000 (11:50 -0400)]
rebalance wip

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agocode cleanup of try_rebalance
Liam R. Howlett [Wed, 16 Apr 2025 15:54:58 +0000 (11:54 -0400)]
code cleanup of try_rebalance

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agoIntroduce helpers for can_rebalance directions
Liam R. Howlett [Wed, 16 Apr 2025 15:39:06 +0000 (11:39 -0400)]
Introduce helpers for can_rebalance directions

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agooutline
Liam R. Howlett [Wed, 16 Apr 2025 14:53:45 +0000 (10:53 -0400)]
outline

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agocompiles, ship it.
Liam R. Howlett [Wed, 16 Apr 2025 01:02:35 +0000 (21:02 -0400)]
compiles, ship it.

The copy and pasting of code does not work out without an overall plan

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agobroken for now
Liam R. Howlett [Mon, 14 Apr 2025 19:39:23 +0000 (15:39 -0400)]
broken for now

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agorename alloc to is_alloc
Liam R. Howlett [Thu, 10 Apr 2025 19:12:52 +0000 (15:12 -0400)]
rename alloc to is_alloc

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agoma_part -> part and comments
Liam R. Howlett [Thu, 10 Apr 2025 18:43:55 +0000 (14:43 -0400)]
ma_part -> part and comments

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agofinished conversion
Liam R. Howlett [Thu, 10 Apr 2025 18:34:08 +0000 (14:34 -0400)]
finished conversion

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agotry_rebalance converted
Liam R. Howlett [Thu, 10 Apr 2025 18:19:39 +0000 (14:19 -0400)]
try_rebalance converted

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agoconverged converted
Liam R. Howlett [Thu, 10 Apr 2025 18:13:16 +0000 (14:13 -0400)]
converged converted

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agouse split_data struct
Liam R. Howlett [Thu, 10 Apr 2025 15:58:47 +0000 (11:58 -0400)]
use split_data struct

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agowip, cleanup
Liam R. Howlett [Tue, 8 Apr 2025 17:50:28 +0000 (13:50 -0400)]
wip, cleanup

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agomas_wr_split cleanup and some comments
Liam R. Howlett [Tue, 8 Apr 2025 15:07:39 +0000 (11:07 -0400)]
mas_wr_split cleanup and some comments

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agoRevert "remove dead code"
Liam R. Howlett [Tue, 8 Apr 2025 02:02:54 +0000 (22:02 -0400)]
Revert "remove dead code"

This reverts commit b3062ee59ae87e44f81fd309b79c8fbf5660f2db.

2 months agomore printk and dead code
Liam R. Howlett [Tue, 8 Apr 2025 02:00:03 +0000 (22:00 -0400)]
more printk and dead code

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agoremove dead code
Liam R. Howlett [Tue, 8 Apr 2025 01:53:20 +0000 (21:53 -0400)]
remove dead code

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agoremove printk
Liam R. Howlett [Tue, 8 Apr 2025 01:53:01 +0000 (21:53 -0400)]
remove printk

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agoworking new code
Liam R. Howlett [Tue, 8 Apr 2025 01:49:42 +0000 (21:49 -0400)]
working new code

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
2 months agodebug
Liam R. Howlett [Wed, 2 Apr 2025 13:36:49 +0000 (09:36 -0400)]
debug

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
3 months agomas_wr_try_rebalance: Drop dead code
Liam R. Howlett [Fri, 28 Feb 2025 22:28:38 +0000 (17:28 -0500)]
mas_wr_try_rebalance: Drop dead code

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
3 months agomas_split: Drop dead code
Liam R. Howlett [Fri, 28 Feb 2025 22:27:39 +0000 (17:27 -0500)]
mas_split: Drop dead code

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
3 months agomaple_tree: use mt_wr_split_data() in split and try_rebalance
Liam R. Howlett [Fri, 28 Feb 2025 22:27:01 +0000 (17:27 -0500)]
maple_tree: use mt_wr_split_data() in split and try_rebalance

Signed-off-by: Liam R. Howlett <howlett@gmail.com>
3 months agofix rewind for ma_part
Liam R. Howlett [Thu, 27 Feb 2025 18:57:47 +0000 (13:57 -0500)]
fix rewind for ma_part

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
3 months agomas_wr_split using mt_wr_split_data
Liam R. Howlett [Thu, 27 Feb 2025 03:02:30 +0000 (22:02 -0500)]
mas_wr_split using mt_wr_split_data

Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
3 months agomt_wr_split_data()
Liam R. Howlett [Thu, 27 Feb 2025 02:20:19 +0000 (21:20 -0500)]
mt_wr_split_data()

Signed-off-by: Liam R. Howlett <howlett@gmail.com>
3 months agoprogress, I guess Split and reblance testing
Liam R. Howlett [Wed, 19 Feb 2025 02:45:42 +0000 (21:45 -0500)]
progress, I guess  Split and reblance testing

Signed-off-by: Liam R. Howlett <howlett@gmail.com>
4 months agoworking on split rebalance now
Liam R. Howlett [Fri, 14 Feb 2025 20:42:56 +0000 (15:42 -0500)]
working on split rebalance now

Signed-off-by: Liam R. Howlett <howlett@gmail.com>
4 months agowip, moving to struct splitting
Liam R. Howlett [Tue, 11 Feb 2025 17:18:30 +0000 (12:18 -0500)]
wip, moving to struct splitting

Signed-off-by: Liam R. Howlett <howlett@gmail.com>
4 months agorebalance wip
Liam R. Howlett [Tue, 4 Feb 2025 18:05:35 +0000 (13:05 -0500)]
rebalance wip

Signed-off-by: Liam R. Howlett <howlett@gmail.com>
4 months agomas_wr_rebalance() - it compiles new_split_2025
Liam R. Howlett [Mon, 3 Feb 2025 21:04:12 +0000 (16:04 -0500)]
mas_wr_rebalance() - it compiles

Signed-off-by: Liam R. Howlett <howlett@gmail.com>
4 months agomas_destroy_rebalance() whitespace fix
Liam R. Howlett [Thu, 30 Jan 2025 18:42:29 +0000 (13:42 -0500)]
mas_destroy_rebalance() whitespace fix

Signed-off-by: Liam R. Howlett <howlett@gmail.com>
4 months agomas_wr_rebalance_nodes: fix line length
Liam R. Howlett [Mon, 27 Jan 2025 21:10:36 +0000 (16:10 -0500)]
mas_wr_rebalance_nodes: fix line length

Signed-off-by: Liam R. Howlett <howlett@gmail.com>
4 months agotesting/raix-tree/maple: Increase readers and reduce delay for faster machines
Liam R. Howlett [Mon, 27 Jan 2025 20:59:53 +0000 (15:59 -0500)]
testing/raix-tree/maple: Increase readers and reduce delay for faster machines

Signed-off-by: Liam R. Howlett <howlett@gmail.com>
4 months agomas_wr_rebalance for insufficient data
Liam R. Howlett [Mon, 27 Jan 2025 20:56:40 +0000 (15:56 -0500)]
mas_wr_rebalance for insufficient data

Signed-off-by: Liam R. Howlett <howlett@gmail.com>
4 months agodrop mas_wr_rebalance to be re-added clean
Liam R. Howlett [Mon, 27 Jan 2025 20:56:11 +0000 (15:56 -0500)]
drop mas_wr_rebalance to be re-added clean

Signed-off-by: Liam R. Howlett <howlett@gmail.com>
4 months agodrop meaningless return from mas_wr_split
Liam R. Howlett [Thu, 5 Dec 2024 20:49:17 +0000 (15:49 -0500)]
drop meaningless return from mas_wr_split

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
4 months agomaple_tree: Combine mas_parent_gap() into mas_update_gap()
Liam R. Howlett [Sat, 30 Nov 2024 04:54:58 +0000 (23:54 -0500)]
maple_tree: Combine mas_parent_gap() into mas_update_gap()

mas_parent_gap() is used in one location and a lot of what is needed already
exists in the calling function.  Inline the function and dropping the
duplication simplifies the code and reduces the instruction count.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
4 months agomaple_tree: Inline ma_max_gap() in mas_update_gap()
Liam R. Howlett [Sat, 30 Nov 2024 04:30:52 +0000 (23:30 -0500)]
maple_tree: Inline ma_max_gap() in mas_update_gap()

ma_max_gap is called from a single location and can benefit from the
setup in mas_update_gap, so inline it.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
4 months agomaple_tree: Fix ma_dead_node() comment
Liam R. Howlett [Wed, 30 Oct 2024 15:28:08 +0000 (11:28 -0400)]
maple_tree: Fix ma_dead_node() comment

Update the arguemnt description to be accurate.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
4 months agoinline three small functions
Liam R. Howlett [Sat, 30 Nov 2024 04:02:41 +0000 (23:02 -0500)]
inline three small functions

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
4 months agomas_wr_split() Avoid mas_wr_new_end() call
Liam R. Howlett [Sat, 30 Nov 2024 04:01:13 +0000 (23:01 -0500)]
mas_wr_split() Avoid mas_wr_new_end() call

ma_part has the size set to what is needed by examining the same data.
Use ma_part.size instead.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
4 months agotools/testing/radix-tree: Add maple tree fuzzer
Liam R. Howlett [Wed, 23 Aug 2023 16:13:52 +0000 (12:13 -0400)]
tools/testing/radix-tree: Add maple tree fuzzer

This is the introduction of the maple tree fuzzer into the radix-tree
test suite, based heavily on the work of Vasily Gorbik sent in March
2022.

The tester uses the LLVM fuzzer to automate testing of the maple tree by
randomly inserting, storing, deleting, and resetting the tree.  Testing
has been expanded to test both allocation and basic trees.

After building the fuzz-maple target with clang, just run the resulting
executable.  The llvm libfuzzer supports minimizing the steps to
reproduce a crash from a crash file.

Using V=1 on the minimized crash will result in a testcase that can be
added to the lib/test_maple_tree.c test suite.  Using V=2 can help
figure out what is happening to cause the crash.

Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Liam R. Howlett <Liam.Howlett@oracle.com>
4 months agomaple_tree: Use local variable
Liam R. Howlett [Sat, 30 Nov 2024 01:34:34 +0000 (20:34 -0500)]
maple_tree: Use local variable

the maple state variable has already been set up, so use it.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
4 months agoinlineing
Liam R. Howlett [Sat, 30 Nov 2024 01:33:38 +0000 (20:33 -0500)]
inlineing

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
4 months agoalways inlined and such
Liam R. Howlett [Fri, 29 Nov 2024 23:26:03 +0000 (18:26 -0500)]
always inlined and such

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
4 months agomaple_tree: Add skipping slot support
Liam R. Howlett [Fri, 29 Nov 2024 22:15:53 +0000 (17:15 -0500)]
maple_tree: Add skipping slot support

Allow maple node state to jump entire slots when necessary.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
4 months agooptimize a bunch of junk
Liam R. Howlett [Fri, 29 Nov 2024 18:25:18 +0000 (13:25 -0500)]
optimize a bunch of junk

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
4 months agorebalance starts now
Liam R. Howlett [Fri, 29 Nov 2024 15:31:43 +0000 (10:31 -0500)]
rebalance starts now

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
4 months agomaple_tree: Optimise mas_wr_store_entry() and mas_prealloc_calc()
Liam R. Howlett [Fri, 29 Nov 2024 16:28:33 +0000 (11:28 -0500)]
maple_tree: Optimise mas_wr_store_entry() and mas_prealloc_calc()

Rearrange the switch statements so that the more likely code paths are
checked first.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
4 months agomaple_tree: Create new mas_wr_split()
Liam R. Howlett [Mon, 4 Nov 2024 15:32:03 +0000 (10:32 -0500)]
maple_tree: Create new mas_wr_split()

Stop using the large struct big_node and use logic with two allocated
nodes.

Signed-off-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
4 months agofoo
Andrew Morton [Sun, 26 Jan 2025 23:05:03 +0000 (15:05 -0800)]
foo

4 months agomailmap: add an entry for Hamza Mahfooz
Hamza Mahfooz [Mon, 20 Jan 2025 20:56:59 +0000 (15:56 -0500)]
mailmap: add an entry for Hamza Mahfooz

Map my previous work email to my current one.

Link: https://lkml.kernel.org/r/20250120205659.139027-1-hamzamahfooz@linux.microsoft.com
Signed-off-by: Hamza Mahfooz <hamzamahfooz@linux.microsoft.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Hans verkuil <hverkuil@xs4all.nl>
Cc: Matthieu Baerts <matttbe@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
4 months agomm: gup: fix infinite loop within __get_longterm_locked
Zhaoyang Huang [Tue, 21 Jan 2025 02:01:59 +0000 (10:01 +0800)]
mm: gup: fix infinite loop within __get_longterm_locked

We can run into an infinite loop in __get_longterm_locked() when
collect_longterm_unpinnable_folios() finds only folios that are isolated
from the LRU or were never added to the LRU.  This can happen when all
folios to be pinned are never added to the LRU, for example when
vm_ops->fault allocated pages using cma_alloc() and never added them to
the LRU.

We incorrectly update the "collected" variable even if nothing was
collected.  Fix it by incrementing "collected" only when we isolated a
folio and added it to the list of folios to migrate.

Link: https://lkml.kernel.org/r/20250121020159.3636477-1-zhaoyang.huang@unisoc.com
Fixes: 67e139b02d99 ("mm/gup.c: refactor check_and_migrate_movable_pages()")
Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Suggested-by: David Hildenbrand <david@redhat.com>
Cc: Aijun Sun <aijun.sun@unisoc.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
4 months agoocfs2: fix incorrect CPU endianness conversion causing mount failure
Heming Zhao [Tue, 21 Jan 2025 11:22:03 +0000 (19:22 +0800)]
ocfs2: fix incorrect CPU endianness conversion causing mount failure

Commit 23aab037106d ("ocfs2: fix UBSAN warning in ocfs2_verify_volume()")
introduced a regression bug.  The blksz_bits value is already converted to
CPU endian in the previous code; therefore, the code shouldn't use
le32_to_cpu() anymore.

Link: https://lkml.kernel.org/r/20250121112204.12834-1-heming.zhao@suse.com
Fixes: 23aab037106d ("ocfs2: fix UBSAN warning in ocfs2_verify_volume()")
Signed-off-by: Heming Zhao <heming.zhao@suse.com>
Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Cc: Mark Fasheh <mark@fasheh.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Jun Piao <piaojun@huawei.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
4 months agomm: page_isolation: avoid calling folio_hstate() without hugetlb_lock
Liu Shixin [Wed, 22 Jan 2025 06:11:51 +0000 (14:11 +0800)]
mm: page_isolation: avoid calling folio_hstate() without hugetlb_lock

I found a NULL pointer dereference as followed:

 BUG: kernel NULL pointer dereference, address: 0000000000000028
 #PF: supervisor read access in kernel mode
 #PF: error_code(0x0000) - not-present page
 PGD 0 P4D 0
 Oops: Oops: 0000 [#1] SMP PTI
 CPU: 5 UID: 0 PID: 5964 Comm: sh Kdump: loaded Not tainted 6.13.0-dirty #20
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1ubuntu1.
 RIP: 0010:has_unmovable_pages+0x184/0x360
 ...
 Call Trace:
  <TASK>
  set_migratetype_isolate+0xd1/0x180
  start_isolate_page_range+0xd2/0x170
  alloc_contig_range_noprof+0x101/0x660
  alloc_contig_pages_noprof+0x238/0x290
  alloc_gigantic_folio.isra.0+0xb6/0x1f0
  only_alloc_fresh_hugetlb_folio.isra.0+0xf/0x60
  alloc_pool_huge_folio+0x80/0xf0
  set_max_huge_pages+0x211/0x490
  __nr_hugepages_store_common+0x5f/0xe0
  nr_hugepages_store+0x77/0x80
  kernfs_fop_write_iter+0x118/0x200
  vfs_write+0x23c/0x3f0
  ksys_write+0x62/0xe0
  do_syscall_64+0x5b/0x170
  entry_SYSCALL_64_after_hwframe+0x76/0x7e

As has_unmovable_pages() call folio_hstate() without hugetlb_lock, there
is a race to free the HugeTLB page between PageHuge() and folio_hstate().
There is no need to add hugetlb_lock here as the HugeTLB page can be freed
in lot of places.  So it's enough to unfold folio_hstate() and add a check
to avoid NULL pointer dereference for hugepage_migration_supported().

Link: https://lkml.kernel.org/r/20250122061151.578768-1-liushixin2@huawei.com
Fixes: 464c7ffbcb16 ("mm/hugetlb: filter out hugetlb pages if HUGEPAGE migration is not supported.")
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Zi Yan <ziy@nvidia.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Kirill A. Shuemov <kirill.shutemov@linux.intel.com>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Nanyong Sun <sunnanyong@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
4 months agoMAINTAINERS: mailmap: update Yosry Ahmed's email address
Yosry Ahmed [Thu, 23 Jan 2025 23:13:44 +0000 (23:13 +0000)]
MAINTAINERS: mailmap: update Yosry Ahmed's email address

Moving to a linux.dev email address.

Link: https://lkml.kernel.org/r/20250123231344.817358-1-yosry.ahmed@linux.dev
Signed-off-by: Yosry Ahmed <yosry.ahmed@linux.dev>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Nhat Pham <nphamcs@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
4 months agomailmap, docs: update email to carlos.bilbao@kernel.org
Carlos Bilbao [Sat, 11 Jan 2025 16:11:06 +0000 (10:11 -0600)]
mailmap, docs: update email to carlos.bilbao@kernel.org

Update .mailmap to reflect my new (and final) primary email address,
carlos.bilbao@kernel.org.  This ensures consistent attribution in Git
history.  Also update my contact information in file
Documentation/translations/sp_SP/index.rst to help contributors reach out
for Spanish translations.

Link: https://lkml.kernel.org/r/20250111161110.862131-1-carlos.bilbao@kernel.org
Signed-off-by: Carlos Bilbao <carlos.bilbao@kernel.org>
Cc: Avadhut Naik <avadhut.naik@amd.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>