1. 03 Jun, 2015 3 commits
    • Ian Munsie's avatar
      cxl: Use call_rcu to reduce latency when releasing the afu fd · 8ac75b96
      Ian Munsie authored
      The afu fd release path was identified as a significant bottleneck in
      the overall performance of cxl. While an optimal AFU design would
      minimise the need to close & reopen the AFU fd, it is not always
      practical to avoid.
      
      The bottleneck seems to be down to the call to synchronize_rcu(), which
      will block until every other thread is guaranteed to be out of an RCU
      critical section. Replace it with call_rcu() to free the context
      structures later so we can return to the application sooner.
      
      This reduces the time spent in the fd release path from 13356 usec to
      13.3 usec - about a 100x speed up.
      Reported-by: default avatarFei K Chen <uchen@cn.ibm.com>
      Signed-off-by: default avatarIan Munsie <imunsie@au1.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      8ac75b96
    • Vaibhav Jain's avatar
      cxl: Export AFU error buffer via sysfs · e36f6fe1
      Vaibhav Jain authored
      Export the "AFU Error Buffer" via sysfs attribute (afu_err_buf). AFU
      error buffer is used by the AFU to report application specific
      errors. The contents of this buffer are AFU specific and are intended to
      be interpreted by the application interacting with the afu.
      Suggested-by: default avatarMichael Neuling <mikey@neuling.org>
      Signed-off-by: default avatarVaibhav Jain <vaibhav@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      e36f6fe1
    • Vaibhav Jain's avatar
      cxl: Implement an ioctl to fetch afu card-id, offset-id and mode · 27d4dc71
      Vaibhav Jain authored
      Given a file descriptor on an afu device, libcxl currently uses the
      major/minor number obtained from fstat on the fd to construct path to
      the afu's sysfs directory. However it is possible that rather than using
      one of the device in /dev/cxl, a kernel driver creates its own device
      which export generic cxl interface to the userspace. This causes
      problems with libcxl as it tries to use a wrong major/minor number to
      construct the sysfs path and fail.
      
      So this patch introduces a new ioctl called CXL_IOCTL_GET_AFU_ID on the
      afu file descriptor to fetch the cxl_afu_id struct that holds the
      card/offset-id and mode information. These info is then used by libcxl to
      construct the correct path to the afu sysfs directory.
      
      Testing:
      	- Build against pseries be/le configs
      	- Testing with corresponding libcxl changes to verify that it constructs
      	  right sysfs path to the afu.
      Signed-off-by: default avatarVaibhav Jain <vaibhav@linux.vnet.ibm.com>
      Acked-by: default avatarIan Munsie <imunsie@au1.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      27d4dc71
  2. 02 Jun, 2015 18 commits
  3. 22 May, 2015 15 commits
  4. 20 May, 2015 1 commit
    • Laurent Dufour's avatar
      powerpc: Enable sys_kcmp() for CRIU · 7978f76c
      Laurent Dufour authored
      The commit 8170a83f ("powerpc: Wireup the kcmp syscall to sys_ni") has
      disabled the kcmp syscall for powerpc.  This has been done due to the use
      of unsigned long parameters which may require a dedicated wrapper to handle
      32bit process on top of 64bit kernel.  However in the kcmp() case, the 2
      unsigned long parameters are currently only used to carry file descriptors
      from user space to the kernel.  Since such a parameter is passed through
      register, and file descriptor doesn't need to get extended, there is,
      today, no need for a wrapper.
      
      In the case there will be a need to pass address in or out of this system
      call, then a wrapper could be required, it will then be to care of it.
      
      As today this is not the case, it is safe to enable kcmp() on powerpc.
      
      Tested (by Laurent) on 64-bit, 32-bit, and 32-bit userspace on 64-bit
      kernel using tools/testing/selftests/kcmp [mpe].
      Signed-off-by: default avatarLaurent Dufour <ldufour@linux.vnet.ibm.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      7978f76c
  5. 18 May, 2015 1 commit
  6. 13 May, 2015 2 commits