mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-26 15:31:35 +00:00
HV: remove one lock for ctx->flags operation.
for ctx->flags is protected by scheduler lock, so not need to set lock again. Tracked-On: #3130 Signed-off-by: Minggui Cao <minggui.cao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
fc1cbebe31
commit
9b7dee90a6
@ -112,7 +112,7 @@ void make_reschedule_request(uint16_t pcpu_id, uint16_t delmode)
|
|||||||
{
|
{
|
||||||
struct sched_context *ctx = &per_cpu(sched_ctx, pcpu_id);
|
struct sched_context *ctx = &per_cpu(sched_ctx, pcpu_id);
|
||||||
|
|
||||||
bitmap_set_lock(NEED_RESCHEDULE, &ctx->flags);
|
bitmap_set_nolock(NEED_RESCHEDULE, &ctx->flags);
|
||||||
if (get_pcpu_id() != pcpu_id) {
|
if (get_pcpu_id() != pcpu_id) {
|
||||||
switch (delmode) {
|
switch (delmode) {
|
||||||
case DEL_MODE_IPI:
|
case DEL_MODE_IPI:
|
||||||
@ -192,7 +192,7 @@ void schedule(void)
|
|||||||
|
|
||||||
get_schedule_lock(pcpu_id);
|
get_schedule_lock(pcpu_id);
|
||||||
next = get_next_sched_obj(ctx);
|
next = get_next_sched_obj(ctx);
|
||||||
bitmap_clear_lock(NEED_RESCHEDULE, &ctx->flags);
|
bitmap_clear_nolock(NEED_RESCHEDULE, &ctx->flags);
|
||||||
|
|
||||||
if (prev == next) {
|
if (prev == next) {
|
||||||
release_schedule_lock(pcpu_id);
|
release_schedule_lock(pcpu_id);
|
||||||
|
Loading…
Reference in New Issue
Block a user