Skip to content

Commit 838cd1e

Browse files
committed
Rebuild rocky9_6 with kernel-5.14.0-570.17.1.el9_6
Rebuild_History BUILDABLE Rebuilding Kernel from rpm changelog with Fuzz Limit: 87.50% Number of commits in upstream range v5.14~1..kernel-mainline: 296506 Number of commits in rpm: 40 Number of commits matched with upstream: 37 (92.50%) Number of commits in upstream but not in rpm: 296469 Number of commits NOT found in upstream: 3 (7.50%) Rebuilding Kernel on Branch rocky9_6_rebuild_kernel-5.14.0-570.17.1.el9_6 for kernel-5.14.0-570.17.1.el9_6 Clean Cherry Picks: 35 (94.59%) Empty Cherry Picks: 2 (5.41%) _______________________________ Full Details Located here: ciq/ciq_backports/kernel-5.14.0-570.17.1.el9_6/rebuild.details.txt Includes: * git commit header above * Empty Commits with upstream SHA * RPM ChangeLog Entries that could not be matched Individual Empty Commit failures contained in the same containing directory. The git message for empty commits will have the path for the failed commit. File names are the first 8 characters of the upstream SHA
1 parent c42faa6 commit 838cd1e

31 files changed

+419
-127136
lines changed
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
3+
====================
4+
Union-Find in Linux
5+
====================
6+
7+
8+
:Date: June 21, 2024
9+
:Author: Xavier <[email protected]>
10+
11+
What is union-find, and what is it used for?
12+
------------------------------------------------
13+
14+
Union-find is a data structure used to handle the merging and querying
15+
of disjoint sets. The primary operations supported by union-find are:
16+
17+
Initialization: Resetting each element as an individual set, with
18+
each set's initial parent node pointing to itself.
19+
Find: Determine which set a particular element belongs to, usually by
20+
returning a “representative element” of that set. This operation
21+
is used to check if two elements are in the same set.
22+
Union: Merge two sets into one.
23+
24+
As a data structure used to maintain sets (groups), union-find is commonly
25+
utilized to solve problems related to offline queries, dynamic connectivity,
26+
and graph theory. It is also a key component in Kruskal's algorithm for
27+
computing the minimum spanning tree, which is crucial in scenarios like
28+
network routing. Consequently, union-find is widely referenced. Additionally,
29+
union-find has applications in symbolic computation, register allocation,
30+
and more.
31+
32+
Space Complexity: O(n), where n is the number of nodes.
33+
34+
Time Complexity: Using path compression can reduce the time complexity of
35+
the find operation, and using union by rank can reduce the time complexity
36+
of the union operation. These optimizations reduce the average time
37+
complexity of each find and union operation to O(α(n)), where α(n) is the
38+
inverse Ackermann function. This can be roughly considered a constant time
39+
complexity for practical purposes.
40+
41+
This document covers use of the Linux union-find implementation. For more
42+
information on the nature and implementation of union-find, see:
43+
44+
Wikipedia entry on union-find
45+
https://en.wikipedia.org/wiki/Disjoint-set_data_structure
46+
47+
Linux implementation of union-find
48+
-----------------------------------
49+
50+
Linux's union-find implementation resides in the file "lib/union_find.c".
51+
To use it, "#include <linux/union_find.h>".
52+
53+
The union-find data structure is defined as follows::
54+
55+
struct uf_node {
56+
struct uf_node *parent;
57+
unsigned int rank;
58+
};
59+
60+
In this structure, parent points to the parent node of the current node.
61+
The rank field represents the height of the current tree. During a union
62+
operation, the tree with the smaller rank is attached under the tree with the
63+
larger rank to maintain balance.
64+
65+
Initializing union-find
66+
--------------------
67+
68+
You can complete the initialization using either static or initialization
69+
interface. Initialize the parent pointer to point to itself and set the rank
70+
to 0.
71+
Example::
72+
73+
struct uf_node my_node = UF_INIT_NODE(my_node);
74+
or
75+
uf_node_init(&my_node);
76+
77+
Find the Root Node of union-find
78+
--------------------------------
79+
80+
This operation is mainly used to determine whether two nodes belong to the same
81+
set in the union-find. If they have the same root, they are in the same set.
82+
During the find operation, path compression is performed to improve the
83+
efficiency of subsequent find operations.
84+
Example::
85+
86+
int connected;
87+
struct uf_node *root1 = uf_find(&node_1);
88+
struct uf_node *root2 = uf_find(&node_2);
89+
if (root1 == root2)
90+
connected = 1;
91+
else
92+
connected = 0;
93+
94+
Union Two Sets in union-find
95+
----------------------------
96+
97+
To union two sets in the union-find, you first find their respective root nodes
98+
and then link the smaller node to the larger node based on the rank of the root
99+
nodes.
100+
Example::
101+
102+
uf_union(&node_1, &node_2);
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
.. SPDX-License-Identifier: GPL-2.0
2+
.. include:: ../disclaimer-zh_CN.rst
3+
4+
:Original: Documentation/core-api/union_find.rst
5+
6+
===========================
7+
Linux中的并查集(Union-Find)
8+
===========================
9+
10+
11+
:日期: 2024年6月21日
12+
:作者: Xavier <[email protected]>
13+
14+
何为并查集,它有什么用?
15+
---------------------
16+
17+
并查集是一种数据结构,用于处理一些不交集的合并及查询问题。并查集支持的主要操作:
18+
初始化:将每个元素初始化为单独的集合,每个集合的初始父节点指向自身
19+
查询:查询某个元素属于哪个集合,通常是返回集合中的一个“代表元素”。这个操作是为
20+
了判断两个元素是否在同一个集合之中。
21+
合并:将两个集合合并为一个。
22+
23+
并查集作为一种用于维护集合(组)的数据结构,它通常用于解决一些离线查询、动态连通性和
24+
图论等相关问题,同时也是用于计算最小生成树的克鲁斯克尔算法中的关键,由于最小生成树在
25+
网络路由等场景下十分重要,并查集也得到了广泛的引用。此外,并查集在符号计算,寄存器分
26+
配等方面也有应用。
27+
28+
空间复杂度: O(n),n为节点数。
29+
30+
时间复杂度:使用路径压缩可以减少查找操作的时间复杂度,使用按秩合并可以减少合并操作的
31+
时间复杂度,使得并查集每个查询和合并操作的平均时间复杂度仅为O(α(n)),其中α(n)是反阿
32+
克曼函数,可以粗略地认为并查集的操作有常数的时间复杂度。
33+
34+
本文档涵盖了对Linux并查集实现的使用方法。更多关于并查集的性质和实现的信息,参见:
35+
36+
维基百科并查集词条
37+
https://en.wikipedia.org/wiki/Disjoint-set_data_structure
38+
39+
并查集的Linux实现
40+
----------------
41+
42+
Linux的并查集实现在文件“lib/union_find.c”中。要使用它,需要
43+
“#include <linux/union_find.h>”。
44+
45+
并查集的数据结构定义如下::
46+
47+
struct uf_node {
48+
struct uf_node *parent;
49+
unsigned int rank;
50+
};
51+
其中parent为当前节点的父节点,rank为当前树的高度,在合并时将rank小的节点接到rank大
52+
的节点下面以增加平衡性。
53+
54+
初始化并查集
55+
---------
56+
57+
可以采用静态或初始化接口完成初始化操作。初始化时,parent 指针指向自身,rank 设置
58+
为 0。
59+
示例::
60+
61+
struct uf_node my_node = UF_INIT_NODE(my_node);
62+
63+
uf_node_init(&my_node);
64+
65+
查找并查集的根节点
66+
----------------
67+
68+
主要用于判断两个并查集是否属于一个集合,如果根相同,那么他们就是一个集合。在查找过程中
69+
会对路径进行压缩,提高后续查找效率。
70+
示例::
71+
72+
int connected;
73+
struct uf_node *root1 = uf_find(&node_1);
74+
struct uf_node *root2 = uf_find(&node_2);
75+
if (root1 == root2)
76+
connected = 1;
77+
else
78+
connected = 0;
79+
80+
合并两个并查集
81+
-------------
82+
83+
对于两个相交的并查集进行合并,会首先查找它们各自的根节点,然后根据根节点秩大小,将小的
84+
节点连接到大的节点下面。
85+
示例::
86+
87+
uf_union(&node_1, &node_2);

