Hi Jan/Ralf,

Do you have any opinion on the following?

Regards,
Nikhil D

On Wednesday 13 December 2017 11:52 AM, Devshatwar, Nikhil wrote:

Hello all,

I am profiling the impact of reloading a cell on the root cell.

My observation is that the hypercall for cell_load and cell_start ends up suspending the root cell while the operation is being performed.

This causes delays in the execution of a real time application running in the root cell.

I can understand that the cell_suspend might be necessary when creating or destroying cells because it affects resources being used by root cell.

But the loading and starting of other non-root cell can happen with root cell running in parallel.

Was this decision taken to avoid making Jailhouse re-entrant?

If so, we can hold some locks in the hypercall to avoid that

For now, I tried[1 HACK patch] to remove the cell_suspend and cell_resume and it seems to work well.

The correct way would be to suspend only when creating or destroying cells.

Let me know if there will be any repercussions of this change?

diff --git a/hypervisor/control.c b/hypervisor/control.c

index 72d3c7e..a25da91 100644

--- a/hypervisor/control.c

+++ b/hypervisor/control.c

@@ -514,26 +514,21 @@ static int cell_management_prologue(enum management_task task,

        if (cpu_data->cell != &root_cell)

                return -EPERM;

-       cell_suspend(&root_cell, cpu_data);

-

        for_each_cell(*cell_ptr)

                if ((*cell_ptr)->config->id == id)

                        break;

        if (!*cell_ptr) {

-               cell_resume(cpu_data);

                return -ENOENT;

        }

        /* root cell cannot be managed */

        if (*cell_ptr == &root_cell) {

-               cell_resume(cpu_data);

                return -EINVAL;

        }

        if ((task == CELL_DESTROY && !cell_reconfig_ok(*cell_ptr)) ||

            !cell_shutdown_ok(*cell_ptr)) {

-               cell_resume(cpu_data);

                return -EPERM;

        }

@@ -582,8 +577,6 @@ static int cell_start(struct per_cpu *cpu_data, unsigned long id)

        printk("Started cell \"%s\"\n", cell->config->name);

out_resume:

-       cell_resume(cpu_data);

-

        return err;

}

Regards,

Nikhil D


--
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jailhouse-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to