From: Andrii Anisov <andrii.anisov@gmail.com>
To: Julien Grall <julien.grall@gmail.com>
Cc: xen-devel@lists.xenproject.org,
Julien Grall <julien.grall@arm.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Andrii Anisov <andrii_anisov@epam.com>
Subject: Re: [PATCH] gic:vgic: avoid excessive conversions
Date: Mon, 19 Nov 2018 17:48:31 +0200 [thread overview]
Message-ID: <1046e6f5-1608-0d94-8bfd-668fe21cf5e3@gmail.com> (raw)
In-Reply-To: <CAF3u54Agc7Yw5KRfaiLdP7pb06_Pj-RcajD+VUFsQJCwMyb7TA@mail.gmail.com>
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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-11-19 15:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-16 16:45 [PATCH] gic:vgic: avoid excessive conversions Andrii Anisov
2018-11-16 17:27 ` Julien Grall
2018-11-19 12:02 ` Andrii Anisov
2018-11-19 13:54 ` Julien Grall
2018-11-19 15:48 ` Andrii Anisov [this message]
2018-11-20 11:09 ` Andrii Anisov
2018-12-19 10:49 ` Andrii Anisov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1046e6f5-1608-0d94-8bfd-668fe21cf5e3@gmail.com \
--to=andrii.anisov@gmail.com \
--cc=andrii_anisov@epam.com \
--cc=julien.grall@arm.com \
--cc=julien.grall@gmail.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).