Commit 50bfc6ff authored by Tang Yizhou's avatar Tang Yizhou Committed by Yang Yingliang
Browse files

share_pool: Redesign sp_alloc pass through

ascend inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I4EUVI


CVE: NA

-------------------------------------------------

The requirement of sp_alloc pass through was not proposed in the
original design and the first implementation confused many people.

When a process not in any sp group calls sp_alloc, it enters pass
through procedure. In the first implementation, this process is added to
a special sp group which id is between [SPG_ID_DVPP_PASS_THROUGH_MIN,
SPG_ID_DVPP_PASS_THROUGH_MAX]. The main benefit is that most procedure
of sp_alloc can be reused directly.

However, many code reviewers feel confused because of the sp group.
The call of sp_group_add_task in sp_alloc is not only abrupt but also
buggy. Moreover, a process once in sp alloc pass through procedure
can't be added to any sp groups later because it is already in a special
sp group. This is a scalability limitation.

Idealy, sp_alloc pass through procedure doesn't need any sp group.
That's why we decide to redesign it with spg_none, which manages all
accounting statistics of sp_areas generated by sp_alloc pass through and
k2u_task but contains none.

Signed-off-by: default avatarTang Yizhou <tangyizhou@huawei.com>
Reviewed-by: default avatarDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: default avatarZhou Guanghui <zhouguanghui1@huawei.com>
Reviewed-by: default avatarWeilong Chen <chenweilong@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent ba1e7e4c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment