* [PATCH] Input: xen-kbdfront - free grant table entry in xenkbd_disconnect_backend
@ 2014-10-11 8:33 hansechang
0 siblings, 0 replies; 6+ messages in thread
From: hansechang @ 2014-10-11 8:33 UTC (permalink / raw)
To: linux-kernel, xen-devel; +Cc: Ian.Campbell, dgdegra, jinsong.liu, Chang Huaixin
From: Chang Huaixin <huaixin.chx@alibaba-inc.com>
xenkbd_disconnect_backend doesn't free grant table entry.
This bug affects live migration.
xenkbd_disconnect_backend uses gnttab_end_foreign_access_ref
to handle grant table entry which doesn't really free an entry.
Thus every time we do xenkbd_resume, grant table entry increses
by one. As an grant table entry occupies 8 bytes, an grant table
page has at most 512 entries. Every 512 times we do xenkdb_resume,
grant table pages increses by one.
After around 3500 times of live migration, grant table pages
will increase by 7, causing too many pages to populate and hitting
max_pages limit when assigning pages.Thus assign_pages will fail,
so will live migration.
Signed-off-by: Chang Huaixin <huaixin.chx@alibaba-inc.com>
---
drivers/input/misc/xen-kbdfront.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
index fbfdc10..e2ecfc6 100644
--- a/drivers/input/misc/xen-kbdfront.c
+++ b/drivers/input/misc/xen-kbdfront.c
@@ -285,7 +285,7 @@ static int xenkbd_connect_backend(struct xenbus_device *dev,
error_evtchan:
xenbus_free_evtchn(dev, evtchn);
error_grant:
- gnttab_end_foreign_access_ref(info->gref, 0);
+ gnttab_end_foreign_access(info->gref, 0, 0UL);
info->gref = -1;
return ret;
}
@@ -296,7 +296,7 @@ static void xenkbd_disconnect_backend(struct xenkbd_info *info)
unbind_from_irqhandler(info->irq, info);
info->irq = -1;
if (info->gref >= 0)
- gnttab_end_foreign_access_ref(info->gref, 0);
+ gnttab_end_foreign_access(info->gref, 0, 0UL);
info->gref = -1;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Input: xen-kbdfront - free grant table entry in xenkbd_disconnect_backend
2014-10-16 16:01 ` [Xen-devel] " David Vrabel
@ 2014-10-16 20:37 ` Dmitry Torokhov
0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Torokhov @ 2014-10-16 20:37 UTC (permalink / raw)
To: David Vrabel
Cc: Ian.Campbell, hansechang, jinsong.liu, linux-kernel, xen-devel,
Chang Huaixin, dgdegra, boris.ostrovsky
On Thu, Oct 16, 2014 at 05:01:09PM +0100, David Vrabel wrote:
> On 16/10/14 02:46, hansechang@gmail.com wrote:
> > From: Chang Huaixin <huaixin.chx@alibaba-inc.com>
> >
> > xenkbd_disconnect_backend doesn't free grant table entry.
> > This bug affects live migration.
> >
> > xenkbd_disconnect_backend uses gnttab_end_foreign_access_ref
> > to handle grant table entry which doesn't really free an entry.
> >
> > Thus every time we do xenkbd_resume, grant table entry increses
> > by one. As an grant table entry occupies 8 bytes, an grant table
> > page has at most 512 entries. Every 512 times we do xenkdb_resume,
> > grant table pages increses by one.
> >
> > After around 3500 times of live migration, grant table pages
> > will increase by 7, causing too many pages to populate and hitting
> > max_pages limit when assigning pages.Thus assign_pages will fail,
> > so will live migration.
>
> Acked-by: David Vrabel <david.vrabel@citrix.com>
>
> This need to be send to the input subsystem maintainers.
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Input: xen-kbdfront - free grant table entry in xenkbd_disconnect_backend
2014-10-16 1:46 hansechang
2014-10-16 16:01 ` [Xen-devel] " David Vrabel
@ 2014-10-16 16:01 ` David Vrabel
1 sibling, 0 replies; 6+ messages in thread
From: David Vrabel @ 2014-10-16 16:01 UTC (permalink / raw)
To: hansechang, linux-kernel, xen-devel
Cc: Ian.Campbell, jinsong.liu, Chang Huaixin, david.vrabel, dgdegra,
boris.ostrovsky
On 16/10/14 02:46, hansechang@gmail.com wrote:
> From: Chang Huaixin <huaixin.chx@alibaba-inc.com>
>
> xenkbd_disconnect_backend doesn't free grant table entry.
> This bug affects live migration.
>
> xenkbd_disconnect_backend uses gnttab_end_foreign_access_ref
> to handle grant table entry which doesn't really free an entry.
>
> Thus every time we do xenkbd_resume, grant table entry increses
> by one. As an grant table entry occupies 8 bytes, an grant table
> page has at most 512 entries. Every 512 times we do xenkdb_resume,
> grant table pages increses by one.
>
> After around 3500 times of live migration, grant table pages
> will increase by 7, causing too many pages to populate and hitting
> max_pages limit when assigning pages.Thus assign_pages will fail,
> so will live migration.
Acked-by: David Vrabel <david.vrabel@citrix.com>
This need to be send to the input subsystem maintainers.
David
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] Input: xen-kbdfront - free grant table entry in xenkbd_disconnect_backend
@ 2014-10-16 1:46 hansechang
2014-10-16 16:01 ` [Xen-devel] " David Vrabel
2014-10-16 16:01 ` David Vrabel
0 siblings, 2 replies; 6+ messages in thread
From: hansechang @ 2014-10-16 1:46 UTC (permalink / raw)
To: linux-kernel, xen-devel
Cc: konrad.wilk, boris.ostrovsky, david.vrabel, Ian.Campbell,
dgdegra, jinsong.liu, Chang Huaixin
From: Chang Huaixin <huaixin.chx@alibaba-inc.com>
xenkbd_disconnect_backend doesn't free grant table entry.
This bug affects live migration.
xenkbd_disconnect_backend uses gnttab_end_foreign_access_ref
to handle grant table entry which doesn't really free an entry.
Thus every time we do xenkbd_resume, grant table entry increses
by one. As an grant table entry occupies 8 bytes, an grant table
page has at most 512 entries. Every 512 times we do xenkdb_resume,
grant table pages increses by one.
After around 3500 times of live migration, grant table pages
will increase by 7, causing too many pages to populate and hitting
max_pages limit when assigning pages.Thus assign_pages will fail,
so will live migration.
Signed-off-by: Chang Huaixin <huaixin.chx@alibaba-inc.com>
---
drivers/input/misc/xen-kbdfront.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
index fbfdc10..e2ecfc6 100644
--- a/drivers/input/misc/xen-kbdfront.c
+++ b/drivers/input/misc/xen-kbdfront.c
@@ -285,7 +285,7 @@ static int xenkbd_connect_backend(struct xenbus_device *dev,
error_evtchan:
xenbus_free_evtchn(dev, evtchn);
error_grant:
- gnttab_end_foreign_access_ref(info->gref, 0);
+ gnttab_end_foreign_access(info->gref, 0, 0UL);
info->gref = -1;
return ret;
}
@@ -296,7 +296,7 @@ static void xenkbd_disconnect_backend(struct xenkbd_info *info)
unbind_from_irqhandler(info->irq, info);
info->irq = -1;
if (info->gref >= 0)
- gnttab_end_foreign_access_ref(info->gref, 0);
+ gnttab_end_foreign_access(info->gref, 0, 0UL);
info->gref = -1;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] Input: xen-kbdfront - free grant table entry in xenkbd_disconnect_backend
@ 2014-10-16 1:46 hansechang
0 siblings, 0 replies; 6+ messages in thread
From: hansechang @ 2014-10-16 1:46 UTC (permalink / raw)
To: linux-kernel, xen-devel
Cc: Chang Huaixin, jinsong.liu, Ian.Campbell, david.vrabel, dgdegra,
boris.ostrovsky
From: Chang Huaixin <huaixin.chx@alibaba-inc.com>
xenkbd_disconnect_backend doesn't free grant table entry.
This bug affects live migration.
xenkbd_disconnect_backend uses gnttab_end_foreign_access_ref
to handle grant table entry which doesn't really free an entry.
Thus every time we do xenkbd_resume, grant table entry increses
by one. As an grant table entry occupies 8 bytes, an grant table
page has at most 512 entries. Every 512 times we do xenkdb_resume,
grant table pages increses by one.
After around 3500 times of live migration, grant table pages
will increase by 7, causing too many pages to populate and hitting
max_pages limit when assigning pages.Thus assign_pages will fail,
so will live migration.
Signed-off-by: Chang Huaixin <huaixin.chx@alibaba-inc.com>
---
drivers/input/misc/xen-kbdfront.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
index fbfdc10..e2ecfc6 100644
--- a/drivers/input/misc/xen-kbdfront.c
+++ b/drivers/input/misc/xen-kbdfront.c
@@ -285,7 +285,7 @@ static int xenkbd_connect_backend(struct xenbus_device *dev,
error_evtchan:
xenbus_free_evtchn(dev, evtchn);
error_grant:
- gnttab_end_foreign_access_ref(info->gref, 0);
+ gnttab_end_foreign_access(info->gref, 0, 0UL);
info->gref = -1;
return ret;
}
@@ -296,7 +296,7 @@ static void xenkbd_disconnect_backend(struct xenkbd_info *info)
unbind_from_irqhandler(info->irq, info);
info->irq = -1;
if (info->gref >= 0)
- gnttab_end_foreign_access_ref(info->gref, 0);
+ gnttab_end_foreign_access(info->gref, 0, 0UL);
info->gref = -1;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] Input: xen-kbdfront - free grant table entry in xenkbd_disconnect_backend
@ 2014-10-11 8:33 hansechang
0 siblings, 0 replies; 6+ messages in thread
From: hansechang @ 2014-10-11 8:33 UTC (permalink / raw)
To: linux-kernel, xen-devel; +Cc: Ian.Campbell, jinsong.liu, dgdegra, Chang Huaixin
From: Chang Huaixin <huaixin.chx@alibaba-inc.com>
xenkbd_disconnect_backend doesn't free grant table entry.
This bug affects live migration.
xenkbd_disconnect_backend uses gnttab_end_foreign_access_ref
to handle grant table entry which doesn't really free an entry.
Thus every time we do xenkbd_resume, grant table entry increses
by one. As an grant table entry occupies 8 bytes, an grant table
page has at most 512 entries. Every 512 times we do xenkdb_resume,
grant table pages increses by one.
After around 3500 times of live migration, grant table pages
will increase by 7, causing too many pages to populate and hitting
max_pages limit when assigning pages.Thus assign_pages will fail,
so will live migration.
Signed-off-by: Chang Huaixin <huaixin.chx@alibaba-inc.com>
---
drivers/input/misc/xen-kbdfront.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/input/misc/xen-kbdfront.c b/drivers/input/misc/xen-kbdfront.c
index fbfdc10..e2ecfc6 100644
--- a/drivers/input/misc/xen-kbdfront.c
+++ b/drivers/input/misc/xen-kbdfront.c
@@ -285,7 +285,7 @@ static int xenkbd_connect_backend(struct xenbus_device *dev,
error_evtchan:
xenbus_free_evtchn(dev, evtchn);
error_grant:
- gnttab_end_foreign_access_ref(info->gref, 0);
+ gnttab_end_foreign_access(info->gref, 0, 0UL);
info->gref = -1;
return ret;
}
@@ -296,7 +296,7 @@ static void xenkbd_disconnect_backend(struct xenkbd_info *info)
unbind_from_irqhandler(info->irq, info);
info->irq = -1;
if (info->gref >= 0)
- gnttab_end_foreign_access_ref(info->gref, 0);
+ gnttab_end_foreign_access(info->gref, 0, 0UL);
info->gref = -1;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-10-16 20:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-11 8:33 [PATCH] Input: xen-kbdfront - free grant table entry in xenkbd_disconnect_backend hansechang
2014-10-11 8:33 hansechang
2014-10-16 1:46 hansechang
2014-10-16 1:46 hansechang
2014-10-16 16:01 ` [Xen-devel] " David Vrabel
2014-10-16 20:37 ` Dmitry Torokhov
2014-10-16 16:01 ` David Vrabel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.