All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Lalancette <clalance@redhat.com>
To: xen-devel@lists.xensource.com
Cc: john.haxby@oracle.com
Subject: [PATCH]: Only start one xenfb kthread
Date: Thu, 03 Dec 2009 12:48:47 +0100	[thread overview]
Message-ID: <4B17A59F.7040301@redhat.com> (raw)

[-- 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

                 reply	other threads:[~2009-12-03 11:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4B17A59F.7040301@redhat.com \
    --to=clalance@redhat.com \
    --cc=john.haxby@oracle.com \
    --cc=xen-devel@lists.xensource.com \
    /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 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.