[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] linux: Prefer testing io_bitmap_ptr to the TIF_IO_BITMAP.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1173104426 0
# Node ID 2963f61b8135dc2eac21b695c90a76a6bf970c44
# Parent  4159a8a43a97441404edeeccd3534c9282795b4a
linux: Prefer testing io_bitmap_ptr to the TIF_IO_BITMAP.
Former is safer (in case TIF_IO_BITMAP is out-of-sync with actual
existence of an I/O bitmap for this process) and more readable, and
probably results in faster code too.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff -r 4159a8a43a97 -r 2963f61b8135 
linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c
--- a/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c       Mon Mar 05 
14:09:19 2007 +0000
+++ b/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c       Mon Mar 05 
14:20:26 2007 +0000
@@ -605,8 +605,7 @@ struct task_struct fastcall * __switch_t
                mcl++;
        }
 
-       if (unlikely(test_tsk_thread_flag(prev_p, TIF_IO_BITMAP)
-                    || test_tsk_thread_flag(next_p, TIF_IO_BITMAP))) {
+       if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr)) {
                iobmp_op.bitmap   = (char *)next->io_bitmap_ptr;
                iobmp_op.nr_ports = next->io_bitmap_ptr ? IO_BITMAP_BITS : 0;
                mcl->op      = __HYPERVISOR_physdev_op;

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.