MAINTAINERS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19852,6 +19852,15 @@ F: drivers/staging/unisys/
1985219852
F: drivers/visorbus/
1985319853
F: include/linux/visorbus.h
1985419854

19855+
UNION-FIND
19856+
M: Xavier <[email protected]>
19857+
19858+
S: Maintained
19859+
F: Documentation/core-api/union_find.rst
19860+
F: Documentation/translations/zh_CN/core-api/union_find.rst
19861+
F: include/linux/union_find.h
19862+
F: lib/union_find.c
19863+
1985519864
UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER
1985619865
R: Alim Akhtar <[email protected]>
1985719866
R: Avri Altman <[email protected]>

Makefile.rhelver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RHEL_MINOR = 6
1212
#
1313
# Use this spot to avoid future merge conflicts.
1414
# Do not trim this comment.
15-
RHEL_RELEASE = 570.16.1
15+
RHEL_RELEASE = 570.17.1
1616

1717
#
1818
# ZSTREAM
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Rebuild_History BUILDABLE
2+
Rebuilding Kernel from rpm changelog with Fuzz Limit: 87.50%
3+
Number of commits in upstream range v5.14~1..kernel-mainline: 296506
4+
Number of commits in rpm: 40
5+
Number of commits matched with upstream: 37 (92.50%)
6+
Number of commits in upstream but not in rpm: 296469
7+
Number of commits NOT found in upstream: 3 (7.50%)
8+
9+
Rebuilding Kernel on Branch rocky9_6_rebuild_kernel-5.14.0-570.17.1.el9_6 for kernel-5.14.0-570.17.1.el9_6
10+
Clean Cherry Picks: 35 (94.59%)
11+
Empty Cherry Picks: 2 (5.41%)
12+
_______________________________
13+
14+
__EMPTY COMMITS__________________________
15+
93c8332c8373fee415bd79f08d5ba4ba7ca5ad15 Union-Find: add a new module in kernel library
16+
a22b3d54de94f82ca057cc2ebf9496fa91ebf698 cgroup/cpuset: Fix race between newly created partition and dying one
17+
18+
__CHANGES NOT IN UPSTREAM________________
19+
Porting to Rocky Linux 9, debranding and Rocky branding'
20+
Ensure aarch64 kernel is not compressed'
21+
cgroup/cpuset: Add warnings to catch inconsistency in exclusive CPUs

0 commit comments

Comments
 (0)