* [PATCH]: Only start one xenfb kthread
@ 2009-12-03 11:48 Chris Lalancette
0 siblings, 0 replies; only message in thread
From: Chris Lalancette @ 2009-12-03 11:48 UTC (permalink / raw)
To: xen-devel; +Cc: john.haxby
[-- Attachment #1: Type: text/plain, Size: 659 bytes --]
All,
When doing save/restore testing with the linux-2.6.18-xen.hg tree,
it was discovered that every time a restore happened we would get a
new xenfb thread. While the framebuffer continues to work, this is
an obvious resource leak. The attached patch only starts up a new xenfb
thread the first time the backend connects, and continues to re-use that
in the future. Jeremy's upstream LKML tree doesn't suffer from this
since it uses a completely different mechanism to do screen updates.
Original patch from John Haxby @ Oracle; slightly modified by me to apply
to the linux-2.6.18-xen.hg tree.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
[-- Attachment #2: linux-2.6.18-xen.hg-fbfront-one-kthread.patch --]
[-- Type: text/plain, Size: 414 bytes --]
diff --git a/drivers/xen/fbfront/xenfb.c b/drivers/xen/fbfront/xenfb.c
--- a/drivers/xen/fbfront/xenfb.c
+++ b/drivers/xen/fbfront/xenfb.c
@@ -831,7 +831,7 @@ static void xenfb_backend_changed(struct
"request-update", "%d", &val) < 0)
val = 0;
- if (val){
+ if (val && !info->kthread) {
info->kthread = kthread_run(xenfb_thread, info,
"xenfb thread");
if (IS_ERR(info->kthread)) {
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-12-03 11:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-03 11:48 [PATCH]: Only start one xenfb kthread Chris Lalancette
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.