WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] linux pciback/pcifront: work queue management fixes

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux pciback/pcifront: work queue management fixes
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Thu, 19 Mar 2009 08:16:50 +0000
Delivery-date: Thu, 19 Mar 2009 01:17:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
flush_scheduled_work() only flushes work queued to the global
keventd_wq, but pciback is using its own local work queue, so that is
what needs to be flushed.

Calling cancel_delayed_work() on something never inserted through
queue_delayed_work() or schedule_delayed_work() is pointless.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

--- head-2009-03-18.orig/drivers/xen/pciback/xenbus.c   2009-03-18 
10:39:32.000000000 +0100
+++ head-2009-03-18/drivers/xen/pciback/xenbus.c        2009-03-19 
08:53:57.000000000 +0100
@@ -53,10 +53,9 @@ static void pciback_disconnect(struct pc
                pdev->evtchn_irq = INVALID_EVTCHN_IRQ;
        }
 
-       /* If the driver domain started an op, make sure we complete it or
-        * delete it before releasing the shared memory */
-       cancel_delayed_work(&pdev->op_work);
-       flush_scheduled_work();
+       /* If the driver domain started an op, make sure we complete it
+        * before releasing the shared memory */
+       flush_workqueue(pciback_wq);
 
        if (pdev->sh_info != NULL) {
                xenbus_unmap_ring_vfree(pdev->xdev, pdev->sh_area);
--- head-2009-03-18.orig/drivers/xen/pcifront/xenbus.c  2009-03-18 
10:39:32.000000000 +0100
+++ head-2009-03-18/drivers/xen/pcifront/xenbus.c       2009-03-19 
08:57:29.000000000 +0100
@@ -64,7 +64,6 @@ static void free_pdev(struct pcifront_de
        pcifront_free_roots(pdev);
 
        /*For PCIE_AER error handling job*/
-       cancel_delayed_work(&pdev->op_work);
        flush_scheduled_work();
        unbind_from_irqhandler(pdev->evtchn, pdev);
 




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux pciback/pcifront: work queue management fixes, Jan Beulich <=