[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] gic:vgic: avoid excessive conversions




On 19.11.18 15:54, Julien Grall wrote:
You didn't get my point. You removed a parameter without explaining why it is fine.

It is a pure optimization. If you look through the code, you can see that callers of these functions already have a correspondent `struct pending_irq` pointer. But they pass irq number (and priority) to gic_raise_guest_irq/gic_raise_inflight_irq so that they should calculate the pointer again, what is suboptimal.


In that context, the caller for LPI is using lpi_priority.
What in its turn is not taken into consideration by the current `gic_raise_guest_irq` function implementation. Even clearly ignored, because the priority abstraction is only needed by `gic_add_to_lr_pending` to insert a pending irq into `lr_queue`, but it does ordering by `p->priority` only.

With your change, it is becoming issue with the interface because it may not pass the correct things.

Now the interface of `gic_raise_guest_irq` function corresponds to its implementation in addition to optimization.


So this not a cleanup and there must be a reason why lpi_priority was passed instead of priority.

Moreover, if one would like or plan to honor lpi_priority in `gic_raise_guest_irq`, he can freely extract it from a pending_irq structure. It is still there.


--

Sincerely,
Andrii Anisov.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.