VirtualBox

Ticket #12638: VBox-numa_no_reset.diff

File VBox-numa_no_reset.diff, 1.5 KB (added by Fate, 11 years ago)

First version of a patch that explicitly handles distro backports

  • src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c

     
    6666#endif
    6767
    6868
     69/*
     70 * Distribution kernels like to backport things so that we can't always rely
     71 * on Linux kernel version numbers to detect kernel features.
     72 */
     73#ifdef CONFIG_SUSE_KERNEL
     74# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0)
     75# define NUMA_NO_RESET
     76# endif
     77#elif LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
     78# define NUMA_NO_RESET
     79#endif
     80
    6981/*******************************************************************************
    7082*   Structures and Typedefs                                                    *
    7183*******************************************************************************/
     
    15331545                /** @todo Ugly hack! But right now we have no other means to disable
    15341546                 *        automatic NUMA page balancing. */
    15351547# ifdef RT_OS_X86
    1536 #  if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
     1548#  ifndef NUMA_NO_RESET
    15371549                pTask->mm->numa_next_reset = jiffies + 0x7fffffffUL;
    15381550#  endif
    15391551                pTask->mm->numa_next_scan  = jiffies + 0x7fffffffUL;
    15401552# else
    1541 #  if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
     1553#  ifndef NUMA_NO_RESET
    15421554                pTask->mm->numa_next_reset = jiffies + 0x7fffffffffffffffUL;
    15431555#  endif
    15441556                pTask->mm->numa_next_scan  = jiffies + 0x7fffffffffffffffUL;

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy