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/blktap2: eliminate bogus clearing of PG_reserv

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux/blktap2: eliminate bogus clearing of PG_reserved
From: "Jan Beulich" <JBeulich@xxxxxxxxxx>
Date: Tue, 10 Aug 2010 15:04:43 +0100
Cc: dmeyer@xxxxxxxxx, Jeremy Fitzhardinge <jeremy@xxxxxxxx>, jake.wires@xxxxxxxxxx
Delivery-date: Tue, 10 Aug 2010 07:04:56 -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
While making sure PG_reserved is set for pages allocated from the
balloon driver (and to be used for I/O) is a necessary thing to do
(as 2.6.18's as well as pv-ops' balloon drivers don't guarantee this
for the pages returned from alloc_empty_pages_and_page_vec()),
clearing this flag again when a page is no longer in use for I/O is
bogus at best (after all, the page at that point is not associated
with any MFN anymore), and causes problems when the balloon driver
properly marks all such pages as reserved and checks, upon their
return, that they are still marked this way.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Cc: Jake Wires <Jake.Wires@xxxxxxxxxx>
Cc: Dutch Meyer <dmeyer@xxxxxxxxx>
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>

--- a/drivers/xen/blktap2/device.c
+++ b/drivers/xen/blktap2/device.c
@@ -281,7 +281,6 @@ blktap_device_fast_flush(struct blktap *
 
                page = map[offset];
                if (page) {
-                       ClearPageReserved(map[offset]);
                        if (PageBlkback(page)) {
                                ClearPageBlkback(page);
                                set_page_private(page, 0);
--- a/drivers/xen/blktap2/ring.c
+++ b/drivers/xen/blktap2/ring.c
@@ -112,12 +112,9 @@ blktap_ring_clear_pte(struct vm_area_str
 
        offset  = (int)((uvaddr - vma->vm_start) >> PAGE_SHIFT);
        page    = map[offset];
-       if (page) {
-               ClearPageReserved(page);
-               if (PageBlkback(page)) {
-                       ClearPageBlkback(page);
-                       set_page_private(page, 0);
-               }
+       if (page && PageBlkback(page)) {
+               ClearPageBlkback(page);
+               set_page_private(page, 0);
        }
        map[offset] = NULL;
 



Attachment: xenlinux-blktap2-ClearPageReserved.patch
Description: Text document

_______________________________________________
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/blktap2: eliminate bogus clearing of PG_reserved, Jan Beulich <=