summaryrefslogtreecommitdiff
path: root/drivers/pps/kapi.c
diff options
context:
space:
mode:
authorWei Yang <richard.weiyang@gmail.com>2024-11-13 03:16:14 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-21 13:49:55 +0100
commit09b288fb7f4eaf91e441b9cd6d488cbac77d8de5 (patch)
tree56b3514c7073ec9a70a705aeb6509d5e7a5cb855 /drivers/pps/kapi.c
parentc4720d0490ca395891bc950639779f10860837ae (diff)
downloadlinux-09b288fb7f4eaf91e441b9cd6d488cbac77d8de5.tar.gz
linux-09b288fb7f4eaf91e441b9cd6d488cbac77d8de5.tar.bz2
linux-09b288fb7f4eaf91e441b9cd6d488cbac77d8de5.zip
maple_tree: simplify split calculation
commit 4f6a6bed0bfef4b966f076f33eb4f5547226056a upstream. Patch series "simplify split calculation", v3. This patch (of 3): The current calculation for splitting nodes tries to enforce a minimum span on the leaf nodes. This code is complex and never worked correctly to begin with, due to the min value being passed as 0 for all leaves. The calculation should just split the data as equally as possible between the new nodes. Note that b_end will be one more than the data, so the left side is still favoured in the calculation. The current code may also lead to a deficient node by not leaving enough data for the right side of the split. This issue is also addressed with the split calculation change. [Liam.Howlett@Oracle.com: rephrase the change log] Link: https://lkml.kernel.org/r/20241113031616.10530-1-richard.weiyang@gmail.com Link: https://lkml.kernel.org/r/20241113031616.10530-2-richard.weiyang@gmail.com Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Wei Yang <richard.weiyang@gmail.com> Reviewed-by: Liam R. Howlett <Liam.Howlett@Oracle.com> Cc: Sidhartha Kumar <sidhartha.kumar@oracle.com> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pps/kapi.c')
0 files changed, 0 insertions, 0 deletions