[PATCH v3 0/4] Optimize the fast path of mas_store()

Peng Zhang posted 4 patches 2 years, 7 months ago
There is a newer version of this series
lib/maple_tree.c                 | 69 +++++++++++++++++++----------
lib/test_maple_tree.c            | 65 +++++++++++++++++++++++++++
tools/testing/radix-tree/maple.c | 75 ++++++++++++++++++++++++++++++++
3 files changed, 186 insertions(+), 23 deletions(-)
[PATCH v3 0/4] Optimize the fast path of mas_store()
Posted by Peng Zhang 2 years, 7 months ago
Add fast paths for mas_wr_append() and mas_wr_slot_store() respectively.
The newly added fast path of mas_wr_append() is used in fork() and how
much it benefits fork() depends on how many VMAs are duplicated.

Changes since v2:
 - Add test for expanding range in RCU mode. [2/4]

v1: https://lore.kernel.org/lkml/20230602075353.5917-1-zhangpeng.00@bytedance.com/
v2: https://lore.kernel.org/lkml/20230609120347.63936-1-zhangpeng.00@bytedance.com/

Peng Zhang (4):
  maple_tree: add test for mas_wr_modify() fast path
  maple_tree: add test for expanding range in RCU mode
  maple_tree: optimize mas_wr_append(), also improve duplicating VMAs
  maple_tree: add a fast path case in mas_wr_slot_store()

 lib/maple_tree.c                 | 69 +++++++++++++++++++----------
 lib/test_maple_tree.c            | 65 +++++++++++++++++++++++++++
 tools/testing/radix-tree/maple.c | 75 ++++++++++++++++++++++++++++++++
 3 files changed, 186 insertions(+), 23 deletions(-)

-- 
2.20.1
Re: [PATCH v3 0/4] Optimize the fast path of mas_store()
Posted by Liam R. Howlett 2 years, 7 months ago
* Peng Zhang <zhangpeng.00@bytedance.com> [230615 04:43]:
> Add fast paths for mas_wr_append() and mas_wr_slot_store() respectively.
> The newly added fast path of mas_wr_append() is used in fork() and how
> much it benefits fork() depends on how many VMAs are duplicated.
> 
> Changes since v2:
>  - Add test for expanding range in RCU mode. [2/4]

Apologies for the late review, other tasks had me held up.

Dropping the RCU flag from your test makes your test fail as expected.
It also fails if we alter the code to not check the rcu flag.  So your
test works and I'm happy with your changes.

Please remove the statement from the change log in patch 4 regarding
testing since you have fixed testing and add:

Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>

For the whole patch series.


> 
> v1: https://lore.kernel.org/lkml/20230602075353.5917-1-zhangpeng.00@bytedance.com/
> v2: https://lore.kernel.org/lkml/20230609120347.63936-1-zhangpeng.00@bytedance.com/
> 
> Peng Zhang (4):
>   maple_tree: add test for mas_wr_modify() fast path
>   maple_tree: add test for expanding range in RCU mode
>   maple_tree: optimize mas_wr_append(), also improve duplicating VMAs
>   maple_tree: add a fast path case in mas_wr_slot_store()
> 
>  lib/maple_tree.c                 | 69 +++++++++++++++++++----------
>  lib/test_maple_tree.c            | 65 +++++++++++++++++++++++++++
>  tools/testing/radix-tree/maple.c | 75 ++++++++++++++++++++++++++++++++
>  3 files changed, 186 insertions(+), 23 deletions(-)
> 
> -- 
> 2.20.1
> 
>
Re: [PATCH v3 0/4] Optimize the fast path of mas_store()
Posted by Peng Zhang 2 years, 7 months ago

在 2023/6/15 16:42, Peng Zhang 写道:
> Add fast paths for mas_wr_append() and mas_wr_slot_store() respectively.
> The newly added fast path of mas_wr_append() is used in fork() and how
> much it benefits fork() depends on how many VMAs are duplicated.
> 
> Changes since v2:
>   - Add test for expanding range in RCU mode. [2/4]
> 
> v1: https://lore.kernel.org/lkml/20230602075353.5917-1-zhangpeng.00@bytedance.com/
> v2: https://lore.kernel.org/lkml/20230609120347.63936-1-zhangpeng.00@bytedance.com/
> 
> Peng Zhang (4):
>    maple_tree: add test for mas_wr_modify() fast path
>    maple_tree: add test for expanding range in RCU mode
>    maple_tree: optimize mas_wr_append(), also improve duplicating VMAs
>    maple_tree: add a fast path case in mas_wr_slot_store()
> 
>   lib/maple_tree.c                 | 69 +++++++++++++++++++----------
>   lib/test_maple_tree.c            | 65 +++++++++++++++++++++++++++
>   tools/testing/radix-tree/maple.c | 75 ++++++++++++++++++++++++++++++++
>   3 files changed, 186 insertions(+), 23 deletions(-)
> 
Hi Andrew,

I think this patchset can be queued for testing.
Both v2 and v3 just update the test code.