Skip to content
  1. Sep 25, 2013
  2. Sep 12, 2013
  3. Sep 10, 2013
    • Konrad Rzeszutek Wilk's avatar
      xen/spinlock: Don't use __initdate for xen_pv_spin · c3b7cb1f
      Konrad Rzeszutek Wilk authored
      
      
      As we get compile warnings about .init.data being
      used by non-init functions.
      
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      c3b7cb1f
    • Konrad Rzeszutek Wilk's avatar
      Revert "xen/spinlock: Disable IRQ spinlock (PV) allocation on PVHVM" · fb78e58c
      Konrad Rzeszutek Wilk authored
      This reverts commit 70dd4998
      
      .
      
      Now that the bugs have been resolved we can re-enable the
      PV ticketlock implementation under PVHVM Xen guests.
      
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reviewed-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      fb78e58c
    • Konrad Rzeszutek Wilk's avatar
      xen/spinlock: Don't setup xen spinlock IPI kicker if disabled. · 3310bbed
      Konrad Rzeszutek Wilk authored
      
      
      There is no need to setup this kicker IPI if we are never going
      to use the paravirtualized ticketlock mechanism.
      
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reviewed-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      3310bbed
    • Konrad Rzeszutek Wilk's avatar
      xen/smp: Update pv_lock_ops functions before alternative code starts under PVHVM · 26a79995
      Konrad Rzeszutek Wilk authored
      Before this patch we would patch all of the pv_lock_ops sites
      using alternative assembler. Then later in the bootup cycle
      change the unlock_kick and lock_spinning to the Xen specific -
      without re patching.
      
      That meant that for the core of the kernel we would be running
      with the baremetal version of unlock_kick and lock_spinning while
      for modules we would have the proper Xen specific slowpaths.
      
      As most of the module uses some API from the core kernel that ended
      up with slowpath lockers waiting forever to be kicked (b/c they
      would be using the Xen specific slowpath logic). And the
      kick never came b/c the unlock path that was taken was the
      baremetal one.
      
      On PV we do not have the problem as we initialise before the
      alternative code kicks in.
      
      The fix is to make the updating of the pv_lock_ops function
      be done before the alternative code starts patching.
      
      Note that this patch fixes issues discovered by commit
      f10cd522.
      ("xen: disable PV spinlocks on HVM") wherein it mentioned
      
         PV spinlocks cannot possibly work with the current code because they are
         enabled after pvops patching has already been done, and because PV
         spinlocks use a different data structure than native spinlocks so we
         cannot switch between them dynamically.
      
      The first problem is solved by this patch.
      
      The second problem has been solved by commit
      816434ec
      (Merge branch 'x86-spinlocks-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip)
      
      P.S.
      There is still the commit 70dd4998
      
      
      (xen/spinlock: Disable IRQ spinlock (PV) allocation on PVHVM) to
      revert but that can be done later after all other bugs have been
      fixed.
      
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reviewed-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      26a79995
    • Konrad Rzeszutek Wilk's avatar
      xen/spinlock: We don't need the old structure anymore · 6055aaf8
      Konrad Rzeszutek Wilk authored
      
      
      As we are using the generic ticketlock structs and these
      old structures are not needed anymore.
      
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reviewed-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      6055aaf8
    • Konrad Rzeszutek Wilk's avatar
      xen/spinlock: Fix locking path engaging too soon under PVHVM. · 1fb3a8b2
      Konrad Rzeszutek Wilk authored
      The xen_lock_spinning has a check for the kicker interrupts
      and if it is not initialized it will spin normally (not enter
      the slowpath).
      
      But for PVHVM case we would initialize the kicker interrupt
      before the CPU came online. This meant that if the booting
      CPU used a spinlock and went in the slowpath - it would
      enter the slowpath and block forever. The forever part because
      during bootup: the spinlock would be taken _before_ the CPU
      sets itself to be online (more on this further), and we enter
      to poll on the event channel forever.
      
      The bootup CPU (see commit fc78d343
      
      
      "xen/smp: initialize IPI vectors before marking CPU online"
      for details) and the CPU that started the bootup consult
      the cpu_online_mask to determine whether the booting CPU should
      get an IPI. The booting CPU has to set itself in this mask via:
      
        set_cpu_online(smp_processor_id(), true);
      
      However, if the spinlock is taken before this (and it is) and
      it polls on an event channel - it will never be woken up as
      the kernel will never send an IPI to an offline CPU.
      
      Note that the PVHVM logic in sending IPIs is using the HVM
      path which has numerous checks using the cpu_online_mask
      and cpu_active_mask. See above mention git commit for details.
      
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Reviewed-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
      1fb3a8b2
    • Konrad Rzeszutek Wilk's avatar
      Merge tag 'v3.11-rc7' into stable/for-linus-3.12 · 65320fce
      Konrad Rzeszutek Wilk authored
      
      
      Linux 3.11-rc7
      
      As we need the git commit 28817e9de4f039a1a8c1fe1df2fa2df524626b9e
      Author: Chuck Anderson <chuck.anderson@oracle.com>
      Date:   Tue Aug 6 15:12:19 2013 -0700
      
          xen/smp: initialize IPI vectors before marking CPU online
      
      * tag 'v3.11-rc7': (443 commits)
        Linux 3.11-rc7
        ARC: [lib] strchr breakage in Big-endian configuration
        VFS: collect_mounts() should return an ERR_PTR
        bfs: iget_locked() doesn't return an ERR_PTR
        efs: iget_locked() doesn't return an ERR_PTR()
        proc: kill the extra proc_readfd_common()->dir_emit_dots()
        cope with potentially long ->d_dname() output for shmem/hugetlb
        usb: phy: fix build breakage
        USB: OHCI: add missing PCI PM callbacks to ohci-pci.c
        staging: comedi: bug-fix NULL pointer dereference on failed attach
        lib/lz4: correct the LZ4 license
        memcg: get rid of swapaccount leftovers
        nilfs2: fix issue with counting number of bio requests for BIO_EOPNOTSUPP error detection
        nilfs2: remove double bio_put() in nilfs_end_bio_write() for BIO_EOPNOTSUPP error
        drivers/platform/olpc/olpc-ec.c: initialise earlier
        ipv4: expose IPV4_DEVCONF
        ipv6: handle Redirect ICMP Message with no Redirected Header option
        be2net: fix disabling TX in be_close()
        Revert "ACPI / video: Always call acpi_video_init_brightness() on init"
        Revert "genetlink: fix family dump race"
        ...
      
      Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      65320fce
    • Konrad Rzeszutek Wilk's avatar
      Merge branch 'x86/spinlocks' of... · c3f31f6a
      Konrad Rzeszutek Wilk authored
      Merge branch 'x86/spinlocks' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into stable/for-linus-3.12
      
      * 'x86/spinlocks' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/kvm/guest: Fix sparse warning: "symbol 'klock_waiting' was not declared as static"
        kvm: Paravirtual ticketlocks support for linux guests running on KVM hypervisor
        kvm guest: Add configuration support to enable debug information for KVM Guests
        kvm uapi: Add KICK_CPU and PV_UNHALT definition to uapi
        xen, pvticketlock: Allow interrupts to be enabled while blocking
        x86, ticketlock: Add slowpath logic
        jump_label: Split jumplabel ratelimit
        x86, pvticketlock: When paravirtualizing ticket locks, increment by 2
        x86, pvticketlock: Use callee-save for lock_spinning
        xen, pvticketlocks: Add xen_nopvspin parameter to disable xen pv ticketlocks
        xen, pvticketlock: Xen implementation for PV ticket locks
        xen: Defer spinlock setup until boot CPU setup
        x86, ticketlock: Collapse a layer of functions
        x86, ticketlock: Don't inline _spin_unlock when using paravirt spinlocks
        x86, spinlock: Replace pv spinlocks with pv ticketlocks
      c3f31f6a
  4. Sep 09, 2013
  5. Aug 31, 2013
  6. Aug 30, 2013
  7. Aug 26, 2013
  8. Aug 25, 2013
  9. Aug 24, 2013