[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH V1 04/12] xen/arm: Introduce arch specific bits for IOREQ/DM features
 
- To: Julien Grall <julien@xxxxxxx>
 
- From: Oleksandr <olekstysh@xxxxxxxxx>
 
- Date: Mon, 10 Aug 2020 21:21:58 +0300
 
- Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
 
- Delivery-date: Mon, 10 Aug 2020 18:22:03 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
Hi
 
 
 
@@ -2275,6 +2282,16 @@ static void check_for_vcpu_work(void)
   */
  void leave_hypervisor_to_guest(void)
  {
+#ifdef CONFIG_IOREQ_SERVER
+    /*
+     * XXX: Check the return. Shall we call that in
+     * continue_running and context_switch instead?
+     * The benefits would be to avoid calling
+     * handle_hvm_io_completion on every return.
+     */
 
Yeah, that could be a simple and good optimization
 
 
 Well, it is not simple as it is sounds :). handle_hvm_io_completion() 
is the function in charge to mark the vCPU as waiting for I/O. So we 
would at least need to split the function.
 I wrote this TODO because I wasn't sure about the complexity of 
handle_hvm_io_completion(current). Looking at it again, the main 
complexity is the looping over the IOREQ servers.
 I think it would be better to optimize handle_hvm_io_completion() 
rather than trying to hack the context_switch() or continue_running().
 Well, is the idea in proposed dirty test patch below close to what you 
expect? Patch optimizes handle_hvm_io_completion() to avoid extra 
actions if vcpu's domain doesn't have ioreq_server, alternatively
the check could be moved out of handle_hvm_io_completion() to avoid 
calling that function at all. BTW, TODO also suggests checking the 
return value of handle_hvm_io_completion(), but I am completely sure 
we can simply
just return from leave_hypervisor_to_guest() at this point. 
 
 Sorry, made a mistake in last sentence).  s / I am completely sure / I 
am not completely sure
--
Regards,
Oleksandr Tyshchenko
 
 
    
     |