public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* (no subject)
@ 2013-12-31 15:15 Konrad Rzeszutek Wilk
  2013-12-31 15:15 ` [PATCH] xen/grant-table: Force to use v1 of grants Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 8+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-12-31 15:15 UTC (permalink / raw)
  To: xen-devel, linux-kernel

This had been posted way way back:  https://lkml.org/lkml/2013/1/16/696

and the discussion about it was:
 - If there are no uses of v2, then why not rip out the support for it.
   [b/c the work for it would be in the networking code and I am still
    hoping that will be done?]
 - Why not do all of this in the toolstack. Enforce that the guest
   can only use v1 ".. if the backend isn't going to make use of them."
   (Matt).
   I am not sure how one would set up the plumbing to properly figure out
   whether the backend (say a driver domain) would communicate to hypervisor
   or XenBus that it is going to use v1 only if it has not yet started.
   (It would not have started b/c the guest hasn't started yet).

   My thinking is that once the frontend and backend start using the
   esoteric features of v2 we can rip this patch out. And also implement
   the proper code for PVHVM/PVH to actually use v2 grants.



^ permalink raw reply	[flat|nested] 8+ messages in thread
* [PATCH] xen/grant-table: Force to use v1 of grants.
@ 2013-01-16 21:22 Konrad Rzeszutek Wilk
  2013-01-17 12:22 ` Matt Wilson
  2013-01-17 13:12 ` Ian Campbell
  0 siblings, 2 replies; 8+ messages in thread
From: Konrad Rzeszutek Wilk @ 2013-01-16 21:22 UTC (permalink / raw)
  To: linux-kernel, xen-devel; +Cc: Konrad Rzeszutek Wilk, annie.li, msw

We have the framework to use v2, but there are no backends that
actually use it. The end result is that on PV we use v2 grants
and on PVHVM v1. The v1 has a capacity of 512 grants per page while
the v2 has 256 grants per page. This means we lose about 50%
capacity - and if we want more than 16 VIFs (each VIF takes
512 grants), then we are hitting the max per guest of 32.

Note: The hypervisor provides an over-ride for the default
of 32 frames (pages) per guest: gnttab_max_nr_frames=X

Oracle-bug: 16039922
CC: annie.li@oracle.com
CC: msw@amazon.com
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
---
 drivers/xen/grant-table.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
index 95ce9d0..568fd8f 100644
--- a/drivers/xen/grant-table.c
+++ b/drivers/xen/grant-table.c
@@ -1108,10 +1108,8 @@ static void gnttab_request_version(void)
 	int rc;
 	struct gnttab_set_version gsv;
 
-	if (xen_hvm_domain())
-		gsv.version = 1;
-	else
-		gsv.version = 2;
+	gsv.version = 1;
+
 	rc = HYPERVISOR_grant_table_op(GNTTABOP_set_version, &gsv, 1);
 	if (rc == 0 && gsv.version == 2) {
 		grant_table_version = 2;
-- 
1.8.0.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-01-02 19:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-31 15:15 Konrad Rzeszutek Wilk
2013-12-31 15:15 ` [PATCH] xen/grant-table: Force to use v1 of grants Konrad Rzeszutek Wilk
2014-01-02 14:54   ` [Xen-devel] " David Vrabel
2014-01-02 19:17     ` Konrad Rzeszutek Wilk
  -- strict thread matches above, loose matches on Subject: below --
2013-01-16 21:22 Konrad Rzeszutek Wilk
2013-01-17 12:22 ` Matt Wilson
2013-01-17 13:05   ` [Xen-devel] " Jan Beulich
2013-01-18  2:32     ` konrad wilk
2013-01-17 13:12 ` Ian Campbell
2013-01-18 14:46   ` Konrad Rzeszutek Wilk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox